[OpenLayers-Users] Mercator and getLonLatFromPixel

Tim Schaub noreply at geocartic.com
Wed Jan 24 11:42:37 EST 2007


> Right now the getLonLatFromPixel() function returns a 
> latitude/longitude which is incorrect since my map is 
> actually projected in mercator.

When you see getLonLatFromPixel() think getMapPointFromScreenPoint() and if
the return is OpenLayers.LonLat, think OpenLayers.MapPoint.  The units of an
OpenLayers.LonLat are the same as your map units (meters for mercator).
Ignore the fact that LonLat makes you think of longitude, latitude, and
decimal degrees.  Instead you should think of x, y, and map units.

> 
> 
> Thanks,
> 
> Ben
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 




More information about the Users mailing list