nix
nix

Reputation: 41

How to hide 3d buildings in google_maps_flutter?

I'm trying to create a simple Flutter app that uses the official Google Maps plugin for Flutter. I'm glad they've recently added the support for custom styling, however when I zoom really close I can see all the white 3d buildings and I think there should be the ability to turn it off because sometimes it's just not wanted and does not fit to the map theme.

I've tried searching for the answer but I haven't been able to find anything related to this issue yet.

I would imagine something like

void _onMapCreated(GoogleMapController controller) {
    mapController = controller;
    mapController.setMapStyle(_mapStyle);
    mapController.show3dBuildings = false;  <------
}

I know the plugin itself is very new and still in dev preview but I'd like to make sure it's not just me and in case it is really missing, make this problem somehow get to the community.

Upvotes: 2

Views: 2377

Answers (1)

kashlo
kashlo

Reputation: 2627

GoogleMap(
  mapType: MapType.normal,
  buildingsEnabled: false
)

Don't know why but with this setting not all buildings are shown, some are marked only as a number, without any contours. Looks like its google maps behavior, not Flutter bug

Upvotes: 1

Related Questions