Skip to content

Commit

Permalink
fix: use correct indices for the Polygon.holes property
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Feb 6, 2021
1 parent 2ab6088 commit d022cfb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Classes/TiGooglemapsPolygonProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ - (void)setHoles:(id)value

[path insertCoordinate:CLLocationCoordinate2DMake(latitude, longitude) atIndex:idx];
} else if ([point isKindOfClass:[NSArray class]]) {
CLLocationDegrees latitude = [TiUtils doubleValue:[point objectAtIndex:0]];
CLLocationDegrees longitude = [TiUtils doubleValue:[point objectAtIndex:1]];
CLLocationDegrees latitude = [TiUtils doubleValue:[point objectAtIndex:1]];
CLLocationDegrees longitude = [TiUtils doubleValue:[point objectAtIndex:0]];

[path insertCoordinate:CLLocationCoordinate2DMake(latitude, longitude) atIndex:idx];
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ const polygon = maps.createPolygon({
holes: [ {
latitude: -32.95785,
longitude: 115.86234
}, [ -32.95785, 115.86234 ] ], // Important: The longitude is at index 1 and the latitude at index 0.
// This will be deprecated in future releases to align with the other behaviors
}, [ -32.95785, 115.86234 ] ], // Important: The longitude is at index 0 and the latitude at index 1.
// This has been changed in v6.1.2 of the module to align with the other APIs!
zIndex: 10
});
mapView.addPolygon(polygon);
Expand Down
2 changes: 1 addition & 1 deletion manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 6.1.1
version: 6.1.2
apiversion: 2
mac: false
architectures: armv7 arm64 i386 x86_64
Expand Down

0 comments on commit d022cfb

Please sign in to comment.