Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit b376693

Browse files
author
Chris Yang
committed
draft
remove unnecessary static funcctions clean up method name and remove unused code update version remove all static methods fix remove unnecessary imports review part 1 review 2 drat 2 format, crash, more tests
1 parent 5942a85 commit b376693

19 files changed

+1245
-933
lines changed

packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Fixes issue in Flutter v3.0.0 where some updates to the map don't take effect on Android.
44
* Fixes iOS native unit tests on M1 devices.
55
* Minor fixes for new analysis options.
6+
* Objective-C code cleanup.
67

78
## 2.1.5
89

packages/google_maps_flutter/google_maps_flutter/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1212
4510D964F3B1259FEDD3ABA6 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */; };
13+
6851F3562835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */; };
14+
68E4726A2836FF0C00BDDDAC /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68E472692836FF0C00BDDDAC /* MapKit.framework */; };
1315
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
1416
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
1517
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
@@ -55,6 +57,8 @@
5557
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
5658
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
5759
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
60+
6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLTGoogleMapJSONConversionsConversionTests.m; sourceTree = "<group>"; };
61+
68E472692836FF0C00BDDDAC /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/iOSSupport/System/Library/Frameworks/MapKit.framework; sourceTree = DEVELOPER_DIR; };
5862
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>"; };
5963
7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6064
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@@ -95,6 +99,7 @@
9599
isa = PBXFrameworksBuildPhase;
96100
buildActionMask = 2147483647;
97101
files = (
102+
68E4726A2836FF0C00BDDDAC /* MapKit.framework in Frameworks */,
98103
FC8F35FC8CD533B128950487 /* libPods-RunnerTests.a in Frameworks */,
99104
);
100105
runOnlyForDeploymentPostprocessing = 0;
@@ -112,6 +117,7 @@
112117
1E7CF0857EFC88FC263CF3B2 /* Frameworks */ = {
113118
isa = PBXGroup;
114119
children = (
120+
68E472692836FF0C00BDDDAC /* MapKit.framework */,
115121
7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */,
116122
F267F68029D1A4E2E4C572A7 /* libPods-RunnerTests.a */,
117123
);
@@ -190,6 +196,7 @@
190196
F7151F11265D7ED70028CB91 /* RunnerTests */ = {
191197
isa = PBXGroup;
192198
children = (
199+
6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */,
193200
F7151F12265D7ED70028CB91 /* GoogleMapsTests.m */,
194201
982F2A6A27BADE17003C81F4 /* PartiallyMockedMapView.h */,
195202
982F2A6B27BADE17003C81F4 /* PartiallyMockedMapView.m */,
@@ -446,6 +453,7 @@
446453
buildActionMask = 2147483647;
447454
files = (
448455
F7151F13265D7ED70028CB91 /* GoogleMapsTests.m in Sources */,
456+
6851F3562835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m in Sources */,
449457
982F2A6C27BADE17003C81F4 /* PartiallyMockedMapView.m in Sources */,
450458
);
451459
runOnlyForDeploymentPostprocessing = 0;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
@import google_maps_flutter;
6+
@import google_maps_flutter.Test;
7+
@import XCTest;
8+
@import MapKit;
9+
@import GoogleMaps;
10+
11+
#import <OCMock/OCMock.h>
12+
#import "PartiallyMockedMapView.h"
13+
14+
@interface FLTGoogleMapJSONConversionsTests : XCTestCase
15+
@end
16+
17+
@implementation FLTGoogleMapJSONConversionsTests
18+
19+
- (void)testLocationFromLatlong {
20+
NSArray<NSNumber *> *latlong = @[ @(1), @(2) ];
21+
CLLocationCoordinate2D location = [FLTGoogleMapJSONConversions locationFromLatlong:latlong];
22+
XCTAssertEqual(location.latitude, 1);
23+
XCTAssertEqual(location.longitude, 2);
24+
}
25+
26+
- (void)testPointFromArray {
27+
NSArray<NSNumber *> *array = @[ @(1), @(2) ];
28+
CGPoint point = [FLTGoogleMapJSONConversions pointFromArray:array];
29+
XCTAssertEqual(point.x, 1);
30+
XCTAssertEqual(point.y, 2);
31+
}
32+
33+
- (void)testArrayFromLocation {
34+
CLLocationCoordinate2D location = CLLocationCoordinate2DMake(1, 2);
35+
NSArray<NSNumber *> *array = [FLTGoogleMapJSONConversions arrayFromLocation:location];
36+
XCTAssertEqual([array[0] integerValue], 1);
37+
XCTAssertEqual([array[1] integerValue], 2);
38+
}
39+
40+
- (void)testColorFromRGBA {
41+
NSNumber *rgba = @(0x01020304);
42+
UIColor *color = [FLTGoogleMapJSONConversions colorFromRGBA:rgba];
43+
CGFloat red, green, blue, alpha;
44+
BOOL success = [color getRed:&red green:&green blue:&blue alpha:&alpha];
45+
XCTAssertTrue(success);
46+
const CGFloat accuracy = 0.0001;
47+
XCTAssertEqualWithAccuracy(red, 2 / 255.0, accuracy);
48+
XCTAssertEqualWithAccuracy(green, 3 / 255.0, accuracy);
49+
XCTAssertEqualWithAccuracy(blue, 4 / 255.0, accuracy);
50+
XCTAssertEqualWithAccuracy(alpha, 1 / 255.0, accuracy);
51+
}
52+
53+
- (void)testPointsFromLatlongs {
54+
NSArray<NSArray *> *latlongs = @[ @[ @(1), @(2) ], @[ @(3), @(4) ] ];
55+
NSArray<CLLocation *> *locations = [FLTGoogleMapJSONConversions pointsFromLatlongs:latlongs];
56+
XCTAssertEqual(locations.count, 2);
57+
XCTAssertEqual(locations[0].coordinate.latitude, 1);
58+
XCTAssertEqual(locations[0].coordinate.longitude, 2);
59+
XCTAssertEqual(locations[1].coordinate.latitude, 3);
60+
XCTAssertEqual(locations[1].coordinate.longitude, 4);
61+
}
62+
63+
- (void)testHolesFromPointsArray {
64+
NSArray<NSArray *> *pointsArray =
65+
@[ @[ @[ @(1), @(2) ], @[ @(3), @(4) ] ], @[ @[ @(5), @(6) ], @[ @(7), @(8) ] ] ];
66+
NSArray<NSArray<CLLocation *> *> *holes =
67+
[FLTGoogleMapJSONConversions holesFromPointsArray:pointsArray];
68+
XCTAssertEqual(holes.count, 2);
69+
XCTAssertEqual(holes[0][0].coordinate.latitude, 1);
70+
XCTAssertEqual(holes[0][0].coordinate.longitude, 2);
71+
XCTAssertEqual(holes[0][1].coordinate.latitude, 3);
72+
XCTAssertEqual(holes[0][1].coordinate.longitude, 4);
73+
XCTAssertEqual(holes[1][0].coordinate.latitude, 5);
74+
XCTAssertEqual(holes[1][0].coordinate.longitude, 6);
75+
XCTAssertEqual(holes[1][1].coordinate.latitude, 7);
76+
XCTAssertEqual(holes[1][1].coordinate.longitude, 8);
77+
}
78+
79+
- (void)testDictionaryFromPosition {
80+
id mockPosition = OCMClassMock([GMSCameraPosition class]);
81+
NSValue *locationValue = [NSValue valueWithMKCoordinate:CLLocationCoordinate2DMake(1, 2)];
82+
[(GMSCameraPosition *)[[mockPosition stub] andReturnValue:locationValue] target];
83+
[[[mockPosition stub] andReturnValue:@(2.0)] zoom];
84+
[[[mockPosition stub] andReturnValue:@(3.0)] bearing];
85+
[[[mockPosition stub] andReturnValue:@(75.0)] viewingAngle];
86+
NSDictionary *dictionary = [FLTGoogleMapJSONConversions dictionaryFromPosition:mockPosition];
87+
NSArray *targetArray = @[ @1, @2 ];
88+
XCTAssertEqualObjects(dictionary[@"target"], targetArray);
89+
XCTAssertEqualObjects(dictionary[@"zoom"], @2.0);
90+
XCTAssertEqualObjects(dictionary[@"bearing"], @3.0);
91+
XCTAssertEqualObjects(dictionary[@"tilt"], @75.0);
92+
}
93+
94+
- (void)testDictionaryFromPoint {
95+
CGPoint point = CGPointMake(10, 20);
96+
NSDictionary *dictionary = [FLTGoogleMapJSONConversions dictionaryFromPoint:point];
97+
const CGFloat accuracy = 0.0001;
98+
XCTAssertEqualWithAccuracy([dictionary[@"x"] floatValue], point.x, accuracy);
99+
XCTAssertEqualWithAccuracy([dictionary[@"y"] floatValue], point.y, accuracy);
100+
}
101+
102+
- (void)testDictionaryFromCoordinateBounds {
103+
XCTAssertNil([FLTGoogleMapJSONConversions dictionaryFromCoordinateBounds:nil]);
104+
105+
GMSCoordinateBounds *bounds =
106+
[[GMSCoordinateBounds alloc] initWithCoordinate:CLLocationCoordinate2DMake(10, 20)
107+
coordinate:CLLocationCoordinate2DMake(30, 40)];
108+
NSDictionary *dictionary = [FLTGoogleMapJSONConversions dictionaryFromCoordinateBounds:bounds];
109+
NSArray *southwest = @[ @10, @20 ];
110+
NSArray *northeast = @[ @30, @40 ];
111+
XCTAssertEqualObjects(dictionary[@"southwest"], southwest);
112+
XCTAssertEqualObjects(dictionary[@"northeast"], northeast);
113+
}
114+
115+
- (void)testCameraPostionFromDictionary {
116+
XCTAssertNil([FLTGoogleMapJSONConversions cameraPostionFromDictionary:nil]);
117+
118+
NSDictionary *channelValue =
119+
@{@"target" : @[ @(1), @(2) ], @"zoom" : @3, @"bearing" : @4, @"tilt" : @5};
120+
121+
GMSCameraPosition *cameraPosition =
122+
[FLTGoogleMapJSONConversions cameraPostionFromDictionary:channelValue];
123+
124+
const CGFloat accuracy = 0.001;
125+
XCTAssertEqualWithAccuracy(cameraPosition.target.latitude, 1, accuracy);
126+
XCTAssertEqualWithAccuracy(cameraPosition.target.longitude, 2, accuracy);
127+
XCTAssertEqualWithAccuracy(cameraPosition.zoom, 3, accuracy);
128+
XCTAssertEqualWithAccuracy(cameraPosition.bearing, 4, accuracy);
129+
XCTAssertEqualWithAccuracy(cameraPosition.viewingAngle, 5, accuracy);
130+
}
131+
132+
- (void)testPointFromDictionary {
133+
XCTAssertNil([FLTGoogleMapJSONConversions cameraPostionFromDictionary:nil]);
134+
135+
NSDictionary *dictionary = @{
136+
@"x" : @1,
137+
@"y" : @2,
138+
};
139+
140+
CGPoint point = [FLTGoogleMapJSONConversions pointFromDictionary:dictionary];
141+
142+
const CGFloat accuracy = 0.001;
143+
XCTAssertEqualWithAccuracy(point.x, 1, accuracy);
144+
XCTAssertEqualWithAccuracy(point.y, 2, accuracy);
145+
}
146+
147+
- (void)testCoordinateBoundsFromLatlongs {
148+
NSArray<NSNumber *> *latlong1 = @[ @(1), @(2) ];
149+
NSArray<NSNumber *> *latlong2 = @[ @(3), @(4) ];
150+
151+
GMSCoordinateBounds *bounds =
152+
[FLTGoogleMapJSONConversions coordinateBoundsFromLatlongs:@[ latlong1, latlong2 ]];
153+
154+
const CGFloat accuracy = 0.001;
155+
XCTAssertEqualWithAccuracy(bounds.southWest.latitude, 1, accuracy);
156+
XCTAssertEqualWithAccuracy(bounds.southWest.longitude, 2, accuracy);
157+
XCTAssertEqualWithAccuracy(bounds.northEast.latitude, 3, accuracy);
158+
XCTAssertEqualWithAccuracy(bounds.northEast.longitude, 4, accuracy);
159+
}
160+
161+
- (void)testMapViewTypeFromTypeValue {
162+
XCTAssertEqual(kGMSTypeNormal, [FLTGoogleMapJSONConversions mapViewTypeFromTypeValue:@1]);
163+
XCTAssertEqual(kGMSTypeSatellite, [FLTGoogleMapJSONConversions mapViewTypeFromTypeValue:@2]);
164+
XCTAssertEqual(kGMSTypeTerrain, [FLTGoogleMapJSONConversions mapViewTypeFromTypeValue:@3]);
165+
XCTAssertEqual(kGMSTypeHybrid, [FLTGoogleMapJSONConversions mapViewTypeFromTypeValue:@4]);
166+
XCTAssertEqual(kGMSTypeNone, [FLTGoogleMapJSONConversions mapViewTypeFromTypeValue:@5]);
167+
}
168+
169+
- (void)testCameraUpdateFromChannelValueNewCameraPosition {
170+
NSArray *channelValue = @[
171+
@"newCameraPosition",
172+
@{@"target" : @[ @(1), @(2) ], @"zoom" : @3, @"bearing" : @4, @"tilt" : @5}
173+
];
174+
id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]);
175+
[FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValue];
176+
[[classMockCameraUpdate expect]
177+
setCamera:[FLTGoogleMapJSONConversions cameraPostionFromDictionary:channelValue[1]]];
178+
[classMockCameraUpdate stopMocking];
179+
}
180+
181+
// TODO(cyanglaz): Fix the test for CameraUpdateFromChannelValue with the "NewLatlng" key.
182+
// 2 approaches have been tried and neither worked for the tests.
183+
//
184+
// 1. Use OCMock to vefiry that [GMSCameraUpdate setTarget:] is triggered with the correct value.
185+
// This class method conflicts with certain category method in OCMock, causing OCMock not able to
186+
// disambigious them.
187+
//
188+
// 2. Directly verify the GMSCameraUpdate object returned by the method.
189+
// The GMSCameraUpdate object returned from the method doesn't have any accessors to the "target"
190+
// property. It can be used to update the "camera" property in GMSMapView. However, [GMSMapView
191+
// moveCamera:] doesn't update the camera immediately. Thus the GMSCameraUpdate object cannot be
192+
// verified.
193+
//
194+
// The code in below test uses the 2nd approach.
195+
- (void)skip_testCameraUpdateFromChannelValueNewLatlong {
196+
NSArray *channelValue = @[ @"newLatLng", @[ @1, @2 ] ];
197+
198+
GMSCameraUpdate *update = [FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValue];
199+
200+
GMSMapView *mapView = [[GMSMapView alloc]
201+
initWithFrame:CGRectZero
202+
camera:[GMSCameraPosition cameraWithTarget:CLLocationCoordinate2DMake(5, 6) zoom:1]];
203+
[mapView moveCamera:update];
204+
const CGFloat accuracy = 0.001;
205+
XCTAssertEqualWithAccuracy(mapView.camera.target.latitude, 1,
206+
accuracy); // mapView.camera.target.latitude is still 5.
207+
XCTAssertEqualWithAccuracy(mapView.camera.target.longitude, 2,
208+
accuracy); // mapView.camera.target.longitude is still 6.
209+
}
210+
211+
- (void)testCameraUpdateFromChannelValueNewLatLngBounds {
212+
NSArray<NSNumber *> *latlong1 = @[ @(1), @(2) ];
213+
NSArray<NSNumber *> *latlong2 = @[ @(3), @(4) ];
214+
GMSCoordinateBounds *bounds =
215+
[FLTGoogleMapJSONConversions coordinateBoundsFromLatlongs:@[ latlong1, latlong2 ]];
216+
217+
NSArray *channelValue = @[ @"newLatLngBounds", @[ latlong1, latlong2 ], @20 ];
218+
id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]);
219+
[FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValue];
220+
221+
[[classMockCameraUpdate expect] fitBounds:bounds withPadding:20];
222+
[classMockCameraUpdate stopMocking];
223+
}
224+
225+
- (void)testCameraUpdateFromChannelValueNewLatLngZoom {
226+
NSArray *channelValue = @[ @"newLatLngZoom", @[ @1, @2 ], @3 ];
227+
228+
id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]);
229+
[FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValue];
230+
231+
[[classMockCameraUpdate expect] setTarget:CLLocationCoordinate2DMake(1, 2) zoom:3];
232+
[classMockCameraUpdate stopMocking];
233+
}
234+
235+
- (void)testCameraUpdateFromChannelValueScrollBy {
236+
NSArray *channelValue = @[ @"scrollBy", @1, @2 ];
237+
238+
id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]);
239+
[FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValue];
240+
241+
[[classMockCameraUpdate expect] scrollByX:1 Y:2];
242+
[classMockCameraUpdate stopMocking];
243+
}
244+
245+
- (void)testCameraUpdateFromChannelValueZoomBy {
246+
NSArray *channelValueNoPoint = @[ @"zoomBy", @1 ];
247+
248+
id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]);
249+
[FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValueNoPoint];
250+
251+
[[classMockCameraUpdate expect] zoomBy:1];
252+
253+
NSArray *channelValueWithPoint = @[ @"zoomBy", @1, @[ @2, @3 ] ];
254+
255+
[FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValueWithPoint];
256+
257+
[[classMockCameraUpdate expect] zoomBy:1 atPoint:CGPointMake(2, 3)];
258+
[classMockCameraUpdate stopMocking];
259+
}
260+
261+
- (void)testCameraUpdateFromChannelValueZoomIn {
262+
NSArray *channelValueNoPoint = @[ @"zoomIn" ];
263+
264+
id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]);
265+
[FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValueNoPoint];
266+
267+
[[classMockCameraUpdate expect] zoomIn];
268+
[classMockCameraUpdate stopMocking];
269+
}
270+
271+
- (void)testCameraUpdateFromChannelValueZoomOut {
272+
NSArray *channelValueNoPoint = @[ @"zoomOut" ];
273+
274+
id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]);
275+
[FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValueNoPoint];
276+
277+
[[classMockCameraUpdate expect] zoomOut];
278+
[classMockCameraUpdate stopMocking];
279+
}
280+
281+
- (void)testCameraUpdateFromChannelValueZoomTo {
282+
NSArray *channelValueNoPoint = @[ @"zoomTo", @1 ];
283+
284+
id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]);
285+
[FLTGoogleMapJSONConversions cameraUpdateFromChannelValue:channelValueNoPoint];
286+
287+
[[classMockCameraUpdate expect] zoomTo:1];
288+
[classMockCameraUpdate stopMocking];
289+
}
290+
291+
@end

