setMapStyle method

  1. @override
Future<void> setMapStyle(
  1. String? mapStyle, {
  2. required int mapId,
})

Sets the passed-in mapStyle to the map.

This function just adds a 'styles' option to the current map options.

Subsequent calls to this method override previous calls, you need to pass full styles.

Implementation

@override
Future<void> setMapStyle(
  String? mapStyle, {
  required int mapId,
}) async {
  _map(mapId).updateStyles(_mapStyles(mapStyle));
}