getStyleJson method
Returns the JSON style for the specified map style.
mapStyle
specifies the desired map style, such as MapStyle.standard
, MapStyle.dark
, etc.
The corresponding style JSON is returned, or null for the standard style.
Implementation
String? getStyleJson(MapStyle mapStyle) {
switch (mapStyle) {
case MapStyle.standard:
return null;
case MapStyle.silver:
return MapStyles.silver;
case MapStyle.retro:
return MapStyles.retro;
case MapStyle.dark:
return MapStyles.dark;
case MapStyle.night:
return MapStyles.night;
case MapStyle.aubergine:
return MapStyles.aubergine;
}
}