Convert a lon/lat coordinate to a tile coordinate for a given zoom. Decimal tile coordinates (x, y) are reported.
Arguments
- lon_deg
longitude in degrees
- lat_deg
latitude in degrees
- zoom
zoom
- xpix
width of tile in pixels
- ypix
length of tile in pixels
Author
David Kahle david@kahle.io, based on
RgoogleMaps::LatLon2XY()
by Markus Loecher of Sense Networks
markus@sensenetworks.com
Examples
if (FALSE) {
gc <- geocode('baylor university')
LonLat2XY(gc$lon, gc$lat, 10)
}