[OpenLayers-Users] how to get layers in a layer

Ryan Williams rwilliams at paqinteractive.com
Mon May 17 12:26:14 EDT 2010


Hi all,

I've searched around on google for a while on this and haven't found an 
answer yet:
Can anyone show me an example of how to get the layers in a openlayers 
wms.layer?
Here's an example:

cities = new OpenLayers.Layer.WMS("US Cities", wms_path,
                     {layers: 'Public:US_Cities'}
);


I'm able to read items like the layer name (which would be "US Cities" 
in the above example, with:
layer.get("layer").name

but haven't had luck with getting the layers listed in the paramaters ( 
{ layers:   })
I want to know how to get the value 'Public:US_Cities'

Thanks,
Ryan

-- 
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
107 S State St., Suite 300
Monticello, IL 61856-1968
Office: (217) 762-7955
Mobile: (217) 722-2794
rwilliams at paqinteractive.com




More information about the Users mailing list