<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello Zach,<br>
<br>
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.<br>
<br>
<div class="moz-signature">Bye, TDS
<hr>
<font size="-1">
<a class="moz-txt-link-freetext" href="mailto:tds@tds-net.de">mailto:tds@tds-net.de</a><br>
</font>
<hr>
<font size="-1">
1+1=10<br>
You have a question? - 42 or RTFM.
</font>
</div>
Am 18.08.2014 um 18:07 schrieb Zach Seaman:<br>
</div>
<blockquote
cite="mid:CACVtUUuecGD+WTCuj_7ARANmmoN85KEg2iMsLxbTuxxqxE_n_A@mail.gmail.com"
type="cite">
<div dir="ltr">
<p style="margin:0px 0px
1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica
Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">
I have an array of layers that I am passing to <code
style="margin:0px;padding:1px
5px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida
Console','Liberation Mono','DejaVu Sans Mono','Bitstream
Vera Sans Mono','Courier
New',monospace,serif;color:rgb(34,34,34);white-space:pre-wrap;background-color:rgb(238,238,238)">map.addLayers()</code>.
When I pass the array to the function in <code
style="margin:0px;padding:1px
5px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida
Console','Liberation Mono','DejaVu Sans Mono','Bitstream
Vera Sans Mono','Courier
New',monospace,serif;color:rgb(34,34,34);white-space:pre-wrap;background-color:rgb(238,238,238)">$(document).ready(function
(){})</code>, it doesn't add them to the map (i.e. <code
style="margin:0px;padding:1px
5px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida
Console','Liberation Mono','DejaVu Sans Mono','Bitstream
Vera Sans Mono','Courier
New',monospace,serif;color:rgb(34,34,34);white-space:pre-wrap;background-color:rgb(238,238,238)">map.layers</code> 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.</p>
<p style="margin:0px 0px
1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica
Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">
I've tried adding them individually in a <code
style="margin:0px;padding:1px
5px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida
Console','Liberation Mono','DejaVu Sans Mono','Bitstream
Vera Sans Mono','Courier
New',monospace,serif;color:rgb(34,34,34);white-space:pre-wrap;background-color:rgb(238,238,238)">for</code> loop
but that also doesn't work either.</p>
<p style="margin:0px 0px
1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica
Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">
Any ideas?</p>
<p style="margin:0px 0px
1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica
Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">
Zach</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a></pre>
</blockquote>
<br>
</body>
</html>