Is there a way to use Mapbox GL (asking about both JS and native) in an offline setting? With MBTiles, you could use either the MBTiles file or extract the raster images. I'm wondering if there's anything similar that would allow Mapbox GL to load the data from a local source as opposed to requiring a web connection to Mapbox's servers. Not talking about just caching data for when the user is offline but actually making a map that runs purely offline all the time. Thanks.
You can create an unlimited number of offline regions. Your Mapbox-powered application will reuse tiles and resources that are required by multiple regions, conserving network traffic and disk space.
Is Mapbox GL JS open source? The previous version, Mapbox GL JS v1, is indeed a free and open-source, BSD3 licensed software. Anyone can contribute to it, or start their own derived work based on it, for free. As of February 2021, the v1 source code is still available from the Mapbox Github.
Mapbox GL JS is an open-source JavaScript library that uses Mapbox GL to render interactive maps.
Customization: Mapbox has the best customization features, hands down. Google Maps is less flexible – for instance, it forces you to use its default base layer, while Mapbox does not. Ease of Integration: This really depends on the experience that your developers and designers have with the APIs and their SDKs.
A sample of MapBox GL JS offline (completely hosted on a custom server, in this case GitHub gh-pages) is visible at:
http://klokantech.github.io/mapbox-gl-js-offline-example/
The javascript, css, fonts and even the pre-rendered vector tiles unpacked from MBTiles may be simply in a directory and you get the zoomable vector map.
In case you want to host MBTiles with the vector or raster tiles somewhere online for free, easiest is probably: https://github.com/klokantech/tileserver-php/
While playing with the vector tiles I documented most of the use-cases in these two repos:
Not yet, but this is on the development roadmap for native, at least:
https://github.com/mapbox/mapbox-gl-native/issues/584
It's trickier with JavaScript in the browser, not not really a core use case, but could maybe be done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With