You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Create richer Basemap class and deprecate basemap_style arg (#935)
### Change list
- Add `basemap` parameter to `Map`. This now manages a class with more
information than just the basemap style. In particular, this holds the
render mode `"interleaved"`, `"overlaid"`, or `"reverse-controlled"`
that was implemented on the JS side in
#921
- Deprecate `basemap_style` parameter to `Map`. This is superseded by
the `style` parameter to `MaplibreBasemap`
- Rename `CartoBasemap` to `CartoStyle`
- Add `before_id` parameter to the core `Layer`. When passed and the
basemap render mode is `"interleaved"`,
- Pass `interleaved` prop down to MapboxOverlay
- Remove temporary `render_mode` from #921
**Rendering layer interleaved in maplibre layer stack:**
<img width="817" height="505" alt="image"
src="https://github.com/user-attachments/assets/c63148a9-daa0-4dd4-bb65-88cc13805060"
/>
TODO:
- [ ] Validation for `beforeId`. If `beforeId` is passed to a layer, try
to resolve the basemap style URL to a dict, and then validate that the
string value of `beforeId` exists in that layer stack. Keep a cache of
fetched styles so that you're not fetching them repeatedly.
- [ ] Warn if `beforeId` is set when the basemap style is not
`"interleaved"`?
- [ ] (next PR): integration with
https://github.com/geopandas/xyzservices (see #494)
- [ ] (possibly future PR): examples of rendering different basemap
modes
For #494
---------
Co-authored-by: Vitor George <vitor.george@gmail.com>
The interleaved mode renders deck.gl layers into the same context created by MapLibre. If you need to mix deck.gl layers with MapLibre layers, e.g. having deck.gl surfaces below text labels, or objects occluding each other correctly in 3D, then you have to use this option.
154
+
155
+
- **`"overlaid"`**:
156
+
157
+
The overlaid mode renders deck.gl in a separate canvas inside the MapLibre's controls container. If your use case does not require interleaving, but you still want to use certain features of maplibre-gl, such as globe view, then you should use this option.
158
+
159
+
- **`"reverse-controlled"`**:
160
+
161
+
The reverse-controlled mode renders deck.gl above the MapLibre container and blocks any interaction to the base map.
162
+
163
+
If you need to have multiple views, you should use this option.
0 commit comments