Skip to content

控件类方法调用

调用方法

callMapControlFn(option)

option

名称类型说明
tagstring生成的地图控件的tag标识
functionstring对应的方法名称,不支持onAdd方法
paramany参数,方法的参数都只有一个,当调用【鹰眼】的setButtonImage方法时,param为长度为2的数组,对应方法的两个传参
successfunction调用成功回调
failfunction调用失败回调

示例代码

javascript
const option = {
  tag: tag,
  function: 'hide'
};
// mosowe-tdt
TDTRenderRef.value.addControlZoom(option);
// mosowe-tdt-x
TDTRenderRef.value?.addControlZoom?.(option);

贡献者

mosowe

文档版本 v1.0.1