Use Maplibre GL JS addProtocol to support PMTiles
#2165
tordans
started this conversation in
Show and tell
Replies: 2 comments 4 replies
-
|
What happens if you call |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Thank you @tordans for bringing this up. I ran into the same issue and can share this logic which works ok for me now. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Today I added PMTiles to my React Map GL Project.
Docs: https://protomaps.com/docs/frontends/maplibre
I did not find anything on how to do this in React Map GL, yet, we might as well use this as a starting point.
Since the implementation was not super straight forward (yet), I wonder if a dedicated Example would be welcome?
Here is what I have
.geojsonfiles and create and upload.pmtilesusing Felt's TippecanoeaddProtocolneeds to be called onmaplibregldirectly, which was unexpected; I did this inonLoadwhich might not be ideal(?)pmTilesProtocolReadyguard; This feels hacky as well, open to suggestionsSee also protomaps/PMTiles#163
Beta Was this translation helpful? Give feedback.
All reactions