addOpenweatherCurrent | R Documentation |
Add current OpenWeatherMap Marker
addOpenweatherCurrent(
map,
apikey = NULL,
group = NULL,
layerId = NULL,
options = openweatherCurrentOptions()
)
map |
a map widget object created from |
apikey |
a valid Openweathermap-API key. |
group |
the name of the group the newly created layers should belong to
(for |
layerId |
the layer id |
options |
List of further options. See
|
the new map
object
The current weather icons will appear beginning with zoom level 9
and if used in Shiny, a click on an icon will update a Shiny input at
input$MAPID_owm_click
.
https://github.com/trafficonese/leaflet-openweathermap
Other Openweathermap Functions:
addOpenweatherTiles()
,
openweatherCurrentOptions()
,
openweatherOptions()
## Not run:
library(leaflet)
library(leaflet.extras2)
Sys.setenv("OPENWEATHERMAP" = "Your_API_Key")
leaflet() %>%
addTiles() %>%
setView(9, 50, 9) %>%
addOpenweatherCurrent(options = openweatherCurrentOptions(
lang = "en", popup = TRUE
))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.