packages/google_maps_flutter/google_maps_flutter/ios/Classes/FLTGoogleMapTileOverlayController.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ NS_ASSUME_NONNULL_BEGIN
2424
@end
2525

2626
@interface FLTTileProviderController : GMSTileLayer
27-
@property(copy, nonatomic, readonly) NSString *tileOverlayId;
28-
- (instancetype)init:(FlutterMethodChannel *)methodChannel tileOverlayId:(NSString *)tileOverlayId;
27+
@property(copy, nonatomic, readonly) NSString *tileOverlayIdentifier;
28+
- (instancetype)init:(FlutterMethodChannel *)methodChannel
29+
withTileOverlayIdentifier:(NSString *)identifier;
2930
@end
3031

3132
@interface FLTTileOverlaysController : NSObject
@@ -34,9 +35,9 @@ NS_ASSUME_NONNULL_BEGIN
3435
registrar:(NSObject<FlutterPluginRegistrar> *)registrar;
3536
- (void)addTileOverlays:(NSArray *)tileOverlaysToAdd;
3637
- (void)changeTileOverlays:(NSArray *)tileOverlaysToChange;
37-
- (void)removeTileOverlayIds:(NSArray *)tileOverlayIdsToRemove;
38-
- (void)clearTileCache:(NSString *)tileOverlayId;
39-
- (nullable NSDictionary *)getTileOverlayInfo:(NSString *)tileverlayId;
38+
- (void)removeTileOverlayWithIdentifiers:(NSArray *)identifiers;
39+
- (void)clearTileCacheWithIdentifier:(NSString *)identifiers;
40+
- (nullable NSDictionary *)tileOverlayInfoWithIdentifier:(NSString *)identifier;
4041
@end
4142

4243
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)