You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A scale widget plugin allows to place a scalebar on a Mapbox map.
iOS is bringing this feature to their SDK in mapbox/mapbox-gl-native#7631. We could potentially implement this as a plugin instead. This fits in our to decouple our map SDK more into smaller pluggable components.
@samoilovich the code in #17 was just a WIP and I haven't been able to pick this up again. That said, we are aware that we are missing this functionality but we also haven't heard many request for it either (other than above). If this is an immediate need on your end, you can roll your own and we do accept pull requests ;)
@tobrun any updates on this?
if you want contributions, it would be nice if you could point us in the right direction. AFAICS, you haven't fully decided on whether or not this should be a plugin? this is a core map feature IMO
Regarding of whether this should be included or not as part of the Maps SDK, that's a great question. I think that it's probably easier to initially build out the feature and iterate it here but we're hoping to get this kind of feedback (thanks!) as we're constantly evaluating what belongs here and what belongs in the core SDK.
As someone that has used MapBox in both iOS and Android one of the biggest issues is learning the API because it is not one of the easiest to master. Even then you master the iOS version and the Android is so different. In my honest opinion this is one of the biggest drawbacks, that there is no 1:1 mapping of functions or variable names. It needs to be standardised and you need a plan going forward to ensure the same features are available in both platforms.
@pacomacman thank you very much for this feedback, this is something we've heard before and it's top of mind whenever we plan new features and components. While we try to keep consistency in naming across platforms, sometimes platform-specific conventions, or differences in the technical implementation, make our public APIs diverge in name.
Please share any specific instances that were particularly confusing or challenging. While changing API names isn't always feasible (it'd break the public API and require a major SEMVER release) it helps us improve our documentation and guide future naming strategies.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
samoilovich commentedon May 22, 2018
Hi
Could you update the status about scale plugin?
I need scale bar widget for my app. Looks like work is done in the https://github.com/mapbox/mapbox-plugins-android/pull/17/commits but i can't find a way to add scale plugin to app.
Could you help with that? Maybe not a plugin but i need to change some attributes for map like in iOs
self.mapView.scaleBar.hidden?Thanks.
tobrun commentedon May 22, 2018
@samoilovich the code in #17 was just a WIP and I haven't been able to pick this up again. That said, we are aware that we are missing this functionality but we also haven't heard many request for it either (other than above). If this is an immediate need on your end, you can roll your own and we do accept pull requests ;)
hurrba commentedon Aug 14, 2018
@tobrun any updates on this?
if you want contributions, it would be nice if you could point us in the right direction. AFAICS, you haven't fully decided on whether or not this should be a plugin? this is a core map feature IMO
samoilovich commentedon Aug 14, 2018
I have added scale bar to map. It was as an additional view.
I used info from this answer
https://stackoverflow.com/questions/39739250/mapbox-touchlistner-for-map/39813925#39813925
But it was quick solution but not great implementation.
Hope it helps to go forward.
zugaldia commentedon Aug 14, 2018
@hurrba @samoilovich we definitely welcome contributions, we have some general instructions here and we're available for any questions you might have.
Regarding of whether this should be included or not as part of the Maps SDK, that's a great question. I think that it's probably easier to initially build out the feature and iterate it here but we're hoping to get this kind of feedback (thanks!) as we're constantly evaluating what belongs here and what belongs in the core SDK.
pacomacman commentedon Sep 25, 2018
As someone that has used MapBox in both iOS and Android one of the biggest issues is learning the API because it is not one of the easiest to master. Even then you master the iOS version and the Android is so different. In my honest opinion this is one of the biggest drawbacks, that there is no 1:1 mapping of functions or variable names. It needs to be standardised and you need a plan going forward to ensure the same features are available in both platforms.
zugaldia commentedon Sep 28, 2018
@pacomacman thank you very much for this feedback, this is something we've heard before and it's top of mind whenever we plan new features and components. While we try to keep consistency in naming across platforms, sometimes platform-specific conventions, or differences in the technical implementation, make our public APIs diverge in name.
Please share any specific instances that were particularly confusing or challenging. While changing API names isn't always feasible (it'd break the public API and require a major SEMVER release) it helps us improve our documentation and guide future naming strategies.
stale commentedon Mar 27, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
paulsUsername commentedon May 20, 2019
It would be great to have a scale bar!
langsmith commentedon May 20, 2019
@paulsUsername , @Chaoba is working on this in #955 👍