[OpenLayers-Users] RC 2.5 may be problem with untiled vs singletile

Christopher Schmidt crschmidt at metacarta.com
Tue Sep 18 13:23:46 EDT 2007


On Tue, Sep 18, 2007 at 11:04:13AM -0600, Linda Rawson wrote:
> Okay.  I ran the example http://www.openlayers.org/dev/examples/notile.html
> 
> When I look at the rendered source I see for "WMS.Untiled" layer only one
> div with a request for the service:
> 
> <DIV style="LEFT: -99px; OVERFLOW: hidden; WIDTH: 597px; POSITION: absolute;
> TOP: -99px; HEIGHT: 597px"><IMG class=olTileImage id=OpenLayersDiv59
> style="WIDTH: 597px; POSITION: relative; HEIGHT: 597px; alt:
> OpenLayersDiv59" src="
> http://labs.metacarta.com/wms/vmap0?LAYERS=basic&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_inimage&amp;FORMAT=image%2Fjpeg&amp;SRS=EPSG%3A4326&amp;BBOX=-10.375,23.625,23.375,57.375&amp;WIDTH=597&amp;HEIGHT=597"
> _eventCacheID="OpenLayersDiv59_eventCacheID_60" galleryImg="no"
> viewRequestID="2"></DIV>

You viewed one layer. It requested on image. Good.

> But when I access the other example:
> 
> <DIV style="LEFT: -99px; OVERFLOW: hidden; WIDTH: 597px; POSITION: absolute;
> TOP: -99px; HEIGHT: 597px"><IMG class=olTileImage id=OpenLayersDiv59
> style="WIDTH: 597px; POSITION: relative; HEIGHT: 597px; alt:
> OpenLayersDiv59" src="
> http://labs.metacarta.com/wms/vmap0?LAYERS=basic&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_inimage&amp;FORMAT=image%2Fjpeg&amp;SRS=EPSG%3A4326&amp;BBOX=-10.375,23.625,23.375,57.375&amp;WIDTH=597&amp;HEIGHT=597"
> _eventCacheID="OpenLayersDiv59_eventCacheID_60" galleryImg="no"
> viewRequestID="2"></DIV></DIV>
> <DIV id=OpenLayers.Layer.WMS_42 style="DISPLAY: block; Z-INDEX: 105; WIDTH:
> 100%; POSITION: absolute; HEIGHT: 100%" _eventCacheID="
> OpenLayers.Layer.WMS_42_eventCacheID_44">
> <DIV style="LEFT: 0px; OVERFLOW: hidden; WIDTH: 398px; POSITION: absolute;
> TOP: 0px; HEIGHT: 398px"><IMG class=olTileImage id=OpenLayersDiv66
> style="WIDTH: 398px; POSITION: relative; HEIGHT: 398px; alt:
> OpenLayersDiv66" src="
> http://labs.metacarta.com/wms/vmap0?LAYERS=basic&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_inimage&amp;FORMAT=image%2Fjpeg&amp;SRS=EPSG%3A4326&amp;BBOX=-4.75,29.25,17.75,51.75&amp;WIDTH=398&amp;HEIGHT=398"
> _eventCacheID="OpenLayersDiv66_eventCacheID_67" galleryImg="no"
> viewRequestID="4"></DIV></DIV></DIV>

You viewed a second layer. It hid the first layer (display:none -- you
can't see this in the above snippet because you snipped right below the
layer reference). It then created a second layer, and sent a request.
The first layer (contains Div59) is the Layer.Untiled (as you can see from the
Layer Div ID). The second layer (#42) contains one image (#66).  

> I see TWO divs with the service request in them.  In my case this would slow
> it down because I only want one image on the page for the request.  

If you only want one image on the page, don't add two layers.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list