Bug fix: Markers Sometimes Missing
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta3-20170901-1415" 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-20170901-1541" 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/PluginCircle.m
src/ios/GoogleMaps/PluginCircle.m
}
BOOL isVisible = NO;
- if ([[json valueForKey:@"visible"] boolValue]) {
+ if (json[@"visible"]) {
circle.map = self.mapCtrl.map;
isVisible = YES;
}

MODIFY
src/ios/GoogleMaps/PluginGroundOverlay.m
src/ios/GoogleMaps/PluginGroundOverlay.m
}
BOOL isVisible = NO;
- if ([[json valueForKey:@"visible"] boolValue]) {
+ if (json[@"visible"]) {
groundOverlay.map = self.mapCtrl.map;
isVisible = YES;
}

MODIFY
src/ios/GoogleMaps/PluginMarker.m
src/ios/GoogleMaps/PluginMarker.m
}
// Visible property
- if ([json valueForKey:@"visible"]) {
- [iconProperty setObject:[json valueForKey:@"visible"] forKey:@"visible"];
+ if (json[@"visible"]) {
+ [iconProperty setObject:json[@"visible"] forKey:@"visible"];
} else {
[iconProperty setObject:[NSNumber numberWithBool:true] forKey:@"visible"];
}
// Load icon in asynchronise
[self setIcon_:marker iconProperty:iconProperty callbackBlock:callbackBlock];
} else {
- if ([[json valueForKey:@"visible"] boolValue]) {
+ if (json[@"visible"]) {
marker.map = self.mapCtrl.map;
}
// The `visible` property
- if ([iconProperty[@"visible"] boolValue]) {
+ if (iconProperty[@"visible"]) {
marker.map = self.mapCtrl.map;
}
if (!succeeded) {
NSLog(@"[fail] url = %@", url);
// The `visible` property
- if ([[iconProperty valueForKey:@"visible"] boolValue]) {
+ if (iconProperty[@"visible"]) {
marker.map = self.mapCtrl.map;
}
if ([[UIImageCache sharedInstance].iconCacheKeys objectForKey:iconCacheKey]) {
}
// The `visible` property
- if ([[iconProperty valueForKey:@"visible"] boolValue]) {
+ if (iconProperty[@"visible"]) {
marker.map = self.mapCtrl.map;
}

MODIFY
src/ios/GoogleMaps/PluginMarkerCluster.m
src/ios/GoogleMaps/PluginMarkerCluster.m
@@ -203,7 +203,7 @@ const int GEOCELL_GRID_SIZE = 4;
if ([clusterData objectForKey:@"title"]) {
[properties setObject:[clusterData objectForKey:@"title"] forKey:@"title"];
}
- if ([clusterData objectForKey:@"visible"]) {
+ if (clusterData[@"visible"]) {
[properties setObject:[clusterData objectForKey:@"visible"] forKey:@"visible"];
} else {
[properties setObject:[NSNumber numberWithBool:true] forKey:@"visible"];

MODIFY
src/ios/GoogleMaps/PluginPolygon.m
src/ios/GoogleMaps/PluginPolygon.m
}
BOOL isVisible = NO;
- if ([[json valueForKey:@"visible"] boolValue]) {
+ if (json[@"visible"]) {
polygon.map = self.mapCtrl.map;
isVisible = YES;
}

MODIFY
src/ios/GoogleMaps/PluginPolyline.m
src/ios/GoogleMaps/PluginPolyline.m
GMSPolyline *polyline = [GMSPolyline polylineWithPath:mutablePath];
BOOL isVisible = NO;
- if ([[json valueForKey:@"visible"] boolValue]) {
+ if (json[@"visible"]) {
polyline.map = self.mapCtrl.map;
isVisible = YES;
}

MODIFY
src/ios/GoogleMaps/PluginTileOverlay.m
src/ios/GoogleMaps/PluginTileOverlay.m
- if ([[json valueForKey:@"visible"] boolValue]) {
+ if (json[@"visible"]) {
layer.map = self.mapCtrl.map;
}
if ([json valueForKey:@"zIndex"]) {

Bug fix: Markers Sometimes Missing #1689