From: Wigger T. <but...@ho...> - 2011-03-06 21:08:18
|
Dear all, Thank you for your help. unfortunately I haven't solved the problem yet. - My layout is the following: I have a dockpanel as root, and add an Absolute panel (containing the mapwidget) to the center of the Dockpanel.- I have tried both tiled and single tile layers. No real difference in result. Besides GWT I use smartgwt and incubator libraries. I used them before in other projects where they didn't seem to cause any problems. - In my map I dont believe other divs, like the selection element you mentioned, could cause the WMS div to move. Could it help if I send you the link to the application in a private email so you can see what happends? It seems that if I pan the WMS to the top left corner it fits again on the underground (OSM). Thanks again,Willem > Date: Fri, 4 Mar 2011 09:09:59 -0600 > From: Rol...@no... > To: gwt...@li... > Subject: Re: [Gwt-openlayers-users] WMS shifts to wrong location after zooming/panning > > Hi, > > On 03/04/2011 02:30 AM, Edwin Commandeur wrote: > > Are you using plain GWT or some GUI library? > > > > It is OpenLayers that calculates these offsets for tiled layers. > > Apparently it does this in way that does not play nice with GWT. Have > > you tried untiled (get's the whole map image in one go, versus in > > several tiles)? Or is that no option for you? > > I have found that problems like this crop up when the div that contains > the map moves on the page. My solution was to connect a function that > re-centers the map to events that cause the location of the map div to > move on the page. In our case we add and remove some selection elements > above the div pushing it up and down on the page and re-centering the > map each time one of those elements was added/removed fixed the problem. > > Roland > > > public void resizeMap() { > // Do a meaningless little calculation to force the map > to re-calibrate where it is on the page. > int zoom = map.getZoom(); > LonLat center = map.getCenter(); > map.setCenter(center, zoom); > } > > Greetings, > > Edwin > > > > On 3 March 2011 23:30, Wigger Tims<but...@ho...> wrote: > >> Dear List, > >> In my web application using gwt-openlayers 0.5 and GWT 2.04 I am > >> experiencing a rather annoying problem. When I initially load a WMS, it is > >> visualized without a problem. When I zoom, however, the WMS is shifted, most > >> of the time to the south east. After every pan/ zoom action the offset is > >> difference. When I use firebug in firefox I see can see that the DIV that > >> contains the image has a top and left offset as can be seen below: > >> <div style="overflow: hidden; position: absolute; z-index: 1; left: 218px; > >> top: 96px; width: 1004px; height: 496px;"><img id="OpenLayersDiv499" > >> style="width: 1004px; height: 496px; position: relative;" > >> class="olTileImage" > >> src="xxxxxx/deegree/services?FORMAT=image%2Fpng&TRANSPARENT=TRUE&LAYERS=Lakes%20Rwanda&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&_OLSALT=0.7358005342568256&BBOX=3186029.3265993,-283703.63671876,3493000.4269411,-132052.57519532&WIDTH=1004&HEIGHT=496"></div> > >> The image that is returned by Deegree is fine by the way. > >> Does anyone have an idea what is going wrong and what I can do to solve it? > >> Thanks in advance! > >> Best, > >> Willem > >> > >> > >> ------------------------------------------------------------------------------ > >> What You Don't Know About Data Connectivity CAN Hurt You > >> This paper provides an overview of data connectivity, details > >> its effect on application quality, and explores various alternative > >> solutions. http://p.sf.net/sfu/progress-d2d > >> _______________________________________________ > >> Gwt-openlayers-users mailing list > >> Gwt...@li... > >> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > >> > >> > > ------------------------------------------------------------------------------ > > What You Don't Know About Data Connectivity CAN Hurt You > > This paper provides an overview of data connectivity, details > > its effect on application quality, and explores various alternative > > solutions. http://p.sf.net/sfu/progress-d2d > > _______________________________________________ > > Gwt-openlayers-users mailing list > > Gwt...@li... > > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > > ------------------------------------------------------------------------------ > What You Don't Know About Data Connectivity CAN Hurt You > This paper provides an overview of data connectivity, details > its effect on application quality, and explores various alternative > solutions. http://p.sf.net/sfu/progress-d2d > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |