Comments (5)
Mapbox layer of just streets and labels on top of the polygons.
Do you mean that this 'layer' will only cover the area of the map that also contains the polygons, and the rest of the map will be the 'base' style? If so there's not a native / simple solution, but there are a couple of ways I can think of to achieve this effect:
1. add_bitmap()
from ?add_bitmap
example:
library(mapdeck)
set_token(secret::get_secret("MAPBOX"))
mapdeck(location = c(-122.3, 37.8), zoom = 10) %>%
add_bitmap(
image = paste0(
'https://raw.githubusercontent.com/uber-common/deck.gl-data/master/',
'website/sf-districts.png')
, bounds = c(-122.519, 37.7045, -122.355, 37.829)
)
2 Custom Mapbox Style
You can make your own custom style - https://docs.mapbox.com/api/maps/styles/ - and set that as the style
argument. I'm not too familiar with this method though and whether or not you can only change the style for certain areas and not others.
from mapdeck.
Thanks for the quick reply! (and, by the way, thanks for your work on this and other packages!)
I already have mapbox styles set up. I'm essentially looking to layer them, so that I have a basemap layer with a roadway-only layer on the top of the map, with the polygons sandwiched in-between.
Here are functions in other deck gl implementations that I think would accomplish what I'm looking to do (but I prefer mapdeck and think it would be a nice feature add if not currently possible):
- https://crazycapivara.github.io/deckgl/reference/add_raster_tile_layer.html
- https://qfes.github.io/rdeck/reference/tile_layer.html
from mapdeck.
@jlehman01 Did you happen to find a solution for this? I too would like to get place names above the basemap and polygons.
from mapdeck.
@timathomas I never found a workaround. It is possible to do this in leaflet and tmap so I tend to use those packages when possible.
from mapdeck.
Thanks @jlehman01. Me too. I've been able to get it to work with the Mapboxapi and Mapboxer packages but still have to edit the underlying data in mapbox studio. @dcooley I too very much appreciate you and your teams work on mapdeck, it's a great package!
from mapdeck.
Related Issues (20)
- Empty Geometries cause issues witih colours HOT 1
- Dragging Javascript errors HOT 3
- Custom tile layer (slippy map) HOT 1
- mapdeck crashing in windows R 4.3.1 ... but not in R 4.1.3 HOT 1
- clear_bitmap() not working HOT 2
- Mapdeck inside golem shinyapp does not update! HOT 6
- add_text: --> Error: Must supply `x`, `y` and `text` attributes HOT 1
- Cesium Troubles HOT 6
- onClick events don't return layerId HOT 1
- Map crashes when hidden in multitab shiny app HOT 9
- Legend order is incorrect for factors HOT 2
- Support for updating pitch/zoom/bearing without specifying the location HOT 3
- quarto tabset and mapdeck HOT 7
- geoarrow + mapdeck HOT 2
- crosstalk support
- Return coordinates with map click event HOT 1
- Styling parameters in add_text()
- Change scatterplot colour on client side HOT 1
- mapdeck_view() doesn't use current viewState properties HOT 5
- map freezes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapdeck.