[OpenLayers-Users] Adding multiple WMS layers in OpenLayers

Zach Seaman znseaman at gmail.com
Mon Aug 18 09:07:35 PDT 2014


I have an array of layers that I am passing to map.addLayers(). When I pass
the array to the function in $(document).ready(function (){}), it doesn't
add them to the map (i.e. map.layers does not have any of the new layers
added. But if I open up the JavaScript console and run the function, it
works and my added layers appear.

I've tried adding them individually in a for loop but that also doesn't
work either.

Any ideas?

Zach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140818/1b2e1517/attachment.html>


More information about the Users mailing list