Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing part of map while moving on Android #147124

Open
kmeljko opened this issue Apr 20, 2024 · 6 comments
Open

Missing part of map while moving on Android #147124

kmeljko opened this issue Apr 20, 2024 · 6 comments
Assignees
Labels
found in release: 3.19 Found to occur in 3.19 found in release: 3.22 Found to occur in 3.22 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: maps Google Maps plugin package flutter/packages repository. See also p: labels. platform-android Android applications specifically team-android Owned by Android platform team

Comments

@kmeljko
Copy link

kmeljko commented Apr 20, 2024

What package does this bug report belong to?

google_maps_flutter

What target platforms are you seeing this bug on?

Android

Have you already upgraded your packages?

Yes

Steps to reproduce

  1. Using google maps widget
  2. Moving map and zooming in and out

Expected results

Smooth map camera without white boxes appearing. On iOS working properly and smoothly.

Actual results

White boxes appear as in video. Sometimes you can see outlines of buildings even though they are disabled.

Code sample

Code sample
 GoogleMap(
            style: MapStyle.style,//json string from assets/map_style.json
            padding: EdgeInsets.only(
              top: MediaQuery.of(context).viewPadding.top +
                  180,
              bottom: 15,
            ),
            onMapCreated: c.onMapCreated,
            initialCameraPosition: 
                CameraPosition(
                  target: c.center,
                  zoom: 16.5,
                ),
            myLocationButtonEnabled: true,
            myLocationEnabled: true,
            markers: c.markers.values.toSet(),
            buildingsEnabled: false,
            compassEnabled: true,
          )

Screenshots or Videos

Screenshots / Video demonstration
record.webm

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.5, on Arch Linux 6.8.4-arch1-1, locale C.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Community Edition (version 2024.1)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!
@huycozy huycozy added the in triage Presently being triaged by the triage team label Apr 22, 2024
@huycozy
Copy link
Member

huycozy commented Apr 22, 2024

Hi @kmeljko
I checked this issue using package sample code (map ui page) but couldn't see the issue.

Maybe this is related to the map style defined in your map_style.json. Could you provide a complete and minimal sample code?

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 22, 2024
@kmeljko
Copy link
Author

kmeljko commented Apr 22, 2024

record2.webm

Hi, I added my map style to example project from packages repo that you linked and it gives same issue.
I am sending code that i used on map_click.dart for my case in that project.

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'page.dart';

const CameraPosition _kInitialPosition =
    CameraPosition(target: LatLng(-33.852, 151.211), zoom: 11.0);

class MapClickPage extends GoogleMapExampleAppPage {
  const MapClickPage({Key? key})
      : super(const Icon(Icons.mouse), 'Map click', key: key);

  @override
  Widget build(BuildContext context) {
    return const _MapClickBody();
  }
}

class _MapClickBody extends StatefulWidget {
  const _MapClickBody();

  @override
  State<StatefulWidget> createState() => _MapClickBodyState();
}

class _MapClickBodyState extends State<_MapClickBody> {
  _MapClickBodyState();

  GoogleMapController? mapController;
  String? style;
  @override
  void initState() {
    super.initState();
    load();
  }

  Future<String> _getFileData(String path) async {
    return rootBundle.loadString(path);
  }

  Future<void> load() async {
    style = await _getFileData('assets/map_style.json');
    setState(() async {});
  }

  @override
  Widget build(BuildContext context) {
    final GoogleMap googleMap = GoogleMap(
      onMapCreated: onMapCreated,
      style: style,
      initialCameraPosition: _kInitialPosition,
      padding: EdgeInsets.only(
        top: MediaQuery.of(context).viewPadding.top + 180,
        bottom: 15,
      ),
      myLocationButtonEnabled: true,
      myLocationEnabled: true,
      buildingsEnabled: false,
      compassEnabled: true,
    
    );
    return googleMap;
  }

  Future<void> onMapCreated(GoogleMapController controller) async {
    setState(() {
      mapController = controller;
    });
  }
}

Also map style is included
map_style.json

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 22, 2024
@kmeljko
Copy link
Author

kmeljko commented Apr 22, 2024

Issue is recorded on emulator (Pixel 7 API 30) but It was present on different Android devices too

@huycozy
Copy link
Member

huycozy commented Apr 23, 2024

Thanks for the update. I also can see the issue on my device Realme 6, Android 11. White boxes blink when zooming out the map.

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.19.6 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (31 hours ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode15.3.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (3 available)
    • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 11 (API 30)
    • macOS (desktop)  • macos            • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)     • chrome           • web-javascript • Google Chrome 123.0.6312.124

[✓] Network resources
    • All expected network resources are available.

• No issues found!
[!] Flutter (Channel master, 3.22.0-15.0.pre.15, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.22.0-15.0.pre.15 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 89a4ffaad5 (56 minutes ago), 2024-04-22 22:16:42 -0400
    • Engine revision f8e373da52
    • Dart version 3.5.0 (build 3.5.0-86.0.dev)
    • DevTools version 2.35.0-dev.8
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode15.3.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 124.0.6367.62

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

@huycozy huycozy added platform-android Android applications specifically p: maps Google Maps plugin package flutter/packages repository. See also p: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on team-android Owned by Android platform team fyi-ecosystem For the attention of Ecosystem team found in release: 3.19 Found to occur in 3.19 found in release: 3.22 Found to occur in 3.22 and removed in triage Presently being triaged by the triage team labels Apr 23, 2024
@stuartmorgan stuartmorgan added the triaged-ecosystem Triaged by Ecosystem team label Apr 23, 2024
@flutter-triage-bot flutter-triage-bot bot removed fyi-ecosystem For the attention of Ecosystem team triaged-ecosystem Triaged by Ecosystem team labels Apr 23, 2024
@kmeljko
Copy link
Author

kmeljko commented Apr 27, 2024

Is there any update?

@yaakovschectman yaakovschectman self-assigned this May 2, 2024
@yaakovschectman yaakovschectman added the triaged-android Triaged by Android platform team label May 2, 2024
@flutter-triage-bot
Copy link

This issue is missing a priority label. Please set a priority label when adding the triaged-android label.

@flutter-triage-bot flutter-triage-bot bot removed the triaged-android Triaged by Android platform team label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
found in release: 3.19 Found to occur in 3.19 found in release: 3.22 Found to occur in 3.22 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: maps Google Maps plugin package flutter/packages repository. See also p: labels. platform-android Android applications specifically team-android Owned by Android platform team
Projects
None yet
Development

No branches or pull requests

4 participants