import type Layer from "../layers/Layer.js";
import type Viewpoint from "../Viewpoint.js";
import type Analysis from "../analysis/Analysis.js";
import type ElevationProfileAnalysis from "../analysis/ElevationProfileAnalysis.js";
import type Collection from "../core/Collection.js";
import type Extent from "../geometry/Extent.js";
import type Point from "../geometry/Point.js";
import type Polygon from "../geometry/Polygon.js";
import type SpatialReference from "../geometry/SpatialReference.js";
import type TileInfo from "../layers/support/TileInfo.js";
import type View from "./View.js";
import type ViewAnimation from "./ViewAnimation.js";
import type MapViewConstraints from "./2d/MapViewConstraints.js";
import type ElevationProfileAnalysisView2D from "./2d/analysis/ElevationProfileAnalysisView2D.js";
import type LayerView from "./layers/LayerView.js";
import type HighlightOptions from "./support/HighlightOptions.js";
import type ColorBackground from "../webmap/background/ColorBackground.js";
import type { ViewpointProperties } from "../Viewpoint.js";
import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
import type { ScreenPoint } from "../core/types.js";
import type { ExtentProperties } from "../geometry/Extent.js";
import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
import type { TimeZone } from "../time/types.js";
import type { BreakpointsOwner, BreakpointsOwnerProperties } from "./BreakpointsOwner.js";
import type { DOMContainer, DOMContainerProperties } from "./DOMContainer.js";
import type { PopupView, PopupViewProperties } from "./PopupView.js";
import type { GoToOptions2D, GoToTarget2D, ToScreenOptions2D } from "./types.js";
import type { Viewport2DMixin, Viewport2DMixinProperties } from "./Viewport2DMixin.js";
import type { MapViewConstraintsProperties } from "./2d/MapViewConstraints.js";
import type { LayerView2DFor, ResizeAlign } from "./2d/types.js";
import type { AnalysisView2DUnion } from "./2d/analysis/types.js";
import type { ColorBackgroundProperties } from "../webmap/background/ColorBackground.js";
import type { PointProperties } from "../geometry/Point.js";
import type { HighlightOptionsProperties } from "./support/HighlightOptions.js";
import type { ViewProperties } from "./View.js";

