Custom Map ID Google Maps Flutter Web

Viewed 1056

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:

0 Answers
Related