Talk:API/OpenLayer

Dear Open WeatherMap Team

I attempted to use this example. The original example worked but failed when I tried to produce a map for Newcastle, UK. It appeared to be defaulting to somewhere in Equatorial Guinea. I tried a few other locations as well but ended up with the same results.

The complete code looks as follows:

I think it maybe something in relation to the lat long style that I am using can you help?

Glen

Hi Glen!

The problem is that you use WGS 1984 coordinates. You should convert it into Mercator Projection. lonlat.transform(		new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984		new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection	);

I have made a correction of your example here: http://openweathermap.org/help/googlemap.html