This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Draw Marker, mNativeMapView NullPointerException #5106
Labels
Android
Mapbox Maps SDK for Android
Milestone
Comments
@NonowPoney The underlying code for long addMarker(@NonNull Marker marker) {
return mNativeMapView.addMarker(marker);
} It's not incorporating the check to validate if the underlying For example: long addPolyline(@NonNull Polyline polyline) {
if (mDestroyed) {
return 0l;
}
return mNativeMapView.addPolyline(polyline);
} |
tobrun
added a commit
that referenced
this issue
May 26, 2016
The same exception is thrown if you add a marker while the screen orientation changes. |
@tobrun Sounds good to me. Let's redo the PR to get it onto the 4.1.0 Release Branch instead of master though. |
@tobrun Actually with the time difference and it being Memorial Day weekend I'll just merge this fix into |
bleege
pushed a commit
that referenced
this issue
May 27, 2016
bleege
pushed a commit
that referenced
this issue
May 27, 2016
Thank you for your help ! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I integrated MapBox 4.0.1 in my mobile app, It's an navigation application like Waze for example.
I've a problem in a particular case : the user click on the back button (onBackPressed was called) when MapBox drawing a Markers on a Map.
The NullPointer Exception is generated here : mapboxMap.addMarker(op);
but looking closer the StrackTrace, we notice (MapView.java:988)
return mNativeMapView.addMarker(marker);
I Think that when the user "onBackPressed" the object "mNativeMapView" becomes "null"
here is the code in question :
Thanks in advance for your help,
The text was updated successfully, but these errors were encountered: