The Scale Bar Component displays a dynamic scale bar of a known length on the map with a legend in miles or kilometers. The length of the bar is calculated according to the Normalized Mercator projection and based on the view on the screen. Clicking the component switches the legend between Metric and Imperial measurements.
The Scale Bar Component uses the following design. The classes of the MapComponent which interact with the User are in yellow, the low level graphics of the GUI rendering are in pink.