I’ve encountered a difficulty with my MapmyIndiaMap widget and controller in my stateful class.
Right here is my widget:
Each time I allow myLocationEnabled to true,
the app crashes instantly after the map masses, particularly on older Android gadgets operating variations beneath Android 11 or 12. The error happens constantly on Android 13 and later variations.
Moreover, the iOS simulator crashes as quickly because the map masses.
I’ve encountered a difficulty with my MapmyIndiaMap widget and controller in my stateful class.
Right here is my widget:
Expanded(
youngster: MapmyIndiaMap(
initialCameraPosition: CameraPosition(
goal: LatLng(state.place.latitude,
state.place.longitude),
zoom: 14.0,
),
myLocationEnabled: true,
myLocationTrackingMode:
MyLocationTrackingMode.NoneCompass,
onMapCreated: (map) async {
_mapController = map;
await _mapController?.addSymbol(
SymbolOptions(
geometry: LatLng(
state.place.latitude,
state.place.longitude,
),
),
);
setState(() {});
},
onMapClick: (level, coordinates) async {
log(“Map Level: $level”);
log(“Coordinates: $coordinates”);
await _mapController!.addSymbol(
SymbolOptions(
geometry: LatLng(
coordinates.latitude,
coordinates.longitude,
),
),
);
},
),
),
Each time I allow these two choices:
myLocationEnabled: true,
myLocationTrackingMode: MyLocationTrackingMode.NoneCompass,
The app crashes instantly after the map masses, particularly on older Android gadgets operating variations beneath Android 11 or 12. The error happens constantly on Android 13 and later variations.
Right here is Error:
That is the error:
W/System.err( 2824): at com.mapmyindia.mapmyindiagl.MapboxMapController.entry$000(MapboxMapController.java:108)
W/System.err( 2824): at com.mapmyindia.mapmyindiagl.MapboxMapController$1.onStyleLoaded(MapboxMapController.java:311)
W/System.err( 2824): at com.mapmyindia.sdk.maps.MapmyIndiaMap.notifyStyleLoaded(MapmyIndiaMap.java:1614)
W/System.err( 2824): at com.mapmyindia.sdk.maps.MapmyIndiaMap.onFinishLoadingStyle(MapmyIndiaMap.java:300)
W/System.err( 2824): at com.mapmyindia.sdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1766)
W/System.err( 2824): at com.mapmyindia.sdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
W/System.err( 2824): at com.mapmyindia.sdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1122)
W/System.err( 2824): at android.os.MessageQueue.nativePollOnce(Native Technique)
W/System.err( 2824): at android.os.MessageQueue.subsequent(MessageQueue.java:339)
W/System.err( 2824): at android.os.Looper.loop(Looper.java:199)
W/System.err( 2824): at android.app.ActivityThread.principal(ActivityThread.java:8212)
W/System.err( 2824): at java.lang.mirror.Technique.invoke(Native Technique)
W/System.err( 2824): at com.android.inside.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
W/System.err( 2824): at com.android.inside.os.ZygoteInit.principal(ZygoteInit.java:1049)
E/libc++abi( 2824): terminating with uncaught exception of kind jni::PendingJavaException
F/libc ( 2824): Deadly sign 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2824 (com.instance.run), pid 2824 (com.instance.run)
Course of identify is com.instance.run, not key_process
Moreover, the iOS simulator crashes as quickly because the map masses.