I just looked around the API for a method in the class com.esri.android.map.MapView for a method for adding a scale bar to the map view. All I see is a getScale() method. Is there an easy way to add a scale bar to the map view that I am missing?
I guess I could make one up from the get scale method and then use a fragment....
I also am looking for a solution to add a scale bar to my map. Any one have any progress with this?
Thanks.
As near as I could tell one would have to make up a custom one. We felt like we did not need it that bad. But I must say I was surprised that something was not in the API. One would think this is a basic thing esri would want to put in...... ??
We create custom scale bar for our apps on iOS and Android.
If you want to know how it looks check our app:
Thank you for the example Kolek, I am looking for a scale that shows like 2 inches = 5 km, so the users know how much area they are looking at.
It seems like I will have to do some custom work to get this working.
Thanks again.
We've done something like this in our iOS apps. We figure out the DPI of the device's screen and then create a one-inch long rectangle. Then we hook into the zoom/pan events and update scale text to display "1in = XXXft" (or whatever) based on a geodetic measure of the extent of the rectangle on the map.
It works pretty well.
Hello.
I have worked on the map scale bar using ArcGIS android SDK 10.2.
Normally there no found the solution for display scale bar what you want.
But I found the example associated with this issue.
You can check this url and apply the sample.
http://stackoverflow.com/questions/12964608/how-to-add-a-map-scale-in-mapview-on-android.
this is not the sample for ArcGIS android SDK, but you can change it in order to the SDK.
if you want to know more details, I could provide my program.
Very cool. Thanks taking the time to reply. At this time we are not using a scale bar in the application.