<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The move function already redraws.<div><br></div><div>The move function takes an OpenLayers.LonLat and not 2 separate arguments so try:</div><div><br></div><div><blockquote type="cite">geo_pointFeature.move(geo); </blockquote><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div>-- <br>Bart van den Eijnden<br>OpenGeo - <a href="http://opengeo.org/">http://opengeo.org</a><br>Expert service straight from the developers.</div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br><div><div>On Sep 24, 2012, at 2:59 PM, darethehair <<a href="mailto:darethehair@gmail.com">darethehair@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I would like to move (rather than destroy and rebuild) a<br>'OpenLayers.Feature.Vector' by simply changing its lat/long, but the 'move'<br>makes the feature disappear.  Do I have to refresh/redraw something to<br>finish the task?  Here is the basic code that I have now:<br><br>...<br>geo_point_vectors = new OpenLayers.Layer.Vector('Geo Point');<br>geo = new OpenLayers.LonLat(geo_long, geo_lat).transform(epsg4326,<br>epsg900913);<br>geo_point = new OpenLayers.Geometry.Point(geo.lon, geo.lat); <br>geo_pointFeature = new OpenLayers.Feature.Vector(geo_point, {title: "GEO"},<br>{<br>        fillColor : "Yellow",<br>        fillOpacity : 1.0,<br>        strokeColor : "Orange",<br>        strokeOpacity : 1,<br>        strokeWidth : 1,<br>        pointRadius : 5<br>});     <br>geo_point_vectors.addFeatures([geo_pointFeature]);<br>map.addLayers([geo_point_vectors]);<br>...<br>geo = new OpenLayers.LonLat(new_geo_long, new_geo_lat).transform(epsg4326,<br>epsg900913);<br>geo_pointFeature.move(geo.lon, geo.lat); <br>...<br><br>I would think that lots of folks have already written similar code e.g. for<br>tracking a moving car GPS position, but I found it very difficult to find<br>any examples out there (!).<br><br>P.S. I was going to wrap my code in 'raw' markers for this post, but the<br>last time I tried it the text was invisible to everyone -- so I left it as<br>plain text..  Did I do something wrong?<br><br><br><br>--<br>View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/Moving-a-OpenLayers-Feature-Vector-How-tp5004007.html">http://osgeo-org.1560.n6.nabble.com/Moving-a-OpenLayers-Feature-Vector-How-tp5004007.html</a><br>Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/openlayers-users<br></blockquote></div><br></div></div></body></html>