a14n / dart-google-maps

A library to use Google Maps JavaScript API v3 from Dart scripts.
Apache License 2.0
130 stars 66 forks source link

Map dissapear on scroll #142

Closed arcas0803 closed 3 weeks ago

arcas0803 commented 4 weeks ago

``The map disappears when scroll.

I have a map inside a scroll widget. The first time the map renders it's fine, but when i keep scrolling, the map start to dissapear.

Captura de pantalla 2024-10-29 a las 11 29 45

Captura de pantalla 2024-10-29 a las 11 32 14

If i click the blank space of the map, then the map re- render again.

ClipRRect(
            clipBehavior: Clip.antiAlias,
            borderRadius: BorderRadius.circular(10),
            child: GoogleMap(
              zoomControlsEnabled: false,
              webGestureHandling: WebGestureHandling.none,
              compassEnabled: false,
              rotateGesturesEnabled: false,
              scrollGesturesEnabled: false,
              myLocationEnabled: false,
              zoomGesturesEnabled: false,
              mapType: MapType.normal,
              initialCameraPosition: initialCameraPosition,
              markers: _markers,
              myLocationButtonEnabled: false,
              onMapCreated: (GoogleMapController controller) {
                _controller = controller;
                // If the address is not null, the camera will be centered on the address coordinates
                if (widget.address != null) {
                  controller.animateCamera(
                    CameraUpdate.newCameraPosition(
                      CameraPosition(
                        target: LatLng(widget.address!.coordinates.latitude,
                            widget.address!.coordinates.longitude),
                        zoom: 15,
                      ),
                    ),
                  );
                }
              },
            ),
          ),

This issue olnly happends on ios chrome, firefox and safary (web-kit), but not on desktop.

I don´t know if it's an implementation issue.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.6.1 23G93 darwin-arm64, locale es-ES)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.94.2)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

I'm on the last version of the library.

Thanks for your amazing work.

a14n commented 3 weeks ago

This looks related to the flutter integration. You should fill your issue against google_maps_flutter package.

arcas0803 commented 3 weeks ago

Well, it just happend on web, the google maps ios and android works as expected. But OK