[OpenLayers-Dev] GeoWebCache and fractionalZoom: addin or feature proposal

Marc Jansen jansen at terrestris.de
Thu Oct 8 16:26:37 EDT 2009


Hi devs,

we develop an OpenLayers application that uses WMS-tiles generated by 
GeoWebCache. But we have the need to allow fractionalZoom as well, 
because the application will sometimes zoom to non-integer scales (when 
we highlight search results, for instance). Without a change to the code 
of OpenLayers these fractional zoomlevels mess up the map (because right 
now GeoWebCache does not act as WMS when being asked for tiles it cannot 
provide).

For the application in question we patched OpenLayers/Layer/WMS.js to 
have an option to use a different baseURL when fractional zoomlevels are 
needed. So when map.zoom is non-integer, we ask the original WMS-Server 
for slow but correct tiles.

I am not sure whether this is possibly a addin, or an additional option 
for WMS-layers. What do you think?

The code in question would introduce a new property 
"alternativeFractionalZoomURL" (name of course TBD) to 
OpenLayers.Layer.WMS-objects and one additional check in the 
WMS.getURL-method (if the map allows fractional zoomlevels AND if the 
alternativeFractionalZoomURL is not empty AND the current map.zoom is 
fractional THEN use the altURL, behave as always in any other case). 
Does this break code elsewhere? We did not have the time to run the 
tests up until now, but maybe you see problems early at this stage.

Regards and thanks for any comments,
Marc

BTW: the new WMS.Post layer looks really promising! Great work!



More information about the Dev mailing list