Offline Maps in cordova using leaflets make my app

2019-06-03 06:50发布

问题:

I have followed this link http://davidrs.com/wp/phonegap-3-0-leaflet-offline-maps/ and it is truly powerful. However, my app stores large amount of data especially tiles. Is there any other ways to make the maps offline with less storage?

Notes: I use google maps for online mode.

回答1:

Save the tiles as JPGs and/or restrict to certain zoom-levels in order to avoid heavy tile folders. Only offer the min. required map area. Other than that there is not much you can do.



回答2:

Use this code in your project and only required tiles in your application,

https://github.com/tbicr/OfflineMap



回答3:

The last thing i can say, Google Maps doesn´t work without network connectivity.

the only thing you can use is:

https://github.com/oscarfonts/mapbox-gl-cordova-offline

This is probably a solution that works for your needs.