Skip to content
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

combining online and offline maps? #3

Open
rvijgen opened this issue Feb 16, 2016 · 3 comments
Open

combining online and offline maps? #3

rvijgen opened this issue Feb 16, 2016 · 3 comments

Comments

@rvijgen
Copy link

rvijgen commented Feb 16, 2016

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

@trevorpowell
Copy link
Owner

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.

@rvijgen
Copy link
Author

rvijgen commented Feb 16, 2016

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 #3 (comment).

@trevorpowell
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants