Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map window does not have any close event #11

Closed
saadmahmoodkhan opened this issue Apr 16, 2014 · 1 comment
Closed

map window does not have any close event #11

saadmahmoodkhan opened this issue Apr 16, 2014 · 1 comment

Comments

@saadmahmoodkhan
Copy link

Dear Masashi Katsumata,

map window does not have any close event ?

Thanks
Best Regards
Saad Mehmood

ghost pushed a commit that referenced this issue Apr 16, 2014
@wf9a5m75
Copy link
Member

@saadmahmoodkhan , I updated the plugin to version 1.0.4 which fires the MAP_CLOSE event when the map dialog is closed.
In order to update the plugin, uninstall the current plugin, then install the new plugin.

$> cd (your project dir)
$> cordova plugin rm plugin.google.maps
$> cordova plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"

snipet

function onBtnClicked() {
  var map = plugin.google.maps.Map.getMap();
  map.addEventListener(plugin.google.maps.event.MAP_READY, onMapInit);
}

function onMapInit(map) {
  map.showDialog();
  map.addEventListener(plugin.google.maps.event.MAP_CLOSE, function() {
    alert("The map dialog is closed");
  });
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants