NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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%


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

permanent link

answered 15 Mar '12, 22:10

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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.

permanent link

answered 16 Mar '12, 10:48

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×9

question asked: 15 Mar '12, 21:35

question was seen: 8,283 times

last updated: 16 Mar '12, 10:48

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum