addOpenweatherTiles | R Documentation |
Add OpenWeatherMap Tiles
addOpenweatherTiles(
map,
apikey = NULL,
layers = NULL,
group = NULL,
layerId = NULL,
opacity = 0.5,
options = openweatherOptions()
)
map |
a map widget object created from |
apikey |
a valid OpenWeatherMap-API key. |
layers |
character vector of layers you wish to add to the map. The
following layers are currently possible |
group |
the name of the group the newly created layers should belong to
(for |
layerId |
the layer id |
opacity |
opacity of the layer |
options |
List of further options. See |
the new map
object
Out of the box a legend image is only available for Pressure, Precipitation Classic, Clouds Classic, Rain Classic, Snow, Temperature and Wind Speed. Please add your own images if you need some more.
https://github.com/trafficonese/leaflet-openweathermap
Other Openweathermap Functions:
addOpenweatherCurrent()
,
openweatherCurrentOptions()
,
openweatherOptions()
## Not run:
library(leaflet)
library(leaflet.extras2)
Sys.setenv("OPENWEATHERMAP" = "Your_API_Key")
leaflet() %>%
addTiles() %>%
setView(9, 50, 6) %>%
addOpenweatherTiles(layers = "wind")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.