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
186 stars 106 forks source link

Android camera tracking incorrect #375

Closed XanderD99 closed 4 months ago

XanderD99 commented 5 months ago

The onCameraTrackingChanged does not convert the android type integer back to the matching flutter enum integer.

Because of this onCameraTracking changed cannot be called as the android integers are greater then the amount of types of tracking modes in flutter.

controller.updateMyLocationTrackingMode(MyLocationTrackingMode.TrackingCompass)
      case 'map#onCameraTrackingChanged':
        final int mode = call.arguments['mode'];
        print(call);
        onCameraTrackingChangedPlatform(MyLocationTrackingMode.values[mode]);
        break;

print statement prints out MethodCall(map#onCameraTrackingChanged, {mode: 32}) on android while it should be MethodCall(map#onCameraTrackingChanged, {mode: 3})

m0nac0 commented 4 months ago

Closed by #376