powered by
Convert a lon/lat coordinate to a tile coordinate for a given zoom. Decimal tile coordinates (x, y) are reported.
LonLat2XY(lon_deg, lat_deg, zoom, xpix = 256, ypix = 256)
longitude in degrees
latitude in degrees
zoom
width of tile in pixels
length of tile in pixels
a data frame with columns X, Y, x, y
http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
# NOT RUN { # } # NOT RUN { gc <- geocode('baylor university') LonLat2XY(gc$lon, gc$lat, 10) # } # NOT RUN { # }
Run the code above in your browser using DataLab