LatLon2XY | R Documentation |
The function LatLon2XY(lat,lon,zoom) computes the coordinate transformation from lat/lon to map tile coordinates given a zoom level.
It returns the tile coordinates as well as the pixel coordinates within the Tile itself.
LatLon2XY(lat, lon, zoom)
lat |
latitude values to transform |
lon |
longitude values to transform |
zoom |
zoom level.lat,lon,zoom |
A list with values
Tile |
integer numbers specifying the tile |
Coords |
pixel coordinate within the Tile |
The fractional part times 256 is the pixel coordinate within the Tile itself.
Markus Loecher
LatLon2XY(38.45, -122.375, 11)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.