Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

google maps flutter maps style

final Completer<GoogleMapController> _mapController = Completer();

....
...

Future<void> _onMapCreated(GoogleMapController controller) async {
    _mapController.complete(controller);
    String value = await DefaultAssetBundle.of(context)
        .loadString('assets/images/mapstyle.json');
    var t = await _mapController.future;
    t.setMapStyle(value);
  }
 
PREVIOUS NEXT
Tagged: #google #maps #flutter #maps #style
ADD COMMENT
Topic
Name
1+6 =