ol/geom/MultiPoint#containsXY

This commit is contained in:
timkeane
2018-10-25 18:28:51 -04:00
committed by Frederic Junod
parent daffbde80b
commit 58b474225c
2 changed files with 34 additions and 0 deletions
+11
View File
@@ -57,6 +57,17 @@ class MultiPoint extends SimpleGeometry {
return multiPoint;
}
/**
* @inheritDoc
* @override
* @api
*/
containsXY(x, y) {
return this.getCoordinates().some(function(coord) {
return coord[0] === x && coord[1] === y;
});
}
/**
* @inheritDoc
*/