FAQ

= Main FAQ =

coordinates
The centre of the map in this example http://openweathermap.org/help/osm.html has these coordinates var lat = 7486473; var lon = 4193332; how can i convert this to WGS84 coordinates?

To solve your problem you should convert the data another Projection. Your coordinates must be in Spherical Mercator Projection (EPSG:900913) like this one: var lat = 7486473; var lon = 4193332; So just convert your coordinates from EPSG:4326  (WGS 1984) into EPSG:900913 (Spherical Mercator Projection):

var lat = 55.5565, lon = 37.5576; var centre = new OpenLayers.LonLat(lon, lat); centre.transform(           new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984            new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection        );