Open rvijgen opened 8 years ago
It is possible. The fork here overrides the online loading of tiles used in Mapbox GL JS with offline loading from a local MBTiles file. Instead of overriding, we'd have to add a param in the layer maybe that would specify online/offline. Then maintain both methods of loading tiles and use that param to switch between them.
Hi Trevor,
thank you for you suggestion, that sounds like a good idea, is there a specific function that I can look at to achieve such functionality?
best, Richard
On 16 Feb 2016, at 17:04, Trevor Powell notifications@github.com wrote:
It is possible. The fork here https://github.com/trevorpowell/mapbox-gl-js-cordova-offline overrides the online loading of tiles used in Mapbox GL JS with offline loading from a local MBTiles file. Instead of overriding, we'd have to add a param in the layer maybe that would specify online/offline. Then maintain both methods of loading tiles and use that param to switch between them.
— Reply to this email directly or view it on GitHub https://github.com/trevorpowell/mapbox-gl-js-cordova-offline-example/issues/3#issuecomment-184746171.
I can try to work on adding that when I have some free time. Otherwise, feel free to fork the repository and submit a pull request.
Hi,
Would it be possible to combine online and offline sources. I currently have the library running using offline sources as described in the documentation, but when I try to add an online map box source, I can't get it to work. If this is possible, how would you go about it?
best, Richard