使用OpenLayers判断点是否在区域边上

使用OpenLayers判断点是否在区域边上

孤独的哈士奇 1 2026-03-26

方法

所属类/模块

功能说明

intersectsCoordinate(coordinate)

ol/geom/Geometry

判断点是否在几何图形内部(边界上的点返回 false

intersectsExtent(extent)

ol/geom/Geometry

判断几何是否与给定范围相交

getClosestPoint(point)

ol/geom/Geometry

获取几何上距离某点最近的点

forEachFeatureAtPixel(pixel, callback, {hitTolerance})

ol/Map

检测像素位置附近的要素(支持容差)

containsCoordinate(extent, coordinate)

ol/extent

判断坐标是否在范围内或边缘上