-
-
Notifications
You must be signed in to change notification settings - Fork 847
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
feat: custom location provider & native user location styling #3134
Conversation
@g4rb4g3 thanks much, looks nice, for first glance will look into it more in details One note that instead of We call those nativeAssetImages there - https://github.com/rnmapbox/maps/blob/main/docs/Images.md#nativeassetimages What do you think? |
@mfazekas |
I'm thinking on deprecate renderMode={'native'}. And making user use NativeUserLocation instead of UserLocation if they want a native user location. Therefore I still find 'topImage' a bit confusing as those are not mapbox image names added to style, but native asset image names. so maybe something like: |
This reverts commit 02ff8a1.
@g4rb4g3 Those features will be available only when using NativeUserLocation, directly. I'll deprecate native mode on UserLocation later. |
@mfazekas I did a few updates to this PR and it is ready your review. 🙂 |
@g4rb4g3 thanks much, great work, I've made some changes, see #3166 Changes:
|
@mfazekas Great job! Thanks for putting everything together nicely. 🙂 |
Description
Added
setCustomLocation
to MapView that allows overriding the location used for the native user location component. It takes advantage of all the functionality of mapbox-maps to animate the native user location.Added
native user location images and scale props
that allow styling the native user location component and not only use the stock images (like the blue puck).Checklist
yarn generate
in the root folder/example
)Screenshot OR Video
The red arrow with the white circle is our custom styled user location using nativeTopImage and nativeShadowImage and the animation is done with setCustomLocation on the map view.
https://github.com/rnmapbox/maps/assets/646435/650d893f-c4dd-4a05-af5f-d7af98abcbeb