I can see the code to get this on this wiki page:
eg in Python:
def num2deg(xtile, ytile, zoom):
n = 2.0 ** zoom
lon_deg = xtile / n * 360.0 - 180.0
lat_rad = math.atan(math.sinh(math.pi * (1 - 2 * ytile / n)))
lat_deg = math.degrees(lat_rad)
return (lat_deg, lon_deg)
But so far been unable to translate this to B4A to the the right results.
Any suggestions?
RBS
Slippy map tilenames - OpenStreetMap Wiki
wiki.openstreetmap.org
eg in Python:
Tile numbers to lon./lat.
import mathdef num2deg(xtile, ytile, zoom):
n = 2.0 ** zoom
lon_deg = xtile / n * 360.0 - 180.0
lat_rad = math.atan(math.sinh(math.pi * (1 - 2 * ytile / n)))
lat_deg = math.degrees(lat_rad)
return (lat_deg, lon_deg)
But so far been unable to translate this to B4A to the the right results.
Any suggestions?
RBS