<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Dear Pedro,<br><br>Thanks a lot for your prompt reply. <br><br>I implemented your suggestion but now the map does not move and the same coordinates point elsewhere. I published the updated example at http://www.logisticsplus-ks.com/testmap/<br><br>Regards,<br>Hekuran<br><br><br>----- Original Message -----<br>From: "Pedro Baracho" &lt;pedropbaracho@gmail.com&gt;<br>To: "hekuran S. Doli" &lt;hekuran.doli@logisticsplus-ks.com&gt;<br>Cc: users@openlayers.org<br>Sent: Monday, November 16, 2009 3:30:27 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna<br>Subject: Re: [OpenLayers-Users] Help with OpenLayer + Google Maps<br><br>I mispelled projection parameter.<br><br>it is lowerCase:<br><br>{projection: new OpenLayers.Projection("EPSG:4326")}<br><br><div class="gmail_quote">On Mon, Nov 16, 2009 at 12:28 PM, Pedro Baracho <span dir="ltr">&lt;<a href="mailto:pedropbaracho@gmail.com" target="_blank">pedropbaracho@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;"><div class="im">var gmap = new OpenLayers.Layer.Google(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Google Streets", // the default<br>

</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {"sphericalMercator": true ,numZoomLevels: 20}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br><br>var vector_layer = new OpenLayers.Layer.Vector("title", {Projection: new OpenLayers.Projection("EPSG:4326")});<br>


<br><div class="gmail_quote"><div><div></div><div class="h5">On Mon, Nov 16, 2009 at 1:20 PM, hekuran S. Doli <span dir="ltr">&lt;<a href="mailto:hekuran.doli@logisticsplus-ks.com" target="_blank">hekuran.doli@logisticsplus-ks.com</a>&gt;</span> wrote:<br>

</div></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><div style="font-family: Times New Roman; font-size: 12pt; color: rgb(0, 0, 0);">I'm using google map as layer in openlayer. I'm trying to add an point in the map as in example <a href="http://www.logisticsplus-ks.com/testmap/" target="_blank">http://www.logisticsplus-ks.com/testmap/</a>. 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>&lt;script type="text/javascript"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var map;<br>


&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function init() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map('map');<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.LayerSwitcher());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var gmap = new OpenLayers.Layer.Google(<br>


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Google Streets", // the default<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {numZoomLevels: 20}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayers([gmap]);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function addGeoJson() {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var geojson_format = new OpenLayers.Format.GeoJSON();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var vector_layer = new OpenLayers.Layer.Vector();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map.addLayer(vector_layer);<br>


&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //vector_layer.addFeatures(geojson_format.read(featurecollection));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vector_layer.addFeatures(geojson_format.read(featurecollection));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;/script&gt;<br><br>Any help would be appreciable.<br>


Thanks in advance,<br><font color="#888888">Hekuran<br><br><br></font></div></div><br></div></div>_______________________________________________<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></blockquote></div><br>
</blockquote></div><br>
</div></body></html>