maplibre-native
maplibre-native copied to clipboard
Mapbox error Exception in onDidFinishRenderingMap {"level": "error", "message": "Exception in onDidFinishRenderingMap", "tag": "Mbgl-MapChangeReceiver"}
I just created a clean new react native app running react-native 0.68.2 and each time I open the map I get "Mapbox error Exception in onDidFinishRenderingMap {"level": "error", "message": "Exception in onDidFinishRenderingMap", "tag": "Mbgl-MapChangeReceiver"}" its also a little a random as on my pc emulator it will sometimes not occur. I switched to Maps SDK v10 to see if it has the same issue. But this was not the case as it didn't crash at all.
Even the example project on rnmapbox/maps crashes when opening a map example when setting the RNMapboxMapsImpl = "maplibre" in the build.gradle. Note the issue is probably only for android, haven't tried ios yet.
i face the same problem !!
The problems seems to be with the v10 version. But with the v8 version I also didnt get it to work either sadly.
Also facing the same problem
Current work around is to comment out the code onDidFinishRenderingMap, If your not using this event I think this is fine
node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.java
@Override
public void onDidFinishRenderingMap(boolean fully) {
// if (fully) {
// for (Pair<Integer, ReadableArray> preRenderMethod : mPreRenderMethods) {
// Integer methodID = preRenderMethod.first;
// ReadableArray args = preRenderMethod.second;
// mManager.receiveCommand(this, methodID, args);
// }
// mPreRenderMethods.clear();
// handleMapChangedEvent(EventTypes.DID_FINISH_RENDERING_MAP_FULLY);
// } else {
// // handleMapChangedEvent(EventTypes.DID_FINISH_RENDERING_MAP);
// }
}
Okay great thx. Atm I am just using mapbox instead of maplibre.
I'm facing the same issue and im using mapbox.
Mapbox error Exception in onDidFinishRenderingMap {"level": "error", "message": "Exception in onDidFinishRenderingMap", "tag": "Mbgl-MapChangeReceiver"}
Also facing the same problem
There is a type casting error.
In the node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/components/mapview/RCTMGLMapViewManager.java
file in the body of receiveCommand
function should be used args.getArray().toString()
instead of args.getString()
Same issue
The project react native project seems to have had a discussion about its future in https://github.com/rnmapbox/maps/discussions/1680 and the community was asked if the focus should be on supporting Mapbox v10 or MapLibre or both.
I did not understand the conclusion but if you feel like you depend on a react native wrapper for MapLibre then it might make sense to coordinate your efforts and have a discussion probably under this thread: https://github.com/rnmapbox/maps/discussions/1680#discussioncomment-1883127
Same issue RN 0.68.2 --> problem RN 0.67.4 --> ok !
Did anyone resolve this?