add interactive map with leaflet

This commit is contained in:
lukasadrion
2026-01-21 12:54:03 +01:00
parent 93f4e3e81d
commit 133827c2bd
2 changed files with 28 additions and 14 deletions

View File

@@ -60,7 +60,7 @@ ui <- fluidPage(
tabPanel("Single Flight Analysis",
fluidRow(
column(6, plotOutput("route_plot", height = "400px")),
column(6, leafletOutput("route_plot", height = "400px")),
column(6, plotOutput("altitude_plot", height = "400px"))
),
fluidRow(
@@ -214,11 +214,9 @@ server <- function(input, output, session) {
})
# Route plot
output$route_plot <- renderPlot({
output$route_plot <- renderLeaflet({
req(rv$current_route)
plot(rv$current_route$lon, rv$current_route$lat, type = "o", pch = 20, col = "blue",
main = paste("Geographic Route of", rv$current_icao),
xlab = "Longitude", ylab = "Latitude")
createInteractiveMap(rv$current_route)
})
# Altitude plot