Bug fix: MAP_READY event is not fired when the mapType = NONE and the camere option are specified
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta2-20170724-0809" 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-beta2-20170724-2000" 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
}
}
+ if (pluginMap.mapCtrl.map.mapType != kGMSTypeNone) {
[pluginMap.mapCtrl.view setHidden:YES];
}
+ }
camera = [GMSCameraPosition cameraWithLatitude:latitude
longitude:longitude
zoom: zoom
mapType = caseBlock();
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
- if (mapType != kGMSTypeNone) {
pluginMap.mapCtrl.map.mapType = mapType;
+ if (mapType != kGMSTypeNone) {
[pluginMap.mapCtrl.view setHidden:YES];
}
}];

MODIFY
src/ios/GoogleMaps/PluginMap.m
src/ios/GoogleMaps/PluginMap.m
[self.mapCtrl.map cameraForBounds:bounds insets:paddingUiEdgeInsets];
[self.mapCtrl.view setHidden:NO];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+
+ if (self.mapCtrl.map.mapType == kGMSTypeNone) {
+ double delayInSeconds = 2;
+ dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
+ dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
+ [self.mapCtrl mapViewDidFinishTileRendering:self.mapCtrl.map];
+ });
+ }
});
});
} else {
- [self.mapCtrl.view setHidden:NO];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+ [self.mapCtrl.view setHidden:NO];
+ if (self.mapCtrl.map.mapType == kGMSTypeNone) {
+ double delayInSeconds = 2;
+ dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
+ dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
+ [self.mapCtrl mapViewDidFinishTileRendering:self.mapCtrl.map];
+ });
+ }
}
}

Bug fix: MAP_READY event is not fired when the mapType = NONE and the camere option are specified (#1577)