mirror of
https://github.com/dylanbenzi/hurricane_normalization_app.git
synced 2026-07-29 21:01:27 +00:00
add rmw inputs to map for calc
This commit is contained in:
+60
-1
@@ -1163,6 +1163,8 @@ observe({
|
||||
new_lon <- as.numeric(input$impact_lon)
|
||||
|
||||
if(new_lat >= -90 & new_lat <= 90 & new_lon >= -180 & new_lon <= 180) {
|
||||
rmw_meters <- input$impact_rmw_slider * 1852
|
||||
|
||||
leafletProxy("impact_analysis_map") %>%
|
||||
setView(lat = new_lat, lng = new_lon, zoom = 9) %>%
|
||||
clearShapes() %>%
|
||||
@@ -1179,7 +1181,64 @@ observe({
|
||||
addCircles(
|
||||
lng = new_lon,
|
||||
lat = new_lat,
|
||||
radius = 18000,
|
||||
radius = rmw_meters,
|
||||
weight = 1,
|
||||
color = "blue",
|
||||
fillColor = "blue",
|
||||
fillOpacity = 0.05
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
observe({
|
||||
req(input$impact_rmw)
|
||||
|
||||
if(as.numeric(input$impact_rmw) > 0) {
|
||||
updateSliderInput(
|
||||
session,
|
||||
"impact_rmw_slider",
|
||||
value = input$impact_rmw
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
observe({
|
||||
req(input$impact_rmw_slider)
|
||||
|
||||
updateTextInput(
|
||||
session,
|
||||
"impact_rmw",
|
||||
value = input$impact_rmw_slider
|
||||
)
|
||||
})
|
||||
|
||||
observe({
|
||||
req(input$impact_rmw, input$impact_rmw_slider)
|
||||
|
||||
rmw_meters <- input$impact_rmw_slider * 1852
|
||||
|
||||
new_lon = input$impact_storm_lon
|
||||
new_lat = input$impact_storm_lat
|
||||
|
||||
req(new_lon, new_lat)
|
||||
|
||||
if(new_lat >= -90 & new_lat <= 90 & new_lon >= -180 & new_lon <= 180) {
|
||||
leafletProxy("impact_analysis_map") %>%
|
||||
clearShapes() %>%
|
||||
clearMarkers() %>%
|
||||
addCircleMarkers(
|
||||
lng = new_lon,
|
||||
lat = new_lat,
|
||||
radius = 2,
|
||||
weight = 0,
|
||||
color = "blue",
|
||||
fillColor = "blue",
|
||||
fillOpacity = 0.5
|
||||
) %>%
|
||||
addCircles(
|
||||
lng = new_lon,
|
||||
lat = new_lat,
|
||||
radius = rmw_meters,
|
||||
weight = 1,
|
||||
color = "blue",
|
||||
fillColor = "blue",
|
||||
|
||||
Reference in New Issue
Block a user