[OpenLayers-Users] GeoExt & OpenLayers

BMcBride bmcbride at chacompanies.com
Fri Aug 6 09:26:20 EDT 2010


I guess I was taking this literally... 

petrus451 wrote:
> 
> I have some OpenLayers code that changes map layers as one zooms in and
> out.
> 
So the question becomes what map layer changes are required on zoom? Do you
want to set layer visibility? You could set a zoomend map event like this:


map.events.register('zoomend', this, function() { 
if (map.getZoom() >=10)
{
mylayer.setVisibility(false);
}
if (map.getZoom() < 10)
{
mylayer.setVisibility(true);
}
});


-----
Bryan R. McBride, GISP
http://www.bryanmcbride.com bryanmcbride.com 
http://geoserving.net/ geoserving.net 
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-tp5380045p5380546.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list