[OpenLayers-Users] Adding multiple WMS layers in OpenLayers

TDS tds at tds-net.de
Mon Aug 18 09:30:19 PDT 2014


Hello Zach,

please give us an example of your code. Is OL already initialized? Do 
you add the layers with brackets (array) => .addLayers([layer1, layer2]) 
? Only .addLayer() is without brackets.

Bye, TDS
------------------------------------------------------------------------
mailto:tds at tds-net.de
------------------------------------------------------------------------
1+1=10
You have a question? - 42 or RTFM.
Am 18.08.2014 um 18:07 schrieb Zach Seaman:
>
> 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
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

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


More information about the Users mailing list