Bug fix: Second Load of Map is Failing with Latest Plugin
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta3-20170824-1555" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta3-20170824-1940" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="BaseClass" src="www/BaseClass.js">
<runs />

MODIFY
src/ios/GoogleMaps/CordovaGoogleMaps.m
src/ios/GoogleMaps/CordovaGoogleMaps.m
* Intialize the map
*/
- (void)getMap:(CDVInvokedUrlCommand *)command {
+ if (self.pluginLayer != nil) {
+ self.pluginLayer.isSuspended = false;
+ self.pluginLayer.pauseResize = false;
+ }
dispatch_async(dispatch_get_main_queue(), ^{

MODIFY
src/ios/GoogleMaps/PluginMap.m
src/ios/GoogleMaps/PluginMap.m
- (void)getMap:(CDVInvokedUrlCommand*)command {
+
if ([command.arguments count] == 1) {
//-----------------------------------------------------------------------
// case: plugin.google.maps.getMap([options]) (no the mapDiv is given)
// Redraw the map mandatory
[self.mapCtrl.map setNeedsDisplay];
-
if ([initOptions valueForKey:@"camera"]) {
//------------------------------------------
// Case : The camera option is specified.
NSDictionary *cameraOpts = [initOptions objectForKey:@"camera"];
[self _changeCameraPosition:@"moveCamera" requestMethod:requestMethod params:cameraOpts command:command];
} else {
+ [self.mapCtrl mapView:self.mapCtrl.map didChangeCameraPosition:self.mapCtrl.map.camera];
[self.mapCtrl.view setHidden:NO];
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];

MODIFY
www/Map.js
www/Map.js
@@ -526,8 +526,8 @@ Map.prototype.remove = function(callback) {
}
}
self.set('div', undefined);
- exec(function() {
self.trigger("remove");
+ exec(function() {
if (typeof callback === "function") {
callback.call(self);
}

Bug fix: Second Load of Map is Failing with Latest Plugin #1666