[OpenLayers-Users] map.getLayersBy() Question

Christopher Schmidt crschmidt at metacarta.com
Thu Sep 3 07:36:47 EDT 2009


On Wed, Sep 02, 2009 at 03:50:51PM -0600, Bill Thoen wrote:
> I'm trying to use getLayersBy() to select layers for a getFeatureInfo  
> tool, and I can get it to work for one criterion :  
> map.getLayersBy("queryable", true) , but suppose I want to use two  
> criteria, like where queryable and visibleity are BOTH true? I can't  
> seem to get the right syntax.

Probably because there isn't one. getLayersBy is just a convenience
method, though -- you can ether write your own (if you're going
to be doing this a lot) or just loop over the layers and check
the two properties that you care about.

Best Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list