Skip to content

Commit

Permalink
Bug fix: Markers Sometimes Missing #1689
Browse files Browse the repository at this point in the history
  • Loading branch information
wf9a5m75 committed Sep 1, 2017
1 parent 4a0b433 commit 2e726f5
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?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 />
Expand Down
2 changes: 1 addition & 1 deletion src/ios/GoogleMaps/PluginCircle.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ -(void)create:(CDVInvokedUrlCommand *)command
}

BOOL isVisible = NO;
if ([[json valueForKey:@"visible"] boolValue]) {
if (json[@"visible"]) {
circle.map = self.mapCtrl.map;
isVisible = YES;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ios/GoogleMaps/PluginGroundOverlay.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ -(void)create:(CDVInvokedUrlCommand *)command
}

BOOL isVisible = NO;
if ([[json valueForKey:@"visible"] boolValue]) {
if (json[@"visible"]) {
groundOverlay.map = self.mapCtrl.map;
isVisible = YES;
}
Expand Down
12 changes: 6 additions & 6 deletions src/ios/GoogleMaps/PluginMarker.m
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ - (void)_create:(NSString *)markerId markerOptions:(NSDictionary *)json callback
}

// 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"];
}
Expand All @@ -188,7 +188,7 @@ - (void)_create:(NSString *)markerId markerOptions:(NSDictionary *)json callback
// 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;
}

Expand Down Expand Up @@ -1108,7 +1108,7 @@ -(void)setIcon_:(GMSMarker *)marker iconProperty:(NSDictionary *)iconProperty ca


// The `visible` property
if ([iconProperty[@"visible"] boolValue]) {
if (iconProperty[@"visible"]) {
marker.map = self.mapCtrl.map;
}

Expand Down Expand Up @@ -1147,7 +1147,7 @@ -(void)setIcon_:(GMSMarker *)marker iconProperty:(NSDictionary *)iconProperty ca
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]) {
Expand Down Expand Up @@ -1200,7 +1200,7 @@ -(void)setIcon_:(GMSMarker *)marker iconProperty:(NSDictionary *)iconProperty ca
}

// The `visible` property
if ([[iconProperty valueForKey:@"visible"] boolValue]) {
if (iconProperty[@"visible"]) {
marker.map = self.mapCtrl.map;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ios/GoogleMaps/PluginMarkerCluster.m
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ - (void)redrawClusters:(CDVInvokedUrlCommand*)command {
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"];
Expand Down
2 changes: 1 addition & 1 deletion src/ios/GoogleMaps/PluginPolygon.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ -(void)create:(CDVInvokedUrlCommand *)command
}

BOOL isVisible = NO;
if ([[json valueForKey:@"visible"] boolValue]) {
if (json[@"visible"]) {
polygon.map = self.mapCtrl.map;
isVisible = YES;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ios/GoogleMaps/PluginPolyline.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ -(void)create:(CDVInvokedUrlCommand *)command
GMSPolyline *polyline = [GMSPolyline polylineWithPath:mutablePath];

BOOL isVisible = NO;
if ([[json valueForKey:@"visible"] boolValue]) {
if (json[@"visible"]) {
polyline.map = self.mapCtrl.map;
isVisible = YES;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ios/GoogleMaps/PluginTileOverlay.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ -(void)create:(CDVInvokedUrlCommand *)command



if ([[json valueForKey:@"visible"] boolValue]) {
if (json[@"visible"]) {
layer.map = self.mapCtrl.map;
}
if ([json valueForKey:@"zIndex"]) {
Expand Down

0 comments on commit 2e726f5

Please sign in to comment.