export interface View2DProperties extends ViewProperties, DOMContainerProperties, PopupViewProperties, BreakpointsOwnerProperties, Viewport2DMixinProperties, Partial<Pick<View2D, "resizeAlign" | "rotation" | "scale" | "spatialReferenceLocked" | "timeZone" | "zoom">> {
  /**
   * A collection of analyses associated with the view.
   *
   * @since 4.34
   * @example
   * // Adds an analysis to the View
   * view.analyses.add(elevationProfileAnalysis);
   * @example
   * // Removes an analysis from the View
   * view.analyses.remove(elevationProfileAnalysis);
   */
  analyses?: ReadonlyArrayOrCollection<Analysis>;
  /**
   * Represents an ongoing view animation initialized by [goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#goTo).
   * You may [watch()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html#watch) this property to be notified of the animation's state.
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   * @example
   * reactiveUtils.watch(
   *   () => view.animation,
   *   (response) => {
   *     if(response?.state === "running"){
   *       console.log("Animation in progress");
   *     } else{
   *      console.log("No animation");
   *     }
   *   }
   * );
   * @see [View2D#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#goTo)
   */
  animation?: ViewAnimation | null;
  /**
   * The background color of the view. If the view's [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#map) changes, the view's `background` is reset to the map's background,
   * even if the user set it previously.
   *
   * @since 4.16
   * @example
   * let view = new MapView({
   *   container: "viewDiv",
   *   map: map,
   *   background: { // autocasts new ColorBackground()
   *     color: "magenta" // autocasts as new Color()
   *   }
   * });
   */
  background?: ColorBackgroundProperties | null;
  /**
   * Represents the view's center point; when setting the center, you may pass a
   * [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) instance or an array of numbers representing
   * a longitude/latitude pair (`[-100.4593, 36.9014]`).
   * Setting the center immediately changes the current view. For animating
   * the view, see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo).
   *
   * The returned [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) object is always in the spatial reference of the view and may be modified internally.
   * To persist the returned object, create a clone using [Point#clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#clone).
   *
   * > [!WARNING]
   * >
   * > **Notes**
   * >
   * > - If the spatial reference of `center` set in the constructor does not match the
   * > [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) of the view, then [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) will be loaded dynamically.
   * > - At runtime, the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) must be [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load) when
   * > setting the `center` to a spatial reference that doesn't match the view spatial reference. You can check if the projectOperator is
   * > loaded prior to setting the center by calling [isLoaded()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#isLoaded). If it is not yet loaded,
   * > you can call [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load).
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   * @example
   * // Sets the initial center point of the view to lon/lat coordinates
   * // lon/lat will be projected to match the spatial reference of the view
   * let view = new MapView({
   *   center: [-112, 38]
   * });
   * @example
   * // Updates the view's center point to a pre-determined Point object
   * let pt = new Point({
   *   x: 12804.24,
   *   y: -1894032.09,
   *   spatialReference: {
   *     wkid: view.spatialReference  // wkid 2027
   *   }
   * });
   * view.center = pt;
   * @example
   * const centerPoint = new Point({
   *   x: -8746995,
   *   y: 4352308,
   *   spatialReference: {
   *     wkid: 8857
   *   }
   * });
   * if (!projectOperator.isLoaded()) {
   *   await projectOperator.load();
   * }
   * view.center = centerPoint;
   */
  center?: PointProperties | [
      number,
      number
  ];
  /**
   * Specifies constraints to [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale), [zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#zoom), and [rotation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#rotation) that may be applied to the MapView.
   * The `constraints.lods` should be set in the MapView constructor, if the map does not have a [basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or when the basemap does not have [TileInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html).
   * See [Zoom and LODs](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#mapview-lods) section to learn more how MapView's zoom and LODs work. See the object specification below.
   *
   * @see [TileInfo#create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html#create)
   * @see [Zoom and LODs](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#mapview-lods)
   * @example
   * view.constraints = {
   *   geometry: { // Constrain lateral movement to Lower Manhattan
   *     type: "extent",
   *     xmin: -74.020,
   *     ymin:  40.700,
   *     xmax: -73.971,
   *     ymax:  40.73
   *   },
   *   minScale: 500000, // User cannot zoom out beyond a scale of 1:500,000
   *   maxScale: 0, // User can overzoom tiles
   *   rotationEnabled: false // Disables map rotation
   * };
   * @example
   * // This snippet shows how to set the MapView scale 1:1 while generating additional LODs for the MapView.constraints.
   * const spatialReference = new SpatialReference({
   *   wkid: 2154
   * });
   * const center = new Point({
   *   x: 0,
   *   y: 0,
   *   spatialReference
   * });
   *
   * // Create LODs from level 0 to 31
   * const tileInfo = TileInfo.create({
   *   spatialReference,
   *   numLODs: 32
   * });
   * const lods = tileInfo.lods;
   *
   * let view = new MapView({
   *   container: "viewDiv",
   *   map,
   *   scale: 1,
   *   center,
   *   spatialReference,
   *   constraints: {
   *     lods: lods,
   *     snapToZoom: false
   *   }
   * });
   */
  constraints?: MapViewConstraintsProperties;
  /**
   * The extent represents the visible portion of a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) within the view as an instance of [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html).
   * Setting the extent immediately changes the view without animation. To animate
   * the view, see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo). When the view is rotated, the extent does not update to include the newly visible portions of the map.
   *
   * The returned [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) object is an internal
   * reference which may be modified internally. To persist the returned
   * object, create a copy using [Extent#clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#clone).
   *
   * > [!WARNING]
   * >
   * > **Notes**
   * >
   * > - If the spatial reference of `extent` set in the constructor does not match the
   * > [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) of the view, then [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) will be loaded dynamically.
   * > - At runtime, the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) must be [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load) when
   * > setting the `extent` to a spatial reference that doesn't match the view spatial reference. You can check if the projectOperator is
   * > loaded prior to setting the extent by calling [isLoaded()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#isLoaded).
   * > If it is not yet loaded, you can call [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load).
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   * @example
   * // the projectOperator must be loaded in the app if the spatial reference
   * // of the view does not match the spatial reference of the extent
   * const extent = new Extent({
   *   xmin: -13056650,
   *   ymin: 6077558,
   *   xmax: -13055709,
   *   ymax: 6077938,
   *   spatialReference: new SpatialReference({wkid:3857})
   * });
   * view.extent = extent;  // Updates the view without animation
   */
  extent?: ExtentProperties;
  /**
   * Applies a display filter on the view for a specific set of floor levels. It can filter the map display on floor-aware layers by zero or more level IDs.
   *
   * @since 4.19
   */
  floors?: ReadonlyArrayOrCollection<string>;
  /**
   * Options for configuring the highlight. Use the highlight method on the
   * appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature.
   *
   * @deprecated since version 4.32. Use the [highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#highlights) property instead.
   * @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
   * @example
   * const view = new MapView({
   *   map: map,
   *   highlightOptions: {
   *     color: [255, 255, 0, 1],
   *     haloOpacity: 0.9,
   *     fillOpacity: 0.2
   *   }
   * });
   */
  highlightOptions?: HighlightOptionsProperties;
  /**
   * The spatial reference of the view. This indicates the projected or geographic coordinate system used to locate geographic features in the map.
   * Starting at version 4.23, you can change the spatialReference of the MapView after it is initialized by either directly changing
   * this property, or by changing the basemap from the [BasemapGallery](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html) or [BasemapToggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html) widgets.
   * Set MapView's [spatialReferenceLocked](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReferenceLocked) property to `true` to prevent users from changing the view's spatial reference at runtime.
   *
   * Prior to changing the spatial reference, check if the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) is loaded by calling
   * [isLoaded()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#isLoaded).
   * If it is not yet loaded, call [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load) method.
   * If the projectOperator is not loaded, the view's [center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#center) will default to `[0, 0]`
   * in the new spatial reference of the view and a console error will be thrown.
   *
   * > [!WARNING]
   * >
   * > **Notes**
   * >
   * > - [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) not compatible with the view's spatial reference are not displayed. In such case, the layer view's [suspended](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#suspended)
   * > property is `true` and [spatialReferenceSupported](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#spatialReferenceSupported) property is `false`.
   * >
   * > - When setting view's spatial reference, the [center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#center), [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#extent) or [viewpoint.targetGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#viewpoint) properties
   * > are projected to the new spatial reference. The [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale)
   * > and [rotation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#rotation) properties are adjusted to keep the content of the map at the same size and orientation on screen.
   * > - To ensure [TileLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html) and [VectorTileLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html) are displayed in a [basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) correctly,
   * > the spatialReference of the MapView must be set match their [tileInfo's](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html) spatial reference.
   * > - Switching spatial reference with an [imageCoordinateSystem](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#imageCoordinateSystem) is not supported.
   *
   * @see [spatialReferenceLocked](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReferenceLocked)
   * @example
   * // check if the projectOperator is loaded
   * if (!projectOperator.isLoaded()) {
   *   projectOperator.load().then(() => {
   *    // change the spatial reference of the view to equal earth projection
   *     view.spatialReference = new SpatialReference({
   *       wkid: 54035 //equal earth projection
   *     });
   *   });
   * } else {
   *   // the projectOperator is already loaded.
   *   // change the spatial reference of the view to equal earth projection
   *   view.spatialReference = new SpatialReference({
   *     wkid: 54035 //equal earth projection
   *   });
   * }
   * @example
   * const basemap = await changeBasemap();
   * const spatialReference = await findSpatialReference(basemap);
   *
   * // check if basemap has the same spatial reference as the view if they are not equal
   * // then check if the projectOperator is loaded, and load the projectOperator if it is not loaded.
   * // If loaded, then simply change view.spatialReference to match the basemap spatialReference
   * if (spatialReference && !view.spatialReference.equals(spatialReference)) {
   *   if (!projectOperator.isLoaded()) {
   *     await projectOperator.load();
   *   }
   *   view.spatialReference = spatialReference;
   * }
   *
   * // change the basemap
   * map.basemap = basemap;
   *
   * async function changeBasemap() {
   *   let basemap;
   *   if (map.basemap.title === "OpenStreetMap Vector Basemap (Blueprint - WGS84)"){
   *     basemap = new Basemap({
   *       portalItem: { // Spilhaus - one ocean basemap
   *         id: "5639ccf22d4c4830ab815c4f9c9319bb"
   *       }
   *     });
   *   } else {
   *     basemap = osm84;
   *   }
   *   return basemap;
   * }
   *
   * async function findSpatialReference(basemap) {
   *   await basemap.load();
   *
   *   if (basemap.spatialReference) {
   *     return basemap.spatialReference;
   *   }
   *
   *   const layer = basemap.baseLayers.at(0);
   *
   *   if (!layer) {
   *     return null;
   *   }
   *
   *   await layer.load();
   *
   *   return layer.spatialReference;
   * }
   */
  spatialReference?: SpatialReferenceProperties;
  /**
   * Represents the current view as a [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) or point of observation on the view.
   * Setting the viewpoint immediately changes the current view. For animating
   * the view, see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo).
   *
   *
   * The returned [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) object is an internal
   * reference which may be modified internally. To persist the returned
   * object, create a copy using [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html#clone) method.
   *
   * > [!WARNING]
   * >
   * > **Notes**
   * >
   * > - If the spatial reference of `viewpoint` set in the constructor does not match the
   * > [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) of the view, then [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) will be loaded dynamically.
   * >
   * > - At runtime, the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) must be [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load) when
   * > setting the `viewPoint` to a spatial reference that doesn't match the view spatial reference. You can check if the projectOperator is
   * > loaded prior to setting the center by calling [isLoaded()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#isLoaded).
   * > If it is not yet loaded, you can call [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load).
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   */
  viewpoint?: ViewpointProperties;
}

