Offline Maps in cordova using leaflets make my app stores much capacity

柔情痞子 提交于 2019-12-08 03:14:53

问题


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.



来源:https://stackoverflow.com/questions/24857207/offline-maps-in-cordova-using-leaflets-make-my-app-stores-much-capacity

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!