maplibre / flutter-maplibre-gl

Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
https://pub.dev/packages/maplibre_gl
Other
185 stars 106 forks source link

[BUG] Example: "User interface > Disable location" error #437

Closed kuhnroyal closed 6 days ago

kuhnroyal commented 4 weeks ago

Platforms

iOS

Version of flutter maplibre_gl

0.19.0/main

Bug Description

When pressing "disable location" in the example apps "user interface" section, I get an error. Only tested on iOS so far.

Steps to Reproduce

Run the example on iOS.

Expected Results

No crash and a disabled location, not sure what that means in that case.

Actual Results

======== Exception caught by widgets library =======================================================
The following assertion was thrown building MapUiBody(dirty, state: MapUiBodyState#42030):
MyLocationRenderMode.gps requires [myLocationEnabled] set to true.
'package:maplibre_gl/src/maplibre_map.dart':
Failed assertion: line 60 pos 11: 'myLocationRenderMode != MyLocationRenderMode.normal
              ? myLocationEnabled
              : true'

Code Sample

None