This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

[closed] How to transform bound to lat & lon

0

I'm trying to get the bounding box of the map area displayed by OpenLayers

I created the map using below code

map = new OpenLayers.Map({
            div: "map", projection: "EPSG:4326",
            layers: [new OpenLayers.Layer.OSM(), overlay],
            center: myLocation.getBounds().getCenterLonLat(), zoom: 12
            });

I used map.getExtent() to get the bounds. It returns like this 8902156.9343171,1452273.0082078,8960210.8572917,1459916.7110352

How to convert or transform bounds to lat & long...Is this possible to convert bounds to lat & long

asked 14 Jun '13, 06:43

gayathri's gravatar image

gayathri
11223
accept rate: 0%

closed 14 Jun '13, 15:11

SK53's gravatar image

SK53 ♦
28.1k48268433

The question has been closed for the following reason “Duplicate Question” by SK53 14 Jun ‘13, 15:11

Source code available on GitHub .