Works as an htmlwidget simply call the g3r function.

library(g3r)

# grand canyon
g3r(lat = 36.2058, lon = -112.4413, alpha = TRUE) %>% g3r_camera(.5,.5,1)

You can run a demo with:

g3r::g3r_demo()

Points

You can add points to map with g3r_points, below we plot the 4 base camps that lead to mount Everest: it’s a built-in “dataset”. Note that the elevation must be in meters.

g3r(27.985655, 86.903697) %>% 
  g3r_points(everest, lat, lon, ele)

Lines

You can add lines to map with g3r_lines, below we plot the 4 base camps and a path connecting camps (not the actual path taken by climbers of course).

g3r(27.985655, 86.903697) %>% 
  g3r_points(everest, lat, lon, ele) %>% 
  g3r_lines(everest, lat, lon, ele)