Skip to content

Commit 09a2976

Browse files
committed
Remove cloudMapId field
1 parent 25c3ea6 commit 09a2976

File tree

5 files changed

+7
-19
lines changed

5 files changed

+7
-19
lines changed

packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ PlatformMapConfiguration _platformMapConfigurationFromMapConfiguration(
13071307
trafficEnabled: config.trafficEnabled,
13081308
buildingsEnabled: config.buildingsEnabled,
13091309
liteModeEnabled: config.liteModeEnabled,
1310-
mapId: config.mapId ?? config.cloudMapId,
1310+
mapId: config.mapId,
13111311
style: config.style,
13121312
);
13131313
}

packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ class MapConfiguration {
3535
this.indoorViewEnabled,
3636
this.trafficEnabled,
3737
this.buildingsEnabled,
38-
this.mapId,
39-
@Deprecated('cloudMapId is deprecated. Use mapId instead.') this.cloudMapId,
38+
String? mapId,
39+
@Deprecated('cloudMapId is deprecated. Use mapId instead.')
40+
String? cloudMapId,
4041
this.style,
41-
});
42+
}) : mapId = mapId ?? cloudMapId;
4243

4344
/// This setting controls how the API handles gestures on the map. Web only.
4445
///
@@ -115,13 +116,6 @@ class MapConfiguration {
115116
/// for more details.
116117
final String? mapId;
117118

118-
/// Identifier that's associated with a specific cloud-based map style.
119-
///
120-
/// See https://developers.google.com/maps/documentation/get-map-id
121-
/// for more details.
122-
@Deprecated('cloudMapId is deprecated. Use mapId instead.')
123-
final String? cloudMapId;
124-
125119
/// Locally configured JSON style.
126120
///
127121
/// To clear a previously set style, set this to an empty string.
@@ -188,7 +182,6 @@ class MapConfiguration {
188182
buildingsEnabled:
189183
buildingsEnabled != other.buildingsEnabled ? buildingsEnabled : null,
190184
mapId: mapId != other.mapId ? mapId : null,
191-
cloudMapId: cloudMapId != other.cloudMapId ? cloudMapId : null,
192185
style: style != other.style ? style : null,
193186
);
194187
}
@@ -222,7 +215,6 @@ class MapConfiguration {
222215
trafficEnabled: diff.trafficEnabled ?? trafficEnabled,
223216
buildingsEnabled: diff.buildingsEnabled ?? buildingsEnabled,
224217
mapId: diff.mapId ?? mapId,
225-
cloudMapId: diff.cloudMapId ?? cloudMapId,
226218
style: diff.style ?? style,
227219
);
228220
}
@@ -250,7 +242,6 @@ class MapConfiguration {
250242
trafficEnabled == null &&
251243
buildingsEnabled == null &&
252244
mapId == null &&
253-
cloudMapId == null &&
254245
style == null;
255246

256247
@override
@@ -283,7 +274,6 @@ class MapConfiguration {
283274
trafficEnabled == other.trafficEnabled &&
284275
buildingsEnabled == other.buildingsEnabled &&
285276
mapId == other.mapId &&
286-
cloudMapId == other.cloudMapId &&
287277
style == other.style;
288278
}
289279

@@ -310,7 +300,6 @@ class MapConfiguration {
310300
trafficEnabled,
311301
buildingsEnabled,
312302
mapId,
313-
cloudMapId,
314303
style,
315304
]);
316305
}

packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ Map<String, Object> jsonForMapConfiguration(MapConfiguration config) {
5959
if (config.buildingsEnabled != null)
6060
'buildingsEnabled': config.buildingsEnabled!,
6161
if (config.mapId != null) 'mapId': config.mapId!,
62-
if (config.cloudMapId != null) 'cloudMapId': config.cloudMapId!,
6362
if (config.style != null) 'style': config.style!,
6463
};
6564
}

packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ void main() {
405405
// The diff from empty options should be the diff itself.
406406
expect(diff.diffFrom(empty), diff);
407407
// A diff applied to non-empty options should update that field.
408-
expect(updated.cloudMapId, _kMapId);
408+
expect(updated.mapId, _kMapId);
409409
// The hash code should change.
410410
expect(empty.hashCode, isNot(diff.hashCode));
411411
});

packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ gmaps.MapOptions _configurationAndStyleToGmapsOptions(
101101
// See updateMapConfiguration for why this is not using configuration.style.
102102
options.styles = styles;
103103

104-
options.mapId = configuration.mapId ?? configuration.cloudMapId;
104+
options.mapId = configuration.mapId;
105105

106106
return options;
107107
}

0 commit comments

Comments
 (0)