<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>I'm using google map as layer in openlayer. I'm trying to add an point in the map as in example http://www.logisticsplus-ks.com/testmap/. I'm successfully adding the point in the map but when I move the map the point changes the position. So it does not stay at the coordinates that I give it. <br><br>By the way the functions works perfectly with openstreet map, but not with google maps.<br><br>In the following is the code that I'm using:<br><br><script type="text/javascript"><br> var map;<br> <br><br><br> function init() {<br> map = new OpenLayers.Map('map');<br> map.addControl(new OpenLayers.Control.LayerSwitcher());<br> <br> var gmap = new OpenLayers.Layer.Google(<br> "Google Streets", // the default<br> {numZoomLevels: 20}<br> );<br><br> map.addLayers([gmap]);<br><br> map.setCenter(new OpenLayers.LonLat(21.159739, 42.656138), 10);<br>}<br>var featurecollection = {"type":"Feature", "id":"OpenLayers.Feature.Vector_173", "properties":{}, "geometry":{"type":"Point", "coordinates":[21.159739, 42.656138]}};<br> function addGeoJson() {<br> var geojson_format = new OpenLayers.Format.GeoJSON();<br> var vector_layer = new OpenLayers.Layer.Vector();<br> map.addLayer(vector_layer);<br> //vector_layer.addFeatures(geojson_format.read(featurecollection));<br> vector_layer.addFeatures(geojson_format.read(featurecollection));<br> } <br> </script><br><br>Any help would be appreciable.<br>Thanks in advance,<br>Hekuran<br><br><br></div></body></html>