-
Notifications
You must be signed in to change notification settings - Fork 12
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
Document Maplibre patterns #339
Comments
There is an alternative library that does mapping with vector tiles called MapLibre: https://maplibre.org/maplibre-gl-js/docs/ It looks to be a fork of mapbox-gl and has many of the same features. The biggest difference that I can tell so far is mapbox gives easier access to nice looking vector tile basemaps. ArcGIS offers some vector tile basemaps of their own and have documentation on how to use them with maplibre: https://developers.arcgis.com/maplibre-gl-js/maps/change-the-basemap-style-v2/ |
I have my first working map using Mapbox-GL: https://ilsolarmap.com/ The map code is here:
I implemented using plain javascript with bootstrap and jquery. The map features:
Things to note / differences with Leaflet:
|
Next steps:
|
this blog post might be a good place to research mapbox + react? https://evilmartians.com/chronicles/how-to-build-a-better-react-map-with-pigeon-maps-and-mapbox this tool was used in that post, seems kind of interesting: https://pigeon-maps.js.org/ from their docs:
|
you can use other basemaps, including raster ones: |
@antidipyramid is doing this for a DPD project, has positive first impressions. |
Include info on protecting tiles with authentication in Django. |
Background
We've been using Leaflet.js and CARTO for our interactive maps for many years now. After working on a side project that leverages mapbox-gl and kepler.gl (https://ilsolarmap.com), I see there are some potentially big advantages to making maps with Mapbox-GL, including:
Our current pattern for rendering GeoJSON data has some pretty hard limits. Anything over 1mb or with over 1,000 features starts to get very slow in Leaflet. In this case, we have switched over to CARTO to render large files, but the switch can be awkward and the plan we are on has limited space and the latest plans are 10x more expensive. If Mapbox GL works out, we can potentially drop our dependence on CARTO and serve all of our map data directly in the browser.
Proposal
I'll create a test project using Mapbox-GL following their tutorials & documentation with some larger data: https://docs.mapbox.com/mapbox-gl-js/guides/
I will also try out a project using React Map GL, a React wrapper for Mapbox GL: https://visgl.github.io/react-map-gl/
Deliverables
I'll summarize my experience and findings and share them back on this thread along with a recommendation on next steps.
Timeline
Probably a day or so
The text was updated successfully, but these errors were encountered: