[OpenLayers-Dev] LonLat to place marker.

Richard Ive richard at xanox.net
Mon Sep 7 13:33:47 EDT 2009


Hey.


I've got a script that calculates the lon & lat of a OS Grid Reference.

The function returns an OpenLayers.LonLat object as follows:
lon=51.499435634436,lat=-0.21041620665612

If you put that into google maps (in reverse order as google accepts lat
long) it's position is correct.

However if I do :

lonLat = OSGridToLatLong(osGrid);
driver.addMarker(new OpenLayers.Marker(lonLat,icon));

The marker appears 1000's of miles directly south of where it should be.

Has anyone any idea why this may be happening?

Thanks.

-- 
Regards,
Richard Ive.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20090907/9e79e379/attachment.html


More information about the Dev mailing list