0

I try to create an open street maps application, which uses self generated static maps. Such a map is composed by up to four tiles, depending on the users position on the base tile.

An example: there is a map (red), generated by four tiles (black): http://s15.postimg.org/jtdhx65gr/tiles.jpg

I have the longitude and latitude of the generated maps center position and I know the horizontal and vertical offset in pixels from the center to every edge. The generated maps size is 256x256 pixels, which applies to each tile, it is generated by.

How can I get the bounding latitudes and longitudes of a generated map? (latitude and longitude of each edge of the red, generated map)

That's what I have created so far to get an edges latitude and longitude: http://pastebin.com/wKyd1tXG

4

1 回答 1

2

OSM wiki 有一个关于易滑地图 tilenames的页面。它解释了如何计算给定坐标的瓦片名称以及反向操作。它甚至包括一个表格,其中包含不同缩放级别的分辨率(每像素米)。还有另一个关于缩放级别的 wiki 页面,其中包含每像素一米的公式。

于 2013-10-25T07:11:31.570 回答