flutter-mapbox-gl / maps

A Mapbox GL flutter package for creating custom maps
Other
1.04k stars 503 forks source link

Setting myLocationEnabled to false disables GPS throughout the app #1223

Closed komineyuki closed 1 year ago

komineyuki commented 1 year ago

I'm currently developing a location information app for Android and iOS, but if I set myLocationEnabled to false in MapBoxMap(), I can't get location information for the entire app.

MapBoxMap(
    myLocationEnabled: false,
    .....
)

I'm also using flutter_background_geolocation to get the user's location. I thought this plugin was the reason that I coudn't get the coordinates, but maybe not.

This difference only occurs when changing myLocationEnabled in MapBoxMap().

flutter doctor -v

[√] Flutter (Channel beta, 3.3.0-0.5.pre, on Microsoft Windows [Version 10.0.22000.1098], locale ja-JP)
    • Flutter version 3.3.0-0.5.pre on channel beta at D:\src\flutter_windows_2.5.0-stable\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 096162697a (9 weeks ago), 2022-08-22 15:34:14 -0700
    • Engine revision ad3d868e0d
    • Dart version 2.18.0 (build 2.18.0-271.7.beta)
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at C:\Users\userName\AppData\Local\Android\sdk
    • Platform android-33, build-tools 32.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.11)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.11.32228.343
    • Windows 10 SDK version 10.0.16299.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.72.2)
    • VS Code at C:\Users\userName\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.50.0

[√] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.22000.1098]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 106.0.5249.119
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 106.0.1370.52

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Thank you.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.