pinApi

图钉相关API

Methods

static addPin(pinData, funcRet)

添加图钉对象

Parameters:
Name Type Description
pinData JSON

图钉信息
格式如下:
{
id: string, 图钉id,唯一标识
Type: string, 图形类型 同 setPinImagePath 中的 PinType
Text: string, 图钉名称
PinMark: string, 图钉标识 同 setPinImagePath 中的 PinMark
Image: string, 图钉对应图片 同 setPinImagePath 中的 DirPath的文件名, 例abc.png
posX: double, 图钉位置信息 x坐标
posY: double, 图钉对应图片 y坐标
posZ: double, 图钉对应图片 z坐标
}

funcRet

static delPin(pinType, pinId, funcRet)

移除图钉对象

Parameters:
Name Type Description
pinType string

图形类型

pinId string

图钉id

funcRet

static getAllPinInfo(funcRet)

获取所有的图钉对象

Parameters:
Name Type Description
funcRet getAllPinInfoCallback

static getPinInfo(pinType, pinId, funcRet)

查找图钉对象

Parameters:
Name Type Description
pinType string

图形类型

pinId string

图钉id

funcRet

static setPinHighLight(pinType, pinId, bHighLight, funcRet)

高亮或者取消高亮图钉对象

Parameters:
Name Type Description
pinType string

图形类型

pinId string

图钉id

bHighLight Boolean

是否高亮

funcRet

static setPinImagePath(imagePaths)

设置图钉资源路径,系统会自动加载该路径下的图片资源

Parameters:
Name Type Description
imagePaths JSON

自定义图片信息
格式如下:
[
{
ImageDir: [
{
DirPath: string, 图片目录
PinMark: string, 图钉标识
用于区分同类型下不同状态图片
例如:初始化Orig、已整改Done......
}
],
PinType: string, 图钉类型
}
]

static setPinVisible(pinType, pinId, bVisible, funcRet)

设置图钉是否可见

Parameters:
Name Type Description
pinType string

图形类型

pinId string

图钉id

bVisible Boolean

是否可见

funcRet

Type Definitions

addPinCallback(returnValue)

addPin回调函数

Parameters:
Name Type Description
returnValue Boolean

操作结果

delPinCallback(returnValue)

delPin回调函数

Parameters:
Name Type Description
returnValue Boolean

操作结果

getAllPinInfoCallback(returnValue)

getAllPinInfo回调函数

Parameters:
Name Type Description
returnValue JSON

图钉信息列表
格式如下:
[
{
id: string, 图钉id,唯一标识
Type: string, 图形类型
Text: string, 图钉名称
PinMark: string 图钉标识
Image: string, 图钉对应图片
posX: double, 图钉位置信息 x坐标
posY: double, 图钉对应图片 y坐标
posZ: double, 图钉对应图片 z坐标
}
]

getPinInfoCallback(returnValue)

getPinInfo

Parameters:
Name Type Description
returnValue JSON

图钉信息
格式如下:
{
id: string, 图钉id,唯一标识
Type: string, 图形类型
Text: string, 图钉名称
PinMark: string, 图钉标识
Image: string, 图钉对应图片
posX: double, 图钉位置信息 x坐标
posY: double, 图钉对应图片 y坐标
posZ: double, 图钉对应图片 z坐标
}

setPinHighLightCallback(returnValue)

setPinHighLight回调函数

Parameters:
Name Type Description
returnValue Boolean

操作结果

setPinVisibleCallback(returnValue)

setPinVisible回调函数

Parameters:
Name Type Description
returnValue Boolean

操作结果