[OpenLayers-Users] latLon from location on the screen?

ulao S_K_U_N_X at yahoo.com
Mon Apr 4 10:27:10 EDT 2011


either I have something bad wrong here or I dont understand
getLonLatFromPixel. In my mind this should give the corresponding lat and
lon from the current view of the map. In other words if my mouse is over NY
City, then I should get that lat and lon to NY City. It would seem that
200,200 ( x,y ) converts to the map off set of 200,200 instead of the
location of my screen. Its like the map goes oo the 0,0 point of the map and
adds 200 to X and 200 to Y and gave me the lat lon of that position. 

for example if I'm looking at the map and tell it to draw an object at
200,200 then I move the map and tell it to draw another, both objects are at
the same position? In my mind, moving the map should have place the objects
at different location. since 200,200 was not over the same location both
time.

Its like I need a screen location to latlon conversion. That or the function
is busted?

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/latLon-from-location-on-the-screen-tp6238783p6238783.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list