feat: custom location provider & native user location styling#3134
feat: custom location provider & native user location styling#3134g4rb4g3 wants to merge 24 commits intornmapbox:mainfrom
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
setCustomLocationto 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 propsthat allow styling the native user location component and not only use the stock images (like the blue puck).Checklist
yarn generatein 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