Skip to content

v2 beta

Masashi Katsumata edited this page Oct 4, 2016 · 20 revisions

Cordova GoogleMaps plugin for iOS and Android v2 (beta)

What is version 2?

The Cordova GoogleMaps plugin version 2 finally supports multiple maps in the same html file. You can create your maps in the same html file for multiple locations.

All most all code is recreated, and the most code run in the background thread. So it should be faster than version 1.

The greatest thing is the plugin recognizes all html element of the HTML. You don't need to turn on/off map.setClickable(true/false) when you display your HTML on the map div (such as HTML dialogs).

Why beta?

Masashi (who is the author of this plugin) wrote the plugin and tested it on his several devices. But he feel it is not enough to test the plugin. So during the tests with early developers, the plugin version 2 is still beta.

How to install?

Please use the multiple_maps branch.

$> cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps #multiple_maps --variable API_KEY_FOR_ANDROID="<YOUR KEY>" --variable API_KEY_FOR_IOS="<YOUR KEY>"

Migrate code from v1

Several methods are renamed in v2. Please rewrite your code.

method names
v1 v2
map.setCenter() map.setCameraTarget()
map.setZoom() map.setCameraZoom()
map.setBearing() map.setCameraBearing()
map.setTilt() map.setCameraTilt()
map.getCenter() map.getCameraTarget()
map.getZoom() map.getCameraZoom()
map.getBearing() map.getCaneraBearing()
map.getTilt() map.getCaneraTilt()
map.setBackgroundColor() Environent.setBackgroundColor()

Join the official community

New versions will be announced through the official community. Stay tune!

Do you have a question or feature request?

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

Clone this wiki locally