LatLon2XY {RgoogleMaps}R Documentation

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. Thanks to Neil Young (see http://groups.google.com/group/Google-Maps-API/browse_thread/thread/d2103ac29e95696f?hl=en) for providing the formulae used.

Usage

LatLon2XY(lat, lon, zoom)

Arguments

lat vector of latitude values
lon vector of longitude values
zoom integer zoom level for Google Maps

Value

A list with values

Tile integer numbers specifying the tile
Coords pixel coordinate within the Tile

Author(s)

Markus Loecher, Sense Networks <markus@sensenetworks.com>

See Also

LatLon2XY.centered

Examples

        LatLon2XY(38.45, -122.375, 11)

[Package RgoogleMaps version 1.1.6 Index]