Is it possible to use json generated from Google Styling Wizard to stylize the Flutter native map?
There is no such ability in current version. But soon it can be achieved due to this pull request
Update
Finally it has been merged with #1697 pull request! And it's published in 0.5.16 version of google_maps_flutter.
To use this feature invoke setMapStyle
on GoogleMapController
instance and pass style string as a parameter.
e.g.
GoogleMapController mapController;
void _onMapCreated(GoogleMapController controller) {
mapController = controller;
mapController.setMapStyle('[{"featureType": "all","stylers": [{ "color": "#C0C0C0" }]},{"featureType": "road.arterial","elementType": "geometry","stylers": [{ "color": "#CCFFFF" }]},{"featureType": "landscape","elementType": "labels","stylers": [{ "visibility": "off" }]}]');
}
From the docs:
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.