<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span id="result_box" class="" lang="en"><span class="hps">Dear All..<br></span></span></div><div><span id="result_box" class="" lang="en"><span class="hps">I want to create</span> <span class="hps">a circle</span> <span class="hps">object</span> <span class="hps">using the</span> <span class="hps">feature</span><span class="">.</span> <span class="hps">I hope the</span> <span class="hps">object</span> <span class="hps">to change</span> <span class="hps">position</span> <span class="hps">every</span> <span class="hps">2 seconds</span> <span class="hps">from</span> <span class="hps">the coordinates of</span> <span class="hps">A</span> <span class="hps">to</span> <span class="hps">B.</span> <span class="hps"><br></span></span></div><div><span id="result_box" class="" lang="en"><span class="hps">The question is</span><span
class="">,</span> <span class="hps">why</span> <span class="hps">two</span> <span class="hps">objects</span> <span class="hps">that have been</span> <span class="hps">created</span> <span class="hps">does not change</span> <span class="hps">the location</span><span class="">,</span> <span class="hps">but</span> <span class="hps">even more</span> <span class="hps">thickened</span> <span class="hps">at</span> <span class="hps">the same</span> <span class="hps">location</span><span class="">.</span><br class=""><br class=""> <span class="hps">Here is the</span> <span class="hps">function</span> <span class="hps">that I created</span><span class="">,</span> <span class="hps">please</span> <span class="hps">its support</span><span class="">:</span><br class=""><br class=""> <span class="hps">var</span> <span class="hps">map;</span><br class=""> <span class="hps">var</span> <span class="hps">c</span> <span class="hps">=</span> <span class="hps">0;</span><br
class=""><br class=""> <span class="hps">ShowPoint</span> <span class="hps">function</span> <span class="hps">()</span><br class=""> <span class="hps atn">{</span><br class=""> <span class="hps">c</span> <span class="hps">=</span> <span class="hps">c</span> <span class="hps">+1</span><span class="">;</span><br class=""> <span class="hps">setTimeout</span> <span class="hps atn">(</span><span class="hps atn">"</span><span class="">ShowPoint</span> <span class="hps">()</span><span class="">"</span><span class="">,</span> <span class="hps">2000)</span><span class="">;</span><br class=""> <span class="hps">var</span> <span class="hps">point1</span> <span class="hps">= new</span> <span class="hps">OpenLayers.Geometry.Point</span> <span class="hps atn">(</span><span class="">-72</span><span class="">,</span> <span class="hps">42)</span><span class="">;</span><br class=""> <span class="hps">var</span> <span class="hps">point2</span> <span class="hps">=
new</span> <span class="hps">OpenLayers.Geometry.Point</span> <span class="hps atn">(</span><span class="">-85</span><span class="">,</span> <span class="hps">45)</span><span class="">;</span><br class=""> <span class="hps">feature_point1</span> <span class="hps">var</span> <span class="hps">= new</span> <span class="hps">OpenLayers.Feature.Vector</span> <span class="hps atn">(</span><span class="">point1</span><span class="">)</span><span class="">;</span><br class=""> <span class="hps">feature_point2</span> <span class="hps">var</span> <span class="hps">= new</span> <span class="hps">OpenLayers.Feature.Vector</span> <span class="hps atn">(</span><span class="">point2</span><span class="">)</span><span class="">;</span><br class=""><br class=""> <span class="hps atn">if (</span><span class="">c</span><span class="">%</span> <span class="hps">2</span><span class="">!</span> <span class="hps">=</span> <span class="hps">0)</span><br
class=""> <span class="hps atn">{</span><br class=""> <span class="hps">map.layers</span> <span class="hps atn">[</span><span class="">1</span><span class="">]</span><span class="">.</span> <span class="hps">addFeatures</span> <span class="hps atn">(</span><span class="atn">[</span><span class="">feature_point1</span><span class="">]</span><span class="">)</span><span class="">;</span><br class=""> <span class="hps">map.layers</span> <span class="hps atn">[</span><span class="">1</span><span class="">]</span><span class="">.</span> <span class="hps">removeFeatures</span> <span class="hps atn">(</span><span class="atn">[</span><span class="">feature_point2</span><span class="">]</span><span class="">)</span><span class="">;</span><br class=""> <span class="hps atn">Else {</span><span class="">}</span><br class=""> <span class="hps">map.layers</span> <span class="hps atn">[</span><span class="">1</span><span
class="">]</span><span class="">.</span> <span class="hps">addFeatures</span> <span class="hps atn">(</span><span class="atn">[</span><span class="">feature_point2</span><span class="">]</span><span class="">)</span><span class="">;</span><br class=""> <span class="hps">map.layers</span> <span class="hps atn">[</span><span class="">1</span><span class="">]</span><span class="">.</span> <span class="hps">removeFeatures</span> <span class="hps atn">(</span><span class="atn">[</span><span class="">feature_point1</span><span class="">]</span><span class="">)</span><span class="">;</span><br class=""> <span class="hps">}</span><br class=""> <span class="hps">}</span><br class=""><br class=""> <span class="hps">function</span> <span class="hps">init</span> <span class="hps">()</span> <span class="hps atn">{</span><br class=""> <span class="hps">/</span> <span class="hps">/</span> <span class="hps">Create</span> <span
class="hps">a</span> <span class="hps">folder</span> <span class="hps">with</span> <span class="hps">an</span> <span class="hps">empty</span> <span class="hps">array</span> <span class="hps">of</span> <span class="hps">controls</span><br class=""> <span class="hps">map =</span> <span class="hps">new</span> <span class="hps">OpenLayers.Map</span> <span class="hps atn">(</span><span class="hps atn">'</span><span class="">map_element</span><span class="">'</span><span class="">,</span> <span class="hps atn">{</span><br class=""> <span class="hps">controls</span><span class="">:</span> <span class="hps atn">[</span><br class=""> <span class="hps">OpenLayers.Control.Navigation</span> <span class="hps">new</span> <span class="hps">()</span><span class="">,</span><br class=""> <span class="hps">OpenLayers.Control.PanZoomBar</span> <span class="hps">new</span> <span class="hps">()</span><span class="">,</span><br class=""> <span
class="hps">OpenLayers.Control.LayerSwitcher</span> <span class="hps">new</span> <span class="hps">()</span><br class=""> <span class="hps">]</span><span class="">,</span><br class=""> <span class="hps">maxScale</span><span class="">:</span> <span class="hps">27683990.15625</span><span class="">,</span><br class=""> <span class="hps">minScale</span><span class="">:</span> <span class="hps">221471921.25</span><br class=""> <span class="hps">}</span><span class="">)</span><span class="">;</span><br class=""><br class=""> <span class="hps">wms_layer</span> <span class="hps">var</span> <span class="hps">= new</span> <span class="hps">OpenLayers.Layer.WMS</span> <span class="hps atn">(</span><br class=""> <span class="hps atn">"</span><span class="">OpenLayers</span> <span class="hps">WMS</span><span class="">"</span><span class="">,</span><br class=""> <span class="hps atn">'</span><span class="">http://vmap0.tiles.osgeo.org/wms/vmap0</span><span
class="">'</span><span class="">,</span><br class=""> <span class="hps atn">{</span><span class="">layers</span><span class="">:</span> <span class="hps">'basic'</span><span class="">}</span><span class="">,</span><br class=""> <span class="hps atn">{</span><span class="">}</span><span class="">)</span><span class="">;</span><br class=""><br class=""> <span class="hps">vector_layer</span> <span class="hps">var</span> <span class="hps">= new</span> <span class="hps">OpenLayers.Layer.Vector</span> <span class="hps atn">(</span><span class="hps atn">'</span><span class="">Basic</span> <span class="hps">Vector</span> <span class="hps">Layer</span><span class="">'</span><span class="">)</span><span class="">;</span><br class=""> <span class="hps">map.addControl</span> <span class="hps">(new</span> <span class="hps">OpenLayers.Control.EditingToolbar</span> <span class="hps atn">(</span><span class="">vector_layer</span><span class="">))</span><span
class="">;</span><br class=""> <span class="hps">map.addLayers</span> <span class="hps atn">(</span><span class="atn">[</span><span class="">wms_layer</span><span class="">,</span> <span class="hps">vector_layer</span><span class="">]</span><span class="">)</span><span class="">;</span><br class=""> <span class="hps">map.render</span> <span class="hps atn">(</span><span class="hps atn">'</span><span class="">map_element</span><span class="">'</span><span class="">)</span><span class="">;</span><br class=""><br class=""> <span class="hps atn">if (</span><span class="">!</span> <span class="hps">map.getCenter</span> <span class="hps">())</span> <span class="hps atn">{</span><br class=""> <span class="hps">map.zoomToMaxExtent</span> <span class="hps">()</span><span class="">;</span><br class=""> <span class="hps">}</span><br class=""><br class=""> <span class="hps">ShowPoint</span> <span class="hps">()</span><span class="">;</span><br class=""> <span
class="hps">}</span></span></div></div></body></html>