I am looking to implement a custom-styled Google Map instance in my Flutter (web) app. I have generated a custom-styled map in Google Cloud Platform and have its id but am unable to set the map style by mapId as this method is not defined in the dart API. Is there any workaround?
JS:
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: lat, lng: lng},
zoom: num,
mapId: 'MAP_ID'
});
Dart:
final mapOptions = MapOptions()
..zoom = num
..center = LatLng
..mapTypeControlOptions = MapTypeControlOptions
..mapId = 'MAP_ID';
final map = GMap(Element, mapOptions);
Custom map types:
Package:
- I am using
google_maps: ^5.1.0which can be found at https://pub.dev/packages/google_maps.