Because the range of the extent is 4 points, it is different from the range drawn by the polygon. Is there a way to make them similar, or is there a way to convert a Polygon object to an Extent object?
I use BaseElevationLayer and I need to give it an extent, I want it to be the polygon that draws the blue part.
const CElevationLayer = BaseElevationLayer.createSubclass({
load: function () {
this._elevation = new ElevationLayer({
// ElevationLayer Service
});
this.addResolvingPromise(
this._elevation.load().then(() => {
this.tileInfo = this._elevation.tileInfo;
this.spatialReference = this._elevation.spatialReference;
this.fullExtent = this.fullExtent || this._elevation.fullExtent;
})
);
return this;
},
fetchTile: function (level, row, col, options) {
return this._elevation.fetchTile(level, row, col, options).then(
function (data) {
// data
return data;
}.bind(this)
);
}
});
every polygon has a built-in "extent" property, which is what you need
Hi @MichaelLev Sorry,question updated, my question may not have been expressed clearly.