<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Hi</DIV>
<DIV>&nbsp;</DIV>
<DIV>Use getLonLatFromViewPortPx():</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;var xys = map.getLonLatFromViewPortPx(e.xy);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; easting = xys.lon;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; northing = xys.lat;<BR></DIV>
<DIV>Regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert Sanson</DIV>
<DIV><BR>&gt;&gt;&gt; ulao &lt;S_K_U_N_X@yahoo.com&gt; 5/04/2011 2:27 a.m. &gt;&gt;&gt;<BR>either I have something bad wrong here or I dont understand<BR>getLonLatFromPixel. In my mind this should give the corresponding lat and<BR>lon from the current view of the map. In other words if my mouse is over NY<BR>City, then I should get that lat and lon to NY City. It would seem that<BR>200,200 ( x,y ) converts to the map off set of 200,200 instead of the<BR>location of my screen. Its like the map goes oo the 0,0 point of the map and<BR>adds 200 to X and 200 to Y and gave me the lat lon of that position. <BR><BR>for example if I'm looking at the map and tell it to draw an object at<BR>200,200 then I move the map and tell it to draw another, both objects are at<BR>the same position? In my mind, moving the map should have place the objects<BR>at different location. since 200,200 was not over the same location both<BR>time.<BR><BR>Its like I need a screen location to latlon conversion. That or the function<BR>is busted?<BR><BR>--<BR>View this message in context: <A href="http://osgeo">http://osgeo</A>-org.1803224.n2.nabble.com/latLon-from-location-on-the-screen-tp6238783p6238783.html<BR>Sent from the OpenLayers Users mailing list archive at Nabble.com.<BR>_______________________________________________<BR>Users mailing list<BR>Users@lists.osgeo.org<BR><A href="http://lists.osgeo.org/mailman/listinfo/openlayers">http://lists.osgeo.org/mailman/listinfo/openlayers</A>-users<BR></DIV><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system.</FONT></P>

<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for Malware and Viruses by Websense Hosted Security.  </FONT><A href="http://www.websense.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.websense.com</FONT></A></P>
</body></HTML>