new NearestPointAnalysis()
Methods
-
<static> doAnalysis(target, pointCollection, ignoreHeight, count)
-
根据用户的目标点和被搜索点集合,计算返回离目标点最近的点
Parameters:
Name Type Default Description targetObject pointCollectionArray.<Object> 被搜索点集合,Object格式为{location: {lon: xxx.xx, lat: xxx.xx, height: xx.xx}, properties: {xx:xx, yy: yy ...}} ignoreHeightBoolean true 如果为true则计算距离时忽略高程,默认为true countNumber 1 返回个数,默认为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>