new FdPMTSParser()
Methods
-
<static> getCidJson(layer, matrixSet, matrix, tileno, uid, token, callback)
-
获取部件的子节点信息
Parameters:
Name Type Description layerObject Layer对象
matrixSetObject MatrixSet对象
matrixObject Matrix对象
tilenoString 'matrix'或'component'; 通过matrix的uid获取子节点,则传入'matrix'; 否则传入"component".
uidString 部件ID
tokenString 用户认证token,如果没有token,可以设置为undefined
callbackFdServer.FdPMTSParser~Callback 获取部件的子节点信息的回调函数
Example
Freedo.FdServer.FdPMTSParser.getCidJson(layer, matrixSet, matrix, tileno, uid token, (json, error) => { console.log('--------------cid-------------'); if (typeof error === 'undefined') { console.log(json); } else { console.log('error: ' + error); } console.log(' '); }); -
<static> getKeyValueJson(layer, matrixSet, matrix, key, val, token, callback, option)
-
通过KeyValue对查询构件属性
Parameters:
Name Type Description layerObject Layer对象
matrixSetObject MatrixSet对象
matrixObject Matrix对象
keyString 属性键
valString 属性值
tokenString 用户认证token,如果没有token,可以设置为undefined
callbackFdServer.FdPMTSParser~Callback 获取部件的属性信息的回调函数
optionObject 查找选项
Properties
Name Type Description pModelPModel 限定在某个PModel内 Freedo.FdServer.FdPMTSParser.getKeyValueJson(layer, matrixSet, matrix, key, val token, (json, error) => { console.log('--------------prop-------------'); if (typeof error === 'undefined') { console.log(json); } else { console.log('error: ' + error); } console.log(' '); });
-
<static> getLayerFromID(jsonPMTSCapabilities, layerIdentifier)
-
根据ID获取Layer对象
Parameters:
Name Type Description jsonPMTSCapabilitiesObject PMTS配置信息,JSON对象
layerIdentifierString Layer的ID
Returns:
Layer对象
- Type
- Object
-
<static> getMatrixBoundingSphere(matrix, worldMatrix)
-
获取Matrix的包围球信息
Parameters:
Name Type Description matrixObject Matrix对象
worldMatrixFreedo.Matrix4 模型矩阵(应为: tileset.modelMatirx * tileset._root.transform)
Returns:
Matrix的包围球信息
- Type
- Freedo.BoundingSphere
-
<static> getMatrixFromID(matrixSet, matrixIdentifier)
-
根据ID获取Matrix对象
Parameters:
Name Type Description matrixSetObject MatrixSet对象,JSON对象
matrixIdentifierString Matrix的ID
Returns:
Matrix对象
- Type
- Object
-
<static> getMatrixSetFromID(jsonPMTSCapabilities, matrixSetIdentifier)
-
根据ID获取MatrixSet对象
Parameters:
Name Type Description jsonPMTSCapabilitiesObject PMTS配置信息,JSON对象
matrixSetIdentifierString MatrixSet的ID
Returns:
MatrixSet对象
- Type
- Object
-
<static> getMatrixSets(jsonPMTSCapabilities, layer)
-
获取Layer对象所属的所有MatrixSet
Parameters:
Name Type Description jsonPMTSCapabilitiesObject PMTS配置信息,JSON对象
layerObject Layer对象
Returns:
MatrixSet对象数组
- Type
- Array.<Object>
-
<static> getPModelURL(layer, matrixSet, matrix, token)
-
获得加载PModel数据的URL
Parameters:
Name Type Description layerObject Layer对象
matrixSetObject MatrixSet对象
matrixObject Matrix对象
tokenString 用户认证token,如果没有token,可以设置为undefined
Returns:
加载PModel数据的URL
- Type
- String
-
<static> getPModelURLArray(url, callback)
-
获取PMTS的模型添加地址列表
Parameters:
Name Type Description urlString PMTS地址,带有token或者accesskey
callbackFdServer.FdPMTSParser~Callback 获取部件的子节点信息的回调函数
-
<static> getPropJson(layer, matrixSet, matrix, uid, token, callback)
-
获取部件的属性信息
Parameters:
Name Type Description layerObject Layer对象
matrixSetObject MatrixSet对象
matrixObject Matrix对象
uidString 部件ID
tokenString 用户认证token,如果没有token,可以设置为undefined
callbackFdServer.FdPMTSParser~Callback 获取部件的属性信息的回调函数
Example
Freedo.FdServer.FdPMTSParser.getPropJson(layer, matrixSet, matrix, uid token, (json, error) => { console.log('--------------prop-------------'); if (typeof error === 'undefined') { console.log(json); } else { console.log('error: ' + error); } console.log(' '); }); -
<static> getTagJson(layer, matrixSet, matrix, tag, token, callback)
-
获取部件的属性信息
Parameters:
Name Type Description layerObject Layer对象
matrixSetObject MatrixSet对象
matrixObject Matrix对象
tagString 部件Tag
tokenString 用户认证token,如果没有token,可以设置为undefined
callbackFdServer.FdPMTSParser~Callback 获取部件的属性信息的回调函数
Example
Freedo.FdServer.FdPMTSParser.getTagJson(layer, matrixSet, matrix, tag, token, (json, error) => { console.log('--------------prop-------------'); if (typeof error === 'undefined') { console.log(json); } else { console.log('error: ' + error); } console.log(' '); }); -
<static> getUidBoundingSphere(layer, matrixSet, matrix, uid, token, worldMatrix, callback)
-
获取部件的包围球信息
Parameters:
Name Type Description layerObject Layer对象
matrixSetObject MatrixSet对象
matrixObject Matrix对象
uidString 部件ID
tokenString 用户认证token
worldMatrixFreedo.Matrix4 模型矩阵(应为: tileset.modelMatirx * tileset._root.transform)
callbackFdServer.FdPMTSParser~Callback 获取部件包围球信息的回调函数
-
<static> getUidJson(layer, matrixSet, matrix, uid, token, callback)
-
获取部件的节点信息
Parameters:
Name Type Description layerObject Layer对象
matrixSetObject MatrixSet对象
matrixObject Matrix对象
uidString 部件ID
tokenString 用户认证token,如果没有token,可以设置为undefined
callbackFdServer.FdPMTSParser~Callback 获取部件的节点信息的回调函数
Example
Freedo.FdServer.FdPMTSParser.getUidJson(layer, matrixSet, matrix, uid, token, (json, error) => { console.log('--------------uid-------------'); if (typeof error === 'undefined') { console.log(json); } else { console.log('error: ' + error); } console.log(' '); }); -
<static> getUidsByKVs(layer, matrixSet, matrix, key, values, token, callback)
-
根据propset中的某个属性获取对应的uid
Parameters:
Name Type Description layerObject Layer对象
matrixSetObject MatrixSet对象
matrixObject Matrix对象
keyString 属性名
valuesArray.<String> 属性值的数组
tokenString 用户认证token,如果没有token,可以设置为undefined
callbackFdServer.FdPMTSParser~Callback 获取部件的节点信息的回调函数
Type Definitions
-
Callback( [result] [, error])
-
FdPMTSParser的回调函数类型
Parameters:
Name Type Argument Description resultObject <optional>
返回相应的对象,可能是MatrixSet、Matrix、包围球等,如果出现错误,则此参数为undefined
errorString <optional>
返回错误字符串,如果是undefined,则表示没有错误