Feature opt_geometryOrProperties cannot be null
This commit is contained in:
@@ -99,10 +99,9 @@ class Feature extends BaseObject {
|
||||
this.handleGeometryChanged_, this);
|
||||
|
||||
if (opt_geometryOrProperties !== undefined) {
|
||||
if (opt_geometryOrProperties instanceof Geometry ||
|
||||
!opt_geometryOrProperties) {
|
||||
if (opt_geometryOrProperties instanceof Geometry) {
|
||||
|
||||
const geometry = /** @type {?Geometry} */ (opt_geometryOrProperties);
|
||||
const geometry = /** @type {Geometry} */ (opt_geometryOrProperties);
|
||||
this.setGeometry(geometry);
|
||||
} else {
|
||||
/** @type {Object<string, *>} */
|
||||
|
||||
@@ -236,7 +236,7 @@ class Geometry extends BaseObject {
|
||||
*/
|
||||
transform(source, destination) {
|
||||
/** @type {import("../proj/Projection.js").default} */
|
||||
const sourceProj = getProjection(source);
|
||||
const sourceProj = getProjection(source);
|
||||
const transformFn = sourceProj.getUnits() == Units.TILE_PIXELS ?
|
||||
function(inCoordinates, outCoordinates, stride) {
|
||||
const pixelExtent = sourceProj.getExtent();
|
||||
@@ -260,7 +260,9 @@ class Geometry extends BaseObject {
|
||||
* @param {number} y Y.
|
||||
* @return {boolean} Contains (x, y).
|
||||
*/
|
||||
containsXY = function(x, y) { return false};
|
||||
containsXY(x, y) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user