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?

The latest Cordova-cli version is recommended. And please install the plugin from the multiple_maps branch.

$> cordova --version
6.3.1  // At least 6.2.0 is good.

$> cordova platform add android@latest ios@latest

$> 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

See the Migrate from v1 to v2

Getter synchronizing

The plugin version 2 synchronizes the class properties automatically. It means you don't need to use callback anymore.

For example,

// version 1
marker.getPosition(function(position) {
  // to do something
});

// version 2
var position = marker.getPosition();

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