best map system for phonegap web app

I have a phonegap application that uses Google Maps API to display a map with markers, which will displays a small resume of each attraction of a city.

I use cache application and localstorage, 1st to preload all my images, 2nd to display a preview when the user click on the marker, and that in case the network is slow or shut down.

But if I want this app to be used offline. I read that Google Maps tiles can't be used offline. if fact, offline my app appears well but with an empty canvas instead of google map

And the js loading of Google maps is cache on my manifest, but all the app is down, beacause of the missing variable 'google' asked by the js scripts present in my manifest:

[Error] ReferenceError: Can't find variable: google
    load (map.js, line 472)
    Geolocation (geolocation.js, line 38)

so all scripts containing this variable, stop.

What is the solution ? It would be ok for me if the google map not appear but the services not required. in fact, in android offline, I have no problem, the google map tiles are not displaying, but my application still work offline.

I saw multiples soluton but which one is really acceptable ?

openstreemap + leafleft ? Seems good, but isn't it too much complicated relative to google map ? looks like I need to use a SQLite database for Storing the OpenStreetMap and I'll have to donwload all the tiles before rendering them...

Or is there another map, like bing or else, that will just stop rendering new tiles, but don't stop all the javascropts containing a map reference.

thanks.


Would you consider this plugin?

https://github.com/wf9a5m75/phonegap-googlemaps-plugin

The above plugin uses Google Maps Android API v2 and Google Maps SDK for iOS. They provides cache map.

This plugin does not cover all features of Google Maps JavaScript API v3, but the most of basic features are available, such as marker, polyline. And they are very faster than Google Maps JavaScript API v3.

链接地址: http://www.djcxy.com/p/67418.html

上一篇: 如何访问PhoneGap中外部存储的地图图块?

下一篇: 最佳地图系统为phonegap网络应用程序