Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update_mvt_layer fails when missing point_type argument #87

Closed
bdbmax opened this issue Feb 23, 2023 · 1 comment
Closed

update_mvt_layer fails when missing point_type argument #87

bdbmax opened this issue Feb 23, 2023 · 1 comment

Comments

@bdbmax
Copy link

bdbmax commented Feb 23, 2023

When updating an MVT layer, it fails with:

Error in `update_mvt_layer()`:
! Failed to create layer
Caused by error in `if (!grepl("icon", layer$point_type, fixed = TRUE)) ...`:
! argument is of length zero

When not supplied a point_type argument.

This works:

test_map <- 
  rdeck(initial_view_state = view_state(center =  c(-73.58, 45.53), zoom = 15)) |> 
  add_mvt_layer(id = "test",
                data = tile_json("mapbox.mapbox-streets-v8", "mapbox"))

update_mvt_layer(test_map,
                 id = "test",
                 line_width_min_pixels = 1,
                 point_type = "circle")

This doesn't:

test_map <- 
  rdeck(initial_view_state = view_state(center =  c(-73.58, 45.53), zoom = 15)) |> 
  add_mvt_layer(id = "test",
                data = tile_json("mapbox.mapbox-streets-v8", "mapbox"))

update_mvt_layer(test_map,
                 id = "test",
                 line_width_min_pixels = 1)
@anthonynorth
Copy link
Member

Fixed in dev/latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants