[OpenLayers-Users] how to get current display status of a layer (not its setting)

Christopher Schmidt crschmidt at metacarta.com
Wed Mar 11 13:10:22 EDT 2009


On Wed, Mar 11, 2009 at 11:48:29AM -0500, William Kyngesburye wrote:
> The visibility property tells OL to display a layer, if the scale or  
> resolution is in the range set for the layer.  Is there a way to get  
> the current actual visibility of a layer other than checking the  
> visibility property and comparing the layer's min/max scale properties  
> with the current scale?  IOW, what I'm looking for is a convenience  
> function already built into OL.

var vis = (layer.getVisibility() && layer.calculateInRange());

> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
> 
> First Pogril: Why is life like sticking your head in a bucket filled  
> with hyena offal?
> Second Pogril: I don't know.  Why IS life like sticking your head in a  
> bucket filled with hyena offal?
> First Pogril: I don't know either.  Wretched, isn't it?
> 
> -HitchHiker's Guide to the Galaxy
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list