UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

127 lines (125 loc) 7.77 kB
import type Point from "../../geometry/Point.js"; import type { Clonable } from "../../core/Clonable.js"; import type { PointProperties } from "../../geometry/Point.js"; export interface CornersGeoreferenceProperties { /** * The bottom left [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) of the bounding box representing the geographic location of the image or video element being added * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/). * * @see [ImageElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) * @see [VideoElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/#georeference) */ bottomLeft?: PointProperties | null; /** * The bottom right [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) of the bounding box representing the geographic location of the image or video element being added * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/). * * @see [ImageElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) * @see [VideoElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/#georeference) */ bottomRight?: PointProperties | null; /** * The top left [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) of the bounding box representing the geographic location of the image or video element being added * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/). * * @see [ImageElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) * @see [VideoElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/#georeference) */ topLeft?: PointProperties | null; /** * The top right [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) of the bounding box representing the geographic location of the image or video element being added * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/). * * @see [ImageElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) * @see [VideoElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/#georeference) */ topRight?: PointProperties | null; } /** * CornersGeoreference is used to set the [geographic location](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) of the * [image](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/) or [element](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/) referenced * in the [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/) using corner points of a bounding box. * * ```js * // create a canvas image element by setting its corner points of the bounding box * const canvasElement = new ImageElement({ * image: canvas, * georeference: new CornersGeoreference({ * bottomRight: new Point({ * x: -121.369, * y: 45.061, * spatialReference: { * wkid: 4326 * } * }), * bottomLeft: new Point({ * x: -122.363, * y: 45.061, * spatialReference: { * wkid: 4326 * } * }), * topRight: new Point({ * x: -121.369, * y: 45.678, * spatialReference: { * wkid: 4326 * } * }), * topLeft: new Point({ * x: -122.363, * y: 45.678, * spatialReference: { * wkid: 4326 * } * }) * }) * }); * ``` * * @since 4.24 * @see [ImageElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) * @see [VideoElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/#georeference) * @see [Sample - MediaLayer with video](https://developers.arcgis.com/javascript/latest/sample-code/layers-medialayer-video/) */ export default class CornersGeoreference extends Clonable { constructor(properties?: CornersGeoreferenceProperties); /** * The bottom left [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) of the bounding box representing the geographic location of the image or video element being added * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/). * * @see [ImageElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) * @see [VideoElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/#georeference) */ get bottomLeft(): Point | null | undefined; set bottomLeft(value: PointProperties | null | undefined); /** * The bottom right [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) of the bounding box representing the geographic location of the image or video element being added * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/). * * @see [ImageElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) * @see [VideoElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/#georeference) */ get bottomRight(): Point | null | undefined; set bottomRight(value: PointProperties | null | undefined); /** * The top left [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) of the bounding box representing the geographic location of the image or video element being added * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/). * * @see [ImageElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) * @see [VideoElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/#georeference) */ get topLeft(): Point | null | undefined; set topLeft(value: PointProperties | null | undefined); /** * The top right [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) of the bounding box representing the geographic location of the image or video element being added * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/). * * @see [ImageElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ImageElement/#georeference) * @see [VideoElement.georeference](https://developers.arcgis.com/javascript/latest/references/core/layers/support/VideoElement/#georeference) */ get topRight(): Point | null | undefined; set topRight(value: PointProperties | null | undefined); /** The georeference type. */ readonly type: "corners"; }