Skip to content

Commit 8108b20

Browse files
committed
plot_mapbox() shouldn't force a scattermapbox trace type, closes plotly#1608
1 parent 4d83031 commit 8108b20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/plotly_build.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ plotly_build.plotly <- function(p, registerFrames = TRUE) {
112112
if (!grepl("scatter|choropleth", tr[["type"]] %||% "scatter")) {
113113
stop("Cant add a '", tr[["type"]], "' trace to a map object", call. = FALSE)
114114
}
115-
if (is_mapbox(p)) tr[["type"]] <- "scattermapbox"
115+
if (is_mapbox(p)) tr[["type"]] <- tr[["type"]] %||% "scattermapbox"
116116
if (is_geo(p)) {
117117
tr[["type"]] <- if (!is.null(tr[["z"]])) "choropleth" else "scattergeo"
118118
}

0 commit comments

Comments
 (0)