-
Notifications
You must be signed in to change notification settings - Fork 918
How different are the JavaScript APIs (web) and the mobile SDKs (native)
Google Maps Javascript API v3 works perfectly in PhoneGap/Cordova, but the performance is not good when the app uses mobile network. Also, it's not as smooth as the native SDK.
Google Maps JavaScript API loads a lot of image data for a map tile.
For instance, a map tile is a png image with a size of 12.6KB.
In the image below, the map loads 9 map tiles (= 9 map images) at least. This means, drawing the map below will download 113.4KB (= 12.6KB * 9) of image data.
You may not feel inconvenience about the map when you're browsing using your desktop browser, because your desktop environment has much more memory and faster a CPU than your mobile device.
The value of 113.4KB is a lot of data for a mobile device. In generally, the mobile network speed is less than WiFi internet, and your device has less memory and less CPU power than your laptop. It means loading map tiles takes a few seconds. If you zoom in the map, the map will load 113.4KB again.
Google provides Google Maps Android API v2 and Google Maps SDK for iOS. They load only map data for drawing map tiles, then the SDK draws the map. It's probably less than 12.6KB. (vector data)
This is the most different point between Google Maps JavaScript API and Google Maps Mobile SDKs. Using Google Maps Mobile SDKs brings more performance into your app.
If you get an error, feel free to ask me on the official community or the issue list.
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md
New versions will be announced through the official community. Stay tune!
Feel free to ask me on the issues tracker.
Or on the official community is also welcome!
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md