This example displays a movable map centered over the business district of Boston (42.3572°N, 71.0596°W). The scale bar of the map is displayed in miles, yards or feet dependent upon the zoom level.

Code

The system of units displayed on the scale bar can be changed by calling the setUnitSystem() method, and providing one of the H.ui.UnitSystem enum values.