View source: R/cartociudad_get_map.R
cartociudad_get_map | R Documentation |
Downloads static maps using Cartociudad API. These maps can be
then plotted by functions such as ggmap
.
cartociudad_get_map(center, radius, add.censal.section = FALSE, add.postcode.area = FALSE, add.cadastral.layer = FALSE, height = 800, width = 1200)
center |
a pair of numbers (latitude and longitude of the center of the map) |
radius |
approximate map "width" in kilometers |
add.censal.section |
whether to add the limit of censal sections and districts to the base map; note that this layer may not be available at low zoom levels |
add.postcode.area |
whether to add the limit of postal code areas to the base map; note that this layer may not be available at low zoom levels |
add.cadastral.layer |
whether to add cadastral information |
height |
map height in pixels |
width |
map width in pixels |
This function, similar to get_googlemap
or
get_openstreetmap
downloads a map from Cartociudad API and creates a
ggmap
compatible version of it.
An object of class ggmap
and raster
which can be used
within the ggmap
framework.
Carlos J. Gil Bellosta
http://www.cartociudad.es/recursos/Documentacion_tecnica/CARTOCIUDAD_ServiciosWeb.pdf
## Not run: soria <- cartociudad_geocode("plaza de san esteban, soria") soria_map <- cartociudad_get_map(c(soria$lat, soria$lng), 1) ggmap::ggmap(soria_map) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.