Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(ROpenWeatherMap)
- library(RCurl)
- library(httr)
- library(jsonlite)
- library(leaflet)
- library(mapview)
- library(owmr)
- library(raster)
- openWeatherPlugin <- htmlDependency(
- "Leaflet.OpenWeather",
- "1.6.0",
- src = normalizePath(path = getwd()),
- script = "www/js/leaflet-openweathermap.js"
- )
- leaflet() %>%
- addTiles() %>%
- registerPlugin(openWeatherPlugin) %>%
- onRender("
- function(el, x){
- L.OWM.clouds({showLegend: true, opacity: 0.5, appId: 'AppID'}).addTo(this);
- }
- ")
Add Comment
Please, Sign In to add comment