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:[email protected]
------------------------------------------------------------------------
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users