flutter-maplibre-gl
flutter-maplibre-gl copied to clipboard
[BUG] My location button not working on webkit based browsers
Platforms
web
Version of flutter maplibre_gl
latest
Bug Description
We using the libary for web deployment, trying to enable userlocation (myLocation) we find an issue with webkit based browsers safari-macos, safari-ios, firefox-ios, chrome-ios.
Steps to Reproduce
- run the example project for web
flutter run -d chrome
- copy paste the url in safari
- then go to user-interface
- click once on
change to MyLocationTrackingMode.tracking
- click on the myLocationButton
Expected Results
(actual behavior on chrome/firefox non-webkit browsers)
- the permisson dialog apears asking for location permission
- the MyLocationButton rotates blue
- when granted the map view animats to userLocation
Actual Results
- the icon on the button turns to red and rotates
- no permission dialog, no location request
- no error logs in console
Code Sample
We can reproduce this issue with every mapLibreMap-widget and the following settings:
myLocationEnabled: true,
myLocationRenderMode: MyLocationRenderMode.compass,
myLocationTrackingMode: MyLocationTrackingMode.tracking,