map_leaflet(dat, popup = TRUE, map_provider = "osm", zoom = 3,
title = "map", size, centerview = c(30, -73.9), dest = ".",
overwrite = TRUE, incl.data = TRUE)
occdat
as returned by occ
.TRUE
(default) popup tooltips are created for each point with
metadta for that point.leaflet<
leaflet
for more information.TRUE
. Set to FALSE
to prevent overwriting local filesTRUE
. Writes geoJSON data into the html file to get around
security restrictions in browsers like Google Chrome. Set to FALSE
to read from a
separate local geoJSON file.library("spocc")
spp <- c('Danaus plexippus','Accipiter striatus','Pinus contorta')
dat <- occ(query = spp, from = 'gbif', gbifopts = list(hasCoordinate = TRUE), limit=50)
map_leaflet(dat, dest = ".")
# An example with more species, a different base map, and different color palette
spp <- c('Danaus plexippus','Accipiter striatus','Pinus contorta','Puma concolor',
'Ursus americanus','Gymnogyps californianus')
dat <- occ(query = spp, from = 'gbif', gbifopts = list(hasCoordinate = TRUE), limit=50)
map_leaflet(dat, map_provider = 'toner')
Run the code above in your browser using DataLab