/**
 * View2D is the base class for all 2D views.
 * To construct 2D views see [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and [LinkChartView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-LinkChartView.html).
 *
 * @since 4.31
 * @see [LinkChartView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-LinkChartView.html)
 * @see [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html)
 */
export default abstract class View2D extends View2DSuperclass {
  /**
   * A collection of analyses associated with the view.
   *
   * @since 4.34
   * @example
   * // Adds an analysis to the View
   * view.analyses.add(elevationProfileAnalysis);
   * @example
   * // Removes an analysis from the View
   * view.analyses.remove(elevationProfileAnalysis);
   */
  get analyses(): Collection<Analysis>;
  set analyses(value: ReadonlyArrayOrCollection<Analysis>);
  /**
   * Represents an ongoing view animation initialized by [goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#goTo).
   * You may [watch()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html#watch) this property to be notified of the animation's state.
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   * @example
   * reactiveUtils.watch(
   *   () => view.animation,
   *   (response) => {
   *     if(response?.state === "running"){
   *       console.log("Animation in progress");
   *     } else{
   *      console.log("No animation");
   *     }
   *   }
   * );
   * @see [View2D#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#goTo)
   */
  accessor animation: ViewAnimation | null | undefined;
  /**
   * The background color of the view. If the view's [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#map) changes, the view's `background` is reset to the map's background,
   * even if the user set it previously.
   *
   * @since 4.16
   * @example
   * let view = new MapView({
   *   container: "viewDiv",
   *   map: map,
   *   background: { // autocasts new ColorBackground()
   *     color: "magenta" // autocasts as new Color()
   *   }
   * });
   */
  get background(): ColorBackground | null | undefined;
  set background(value: ColorBackgroundProperties | null | undefined);
  /**
   * Represents the view's center point; when setting the center, you may pass a
   * [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) instance or an array of numbers representing
   * a longitude/latitude pair (`[-100.4593, 36.9014]`).
   * Setting the center immediately changes the current view. For animating
   * the view, see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo).
   *
   * The returned [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) object is always in the spatial reference of the view and may be modified internally.
   * To persist the returned object, create a clone using [Point#clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#clone).
   *
   * > [!WARNING]
   * >
   * > **Notes**
   * >
   * > - If the spatial reference of `center` set in the constructor does not match the
   * > [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) of the view, then [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) will be loaded dynamically.
   * > - At runtime, the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) must be [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load) when
   * > setting the `center` to a spatial reference that doesn't match the view spatial reference. You can check if the projectOperator is
   * > loaded prior to setting the center by calling [isLoaded()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#isLoaded). If it is not yet loaded,
   * > you can call [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load).
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   * @example
   * // Sets the initial center point of the view to lon/lat coordinates
   * // lon/lat will be projected to match the spatial reference of the view
   * let view = new MapView({
   *   center: [-112, 38]
   * });
   * @example
   * // Updates the view's center point to a pre-determined Point object
   * let pt = new Point({
   *   x: 12804.24,
   *   y: -1894032.09,
   *   spatialReference: {
   *     wkid: view.spatialReference  // wkid 2027
   *   }
   * });
   * view.center = pt;
   * @example
   * const centerPoint = new Point({
   *   x: -8746995,
   *   y: 4352308,
   *   spatialReference: {
   *     wkid: 8857
   *   }
   * });
   * if (!projectOperator.isLoaded()) {
   *   await projectOperator.load();
   * }
   * view.center = centerPoint;
   */
  get center(): Point;
  set center(value: PointProperties | [
      number,
      number
  ]);
  /**
   * Specifies constraints to [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale), [zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#zoom), and [rotation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#rotation) that may be applied to the MapView.
   * The `constraints.lods` should be set in the MapView constructor, if the map does not have a [basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or when the basemap does not have [TileInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html).
   * See [Zoom and LODs](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#mapview-lods) section to learn more how MapView's zoom and LODs work. See the object specification below.
   *
   * @see [TileInfo#create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html#create)
   * @see [Zoom and LODs](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#mapview-lods)
   * @example
   * view.constraints = {
   *   geometry: { // Constrain lateral movement to Lower Manhattan
   *     type: "extent",
   *     xmin: -74.020,
   *     ymin:  40.700,
   *     xmax: -73.971,
   *     ymax:  40.73
   *   },
   *   minScale: 500000, // User cannot zoom out beyond a scale of 1:500,000
   *   maxScale: 0, // User can overzoom tiles
   *   rotationEnabled: false // Disables map rotation
   * };
   * @example
   * // This snippet shows how to set the MapView scale 1:1 while generating additional LODs for the MapView.constraints.
   * const spatialReference = new SpatialReference({
   *   wkid: 2154
   * });
   * const center = new Point({
   *   x: 0,
   *   y: 0,
   *   spatialReference
   * });
   *
   * // Create LODs from level 0 to 31
   * const tileInfo = TileInfo.create({
   *   spatialReference,
   *   numLODs: 32
   * });
   * const lods = tileInfo.lods;
   *
   * let view = new MapView({
   *   container: "viewDiv",
   *   map,
   *   scale: 1,
   *   center,
   *   spatialReference,
   *   constraints: {
   *     lods: lods,
   *     snapToZoom: false
   *   }
   * });
   */
  get constraints(): MapViewConstraints;
  set constraints(value: MapViewConstraintsProperties);
  /**
   * The extent represents the visible portion of a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) within the view as an instance of [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html).
   * Setting the extent immediately changes the view without animation. To animate
   * the view, see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo). When the view is rotated, the extent does not update to include the newly visible portions of the map.
   *
   * The returned [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) object is an internal
   * reference which may be modified internally. To persist the returned
   * object, create a copy using [Extent#clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#clone).
   *
   * > [!WARNING]
   * >
   * > **Notes**
   * >
   * > - If the spatial reference of `extent` set in the constructor does not match the
   * > [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) of the view, then [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) will be loaded dynamically.
   * > - At runtime, the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) must be [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load) when
   * > setting the `extent` to a spatial reference that doesn't match the view spatial reference. You can check if the projectOperator is
   * > loaded prior to setting the extent by calling [isLoaded()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#isLoaded).
   * > If it is not yet loaded, you can call [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load).
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   * @example
   * // the projectOperator must be loaded in the app if the spatial reference
   * // of the view does not match the spatial reference of the extent
   * const extent = new Extent({
   *   xmin: -13056650,
   *   ymin: 6077558,
   *   xmax: -13055709,
   *   ymax: 6077938,
   *   spatialReference: new SpatialReference({wkid:3857})
   * });
   * view.extent = extent;  // Updates the view without animation
   */
  get extent(): Extent;
  set extent(value: ExtentProperties);
  /**
   * Applies a display filter on the view for a specific set of floor levels. It can filter the map display on floor-aware layers by zero or more level IDs.
   *
   * @since 4.19
   */
  get floors(): Collection<string>;
  set floors(value: ReadonlyArrayOrCollection<string>);
  /**
   * Options for configuring the highlight. Use the highlight method on the
   * appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature.
   *
   * @deprecated since version 4.32. Use the [highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#highlights) property instead.
   * @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
   * @example
   * const view = new MapView({
   *   map: map,
   *   highlightOptions: {
   *     color: [255, 255, 0, 1],
   *     haloOpacity: 0.9,
   *     fillOpacity: 0.2
   *   }
   * });
   */
  get highlightOptions(): HighlightOptions;
  set highlightOptions(value: HighlightOptionsProperties);
  /**
   * Defines which anchor stays still while resizing the browser window. The default, `center`, ensures the view's center point remains constantly visible as the window size changes. The other
   * options allow  the respective portion of the view to remain visible when the window's size is changed.
   *
   * @default "center"
   */
  accessor resizeAlign: ResizeAlign;
  /**
   * Represents the size of one pixel in map units. The value of resolution can be found by dividing the extent width by the view's width.
   *
   * @since 4.9
   */
  get resolution(): number;
  /**
   * The clockwise rotation of due north in relation to the top of the view in degrees.
   * The view may be rotated by directly setting
   * the rotation or by using the following mouse event: `Right-click + Drag`.
   * Map rotation may be disabled by setting the `rotationEnabled` property
   * in [constraints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#constraints) to `false`. See the code snippet below for
   * an example of this.
   *
   * @default 0
   * @example
   * // Due north is rotated 90 degrees, pointing to the right side of the view
   * view.rotation = 90;
   * @example
   * // Due north is rotated 180 degrees, pointing to the bottom of the view
   * view.rotation = 180;
   * @example
   * // Due north is rotated 270 degrees, pointing to the left side of the view
   * view.rotation = 270;
   * @example
   * // Due north is rotated 0 degrees, pointing to the top of the view (the default)
   * view.rotation = 0; // 360 or multiple of 360 (e.g. 720) works here as well.
   * @example
   * // Disables map rotation
   * view.constraints = {
   *   rotationEnabled: false
   * };
   */
  accessor rotation: number;
  /**
   * Represents the map scale at the center of the view. Setting the scale immediately changes the view. For animating
   * the view, see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo).
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   * @see [Zoom and LODs](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#mapview-lods)
   * @example view.scale = 24000;  // Sets the map scale in the view's center to 1:24,000
   */
  accessor scale: number;
  /**
   * The spatial reference of the view. This indicates the projected or geographic coordinate system used to locate geographic features in the map.
   * Starting at version 4.23, you can change the spatialReference of the MapView after it is initialized by either directly changing
   * this property, or by changing the basemap from the [BasemapGallery](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html) or [BasemapToggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html) widgets.
   * Set MapView's [spatialReferenceLocked](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReferenceLocked) property to `true` to prevent users from changing the view's spatial reference at runtime.
   *
   * Prior to changing the spatial reference, check if the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) is loaded by calling
   * [isLoaded()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#isLoaded).
   * If it is not yet loaded, call [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load) method.
   * If the projectOperator is not loaded, the view's [center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#center) will default to `[0, 0]`
   * in the new spatial reference of the view and a console error will be thrown.
   *
   * > [!WARNING]
   * >
   * > **Notes**
   * >
   * > - [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) not compatible with the view's spatial reference are not displayed. In such case, the layer view's [suspended](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#suspended)
   * > property is `true` and [spatialReferenceSupported](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#spatialReferenceSupported) property is `false`.
   * >
   * > - When setting view's spatial reference, the [center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#center), [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#extent) or [viewpoint.targetGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#viewpoint) properties
   * > are projected to the new spatial reference. The [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale)
   * > and [rotation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#rotation) properties are adjusted to keep the content of the map at the same size and orientation on screen.
   * > - To ensure [TileLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html) and [VectorTileLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html) are displayed in a [basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) correctly,
   * > the spatialReference of the MapView must be set match their [tileInfo's](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html) spatial reference.
   * > - Switching spatial reference with an [imageCoordinateSystem](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#imageCoordinateSystem) is not supported.
   *
   * @see [spatialReferenceLocked](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReferenceLocked)
   * @example
   * // check if the projectOperator is loaded
   * if (!projectOperator.isLoaded()) {
   *   projectOperator.load().then(() => {
   *    // change the spatial reference of the view to equal earth projection
   *     view.spatialReference = new SpatialReference({
   *       wkid: 54035 //equal earth projection
   *     });
   *   });
   * } else {
   *   // the projectOperator is already loaded.
   *   // change the spatial reference of the view to equal earth projection
   *   view.spatialReference = new SpatialReference({
   *     wkid: 54035 //equal earth projection
   *   });
   * }
   * @example
   * const basemap = await changeBasemap();
   * const spatialReference = await findSpatialReference(basemap);
   *
   * // check if basemap has the same spatial reference as the view if they are not equal
   * // then check if the projectOperator is loaded, and load the projectOperator if it is not loaded.
   * // If loaded, then simply change view.spatialReference to match the basemap spatialReference
   * if (spatialReference && !view.spatialReference.equals(spatialReference)) {
   *   if (!projectOperator.isLoaded()) {
   *     await projectOperator.load();
   *   }
   *   view.spatialReference = spatialReference;
   * }
   *
   * // change the basemap
   * map.basemap = basemap;
   *
   * async function changeBasemap() {
   *   let basemap;
   *   if (map.basemap.title === "OpenStreetMap Vector Basemap (Blueprint - WGS84)"){
   *     basemap = new Basemap({
   *       portalItem: { // Spilhaus - one ocean basemap
   *         id: "5639ccf22d4c4830ab815c4f9c9319bb"
   *       }
   *     });
   *   } else {
   *     basemap = osm84;
   *   }
   *   return basemap;
   * }
   *
   * async function findSpatialReference(basemap) {
   *   await basemap.load();
   *
   *   if (basemap.spatialReference) {
   *     return basemap.spatialReference;
   *   }
   *
   *   const layer = basemap.baseLayers.at(0);
   *
   *   if (!layer) {
   *     return null;
   *   }
   *
   *   await layer.load();
   *
   *   return layer.spatialReference;
   * }
   */
  get spatialReference(): SpatialReference;
  set spatialReference(value: SpatialReferenceProperties);
  /**
   * Indicates if the MapView's [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) can be changed after it is [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#ready). The default is `false` indicating
   * the view's [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) can be changed at runtime. When `true`, [basemaps](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#source)
   * with spatial references that do not match the MapView's spatial reference will be disabled in [BasemapGallery](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html)
   * and [BasemapToggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html) widgets and the view spatialReference cannot be changed at runtime.
   *
   * @default false
   * @since 4.23
   * @see [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference)
   */
  accessor spatialReferenceLocked: boolean;
  /** The tiling scheme information of the view. */
  get tileInfo(): TileInfo | null | undefined;
  /**
   * Defines the time zone of the view. The time zone property determines how dates and times are represented to the
   * user, but the underlying data is unchanged. Changing the time zone will have the following effect:
   *
   * - **Arcade**: [Arcade expressions](https://developers.arcgis.com/javascript/latest/arcade/) referencing date values in labels, renderers, and forms
   *   will represent dates by default in the time zone of the view. When the view time zone
   *   is changed, the output of Arcade expressions working with dates may change to match the time zone of the view.
   *   The user can use the ChangeTimeZone Arcade function (e.g.
   *   `ChangeTimeZone($feature.dateField, "system")`) to display dates in another time zone regardless of web map
   *   time zone. Alternatively they can construct Date values in the context of a specific time zone
   *   (e.g. `Date(2013, 1, 1, 10, 00, 00, 00, "UTC")`).
   * - **Components/widgets**: Date values, including values from `date` and `timestamp-offset` fields, will be displayed in the view's time zone by default in the following components/widgets:
   * [Bookmarks](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html), [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html), [Feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html),  [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html), [Features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html),
   * [FeatureTable](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html), [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/), [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) and [TimeSlider](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TimeSlider.html).
   *
   * The time zone can be set to one of the following values:
   *
   * **Possible Values**
   *
   * Value | Description |
   * ----- | ----------- |
   * system  | Dates and times will be displayed in the time zone of the device or browser.
   * unknown | Dates and times will be displayed based on the time zone that has been defined for the layer. No adjustments are made to the display of date info. [TimeSlider](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TimeSlider.html) is disabled.
   * Specified IANA time zone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
   *
   * > [!WARNING]
   * >
   * > If the `timeZone` is set to `unknown` and a layer’s date/time field includes time information, set the [DateTimeFieldFormat#timeStyle](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-DateTimeFieldFormat.html#timeStyle) property to either long or full on the corresponding [date/time field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-DateTimeFieldFormat.html).
   *
   * @default "system"
   * @since 4.28
   * @see [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
   * @example
   * // Date and time will be displayed in Pacific/Auckland (NZ) time zone
   * const view = new MapView({
   *   map: map,
   *   container: "viewDiv",
   *   timeZone: "Pacific/Auckland"
   * });
   */
  accessor timeZone: TimeZone;
  /** The dimension of the view. */
  get type(): "2d";
  /**
   * Represents the current view as a [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) or point of observation on the view.
   * Setting the viewpoint immediately changes the current view. For animating
   * the view, see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo).
   *
   *
   * The returned [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) object is an internal
   * reference which may be modified internally. To persist the returned
   * object, create a copy using [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html#clone) method.
   *
   * > [!WARNING]
   * >
   * > **Notes**
   * >
   * > - If the spatial reference of `viewpoint` set in the constructor does not match the
   * > [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) of the view, then [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) will be loaded dynamically.
   * >
   * > - At runtime, the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html) must be [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load) when
   * > setting the `viewPoint` to a spatial reference that doesn't match the view spatial reference. You can check if the projectOperator is
   * > loaded prior to setting the center by calling [isLoaded()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#isLoaded).
   * > If it is not yet loaded, you can call [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#load).
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   */
  get viewpoint(): Viewpoint;
  set viewpoint(value: ViewpointProperties);
  /**
   * The visibleArea represents the visible portion of a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) within the view as
   * an instance of a [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). This is similar to the view
   * [MapView#extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#extent) but is a more accurate representation of the visible area especially
   * when the view is rotated. An example use of the visible area is to spatially filter visible features
   * in a layer view query.
   *
   * @since 4.31
   * @see [MapView#extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#extent)
   */
  get visibleArea(): Polygon | null | undefined;
  /**
   * Represents the level of detail (LOD) at the center of the view.
   * A zoom level or [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale) is a number that defines how large or small the contents of a map appear in a map view.
   * Zoom level is a number usually between 0 (global view) and 23 (very detailed view) and is used as a shorthand for predetermined scale values.
   * A value of -1 means the view has no LODs.
   * When setting the zoom value, map view converts it to the corresponding scale, or interpolates it if the zoom is a fractional number.
   * MapView can display maps with different [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) projections at a full range of scales, and so use
   * [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale) rather than zoom level.
   *
   * Setting the zoom immediately changes the current view. For animating the view, see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo).
   * Setting this property in conjunction with [center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#center) is a convenient way to set the initial extent of the view.
   *
   * @see [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo)
   * @see [Understanding MapView lods](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#mapview-lods)
   * @example
   * view.zoom = 3;  // Sets the LOD to 3 (small map scale)
   * view.zoom = 18; // Sets the LOD to 18 (large map scale)
   * @example
   * // Set the zoom level and center in the constructor
   * let view = new MapView({
   *   zoom: 10,
   *   center: [-120, 34],
   *   map: map
   * });
   */
  accessor zoom: number;
  /**
   * Sets the view to a given target. The target parameter can be one of the following:
   *
   * * `[longitude, latitude]` pair of coordinates
   * * [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) (or array of [Geometry[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html))
   * * [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) (or array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html))
   * * [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html)
   * * Object with a combination of `target`, `center`, `scale` and `rotation`
   *   properties (with `target` being any of the types listed above). The `center` property
   *   is provided as a convenience to animate the [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#center)
   *   and is equivalent to specifying the `target` with the center [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html).
   *
   * This function returns a promise which resolves as soon as the new view has been set to the target.
   * If the transition is animated, then the ongoing animation can be obtained using
   * [MapView.animation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#animation).
   * If setting the view to the new target fails, the promise returned by the goTo() method rejects with
   * an error. Use a catch statement, to handle the error:
   *
   * ```js
   * view.goTo({
   *   center: [-126, 49]
   * })
   * .catch(function(error) {
   *   if (error.name != "AbortError") {
   *      console.error(error);
   *   }
   * });
   * ```
   *
   * If a tiled map service is used as the basemap and `snapToZoom` property is set to `true` in [constraints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#constraints),
   * the `goTo` method will zoom in to fit the defined `target`.
   * If `snapToZoom` property is set to `false`, the `goTo` method will zoom to the exact `target`.
   *
   * > [!WARNING]
   * >
   * > **Since 4.30:** The `goTo` method now respects the user's preference for [reduced motion](https://developers.arcgis.com/javascript/latest/accessibility/#reduced-motion).
   * > By default, `goTo()` will animate, but when the user expresses a preference for reduced motion, `goTo()` will navigate to the specified target without animation.
   * > It is possible to override the user's preference for reduced motion by configuring [esriConfig.respectPrefersReducedMotion](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#ConfigWithRespectPrefersReducedMotion)
   * > or on a per-call basis by specifying the `animate` property.
   * > However, if you override the user's preference for reduced motion, you should consider slowing down animations by adjusting the `speedFactor` or `duration` in the `options` parameter, or provide users with a way to slow down or stop the animation.
   * > Refer to [implementing reduced motion in your applications](https://developers.arcgis.com/javascript/latest/accessibility/#implementing-reduced-motion-in-your-applications) for more information.
   *
   * @param target - The target location/viewpoint to animate to. When using an object for `target`, use the properties
   *   in [GoToTarget2D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-types.html#GoToTarget2D).
   * @param options - Animation options for controlling the duration and easing of the animation.
   *   See the properties defined in [GoToOptions2D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-types.html#GoToOptions2D) for object specifications.
   * @returns A promise that resolves when the view's extent updates to the extent defined in `target`.
   * @example
   * let pt = new Point({
   *   latitude: 49,
   *   longitude: -126
   * });
   *
   * // go to the given point
   * view.goTo(pt);
   * @example
   * let opts = {
   *   duration: 5000  // Duration of animation will be 5 seconds
   * };
   *
   * // go to point at LOD 15 with custom duration
   * view.goTo({
   *   target: pt,
   *   zoom: 15
   * }, opts);
   * @example
   * // go to same point using center and zoom
   * view.goTo({
   *   center: [-126, 49],
   *   zoom: 15
   * });
   */
  goTo(target: GoToTarget2D, options?: GoToOptions2D): Promise<void>;
  /**
   * Converts the given screen point to a [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html).
   * The screen point represents a point in terms
   * of pixels relative to the top-left corner of the view.
   *
   * @param screenPoint - The location on the screen (or native mouse event) to convert.
   * @returns The map point corresponding to the given screen point.
   */
  toMap(screenPoint: ScreenPoint | MouseEvent): Point;
  /**
   * Converts the given [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) to a screen point.
   * The screen point represents a point in terms of pixels relative to the top-left corner of the view.
   *
   * @param point - A point geometry.
   * @param options - Options for controlling the [toScreen()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#toScreen) calculation.
   *   See the properties defined in [ToScreenOptions2D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-types.html#ToScreenOptions2D) for object specifications.
   * @returns The screen point corresponding to the given map point.
   * @example
   * // get the screen point for the specified map point.
   * const mapPoint = {
   *   x: -49.97,
   *   y: 41.73,
   *   spatialReference:{
   *      wkid: 4326
   *   }
   * };
   * const screenPoint = mapView.toScreen(mapPoint);
   */
  toScreen(point: Point, options?: ToScreenOptions2D): ScreenPoint | null | undefined;
  /** @param analysis */
  whenAnalysisView(analysis: ElevationProfileAnalysis): Promise<ElevationProfileAnalysisView2D>;
  /**
   * Gets the analysis view created for the given analysis object. The returned promise resolves when
   * the view for the given analysis has been created, or rejects with an error (for example
   * if the analysis does not belong in [MapView#analyses](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#analyses).
   *
   * @param analysis - The analysis for which to obtain the analysis view.
   * @returns Resolves to an instance of the analysis view for the
   *   provided analysis.
   * @since 4.34
   * @example
   * // Create a slice analysis
   * let analysis = new ElevationProfileAnalysis();
   *
   * // add to the view
   * view.analyses.add(analysis);
   *
   * view.whenAnalysisView(analysis)
   *   .then((analysisView) => {
   *     // The analysis view for the analysis
   *   })
   *   .catch((error) => {
   *     // An error occurred during the analysis view creation
   *   });
   */
  whenAnalysisView(analysis: Analysis): Promise<AnalysisView2DUnion>;
  /**
   * Gets the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) created
   * on the view for the given layer. The returned promise resolves when
   * the layer view for the given layer has been created, or rejects with
   * an error (for example if the layer is not part of the view, or if the
   * layer type is not supported in this view).
   *
   * @param layer - The layer for which to obtain its LayerView.
   * @returns Resolves to an instance of
   *                   [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) for the specified layer.
   * @example
   * // Create a feature layer from a url pointing to a Feature Service
   * let layer = new FeatureLayer(url);
   *
   * map.add(layer);
   *
   * view.whenLayerView(layer)
   *     .then(function(layerView) {
   *       // The layerview for the layer
   *     })
   *     .catch(function(error) {
   *       // An error occurred during the layerview creation
   *     });
   * @see [Sample - StreamLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-streamlayer/)
   * @example
   * // Create a feature layer from a url pointing to a Feature Service
   * let layer = new FeatureLayer(url);
   *
   * map.add(layer);
   *
   * view.whenLayerView(layer)
   *     .then(function(layerView) {
   *       // The layerview for the layer
   *     })
   *     .catch(function(error) {
   *       // An error occurred during the layerview creation
   *     });
   */
  whenLayerView<TLayer extends Layer>(layer: TLayer): Promise<LayerView2DFor<TLayer>>;
}
declare const View2DSuperclass: typeof View<LayerView> & typeof DOMContainer & typeof PopupView & typeof BreakpointsOwner & typeof Viewport2DMixin