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

find max/min lat and long?

0

given a central latitude and longitude and also a zoom say 12, how can i get the max/min values for both lat and lon? basically, how can i get the bounds??

asked 15 Mar '12, 21:35

bernabasd's gravatar image

bernabasd
16222
accept rate: 0%


2 Answers:

0

There's a wiki page that explains this with lots of examples in different programming languages: https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames

answered 15 Mar '12, 22:10

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

0

If you're using an existing Javascript library to display map tiles, then it may already contain functions that save you a bit of work, such as these in Leaflet.

answered 16 Mar '12, 10:48

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Source code available on GitHub .