We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to add a legend with the Geojson layer but I won't work. It does work in add_polygon, but I need to be working with Geojson for a project.
Example below;
library(mapdeck) sf <- geojsonsf::geojson_sf( geojson ) sf$width <- sample(1:100, size = nrow(sf), replace = TRUE) sf$elevation <- sample(100:1000, size = nrow(sf), replace = T) geo <- geojsonsf::sf_geojson( sf ) l1 <- legend_element(variables = 1:4, colours = c("#92637C", "#3A7FB9", "#5872A3", "#B5C9E3"), colour_type = "fill", variable_type = "category") js <- mapdeck_legend(l1) #Legend works mapdeck( location = c(145, -37.9) , zoom = 8 , style = mapdeck_style("dark") , pitch = 35 ) %>% add_polygon(data = sf, fill_colour = "fillColor", legend = js) #No legend mapdeck( location = c(145, -37.9) , zoom = 8 , style = mapdeck_style("dark") , pitch = 35 ) %>% add_geojson( data = geo, layer_id = "diabetes", legend = js )
The text was updated successfully, but these errors were encountered:
some legend stuff for #190 - still needs some work
b524c1a
I've just pushed an update - try it now.
I'll be making some changes over the coming days but I'll try and keep your example working.
Sorry, something went wrong.
Thank you, that's worked a treat. Appreciate the fast turn around!
going to keep this open as I need to update the documentation.
1d9468b
dcooley
No branches or pull requests
I'm trying to add a legend with the Geojson layer but I won't work. It does work in add_polygon, but I need to be working with Geojson for a project.
Example below;
The text was updated successfully, but these errors were encountered: