Implement ol/geom/Geometry#containsXY

Fixes issue #8863
ol/source/Vector#getFeaturesAtCoordinate and
implementations of ol/geom/Geometry#containsXY
This commit is contained in:
timkeane
2018-11-09 07:58:04 -05:00
committed by Frederic Junod
parent 5967bc75ba
commit 7274798aa1
5 changed files with 2 additions and 43 deletions
+2 -1
View File
@@ -92,7 +92,8 @@ class Geometry extends BaseObject {
* @return {boolean} Contains (x, y).
*/
containsXY(x, y) {
return false;
const coord = this.getClosestPoint([x, y]);
return coord[0] === x && coord[1] === y;
}
/**