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.
Implementation
@override
Future<void> setMapStyle(String? mapStyle, {required int mapId}) async {
final bool success = await _hostApi(mapId).setStyle(mapStyle ?? '');
if (!success) {
throw const MapStyleException(_setStyleFailureMessage);
}
}