Coordinate values now parsed as double instead of float to retain precision after 6 decimal places.
MODIFY
src/ios/GoogleMaps/PluginCircle.m
src/ios/GoogleMaps/PluginCircle.m
NSDictionary *json = [command.arguments objectAtIndex:1];
NSDictionary *latLng = [json objectForKey:@"center"];
- float latitude = [[latLng valueForKey:@"lat"] floatValue];
- float longitude = [[latLng valueForKey:@"lng"] floatValue];
+ double latitude = [[latLng valueForKey:@"lat"] doubleValue];
+ double longitude = [[latLng valueForKey:@"lng"] doubleValue];
CLLocationCoordinate2D position = CLLocationCoordinate2DMake(latitude, longitude);
float radius = [[json valueForKey:@"radius"] floatValue];
NSString *circleId = [command.arguments objectAtIndex:0];
GMSCircle *circle = [self.mapCtrl.objects objectForKey:circleId];
- float latitude = [[command.arguments objectAtIndex:1] floatValue];
- float longitude = [[command.arguments objectAtIndex:2] floatValue];
+ double latitude = [[command.arguments objectAtIndex:1] doubleValue];
+ double longitude = [[command.arguments objectAtIndex:2] doubleValue];
CLLocationCoordinate2D center = CLLocationCoordinate2DMake(latitude, longitude);
[[NSOperationQueue mainQueue] addOperationWithBlock:^{

MODIFY
src/ios/GoogleMaps/PluginMarker.m
src/ios/GoogleMaps/PluginMarker.m
NSMutableDictionary *iconProperty = nil;
NSString *animation = nil;
NSDictionary *latLng = [json objectForKey:@"position"];
- float latitude = [[latLng valueForKey:@"lat"] floatValue];
- float longitude = [[latLng valueForKey:@"lng"] floatValue];
+ double latitude = [[latLng valueForKey:@"lat"] doubleValue];
+ double longitude = [[latLng valueForKey:@"lng"] doubleValue];
CLLocationCoordinate2D position = CLLocationCoordinate2DMake(latitude, longitude);
NSString *markerId = [command.arguments objectAtIndex:0];
GMSMarker *marker = [self.mapCtrl.objects objectForKey:markerId];
- float latitude = [[command.arguments objectAtIndex:1] floatValue];
- float longitude = [[command.arguments objectAtIndex:2] floatValue];
+ double latitude = [[command.arguments objectAtIndex:1] doubleValue];
+ double longitude = [[command.arguments objectAtIndex:2] doubleValue];
CLLocationCoordinate2D position = CLLocationCoordinate2DMake(latitude, longitude);
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
[marker setPosition:position];

MODIFY
src/ios/GoogleMaps/PluginPolygon.m
src/ios/GoogleMaps/PluginPolygon.m
NSDictionary *latLng;
for (i = 0; i < points.count; i++) {
latLng = [points objectAtIndex:i];
- [mutablePath addCoordinate:CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue])];
+ [mutablePath addCoordinate:CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue])];
}
// Create paths of the hole property if specified.
GMSMutablePath *holePath = [GMSMutablePath path];
for (j = 0; j < latLngArray.count; j++) {
latLng = [latLngArray objectAtIndex:j];
- [holePath addLatitude:[[latLng objectForKey:@"lat"] floatValue] longitude:[[latLng objectForKey:@"lng"] floatValue]];
+ [holePath addLatitude:[[latLng objectForKey:@"lat"] doubleValue] longitude:[[latLng objectForKey:@"lng"] doubleValue]];
}
[holePaths addObject:holePath];
}
GMSMutablePath *path = [GMSMutablePath path];
for (i = 0; i < [holes count]; i++) {
latLng = [latLngArray objectAtIndex:i];
- [path addLatitude:[[latLng objectForKey:@"lat"] floatValue] longitude:[[latLng objectForKey:@"lng"] floatValue]];
+ [path addLatitude:[[latLng objectForKey:@"lat"] doubleValue] longitude:[[latLng objectForKey:@"lng"] doubleValue]];
}
[holePaths insertObject:path atIndex:index];
// Insert a point into the specified hole
GMSMutablePath *path = [holePaths objectAtIndex:holeIndex];
- CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue]);
+ CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue]);
[path replaceCoordinateAtIndex:pointIndex withCoordinate:position];
[holePaths setObject:path atIndexedSubscript:holeIndex];
holePositions = [holeList objectAtIndex:i];
for (int j = 0; j < holePositions.count; j++) {
latLng = [holePositions objectAtIndex:j];
- [path addCoordinate:CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue])];
+ [path addCoordinate:CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue])];
}
[holePaths addObject:path];
}
// Insert a point into the specified hole
GMSMutablePath *path = [holePaths objectAtIndex:holeIndex];
- CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue]);
+ CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue]);
[path insertCoordinate:position atIndex:pointIndex];
[holePaths setObject:path atIndexedSubscript:holeIndex];
[mutablePath removeAllCoordinates];
for (int i = 0; i < positionList.count; i++) {
latLng = [positionList objectAtIndex:i];
- [mutablePath addCoordinate:CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue])];
+ [mutablePath addCoordinate:CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue])];
}
// update the property
GMSMutablePath *mutablePath = (GMSMutablePath *)[properties objectForKey:@"mutablePath"];
- CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue]);
+ CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue]);
[mutablePath insertCoordinate:position atIndex:index];
// update the property
GMSMutablePath *mutablePath = (GMSMutablePath *)[properties objectForKey:@"mutablePath"];
- CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue]);
+ CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue]);
[mutablePath replaceCoordinateAtIndex:index withCoordinate:position];
// update the property

MODIFY
src/ios/GoogleMaps/PluginPolyline.m
src/ios/GoogleMaps/PluginPolyline.m
latLng = [points objectAtIndex:i];
[mutablePath
addCoordinate:
- CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue])];
+ CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue])];
}
dispatch_async(dispatch_get_main_queue(), ^{
NSDictionary *latLng;
for (int i = 0; i < positionList.count; i++) {
latLng = [positionList objectAtIndex:i];
- position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue]);
+ position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue]);
}
// update the property
GMSMutablePath *mutablePath = (GMSMutablePath *)[properties objectForKey:@"mutablePath"];
- CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue]);
+ CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue]);
[mutablePath insertCoordinate:position atIndex:index];
// update the property
GMSMutablePath *mutablePath = (GMSMutablePath *)[properties objectForKey:@"mutablePath"];
- CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] floatValue], [[latLng objectForKey:@"lng"] floatValue]);
+ CLLocationCoordinate2D position = CLLocationCoordinate2DMake([[latLng objectForKey:@"lat"] doubleValue], [[latLng objectForKey:@"lng"] doubleValue]);
[mutablePath replaceCoordinateAtIndex:index withCoordinate:position];
// update the property

Coordinate values now parsed as double instead of float to retain precision after 6 decimal places.