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
-
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
.geojson
files and create and upload.pmtiles
using Felt's TippecanoeaddProtocol
needs to be called onmaplibregl
directly, which was unexpected; I did this inonLoad
which might not be ideal(?)pmTilesProtocolReady
guard; This feels hacky as well, open to suggestionsSee also protomaps/PMTiles#163
Beta Was this translation helpful? Give feedback.
All reactions