Skip to content

Phonegap Usage

Masashi Katsumata edited this page May 5, 2014 · 10 revisions

The phonegap-googlemaps-plugin installation requires the "--variables" parameter to embed the Google Maps API key into your project. However, the PhoneGap CLI does not accept the --variable parameter.

$> phonegap create MapTest com.example.map MapTest

$> cd MapTest

$> phonegap build android

$> phonegap plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID="key"
[phonegap] adding the plugin: plugin.google.maps
[Error: Variable(s) missing: API_KEY_FOR_ANDROID]
[error] Variable(s) missing: API_KEY_FOR_ANDROID

For the solution, please use the Cordova CLI for this plugin installation.

$> phonegap create MapTest com.example.map MapTest

$> cd MapTest

$> phonegap build android

$> cordova plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID="key"

$> phonegap plugin list
[phonegap] com.google.playservices
[phonegap] plugin.google.maps

$>phonegap install android

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