Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

LatLon2XY

computes the coordinate transformation from lat/lon to map tile coordinates


Description

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.

Usage

LatLon2XY(lat, lon, zoom)

Arguments

lat

latitude values to transform

lon

longitude values to transform

zoom

zoom level.lat,lon,zoom

Value

A list with values

Tile

integer numbers specifying the tile

Coords

pixel coordinate within the Tile

Note

The fractional part times 256 is the pixel coordinate within the Tile itself.

Author(s)

Markus Loecher

Examples

LatLon2XY(38.45, -122.375, 11)

RgoogleMaps

Overlays on Static Maps

v1.4.5.3
GPL
Authors
Markus Loecher
Initial release
2020-02-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.