globe_arcs.Rd
Add arcs to a globe.
globe_arcs( globe, ..., data = NULL, inherit_coords = TRUE, on_click = NULL, on_right_click = NULL, on_hover = NULL )
globe | An object of class |
---|---|
... | Coordinates, as specified by |
data | A data.frame of points to draw. |
inherit_coords | Whether to inherit the coordinates ( |
on_click | JavaScript functions as JS
or |
on_right_click | JavaScript functions as JS
or |
on_hover | JavaScript functions as JS
or |
Valid coordinates.
start_lat
, start_lon
end_lat
, end_lon
altitude
color
label
transition
altitude_scale
stroke
curve_resolution
circular_resolution
dash_length
dash_gap
dash_initial_gap
dash_animate_time
# basic create_globe() %>% globe_arcs( data= usflights, coords( start_lat = start_lat, start_lon = start_lon, end_lat = end_lat, end_lon = end_lon, color = cnt ) ) %>% scale_arc_color() # in shiny library(shiny) ui <- fluidPage( actionButton("add", "Add arcs"), globeOutput("globe") ) server <- function(input, output){ output$globe <- renderGlobe({ create_globe() }) observeEvent(input$add, { globeProxy("globe") %>% globe_arcs( coords(start_lat, start_lon, end_lat, end_lon), data = usflights ) }) }# NOT RUN { shinyApp(ui, server) # }