new NearestPointAnalysis()
Methods
-
<static> doAnalysis(target, pointCollection [, ignoreHeight] [, count])
-
根据用户的目标点和被搜索点集合,计算返回离目标点最近的点
Parameters:
Name Type Argument Default Description targetObject 目标对象 pointCollectionArray.<Object> 被搜索点集合,Object格式为{location: {lon: xxx.xx, lat: xxx.xx, height: xx.xx}, properties: {xx:xx, yy: yy ...}} ignoreHeightBoolean <optional>
true 如果为true则计算距离时忽略高程 countNumber <optional>
1 返回个数 Returns:
返回最近的几个点,个数由count参数决定,Object格式为{ distance: xx, point: { location: { lon: xxx.xx, lat: xxx.xx, height: xx.xx }, properties: { xx:xx, yy: yy ... } } }- Type
- Array.<Object>