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