[OpenLayers-Users] show different base layers, depending on zoom level

Maria Panagou snowdrop at ath.forthnet.gr
Sat Jan 12 11:10:36 EST 2008


I would like to have a base layer called 'nomoi' show at startup of my map.
and when the user zooms in, display the google maps as base layer and remove
nomoi. I don't want Google to be added from the start cause I've defined a
specific extent and zoom level for my map, which google doesn't support(has
fixed zoom levels). I'm trying to do so by using the following code but it
doesn't work. google is being added right from the start. am i wrongly using
the if statement?


 if(!map.getResolution()<0.01373291015625) map.addLayers([satellite,
hybrid]);
                hybrid.setVisibility(true);
                map.removeLayers([nomoi]);
-- 
View this message in context: http://www.nabble.com/show-different-base-layers%2C-depending-on-zoom-level-tp14775260p14775260.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list