You can only retrieve/append markers from/to a markers layer: <a href="http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Markers-js.html">http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Markers-js.html</a><br>
<br>To retrieve an array of the markers layers in your map use Map.getLayersByClass("OpenLayers.Layer.Markers"). Make sure that you previously attached a markers layer to your map.<br><br>Franz<br><br><br><div class="gmail_quote">
2010/8/11 ulao <span dir="ltr"><<a href="mailto:S_K_U_N_X@yahoo.com">S_K_U_N_X@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
I need to devise a way to get an array of markers from a layer...<br>
<br>
I see this in the docs OpenLayers. Layer. Markers but under the Layer class<br>
there is no Marker array ?<br>
<br>
for example I tried this<br>
<br>
var test = Map.layers<br>
alert ( test.markers ) // undefined<br>
alert ( test.Markers ) // undefined<br>
<br>
I would also need a way to get features.<br>
<br>
Is this the way its intended to work? If so why do i get undefined.<br>
<br>
Do I need to reference the [OpenLayers. Layer. Marker] itself? Can I not<br>
get to the markers from map?<br>
<font color="#888888">--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/get-markers-from-layers-tp5413201p5413201.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/get-markers-from-layers-tp5413201p5413201.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</font></blockquote></div><br>