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

Replace leaflet-mapbox-vector-tile with protomaps-leaflet #3550

Open
t83714 opened this issue Jul 1, 2024 · 1 comment
Open

Replace leaflet-mapbox-vector-tile with protomaps-leaflet #3550

t83714 opened this issue Jul 1, 2024 · 1 comment

Comments

@t83714
Copy link
Contributor

t83714 commented Jul 1, 2024

Replace leaflet-mapbox-vector-tile with protomaps-leaflet

We use leaflet-mapbox-vector-tile to draw region boundaries in the region filter panel UI on a leaflet map.

It would be good to replace it with the newer protomaps-leaflet library:

https://github.com/protomaps/protomaps-leaflet

Example usage of protomaps can be found from: https://github.com/protomaps/protomaps-leaflet/tree/main/examples

@t83714
Copy link
Contributor Author

t83714 commented Jul 8, 2024

Add more comments from @steve9164

This is the current implementation using protomaps. It doesn't import protomaps-leaflet, but heavily borrows from it to write our renderer. To add a new method of tiled rendering to Terria, we add a custom Cesium ImageryProvider class (implementing the method requestImage(x: number, y: number, level: number) most importantly, and a few others for feature picking etc.). Leaflet plugins match fairly closely to the functionality that we need from a custom Cesium ImageryProvider class, but the interface is different enough that it's annoying (and less performant) to implement the new ImageryProvider by wrapping the Leaflet plugin. Because of this, we usually use the Leaflet plugin as a guide to write our code

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

No branches or pull requests

1 participant