Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permit android vector drawables to be used as markers #2111

Merged
merged 1 commit into from Mar 22, 2018

Conversation

Projects
None yet
3 participants
@mlc
Copy link
Contributor

mlc commented Mar 19, 2018

Does any other open PR do the same thing?

No.

How did you test this PR?

On Android, add a vector drawable resource to the native code. (Here is a sample if you need one.) Then, try to use it as the {{marker}} parameter. Previously, an exception would be thrown; with this PR, it now works:

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
    at com.airbnb.android.react.maps.AirMapMarker.getIcon(AirMapMarker.java:330)
    at com.airbnb.android.react.maps.AirMapMarker.createMarkerOptions(AirMapMarker.java:360)
    at com.airbnb.android.react.maps.AirMapMarker.getMarkerOptions(AirMapMarker.java:294)
    at com.airbnb.android.react.maps.AirMapMarker.addToMap(AirMapMarker.java:316)
    at com.airbnb.android.react.maps.AirMapView.addFeature(AirMapView.java:513)
    at com.airbnb.android.react.maps.AirMapManager.addView(AirMapManager.java:361)
    at com.airbnb.android.react.maps.AirMapManager.addView(AirMapManager.java:28)
@alvelig

This comment has been minimized.

Copy link
Collaborator

alvelig commented Mar 22, 2018

LGTM @rborn 🐽

@rborn rborn merged commit 35855f9 into react-native-community:master Mar 22, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.