-
-
Notifications
You must be signed in to change notification settings - Fork 848
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
added option to switch ScaleBar MetricUnits #3422
base: main
Are you sure you want to change the base?
added option to switch ScaleBar MetricUnits #3422
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gongdao123 thanks much, looks good to me, the only issue is the default value on android. It should be optional or just use the same default as the mapbox
@@ -1305,12 +1305,15 @@ open class RNMBXMapView(private val mContext: Context, var mManager: RNMBXMapVie | |||
} | |||
|
|||
var mScaleBarSettings = OrnamentSettings(enabled = false) | |||
|
|||
var mScaleBarIsMetricUnits = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the default, value.
Currently it depends on the locale
https://docs.mapbox.com/android/maps/api/11.2.1/mapbox-maps-android/com.mapbox.maps.plugin.scalebar/-locale-unit-resolver/is-metric-system.html
https://docs.mapbox.com/ios/maps/api/11.0.0/documentation/mapboxmaps/scalebarviewoptions/usemetricunits/
with this PR it will default to imperial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, let me update the pr.
Description
Fixes #2983
Added
your feature
that allows ...Checklist
CONTRIBUTING.md
yarn generate
in the root folder/example
app./example
)Screenshot OR Video
Component to reprocuce the issue you're fixing