Learn R Programming

RgoogleMaps (version 1.5.1)

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)

Value

A list with values

Tile

integer numbers specifying the tile

Coords

pixel coordinate within the Tile

Arguments

lat

latitude values to transform

lon

longitude values to transform

zoom

zoom level.lat,lon,zoom

Author

Markus Loecher

Examples

Run this code


LatLon2XY(38.45, -122.375, 11)


Run the code above in your browser using DataLab