Maps SDK for Web
tt.ScaleControl
A ScaleControl control displays the ratio of a distance on the map to the corresponding distance on the ground.
Constructor
tt.ScaleControl([options])
Example
var scale = new tt.ScaleControl({
  maxWidth: 80,
  unit: 'imperial'
});
map.addControl(scale);
scale.setUnit('metric');
Methods
setUnit(unit)
Set the scale's unit of the distance
Parameters
| Name | Description | 
|---|---|
| unit String default:None | Unit of the distance ( 'imperial' , 'metric' or 'nautical' ). |