The ScaleBarOverlay is instantiated showing both KM and Miles. I would like to remove the miles annotation but so far have been unable to find any method to accomplish this. Can anyone suggest how to get this done.
Hi Jerry,
We don't an API to do that. However, since the source code of ScaleBarOverlay is publicly available, you could customize it.
Here is the source code of ScaleBarOverlay that does not display miles - ScaleBarOverlay without miles.
The changes made are:
1) In createScaleBar(), I have commented out the code that was creating the second row and text (miles).
2) In onPaint(), I removed code that was drawing the second row and text.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.