new FdPMTSParser()
Methods
-
<static> getCidJson(layer, matrixSet, matrix, tileno, uid, token, callback)
-
获取部件的子节点信息
Parameters:
Name Type Description layer
Object Layer对象
matrixSet
Object MatrixSet对象
matrix
Object Matrix对象
tileno
String 'matrix'或'component'; 通过matrix的uid获取子节点,则传入'matrix'; 否则传入"component".
uid
String 部件ID
token
String 用户认证token,如果没有token,可以设置为undefined
callback
FdServer.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 layer
Object Layer对象
matrixSet
Object MatrixSet对象
matrix
Object Matrix对象
key
String 属性键
val
String 属性值
token
String 用户认证token,如果没有token,可以设置为undefined
callback
FdServer.FdPMTSParser~Callback 获取部件的属性信息的回调函数
option
Object 查找选项
Properties
Name Type Description pModel
PModel 限定在某个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 jsonPMTSCapabilities
Object PMTS配置信息,JSON对象
layerIdentifier
String Layer的ID
Returns:
Layer对象
- Type
- Object
-
<static> getMatrixBoundingSphere(matrix, worldMatrix)
-
获取Matrix的包围球信息
Parameters:
Name Type Description matrix
Object Matrix对象
worldMatrix
Freedo.Matrix4 模型矩阵(应为: tileset.modelMatirx * tileset._root.transform)
Returns:
Matrix的包围球信息
- Type
- Freedo.BoundingSphere
-
<static> getMatrixFromID(matrixSet, matrixIdentifier)
-
根据ID获取Matrix对象
Parameters:
Name Type Description matrixSet
Object MatrixSet对象,JSON对象
matrixIdentifier
String Matrix的ID
Returns:
Matrix对象
- Type
- Object
-
<static> getMatrixSetFromID(jsonPMTSCapabilities, matrixSetIdentifier)
-
根据ID获取MatrixSet对象
Parameters:
Name Type Description jsonPMTSCapabilities
Object PMTS配置信息,JSON对象
matrixSetIdentifier
String MatrixSet的ID
Returns:
MatrixSet对象
- Type
- Object
-
<static> getMatrixSets(jsonPMTSCapabilities, layer)
-
获取Layer对象所属的所有MatrixSet
Parameters:
Name Type Description jsonPMTSCapabilities
Object PMTS配置信息,JSON对象
layer
Object Layer对象
Returns:
MatrixSet对象数组
- Type
- Array.<Object>
-
<static> getPModelURL(layer, matrixSet, matrix, token)
-
获得加载PModel数据的URL
Parameters:
Name Type Description layer
Object Layer对象
matrixSet
Object MatrixSet对象
matrix
Object Matrix对象
token
String 用户认证token,如果没有token,可以设置为undefined
Returns:
加载PModel数据的URL
- Type
- String
-
<static> getPModelURLArray(url, callback)
-
获取PMTS的模型添加地址列表
Parameters:
Name Type Description url
String PMTS地址,带有token或者accesskey
callback
FdServer.FdPMTSParser~Callback 获取部件的子节点信息的回调函数
-
<static> getPropJson(layer, matrixSet, matrix, uid, token, callback)
-
获取部件的属性信息
Parameters:
Name Type Description layer
Object Layer对象
matrixSet
Object MatrixSet对象
matrix
Object Matrix对象
uid
String 部件ID
token
String 用户认证token,如果没有token,可以设置为undefined
callback
FdServer.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 layer
Object Layer对象
matrixSet
Object MatrixSet对象
matrix
Object Matrix对象
tag
String 部件Tag
token
String 用户认证token,如果没有token,可以设置为undefined
callback
FdServer.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 layer
Object Layer对象
matrixSet
Object MatrixSet对象
matrix
Object Matrix对象
uid
String 部件ID
token
String 用户认证token
worldMatrix
Freedo.Matrix4 模型矩阵(应为: tileset.modelMatirx * tileset._root.transform)
callback
FdServer.FdPMTSParser~Callback 获取部件包围球信息的回调函数
-
<static> getUidJson(layer, matrixSet, matrix, uid, token, callback)
-
获取部件的节点信息
Parameters:
Name Type Description layer
Object Layer对象
matrixSet
Object MatrixSet对象
matrix
Object Matrix对象
uid
String 部件ID
token
String 用户认证token,如果没有token,可以设置为undefined
callback
FdServer.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 layer
Object Layer对象
matrixSet
Object MatrixSet对象
matrix
Object Matrix对象
key
String 属性名
values
Array.<String> 属性值的数组
token
String 用户认证token,如果没有token,可以设置为undefined
callback
FdServer.FdPMTSParser~Callback 获取部件的节点信息的回调函数
Type Definitions
-
Callback( [result] [, error])
-
FdPMTSParser的回调函数类型
Parameters:
Name Type Argument Description result
Object <optional>
返回相应的对象,可能是MatrixSet、Matrix、包围球等,如果出现错误,则此参数为undefined
error
String <optional>
返回错误字符串,如果是undefined,则表示没有错误