Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

plot_mapbox() forces scattermapbox #1608

Copy link
Copy link
Closed
@cpsievert

Description

@cpsievert
Issue body actions

For example, this generates a scattermapbox trace:

plot_mapbox() %>%
  add_trace(
    type = "choroplethmapbox",
    geojson = "https://raw.githubusercontent.com/python-visualization/folium/master/examples/data/us-states.json",
    locations = c("NY", "MA", "VT"),
    z = c(1, 2, 3)
  )

In the meantime, you can avoid the issue by using plot_ly() and specify config.mapboxAccessToken:

plot_ly() %>%
  add_trace(
    type = "choroplethmapbox",
    geojson = "https://raw.githubusercontent.com/python-visualization/folium/master/examples/data/us-states.json",
    locations = c("NY", "MA", "VT"),
    z = c(1, 2, 3)
  ) %>%
  config(
    mapboxAccessToken = Sys.getenv("MAPBOX_TOKEN")
  )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.