ol/geom/LineString#containsXY
This commit is contained in:
1 parent
58b474225c
commit
c1963ba369
2 files changed
+43
No files matched your search
@@ -88,6 +88,16 @@ class LineString extends SimpleGeometry {
|
||||
return new LineString(this.flatCoordinates.slice(), this.layout);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
containsXY(x, y) {
|
||||
const coord = this.getClosestPoint([x, y]);
|
||||
return coord[0] === x && coord[1] === y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user