These browser nowadays pretty good at handling bigger DOM. As recommended in <a href="http://trac.openlayers.org/wiki/FrequentlyAskedQuestions">http://trac.openlayers.org/wiki/FrequentlyAskedQuestions</a>, you should keep ~100-200 Features in vector layer. marker.moveTo() for number of markers within 100-200 should be OK.<br>
<br>&gt;&gt; this looks pretty easy, but for few number of markers, what if I have
more than one won&#39;t that be very consuming to the resources?!<br>
from what I understand I will have to keep a reference of all markers used.<br><br><div class="gmail_quote">On Sat, Oct 31, 2009 at 4:43 AM, helmi <span dir="ltr">&lt;<a href="mailto:helmi03@gmail.com">helmi03@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;"><div>
Refer this <a href="http://openlayers.org/pipermail/users/2009-June/012274.html" target="_blank">http://openlayers.org/pipermail/users/2009-June/012274.html</a></div>
<div><br></div><div>My example code:</div><div><br></div><div><div><div>function setLonLat(marker, lonlat) {</div><div>    var newPx = map.getLayerPxFromLonLat(newLonLat);</div><div>    marker.moveTo(newPx);</div><div>}</div>

<div><br></div><div>var marker = new OpenLayers.Marker(new OpenLayers.LonLat(102.2168, 3.09185), new OpenLayers.Icon());                                                          </div><div>var markers = new OpenLayers.Layer.Markers( &quot;Markers&quot; );</div>

<div>markers.addMarker(marker);</div><div>map.addLayer(markers);</div><div><br></div><div>// To move the marker</div><div>var newLonLat = new OpenLayers.LonLat(102.1399, 5.72857);</div><div>setLonLat(marker, newLonLat);</div>

</div></div><div class="im"><div><br></div>&gt;&gt; I mean I wanted to build an apoplication that uploads my current position like every 5 mins or so, is this the best way to do it?</div></span><br><br><div class="gmail_quote">
<div class="im">On Fri, Oct 30, 2009 at 5:39 AM, Hany Harraz <span dir="ltr">&lt;<a href="mailto:h.harraz@gmail.com" target="_blank">h.harraz@gmail.com</a>&gt;</span> wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5"><div dir="ltr">Hi All,<br>I&#39;m thinking of building a website that has openstreetmaps integrated to it, I need to show my position on the map each time I send my coordinates from my mobile, is there a way to show this without refreshing the page? like adding a layer that shows a pointer to some coordinates and can be refreshed without refreshing the whole page or map?<br clear="all">


<br>-- <br>With best Regards<br>Hany Harraz<br>
</div>
<br></div></div><div class="im">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br>