Use mapbox.

e_mapbox(e, token, ...)

Arguments

e

An echarts4r object as returned by e_charts.

token

Your mapbox token from mapbox.

...

Any option.

Note

Mapbox may not work properly in the RSudio console.

See also

Examples

# NOT RUN {
url <- paste0("https://ecomfe.github.io/echarts-examples/",
              "public/data-gl/asset/data/population.json")
data <- jsonlite::fromJSON(url)
data <- as.data.frame(data)
names(data) <- c("lon", "lat", "value")

data %>%
  e_charts(lon) %>%
  e_mapbox(
    token = "YOUR_MAPBOX_TOKEN",
    style = "mapbox://styles/mapbox/dark-v9"
  ) %>%
  e_bar_3d(lat, value, coord_system = "mapbox") %>%
  e_visual_map()
# }