L.Control
所有leaflet控制的基础类。继承自IControl接口。 你可以这样添加控件:
control.addTo(map);
// the same as
map.addControl(control);
构造器
构造器 | 使用 | 描述 |
---|---|---|
L.Control( <Control options> options? ) |
new L.Control(…) L.control(…) |
通过给定的选项创建一个控制。 |
Options
选项 | 类型 | 默认值 | 描述 |
---|---|---|---|
position |
String |
'topright' |
控制初始的位置(在地图的某一角)。参见 control positions. |