setMapStyle method
Sets the styling of the base map.
Set to null
to clear any previous custom styling.
If problems were detected with the mapStyle
, including un-parsable
styling JSON, unrecognized feature type, unrecognized element type, or
invalid styler keys: MapStyleException is thrown and the current
style is left unchanged.
The style string can be generated using map style tool. Also, refer iOS and Android style reference for more information regarding the supported styles.
Implementation
Future<void> setMapStyle(String? mapStyle) {
return GoogleMapsFlutterPlatform.instance
.setMapStyle(mapStyle, mapId: mapId);
}