Learn R Programming

slippymath (version 0.3.1)

tilenum_to_lonlat: tilenum_to_lonlat

Description

Convert slippy map tiles numbers to latitude and longitude

Usage

tilenum_to_lonlat(x, y, zoom)

Arguments

x

slippy map tile number in x domain (left to right)

y

slippy map tile number in y domain (top to bottom)

zoom

the zoom level for the calculation. Increasing zoom increases the number of tiles.

Value

a list containing `lat` and `lon` - latitude and longitude.

Details

Returns the latitude and longitude of the top left corner of a slippy map tile specified by `x`, `y` for a given zoom level.

Examples

Run this code
# NOT RUN {
tilenum_to_lonlat(
 x = 70406,
 y = 42987,
 zoom = 17
)
# }

Run the code above in your browser using DataLab