Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## NEXT
## 2.15.6

* Fixes potential flickers of default property values when adding objects to
the map.
* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.

## 2.15.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
2A6906C72D263DF4001F8426 /* GoogleMapsGroundOverlayControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A6906C62D263DE7001F8426 /* GoogleMapsGroundOverlayControllerTests.m */; };
2BDE99378062AE3E60B40021 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3ACE0AFE8D82CD5962486AFD /* Pods_RunnerTests.framework */; };
330909FF2D99B7A60077A751 /* GoogleMapsMarkerControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 330909FE2D99B79B0077A751 /* GoogleMapsMarkerControllerTests.m */; };
339355BA2EB3E50300EBF864 /* GoogleMapsCircleControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 339355B92EB3E4F900EBF864 /* GoogleMapsCircleControllerTests.m */; };
339355BD2EB3E56300EBF864 /* GoogleMapsTileOverlayControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 339355BC2EB3E55600EBF864 /* GoogleMapsTileOverlayControllerTests.m */; };
339355BF2EB535A600EBF864 /* FLTGoogleMapHeatmapControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 339355BE2EB5359B00EBF864 /* FLTGoogleMapHeatmapControllerTests.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
478116522BEF8F47002F593E /* GoogleMapsPolylinesControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 478116512BEF8F47002F593E /* GoogleMapsPolylinesControllerTests.m */; };
478116522BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 478116512BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m */; };
528F16832C62941000148160 /* FGMClusterManagersControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 528F16822C62941000148160 /* FGMClusterManagersControllerTests.m */; };
528F16872C62952700148160 /* ExtractIconFromDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 528F16862C62952700148160 /* ExtractIconFromDataTests.m */; };
6851F3562835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */; };
Expand Down Expand Up @@ -66,14 +69,19 @@
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
2A6906C62D263DE7001F8426 /* GoogleMapsGroundOverlayControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsGroundOverlayControllerTests.m; sourceTree = "<group>"; };
330909FE2D99B79B0077A751 /* GoogleMapsMarkerControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsMarkerControllerTests.m; sourceTree = "<group>"; };
339355B82EB3E4D500EBF864 /* GoogleMapsPolygonControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsPolygonControllerTests.m; sourceTree = "<group>"; };
339355B92EB3E4F900EBF864 /* GoogleMapsCircleControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsCircleControllerTests.m; sourceTree = "<group>"; };
339355BC2EB3E55600EBF864 /* GoogleMapsTileOverlayControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsTileOverlayControllerTests.m; sourceTree = "<group>"; };
339355BE2EB5359B00EBF864 /* FLTGoogleMapHeatmapControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FLTGoogleMapHeatmapControllerTests.m; sourceTree = "<group>"; };
3ACE0AFE8D82CD5962486AFD /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
478116512BEF8F47002F593E /* GoogleMapsPolylinesControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsPolylinesControllerTests.m; sourceTree = "<group>"; };
478116512BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsPolylineControllerTests.m; sourceTree = "<group>"; };
528F16822C62941000148160 /* FGMClusterManagersControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FGMClusterManagersControllerTests.m; sourceTree = "<group>"; };
528F16862C62952700148160 /* ExtractIconFromDataTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExtractIconFromDataTests.m; sourceTree = "<group>"; };
61A9A8623F5CA9BBC813DC6B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLTGoogleMapJSONConversionsConversionTests.m; sourceTree = "<group>"; };
733AFAB37683A9DA7512F09C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -139,6 +147,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
Expand Down Expand Up @@ -211,12 +220,16 @@
F269303A2BB389BF00BF17C4 /* assets */,
528F16862C62952700148160 /* ExtractIconFromDataTests.m */,
528F16822C62941000148160 /* FGMClusterManagersControllerTests.m */,
339355BE2EB5359B00EBF864 /* FLTGoogleMapHeatmapControllerTests.m */,
6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */,
0DD7B6C22B744EEF00E857FD /* FLTTileProviderControllerTests.m */,
F7151F12265D7ED70028CB91 /* GoogleMapsTests.m */,
330909FE2D99B79B0077A751 /* GoogleMapsMarkerControllerTests.m */,
478116512BEF8F47002F593E /* GoogleMapsPolylinesControllerTests.m */,
339355B92EB3E4F900EBF864 /* GoogleMapsCircleControllerTests.m */,
2A6906C62D263DE7001F8426 /* GoogleMapsGroundOverlayControllerTests.m */,
330909FE2D99B79B0077A751 /* GoogleMapsMarkerControllerTests.m */,
339355B82EB3E4D500EBF864 /* GoogleMapsPolygonControllerTests.m */,
478116512BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m */,
339355BC2EB3E55600EBF864 /* GoogleMapsTileOverlayControllerTests.m */,
982F2A6A27BADE17003C81F4 /* PartiallyMockedMapView.h */,
982F2A6B27BADE17003C81F4 /* PartiallyMockedMapView.m */,
F7151F14265D7ED70028CB91 /* Info.plist */,
Expand Down Expand Up @@ -248,7 +261,6 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
BB6BD9A1101E970BEF85B6D2 /* [CP] Copy Pods Resources */,
9C5FE6CAF02237D44998DDC0 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -426,24 +438,6 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
9C5FE6CAF02237D44998DDC0 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/integration_test/integration_test.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/integration_test.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
BB6BD9A1101E970BEF85B6D2 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -522,11 +516,14 @@
buildActionMask = 2147483647;
files = (
528F16832C62941000148160 /* FGMClusterManagersControllerTests.m in Sources */,
339355BA2EB3E50300EBF864 /* GoogleMapsCircleControllerTests.m in Sources */,
339355BF2EB535A600EBF864 /* FLTGoogleMapHeatmapControllerTests.m in Sources */,
339355BD2EB3E56300EBF864 /* GoogleMapsTileOverlayControllerTests.m in Sources */,
F7151F13265D7ED70028CB91 /* GoogleMapsTests.m in Sources */,
6851F3562835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m in Sources */,
982F2A6C27BADE17003C81F4 /* PartiallyMockedMapView.m in Sources */,
330909FF2D99B7A60077A751 /* GoogleMapsMarkerControllerTests.m in Sources */,
478116522BEF8F47002F593E /* GoogleMapsPolylinesControllerTests.m in Sources */,
478116522BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m in Sources */,
2A6906C72D263DF4001F8426 /* GoogleMapsGroundOverlayControllerTests.m in Sources */,
0DD7B6C32B744EEF00E857FD /* FLTTileProviderControllerTests.m in Sources */,
528F16872C62952700148160 /* ExtractIconFromDataTests.m in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// Copyright 2013 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@import google_maps_flutter_ios;
@import google_maps_flutter_ios.Test;
@import XCTest;
@import GoogleMaps;
@import GoogleMapsUtils;

#import "PartiallyMockedMapView.h"

@interface PropertyOrderValidatingHeatmap : GMUHeatmapTileLayer {
}
@property(nonatomic) BOOL hasSetMap;
@end

@interface GoogleMapsHeatmapControllerTests : XCTestCase
@end

@implementation GoogleMapsHeatmapControllerTests

- (void)testUpdateHeatmapSetsVisibilityLast {
PropertyOrderValidatingHeatmap *heatmap = [[PropertyOrderValidatingHeatmap alloc] init];
[FLTGoogleMapHeatmapController
updateHeatmap:heatmap
fromOptions:@{
@"data" : @[ @[ @[ @(5), @(5) ], @(0.5) ], @[ @[ @(10), @(10) ], @(0.75) ] ],
@"gradient" : @{
@"colors" : @[ @(0), @(1) ],
@"startPoints" : @[ @(0), @(1) ],
@"colorMapSize" : @(256),
},
@"opacity" : @(0.5),
@"radius" : @(1),
@"minimumZoomIntensity" : @(1),
@"maximumZoomIntensity" : @(2),
}
withMapView:[GoogleMapsHeatmapControllerTests mapView]];
XCTAssertTrue(heatmap.hasSetMap);
}

/// Returns a simple map view to add map objects to.
+ (GMSMapView *)mapView {
GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init];
mapViewOptions.frame = CGRectMake(0, 0, 100, 100);
mapViewOptions.camera = [[GMSCameraPosition alloc] initWithLatitude:0 longitude:0 zoom:0];
return [[PartiallyMockedMapView alloc] initWithOptions:mapViewOptions];
}

@end

@implementation PropertyOrderValidatingHeatmap

- (void)setWeightedData:(NSArray<GMUWeightedLatLng *> *)weightedData {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.weightedData = weightedData;
}

- (void)setRadius:(NSUInteger)radius {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.radius = radius;
}

- (void)setGradient:(GMUGradient *)gradient {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.gradient = gradient;
}

- (void)setMinimumZoomIntensity:(NSUInteger)minimumZoomIntensity {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.minimumZoomIntensity = minimumZoomIntensity;
}

- (void)setMaximumZoomIntensity:(NSUInteger)maximumZoomIntensity {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.maximumZoomIntensity = maximumZoomIntensity;
}

- (void)setZIndex:(int)zIndex {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.zIndex = zIndex;
}

- (void)setTileSize:(NSInteger)tileSize {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.tileSize = tileSize;
}

- (void)setOpacity:(float)opacity {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.opacity = opacity;
}

- (void)setFadeIn:(BOOL)fadeIn {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.fadeIn = fadeIn;
}

- (void)setMap:(GMSMapView *)map {
// Don't actually set the map, since that requires more test setup.
if (map) {
self.hasSetMap = YES;
}
}
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
// Copyright 2013 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@import google_maps_flutter_ios;
@import google_maps_flutter_ios.Test;
@import XCTest;
@import GoogleMaps;

#import "PartiallyMockedMapView.h"

/// A GMSCircle that ensures that property updates are made before the map is set.
@interface PropertyOrderValidatingCircle : GMSCircle {
}
@property(nonatomic) BOOL hasSetMap;
@end

@interface GoogleMapsCircleControllerTests : XCTestCase
@end

@implementation GoogleMapsCircleControllerTests

- (void)testUpdateCircleSetsVisibilityLast {
PropertyOrderValidatingCircle *circle = [[PropertyOrderValidatingCircle alloc] init];
[FLTGoogleMapCircleController
updateCircle:circle
fromPlatformCircle:[FGMPlatformCircle
makeWithConsumeTapEvents:NO
fillColor:0
strokeColor:0
visible:YES
strokeWidth:0
zIndex:0
center:[FGMPlatformLatLng makeWithLatitude:0
longitude:0]
radius:10
circleId:@"circle"]
withMapView:[GoogleMapsCircleControllerTests mapView]];
XCTAssertTrue(circle.hasSetMap);
}

/// Returns a simple map view to add map objects to.
+ (GMSMapView *)mapView {
GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init];
mapViewOptions.frame = CGRectMake(0, 0, 100, 100);
mapViewOptions.camera = [[GMSCameraPosition alloc] initWithLatitude:0 longitude:0 zoom:0];
return [[PartiallyMockedMapView alloc] initWithOptions:mapViewOptions];
}

@end

@implementation PropertyOrderValidatingCircle
- (void)setPosition:(CLLocationCoordinate2D)position {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.position = position;
}

- (void)setRadius:(CLLocationDistance)radius {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.radius = radius;
}

- (void)setStrokeWidth:(CGFloat)strokeWidth {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.strokeWidth = strokeWidth;
}

- (void)setStrokeColor:(UIColor *)strokeColor {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.strokeColor = strokeColor;
}

- (void)setFillColor:(UIColor *)fillColor {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.fillColor = fillColor;
}

- (void)setTitle:(NSString *)title {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.title = title;
}

- (void)setTappable:(BOOL)tappable {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.tappable = tappable;
}

- (void)setZIndex:(int)zIndex {
XCTAssertFalse(self.hasSetMap, @"Property set after map was set.");
super.zIndex = zIndex;
}

- (void)setMap:(GMSMapView *)map {
// Don't actually set the map, since that requires more test setup.
if (map) {
self.hasSetMap = YES;
}
}
@end
Loading