Scale
AMap.Scale
Scale control. Located at the bottom-right corner of the map, users can control its display and hide. Inherits from AMap.Control. Constructs a scale object.
new AMap.Scale(opts: ControlConfig)Parameter
opts (ControlConfig): Scale plugin parameters
Demo
AMap.plugin(["AMap.Scale"], function () {
//Add a scale control to display the scale of the map at the current level and latitude
var scale = new AMap.Scale();
scale.addTo(map);
});
Method
remove()
Remove control from map
Demo:
scale.remove();show()
Set control to visible
Demo:
scale.show();hide()
Set control to hidden
Demo:
scale.hide();Event
For event object property descriptions, go to:MapsEvent