[OpenLayers-Dev] setting singleTile=true breaks layer ?
Tim Schaub
tschaub at opengeo.org
Mon May 3 20:12:10 EDT 2010
strk wrote:
> Hi all,
> I've been trying to have a control switch a layer between
> 'tiled' and 'singleTile' but hit what looks like a bug.
>
> See the test:
> http://strk.keybit.net/tmp/ol/st.html
>
> The test starts in multi-tiled, clicking on the first bottom-line
> control does an addOptions({singleTile:true}). After that if you
> zoom in you'll see a _single_ tile being loaded but then placed
> as if it was one of a multi-tile set !
>
> This is using http://openlayers.org/api/OpenLayers.js.
>
> Is it a bug ?
>
No, you're working with a property that is meant to be specified at
construction. We should document this as read only.
Without resizing your map viewport, there is not a clean (API supported)
way to change from singleTile false to true.
Layers are cheap, create a new one (or, if you must, call
layer.clearGrid() and layer.setTileSize() - but be prepared to have
things break with future upgrades).
Tim
> --strk;
>
> () Free GIS & Flash consultant/developer
> /\ http://strk.keybit.net/services.html
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
--
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.
More information about the Dev
mailing list