1

I have set up google_maps_flutter as in the code below with zoomControlsEnabled: true and mapToolbarEnabled: true.

I want to use the Map Toolbar for assisted point-to-point navigation with Google Maps. The Tool Bar Shows up on the map when I click a marker.

I can see both the Zoom Controls and the Map Tool Bar in the Android Emulator for the Flutter app but they are not there in the iOS Simulator.

Can someone please point out what I am missing here?

Thanks

GoogleMap(
                padding: EdgeInsets.only(
                  bottom: _mapBottomPadding,
                ),
                mapType: MapType.normal,
                initialCameraPosition: _baseLocation,
                myLocationButtonEnabled: true,
                myLocationEnabled: true,

                zoomControlsEnabled: true,
                zoomGesturesEnabled: true,
                mapToolbarEnabled: true,
                // minMaxZoomPreference: const MinMaxZoomPreference(12, 14),
                polylines: _polylineSet,
                markers: _markersSet,
                onMapCreated: (GoogleMapController controller) async {
                  if (!_controller.isCompleted) {
                    //first calling is false
                    //call "completer()"
                    _controller.complete(controller);
                    // setState(() {});
                  } else {
                    //other calling, later is true,
                    //don't call again completer()
                  }
                  // _controller.complete(controller);
                  _googleMapController = controller;

                  // Set Driver Current Position
                  locationData.getCurrentPosition().then(
                    (value) {
                      if (mounted)
                        setState(() {
                          _driverLatitude = value.latitude;
                          _driverLongitude = value.longitude;
                        });
                    },
                  ).catchError(
                    (error) {
                      showLocationPermissionsAlert(
                        context,
                        error.toString(),
                      );
                    },
                  );

                  setMapBounds();
                  setState(() {});
                },
              ),
  • duplicate question: https://stackoverflow.com/questions/68666724/google-maps-flutter-not-showing-zoom-and-route-buttons-in-ios – jabamataro Jan 31 '22 at 09:22

0 Answers0