Hi Arnd,<div><br></div><div>Thanks a ton, it works.</div><div>I started off with OSM and Open layers from yesterday and have no idea about projection and transformation. I will check this. </div><div><br></div><div>Best Regards,</div>
<div>Chatur</div><div><br><div class="gmail_quote">On Thu, Aug 4, 2011 at 9:55 PM, Arnd Wippermann <span dir="ltr">&lt;<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>



<div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>OSM layer are displayed in the projection EPSG:900913. 
You have to transform your coordinates from EPSG:4326 to 
EPSG:900913.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Arnd</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial">    
&lt;script&gt;</font></div>
<div> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"> var map, 
layer;</font></div>
<div> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial">    
var P4326   = new 
OpenLayers.Projection(&quot;EPSG:4326&quot;);<br>    var P900913 = new 
OpenLayers.Projection(&quot;EPSG:900913&quot;);</font></div>
<div> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial">      function init() {</font></div>
<div> </div><font color="#0000ff" size="2" face="Arial">
<div dir="ltr" align="left"><br>        map = new 
OpenLayers.Map(&quot;map_id&quot;, { projection: P900913 
});<br>        var mapnik = new 
OpenLayers.Layer.OSM();</div>
<div> </div>
<div dir="ltr" align="left">        
map.addLayer(mapnik);<br>        
map.setCenter(new OpenLayers.LonLat(0,0), 3) ;</div>
<div> </div>
<div dir="ltr" align="left">        
map.addControl(new OpenLayers.Control.Graticule());</div>
<div> </div>
<div dir="ltr" align="left">        var markers = 
new OpenLayers.Layer.Markers( &quot;Markers&quot; 
);<br>        var size = new 
OpenLayers.Size(21,25);<br>        var offset 
= new OpenLayers.Pixel(-(size.w/2), -size.h);</div>
<div> </div>
<div dir="ltr" align="left">        
map.addLayer(markers);</div>
<div> </div>
<div dir="ltr" align="left">        var icon0 = 
new OpenLayers.Icon(&#39;<a href="http://www.openlayers.org/dev/img/marker.png" target="_blank">http://www.openlayers.org/dev/img/marker.png</a>&#39;, size, 
offset);<br>        var icon1 = new 
OpenLayers.Icon(&#39;<a href="http://www.openlayers.org/dev/img/marker-blue.png" target="_blank">http://www.openlayers.org/dev/img/marker-blue.png</a>&#39;, size, 
offset);</div>
<div> </div>
<div dir="ltr" align="left">        var m1 = new 
OpenLayers.Marker(new 
OpenLayers.LonLat(0,0),icon0);<br>        var 
m2 = new OpenLayers.Marker(new 
OpenLayers.LonLat(40,20).transform(P4326,P900913),icon1);</div>
<div> </div>
<div dir="ltr" align="left">        
markers.addMarker(m1);<br>        
markers.addMarker(m2);</div>
<div> </div>
<div dir="ltr" align="left"><br>      
}<br>    &lt;/script&gt;<br></div></font></div><br>
<div dir="ltr" lang="de" align="left">
<hr>
<font size="2" face="Tahoma"><b>Von:</b> <a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a> 
[mailto:<a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a>] <b>Im Auftrag von </b>Chatur 
Patil<br><b>Gesendet:</b> Donnerstag, 4. August 2011 19:53<br><b>An:</b> 
<a href="mailto:openlayers-users@lists.osgeo.org" target="_blank">openlayers-users@lists.osgeo.org</a><br><b>Betreff:</b> [OpenLayers-Users] Need your 
Help: Overlapping Markers even after having different LATITUDE and 
LONGITUDE<br></font><br></div><div><div></div><div class="h5">
<div></div>
<div>Dear Users,</div>
<div> </div>
<div>Re-sending as I received a failure delivery .</div>
<div><br></div>
<div>I am facing a unique problem with overlapping marker Icons, in-spite 
placing them at different LATITUDE and LONGITUDE.</div>
<div><br></div>
<div>I am using OSM Layer for the map. When I add multiple markers they are 
placed one over the other even though there is change in latitude and 
longitude.</div>
<div>Issue is that the markers are placed centrally on the map irrespective of 
the specified latitude and longitude. I have just attached the whole HTML file 
for reference.</div>
<div><br></div>
<div>There is no much coding in the attached file, its very simple (just create 
the map and add 2 markers)</div>
<div><br></div>
<div>Could you please tell me If I am doing anything wrong. I have tried all 
possible ways.</div>
<div><br></div>
<div>Your help is much appreciated.</div>
<div>Many Thanks, </div>
<div>Chatur</div>
<div><br></div>
<div><br></div>
<div>PS: I raised a bug ticket <a href="http://trac.osgeo.org/openlayers/ticket/3450#comment:2" target="_blank">http://trac.osgeo.org/openlayers/ticket/3450#comment:2</a> 
 to explain the issue.</div>
<div>      Indication was tha,t it could be something to do with 
the projections, hence I removed all projections and still face the same issue 
:(</div>
</div></div></blockquote></div><br></div>