[OpenLayers-Dev] Alternating base layers
Christopher Schmidt
crschmidt at metacarta.com
Tue Jun 9 10:37:56 EDT 2009
On Tue, Jun 09, 2009 at 04:29:21PM +0200, Ringdahl Niklas wrote:
> Hello list.
>
> I have two different raster layers with different coordinate systems;
> one is a Google Satellite layer and the other is a tiled layer in
> epsg:2400. Depending on scale, I would like to select either as the base
> layer and keep the WMS and WFS overlays independent of which base layer
> is used.
This is not particularly easy with the current version of OpeNLayers.
#1249 is tracking possible additions which would make this easier, but
is not planned for any particular release. In particular, the overlays
-- particularly vector overlays -- would likely need to be refreshed,
which might not happen.
If all of your data is based on BBOX-style requests -- that is, the data
changes when the extents change -- this might 'just work', though when
you change layers, i expect that the center will likely go to the wrong
place, so you'll need to do some work to set/restore that.
-- Chris
> The way I envision this is to add them both to the map and use the
> map.setBaseLayer method to alternate. Is this approach complete, or are
> there other considerations to make, keeping the different reference
> systems in mind? What kind of trouble will I get myself into with this?
>
> I would be happy for any pointer in the right direction on this. Thanks!
>
> - Niklas Ringdahl
>
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
--
Christopher Schmidt
MetaCarta
More information about the Dev
mailing list