]> git.openstreetmap.org Git - rails.git/blob - vendor/assets/iD/iD/mapillary-js/mapillary.module.js.flow
Update to iD v2.21.0
[rails.git] / vendor / assets / iD / iD / mapillary-js / mapillary.module.js.flow
1 /**
2  * Copyright (c) Facebook, Inc. and its affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  *
7  * @flow
8  */
9
10 /**
11  * Convert coordinates from geodetic (WGS84) reference to local topocentric
12  * (ENU) reference.
13  * @param {number} lng Longitude in degrees.
14  * @param {number} lat Latitude in degrees.
15  * @param {number} alt Altitude in meters.
16  * @param {number} refLng Reference longitude in degrees.
17  * @param {number} refLat Reference latitude in degrees.
18  * @param {number} refAlt Reference altitude in meters.
19  * @returns {Array<number>} The x, y, z local topocentric ENU coordinates.
20  */
21 declare function geodeticToEnu(
22   lng: number,
23   lat: number,
24   alt: number,
25   refLng: number,
26   refLat: number,
27   refAlt: number
28 ): number[];
29
30 /**
31  * Convert coordinates from local topocentric (ENU) reference to
32  * geodetic (WGS84) reference.
33  * @param {number} x Topocentric ENU coordinate in East direction.
34  * @param {number} y Topocentric ENU coordinate in North direction.
35  * @param {number} z Topocentric ENU coordinate in Up direction.
36  * @param {number} refLng Reference longitude in degrees.
37  * @param {number} refLat Reference latitude in degrees.
38  * @param {number} refAlt Reference altitude in meters.
39  * @returns {Array<number>} The longitude, latitude in degrees
40  * and altitude in meters.
41  */
42 declare function enuToGeodetic(
43   x: number,
44   y: number,
45   z: number,
46   refLng: number,
47   refLat: number,
48   refAlt: number
49 ): number[];
50
51 /**
52  * Convert coordinates from Earth-Centered, Earth-Fixed (ECEF) reference
53  * to local topocentric (ENU) reference.
54  * @param {number} X ECEF X-value.
55  * @param {number} Y ECEF Y-value.
56  * @param {number} Z ECEF Z-value.
57  * @param {number} refLng Reference longitude in degrees.
58  * @param {number} refLat Reference latitude in degrees.
59  * @param {number} refAlt Reference altitude in meters.
60  * @returns {Array<number>} The x, y, z topocentric ENU coordinates in East, North
61  * and Up directions respectively.
62  */
63 declare function ecefToEnu(
64   X: number,
65   Y: number,
66   Z: number,
67   refLng: number,
68   refLat: number,
69   refAlt: number
70 ): number[];
71
72 /**
73  * Convert coordinates from local topocentric (ENU) reference
74  * to Earth-Centered, Earth-Fixed (ECEF) reference.
75  * @param {number} x Topocentric ENU coordinate in East direction.
76  * @param {number} y Topocentric ENU coordinate in North direction.
77  * @param {number} z Topocentric ENU coordinate in Up direction.
78  * @param {number} refLng Reference longitude in degrees.
79  * @param {number} refLat Reference latitude in degrees.
80  * @param {number} refAlt Reference altitude in meters.
81  * @returns {Array<number>} The X, Y, Z ECEF coordinates.
82  */
83 declare function enuToEcef(
84   x: number,
85   y: number,
86   z: number,
87   refLng: number,
88   refLat: number,
89   refAlt: number
90 ): number[];
91
92 /**
93  * Convert coordinates from geodetic reference (WGS84) to Earth-Centered,
94  * Earth-Fixed (ECEF) reference.
95  * @param {number} lng Longitude in degrees.
96  * @param {number} lat Latitude in degrees.
97  * @param {number} alt Altitude in meters.
98  * @returns {Array<number>} The X, Y, Z ECEF coordinates.
99  */
100 declare function geodeticToEcef(
101   lng: number,
102   lat: number,
103   alt: number
104 ): number[];
105
106 /**
107  * Convert coordinates from Earth-Centered, Earth-Fixed (ECEF) reference
108  * to geodetic reference (WGS84).
109  * @param {number} X ECEF X-value.
110  * @param {number} Y ECEF Y-value.
111  * @param {number} Z ECEF Z-value.
112  * @returns {Array<number>} The longitude, latitude in degrees
113  * and altitude in meters.
114  */
115 declare function ecefToGeodetic(X: number, Y: number, Z: number): number[];
116
117 /**
118  * Contract describing triangulated meshes.
119  */
120 export interface MeshContract {
121   /**
122    * Flattened array of faces for the mesh. Each face consist
123    * three vertex indices.
124    */
125   faces: number[];
126
127   /**
128    * Flattened array of vertices for the mesh. Each vertex
129    * consists of X, Y and Z coordinates in the camera
130    * reference frame.
131    */
132   vertices: number[];
133 }
134 /**
135  * Decompress and parse an array buffer containing zipped
136  * json data and return as a json object.
137  * @description Handles array buffers continaing zipped json
138  * data.
139  * @param {ArrayBuffer} buffer - Array buffer to decompress.
140  * @returns {Object} Parsed object.
141  */
142 declare function decompress<T>(buffer: ArrayBuffer): T;
143
144 /**
145  * Retrieves a resource as an array buffer and returns a promise
146  * to the buffer.
147  * @description Rejects the promise on request failure.
148  * @param {string} url - URL for resource to retrieve.
149  * @param {Promise} [abort] - Optional promise for aborting
150  * the request through rejection.
151  * @returns {Promise<ArrayBuffer>} Promise to the array buffer
152  * resource.
153  */
154 declare function fetchArrayBuffer(
155   url: string,
156   abort?: Promise<void>
157 ): Promise<ArrayBuffer>;
158
159 /**
160  * Read the fields of a protobuf array buffer into a mesh
161  * object.
162  * @param {ArrayBuffer} buffer - Protobuf array buffer
163  * to read from.
164  * @returns {MeshContract} Mesh object.
165  */
166 declare function readMeshPbf(buffer: ArrayBuffer): MeshContract;
167
168 /**
169  * Interface describing event emitter members.
170  *
171  * This is a specification for implementers to model: it is
172  * not an exported method or class.
173  */
174 export interface IEventEmitter {
175   fire<T>(type: string, event: T): void;
176   off<T>(type: string, handler: (event: T) => void): void;
177   on<T>(type: string, handler: (event: T) => void): void;
178 }
179
180 declare class EventEmitter implements IEventEmitter {
181   constructor(): this;
182
183   /**
184    * Subscribe to an event by its name.
185    * @param {string} type - The name of the event
186    * to subscribe to.
187    * @param {(event: T) => void} handler - The
188    * handler called when the event occurs.
189    */
190   on<T>(type: string, handler: (event: T) => void): void;
191
192   /**
193    * Unsubscribe from an event by its name.
194    * @param {string} type - The name of the event
195    * to unsubscribe from.
196    * @param {(event: T) => void} handler - The
197    * handler to remove.
198    */
199   off<T>(type: string, handler: (event: T) => void): void;
200
201   /**
202    * @ignore
203    */
204   fire<T>(type: string, event: T): void;
205 }
206 /**
207  * Interface that represents a longitude, latitude coordinate,
208  * measured in degrees. Coordinates are defined in the WGS84 datum.
209  */
210 export interface LngLat {
211   /**
212    * Latitude, measured in degrees.
213    */
214   lat: number;
215
216   /**
217    * Longitude, measured in degrees.
218    */
219   lng: number;
220 }
221 /**
222  * Interface that represents longitude-latitude-altitude
223  * coordinates. Longitude and latitude are measured in degrees
224  * and altitude in meters. Coordinates are defined in the WGS84 datum.
225  * @interface
226  */
227 export interface LngLatAlt extends LngLat {
228   /**
229    * Altitude, measured in meters.
230    */
231   alt: number;
232 }
233
234 /**
235  * Contract describing a reconstruction point.
236  */
237 export interface PointContract {
238   /**
239    * RGB color vector of the point, normalized to floats
240    * on the interval [0, 1];
241    */
242   color: number[];
243
244   /**
245    * Coordinates in metric scale in topocentric ENU
246    * reference frame with respect to a geo reference.
247    */
248   coordinates: number[];
249 }
250 /**
251  * Contract describing cluster reconstruction data.
252  */
253 export interface ClusterContract {
254   /**
255    * The unique id of the cluster.
256    */
257   id: string;
258
259   /**
260    * The points of the reconstruction.
261    */
262   points: {
263     [pointId: string]: PointContract,
264     ...
265   };
266
267   /**
268    * The reference longitude, latitude, altitude of
269    * the reconstruction. Determines the
270    * position of the reconstruction in world reference
271    * frame.
272    */
273   reference: LngLatAlt;
274 }
275 /**
276  * Ent representing an entity with a unique ID.
277  * @interface IDEnt
278  */
279 export interface IDEnt {
280   /**
281    * Unique ID.
282    */
283   id: string;
284 }
285 /**
286  * Ent representing core image properties.
287  */
288 export type CoreImageEnt = {
289   /**
290    * SfM computed longitude, latitude in WGS84 datum, measured in degrees.
291    * @description Optional - no 3D interaction available
292    * if unset.
293    */
294   computed_geometry?: LngLat,
295
296   /**
297    * Original EXIF longitude, latitude in WGS84 datum, measured in degrees.
298    */
299   geometry: LngLat,
300
301   /**
302    * Sequence that the image is part of.
303    */
304   sequence: IDEnt,
305   ...
306 } & IDEnt;
307
308 /**
309  * Contract describing core image results.
310  */
311 export interface CoreImagesContract {
312   /**
313    * Geometry cell ID.
314    */
315   cell_id: string;
316
317   /**
318    * Array of core image ents.
319    */
320   images: CoreImageEnt[];
321 }
322 /**
323  * Ent representing camera properties.
324  */
325 export interface CameraEnt {
326   /**
327    * Camera type dependent camera parameters.
328    *
329    * For perspective and fisheye camera types,
330    * the camera parameters array should be
331    * constructed according to
332    *
333    * `[focal, k1, k2]`
334    *
335    * where focal is the camera focal length,
336    * and k1, k2 are radial distortion parameters.
337    *
338    * For spherical camera type the camera
339    * parameters should be an emtpy array.
340    */
341   camera_parameters: number[];
342
343   /**
344    * Projection type of the camera.
345    * @description Supported camera types are:
346    *
347    * ```js
348    * 'spherical'
349    * 'fisheye'
350    * 'perspective'
351    * ```
352    *
353    * Other camera types will be treated as
354    * perspective images.
355    */
356   camera_type: string;
357 }
358 /**
359  * Ent representing URL properties.
360  */
361 export type URLEnt = {
362   /**
363    * URL for fetching ent data.
364    */
365   url: string,
366   ...
367 } & IDEnt;
368
369 /**
370  * Ent representing image creator properties.
371  */
372 export type CreatorEnt = {
373   /**
374    * The username of the creator.
375    */
376   username: string,
377   ...
378 } & IDEnt;
379
380 /**
381  * Ent representing spatial image properties.
382  */
383 export type SpatialImageEnt = {
384   /**
385    * Original EXIF altitude above sea level, in meters.
386    */
387   altitude: number,
388
389   /**
390    * Scale of atomic reconstruction.
391    * @description Optional - no 3D interaction available
392    * if unset.
393    */
394   atomic_scale?: number,
395
396   /**
397    * Timestamp representing the capture date and time.
398    * @description Unix epoch timestamp in milliseconds.
399    */
400   captured_at: number,
401
402   /**
403    * Original EXIF compass angle, measured in degrees.
404    */
405   compass_angle: number,
406
407   /**
408    * Computed altitude, in meters.
409    * @description Optional - no 3D interaction available
410    * if unset.
411    */
412   computed_altitude?: number,
413
414   /**
415    * SfM computed compass angle, measured in degrees.
416    * @description Optional - no 3D interaction available
417    * if unset.
418    */
419   computed_compass_angle?: number,
420
421   /**
422    * Rotation vector in angle axis representation.
423    * @description Optional - no 3D interaction available
424    * if unset.
425    */
426   computed_rotation?: number[],
427
428   /**
429    * Cluster reconstruction to which the image belongs.
430    */
431   cluster: URLEnt,
432
433   /**
434    * Image creator.
435    */
436   creator: CreatorEnt,
437
438   /**
439    * EXIF orientation of original image.
440    */
441   exif_orientation: number,
442
443   /**
444    * Height of original image, not adjusted for orientation.
445    */
446   height: number,
447
448   /**
449    * SfM connected component id to which the image belongs.
450    * @description Optional - no 3D interaction available
451    * if unset.
452    */
453   merge_id?: string,
454
455   /**
456    * 3D mesh resource.
457    */
458   mesh: URLEnt,
459
460   /**
461    * Owner to which the image belongs.
462    */
463   owner: IDEnt,
464
465   /**
466    * Value specifying if image is accessible to organization members only
467    * or to everyone.
468    */
469   private?: boolean,
470
471   /**
472    * Image quality score on the interval [0, 1].
473    */
474   quality_score?: number,
475
476   /**
477    * Image thumbnail resource.
478    */
479   thumb: URLEnt,
480
481   /**
482    * Width of original image, not adjusted for orientation.
483    */
484   width: number,
485   ...
486 } & CameraEnt &
487   IDEnt;
488
489 /**
490  * Contract describing ent results.
491  */
492 export interface EntContract<T> {
493   /**
494    * Ent node.
495    */
496   node: T;
497
498   /**
499    * Ent node id.
500    */
501   node_id: string;
502 }
503 /**
504  * Contract describing spatial image results.
505  */
506 export type SpatialImagesContract = EntContract<SpatialImageEnt>[];
507 /**
508  * Ent representing image properties.
509  */
510 export type ImageEnt = { ... } & CoreImageEnt & SpatialImageEnt;
511
512 /**
513  * Contract describing image results.
514  */
515 export type ImagesContract = EntContract<ImageEnt>[];
516 /**
517  * Ent representing sequence properties.
518  * @interface SequenceEnt
519  */
520 export type SequenceEnt = {
521   /**
522    * The image IDs of the sequence sorted in
523    * acsending order based on capture time.
524    */
525   image_ids: string[],
526   ...
527 } & IDEnt;
528
529 /**
530  * Contract describing sequence results.
531  */
532 export type SequenceContract = SequenceEnt;
533 /**
534  * Ent representing image tile properties.
535  */
536 export interface ImageTileEnt {
537   /**
538    * URL for fetching image tile pixel data.
539    */
540   url: string;
541
542   /**
543    * X tile coordinate.
544    */
545   x: number;
546
547   /**
548    * Y tile coordinate.
549    */
550   y: number;
551
552   /**
553    * Tile level.
554    */
555   z: number;
556 }
557 /**
558  * Contract describing image tile results.
559  */
560 export type ImageTilesContract = EntContract<ImageTileEnt[]>;
561 /**
562  * Contract describing image tile requests.
563  */
564 export interface ImageTilesRequestContract {
565   /**
566    * ID of the tile's image.
567    */
568   imageId: string;
569
570   /**
571    * Tile level.
572    */
573   z: number;
574 }
575 /**
576  * @event
577  */
578 export type ProviderEventType = "datacreate";
579 /**
580  * @interface IGeometryProvider
581  *
582  * Interface describing geometry provider members.
583  *
584  * This is a specification for implementers to model: it
585  * is not an exported method or class.
586  */
587 export interface IGeometryProvider {
588   /**
589    * Convert a geodetic bounding box to the the minimum set
590    * of cell ids containing the bounding box.
591    * @description The bounding box needs
592    * to be sufficiently small to be contained in an area with the size
593    * of maximally four tiles. Up to nine adjacent tiles may be returned.
594    * @param {LngLat} sw - South west corner of bounding box.
595    * @param {LngLat} ne - North east corner of bounding box.
596    * @returns {Array<string>} Array of cell ids.
597    */
598   bboxToCellIds(sw: LngLat, ne: LngLat): string[];
599
600   /**
601    * Get the cell ids of all adjacent cells.
602    * @description In the case of approximately rectangular cells
603    * this is typically the eight orthogonally and diagonally adjacent
604    * cells.
605    * @param {string} cellId - Id of cell.
606    * @returns {Array<string>} Array of cell ids. No specific
607    * order is guaranteed.
608    */
609   getAdjacent(cellId: string): string[];
610
611   /**
612    * Get the vertices of a cell.
613    * @description The vertices form an unclosed
614    * clockwise polygon in the 2D longitude, latitude
615    * space. No assumption on the position of the first
616    * vertex relative to the others can be made.
617    * @param {string} cellId - Id of cell.
618    * @returns {Array<LngLat>} Unclosed clockwise polygon.
619    */
620   getVertices(cellId: string): LngLat[];
621
622   /**
623    * Convert geodetic coordinates to a cell id.
624    * @param {LngLat} lngLat - Longitude, latitude to convert.
625    * @returns {string} Cell id for the longitude, latitude.
626    */
627   lngLatToCellId(lngLat: LngLat): string;
628 }
629 /**
630  * Interface describing data provider members.
631  *
632  * This is a specification for implementers to model: it is
633  * not an exported method or class.
634  * @fires datacreate
635  */
636 export interface IDataProvider extends IEventEmitter {
637   /**
638    * Get geometry property.
639    * @returns {IGeometryProvider} Geometry provider instance.
640    */
641   geometry: IGeometryProvider;
642
643   /**
644    * Get core images in a geometry cell.
645    * @param {string} cellId - The id of the geometry cell.
646    * @returns {Promise<CoreImagesContract>} Promise to
647    * the core images of the requested geometry cell id.
648    * @throws Rejects the promise on errors.
649    */
650   getCoreImages(cellId: string): Promise<CoreImagesContract>;
651
652   /**
653    * Get a cluster reconstruction.
654    * @param {string} url - URL for the cluster reconstruction
655    * to retrieve.
656    * @param {Promise} [abort] - Optional promise for aborting
657    * the request through rejection.
658    * @returns {Promise<ClusterContract>} Promise to the
659    * cluster reconstruction.
660    * @throws Rejects the promise on errors.
661    */
662   getCluster(url: string, abort?: Promise<void>): Promise<ClusterContract>;
663
664   /**
665    * Get spatial images.
666    * @param {Array<string>} imageIds - The ids for the
667    * images to retrieve.
668    * @returns {Promise<SpatialImagesContract>} Promise to
669    * the spatial images of the requested image ids.
670    * @throws Rejects the promise on errors.
671    */
672   getSpatialImages(imageIds: string[]): Promise<SpatialImagesContract>;
673
674   /**
675    * Get complete images.
676    * @param {Array<string>} imageIds - The ids for the
677    * images to retrieve.
678    * @returns {Promise<ImagesContract>} Promise to the images of the
679    * requested image ids.
680    * @throws Rejects the promise on errors.
681    */
682   getImages(imageIds: string[]): Promise<ImagesContract>;
683
684   /**
685    * Get an image as an array buffer.
686    * @param {string} url - URL for image to retrieve.
687    * @param {Promise<void>} [abort] - Optional promise for aborting
688    * the request through rejection.
689    * @returns {Promise<ArrayBuffer>} Promise to the array
690    * buffer containing the image.
691    * @throws Rejects the promise on errors.
692    */
693   getImageBuffer(url: string, abort?: Promise<void>): Promise<ArrayBuffer>;
694
695   /**
696    * Get image tiles urls for a tile level.
697    * @param {ImageTilesRequestContract} tiles - Tiles to request
698    * @returns {Promise<ImageTilesContract>} Promise to the
699    * image tiles response contract
700    * @throws Rejects the promise on errors.
701    * @example ```js
702    * var tileRequest = { imageId: 'image-id', z: 12 };
703    * provider.getImageTiles(tileRequest)
704    *   .then((response) => console.log(response));
705    * ```
706    */
707   getImageTiles(tiles: ImageTilesRequestContract): Promise<ImageTilesContract>;
708
709   /**
710    * Get a mesh.
711    * @param {string} url - URL for mesh to retrieve.
712    * @param {Promise<void>} [abort] - Optional promise for aborting
713    * the request through rejection.
714    * @returns {Promise<MeshContract>} Promise to the mesh.
715    * @throws Rejects the promise on errors.
716    */
717   getMesh(url: string, abort?: Promise<void>): Promise<MeshContract>;
718
719   /**
720    * Get sequence.
721    * @param {Array<string>} sequenceId - The id for the
722    * sequence to retrieve.
723    * @returns {Promise} Promise to the sequences of the
724    * requested image ids.
725    * @throws Rejects the promise on errors.
726    */
727   getSequence(sequenceId: string): Promise<SequenceContract>;
728
729   /**
730    * Set an access token for authenticated API requests of
731    * protected resources.
732    * @param {string} [accessToken] accessToken - User access
733    * token or client access token.
734    */
735   setAccessToken(accessToken?: string): void;
736 }
737
738 /**
739  * Interface for general provider events.
740  */
741 export interface ProviderEvent {
742   /**
743    * Data provider target that emitted the event.
744    */
745   target: IDataProvider;
746
747   /**
748    * Provider event type.
749    */
750   type: ProviderEventType;
751 }
752 /**
753  *
754  * Interface for data provider cell events.
755  */
756 export type ProviderCellEvent = {
757   /**
758    * Cell ids for cells where data have been created.
759    */
760   cellIds: string[],
761
762   /**
763    * Provider event type.
764    */
765   type: "datacreate",
766   ...
767 } & ProviderEvent;
768
769 /**
770  * @class DataProviderBase
771  * @classdesc Base class to extend if implementing a data provider
772  * class.
773  * @fires datacreate
774  * @example ```js
775  * class MyDataProvider extends DataProviderBase {
776  *   constructor() {
777  *     super(new S2GeometryProvider());
778  *   }
779  *   ...
780  * }
781  * ```
782  */
783 declare class DataProviderBase implements IDataProvider, IEventEmitter {
784   _geometry: IGeometryProvider;
785
786   /**
787    * Create a new data provider base instance.
788    * @param {IGeometryProvider} geometry - Geometry
789    * provider instance.
790    */
791   constructor(_geometry: IGeometryProvider): this;
792
793   /**
794    * Get geometry property.
795    * @returns {IGeometryProvider} Geometry provider instance.
796    */
797   geometry: IGeometryProvider;
798
799   fire<T>(type: string, event: T): void;
800
801   /**
802    * Get core images in a geometry cell.
803    * @param {string} cellId - The id of the geometry cell.
804    * @returns {Promise<CoreImagesContract>} Promise to
805    * the core images of the requested geometry cell id.
806    * @throws Rejects the promise on errors.
807    */
808   getCoreImages(cellId: string): Promise<CoreImagesContract>;
809
810   /**
811    * Get a cluster reconstruction.
812    * @param {string} url - URL for the cluster reconstruction
813    * to retrieve.
814    * @param {Promise} [abort] - Optional promise for aborting
815    * the request through rejection.
816    * @returns {Promise<ClusterContract>} Promise to the
817    * cluster reconstruction.
818    * @throws Rejects the promise on errors.
819    */
820   getCluster(url: string, abort?: Promise<void>): Promise<ClusterContract>;
821
822   /**
823    * Get spatial images.
824    * @param {Array<string>} imageIds - The ids for the
825    * images to retrieve.
826    * @returns {Promise<SpatialImagesContract>} Promise to
827    * the spatial images of the requested image ids.
828    * @throws Rejects the promise on errors.
829    */
830   getSpatialImages(imageIds: string[]): Promise<SpatialImagesContract>;
831
832   /**
833    * Get complete images.
834    * @param {Array<string>} imageIds - The ids for the
835    * images to retrieve.
836    * @returns {Promise<ImagesContract>} Promise to the images of the
837    * requested image ids.
838    * @throws Rejects the promise on errors.
839    */
840   getImages(imageIds: string[]): Promise<ImagesContract>;
841
842   /**
843    * Get an image as an array buffer.
844    * @param {string} url - URL for image to retrieve.
845    * @param {Promise<void>} [abort] - Optional promise for aborting
846    * the request through rejection.
847    * @returns {Promise<ArrayBuffer>} Promise to the array
848    * buffer containing the image.
849    * @throws Rejects the promise on errors.
850    */
851   getImageBuffer(url: string, abort?: Promise<void>): Promise<ArrayBuffer>;
852
853   /**
854    * Get image tiles urls for a tile level.
855    * @param {ImageTilesRequestContract} tiles - Tiles to request
856    * @returns {Promise<ImageTilesContract>} Promise to the
857    * image tiles response contract
858    * @throws Rejects the promise on errors.
859    * @example ```js
860    * var tileRequest = { imageId: 'image-id', z: 12 };
861    * provider.getImageTiles(tileRequest)
862    *   .then((response) => console.log(response));
863    * ```
864    */
865   getImageTiles(tiles: ImageTilesRequestContract): Promise<ImageTilesContract>;
866
867   /**
868    * Get a mesh.
869    * @param {string} url - URL for mesh to retrieve.
870    * @param {Promise<void>} [abort] - Optional promise for aborting
871    * the request through rejection.
872    * @returns {Promise<MeshContract>} Promise to the mesh.
873    * @throws Rejects the promise on errors.
874    */
875   getMesh(url: string, abort?: Promise<void>): Promise<MeshContract>;
876
877   /**
878    * Get sequence.
879    * @param {Array<string>} sequenceId - The id for the
880    * sequence to retrieve.
881    * @returns {Promise} Promise to the sequences of the
882    * requested image ids.
883    * @throws Rejects the promise on errors.
884    */
885   getSequence(sequenceId: string): Promise<SequenceContract>;
886
887   off<T>(type: string, handler: (event: T) => void): void;
888
889   on<T>(type: string, handler: (event: T) => void): void;
890
891   /**
892    * Set an access token for authenticated API requests of
893    * protected resources.
894    * @param {string} [accessToken] accessToken - User access
895    * token or client access token.
896    */
897   setAccessToken(accessToken?: string): void;
898 }
899 /**
900  * @class GeometryProviderBase
901  * @classdesc Base class to extend if implementing a geometry
902  * provider class.
903  * @example ```js
904  * class MyGeometryProvider extends GeometryProviderBase {
905  *      ...
906  * }
907  * ```
908  */
909 declare class GeometryProviderBase implements IGeometryProvider {
910   /**
911    * Create a new geometry provider base instance.
912    */
913   constructor(): this;
914
915   /**
916    * Convert a geodetic bounding box to the the minimum set
917    * of cell ids containing the bounding box.
918    * @description The bounding box needs
919    * to be sufficiently small to be contained in an area with the size
920    * of maximally four tiles. Up to nine adjacent tiles may be returned.
921    * @param {LngLat} sw - South west corner of bounding box.
922    * @param {LngLat} ne - North east corner of bounding box.
923    * @returns {Array<string>} Array of cell ids.
924    */
925   bboxToCellIds(sw: LngLat, ne: LngLat): string[];
926
927   /**
928    * Get the cell ids of all adjacent cells.
929    * @description In the case of approximately rectangular cells
930    * this is typically the eight orthogonally and diagonally adjacent
931    * cells.
932    * @param {string} cellId - Id of cell.
933    * @returns {Array<string>} Array of cell ids. No specific
934    * order is guaranteed.
935    */
936   getAdjacent(cellId: string): string[];
937
938   /**
939    * Get the vertices of a cell.
940    * @description The vertices form an unclosed
941    * clockwise polygon in the 2D longitude, latitude
942    * space. No assumption on the position of the first
943    * vertex relative to the others can be made.
944    * @param {string} cellId - Id of cell.
945    * @returns {Array<LngLat>} Unclosed clockwise polygon.
946    */
947   getVertices(cellId: string): LngLat[];
948
949   /**
950    * Convert geodetic coordinates to a cell id.
951    * @param {LngLat} lngLat - Longitude, latitude to convert.
952    * @returns {string} Cell id for the longitude, latitude.
953    */
954   lngLatToCellId(lngLat: LngLat): string;
955
956   /**
957    * @ignore
958    */
959   _approxBboxToCellIds(sw: LngLat, ne: LngLat): string[];
960 }
961 declare interface GraphCameraContract {
962   focal: number;
963   k1: number;
964   k2: number;
965   projection_type: string;
966 }
967 declare interface GraphCameraShotContract {
968   camera: string;
969   rotation: number[];
970   translation: number[];
971 }
972 declare interface GraphReferenceContract {
973   altitude: number;
974   latitude: number;
975   longitude: number;
976 }
977 declare interface GraphPointContract {
978   color: number[];
979   coordinates: number[];
980 }
981 declare interface GraphClusterContract {
982   cameras: {
983     [cameraId: string]: GraphCameraContract,
984     ...
985   };
986   points: {
987     [pointId: string]: GraphPointContract,
988     ...
989   };
990   reference_lla: GraphReferenceContract;
991   shots: {
992     [imageKey: string]: GraphCameraShotContract,
993     ...
994   };
995 }
996 declare interface GraphGeometry {
997   coordinates: [number, number];
998 }
999 declare type GraphCoreImageEnt = {
1000   computed_geometry: GraphGeometry,
1001   geometry: GraphGeometry,
1002   sequence: string,
1003   ...
1004 } & IDEnt;
1005 declare type GraphSpatialImageEnt = {
1006   merge_cc: number,
1007   sfm_cluster: URLEnt,
1008   thumb_1024_url: string,
1009   thumb_2048_url: string,
1010   ...
1011 } & SpatialImageEnt;
1012 declare class GraphConverter {
1013   clusterReconstruction(source: GraphClusterContract): ClusterContract;
1014   coreImage(source: GraphCoreImageEnt): CoreImageEnt;
1015   spatialImage(source: GraphSpatialImageEnt): SpatialImageEnt;
1016 }
1017 declare interface GraphDataProviderOptions {
1018   endpoint?: string;
1019   accessToken?: string;
1020 }
1021 declare class GraphQueryCreator {
1022   +imagesPath: string;
1023   +sequencePath: string;
1024   +coreFields: string[];
1025   +idFields: string[];
1026   +spatialFields: string[];
1027   +imageTileFields: string[];
1028   constructor(): this;
1029   images(imageIds: string[], fields: string[]): string;
1030   imagesS2(cellId: string, fields: string[]): string;
1031   imageTiles(z: number, fields: string[]): string;
1032   imageTilesPath(imageId: string): string;
1033   sequence(sequenceId: string): string;
1034 }
1035 declare class GraphDataProvider extends DataProviderBase {
1036   constructor(
1037     options?: GraphDataProviderOptions,
1038     geometry?: IGeometryProvider,
1039     converter?: GraphConverter,
1040     queryCreator?: GraphQueryCreator
1041   ): this;
1042   getCluster(url: string, abort?: Promise<void>): Promise<ClusterContract>;
1043   getCoreImages(cellId: string): Promise<CoreImagesContract>;
1044   getImageBuffer(url: string, abort?: Promise<void>): Promise<ArrayBuffer>;
1045   getImages(imageIds: string[]): Promise<ImagesContract>;
1046   getImageTiles(
1047     request: ImageTilesRequestContract
1048   ): Promise<ImageTilesContract>;
1049   getMesh(url: string, abort?: Promise<void>): Promise<MeshContract>;
1050   getSequence(sequenceId: string): Promise<SequenceContract>;
1051   getSpatialImages(imageIds: string[]): Promise<SpatialImagesContract>;
1052   setAccessToken(accessToken?: string): void;
1053 }
1054 /**
1055  * @class S2GeometryProvider
1056  * @classdesc Geometry provider based on S2 cells.
1057  * @example ```js
1058  * class MyDataProvider extends DataProviderBase {
1059  *      ...
1060  * }
1061  *
1062  * const geometryProvider = new S2GeometryProvider();
1063  * const dataProvider = new MyDataProvider(geometryProvider);
1064  * ```
1065  */
1066 declare class S2GeometryProvider extends GeometryProviderBase {
1067   /**
1068    * Create a new S2 geometry provider instance.
1069    */
1070   constructor(_level?: number): this;
1071
1072   /**
1073    * @inheritdoc
1074    */
1075   bboxToCellIds(sw: LngLat, ne: LngLat): string[];
1076
1077   /**
1078    * @inheritdoc
1079    */
1080   getAdjacent(cellId: string): string[];
1081
1082   /**
1083    * @inheritdoc
1084    */
1085   getVertices(cellId: string): LngLat[];
1086
1087   /**
1088    * @inheritdoc
1089    */
1090   lngLatToCellId(lngLat: LngLat): string;
1091 }
1092 export interface ComponentConfiguration {
1093   [key: string]: mixed;
1094 }
1095 /**
1096  * Enumeration for render mode
1097  * @enum {number} *
1098  * @readonly
1099  * @description Modes for specifying how rendering is done
1100  * in the viewer. All modes preserves the original aspect
1101  * ratio of the images.
1102  */
1103
1104 declare var RenderMode: {|
1105   +Letterbox: 0, // 0
1106   +Fill: 1, // 1
1107 |};
1108 declare interface ViewportSize {
1109   height: number;
1110   width: number;
1111 }
1112 declare type CameraType = "spherical" | "fisheye" | "perspective";
1113 /**
1114  * @class Transform
1115  * @classdesc Class used for calculating coordinate transformations
1116  * and projections.
1117  */
1118 declare class Transform {
1119   /**
1120    * Create a new transform instance.
1121    * @param {number} orientation - Image orientation.
1122    * @param {number} width - Image height.
1123    * @param {number} height - Image width.
1124    * @param {number} focal - Focal length.
1125    * @param {number} scale - Atomic scale.
1126    * @param {Array<number>} rotation - Rotation vector in three dimensions.
1127    * @param {Array<number>} translation - Translation vector in three dimensions.
1128    * @param {HTMLImageElement} image - Image for fallback size calculations.
1129    */
1130   constructor(
1131     orientation: number,
1132     width: number,
1133     height: number,
1134     scale: number,
1135     rotation: number[],
1136     translation: number[],
1137     image: HTMLImageElement,
1138     textureScale?: number[],
1139     cameraParameters?: number[],
1140     cameraType?: CameraType
1141   ): this;
1142   ck1: number;
1143   ck2: number;
1144   cameraType: CameraType;
1145
1146   /**
1147    * Get basic aspect.
1148    * @returns {number} The orientation adjusted aspect ratio.
1149    */
1150   basicAspect: number;
1151
1152   /**
1153    * Get basic height.
1154    * @description Does not fall back to image image height but
1155    * uses original value from API so can be faulty.
1156    * @returns {number} The height of the basic version image
1157    * (adjusted for orientation).
1158    */
1159   basicHeight: number;
1160
1161   /**
1162    * Get basic width.
1163    * @description Does not fall back to image image width but
1164    * uses original value from API so can be faulty.
1165    * @returns {number} The width of the basic version image
1166    * (adjusted for orientation).
1167    */
1168   basicWidth: number;
1169
1170   /**
1171    * Get focal.
1172    * @returns {number} The image focal length.
1173    */
1174   focal: number;
1175
1176   /**
1177    * Get height.
1178    * @description Falls back to the image image height if
1179    * the API data is faulty.
1180    * @returns {number} The orientation adjusted image height.
1181    */
1182   height: number;
1183
1184   /**
1185    * Get orientation.
1186    * @returns {number} The image orientation.
1187    */
1188   orientation: number;
1189
1190   /**
1191    * Get scale.
1192    * @returns {number} The image atomic reconstruction scale.
1193    */
1194   scale: number;
1195
1196   /**
1197    * Get has valid scale.
1198    * @returns {boolean} Value indicating if the scale of the transform is valid.
1199    */
1200   hasValidScale: boolean;
1201
1202   /**
1203    * Get radial peak.
1204    * @returns {number} Value indicating the radius where the radial
1205    * undistortion function peaks.
1206    */
1207   radialPeak: number;
1208
1209   /**
1210    * Get width.
1211    * @description Falls back to the image image width if
1212    * the API data is faulty.
1213    * @returns {number} The orientation adjusted image width.
1214    */
1215   width: number;
1216
1217   /**
1218    * Project 3D world coordinates to basic coordinates.
1219    * @param {Array<number>} point3d - 3D world coordinates.
1220    * @return {Array<number>} 2D basic coordinates.
1221    */
1222   projectBasic(point3d: number[]): number[];
1223
1224   /**
1225    * Unproject basic coordinates to 3D world coordinates.
1226    * @param {Array<number>} basic - 2D basic coordinates.
1227    * @param {Array<number>} distance - Distance to unproject from camera center.
1228    * @param {boolean} [depth] - Treat the distance value as depth from camera center.
1229    *    Only applicable for perspective images. Will be
1230    *    ignored for spherical.
1231    * @returns {Array<number>} Unprojected 3D world coordinates.
1232    */
1233   unprojectBasic(basic: number[], distance: number, depth?: boolean): number[];
1234
1235   /**
1236    * Project 3D world coordinates to SfM coordinates.
1237    * @param {Array<number>} point3d - 3D world coordinates.
1238    * @return {Array<number>} 2D SfM coordinates.
1239    */
1240   projectSfM(point3d: number[]): number[];
1241
1242   /**
1243    * Unproject SfM coordinates to a 3D world coordinates.
1244    * @param {Array<number>} sfm - 2D SfM coordinates.
1245    * @param {Array<number>} distance - Distance to unproject
1246    * from camera center.
1247    * @param {boolean} [depth] - Treat the distance value as
1248    * depth from camera center. Only applicable for perspective
1249    * images. Will be ignored for spherical.
1250    * @returns {Array<number>} Unprojected 3D world coordinates.
1251    */
1252   unprojectSfM(sfm: number[], distance: number, depth?: boolean): number[];
1253 }
1254 /**
1255  * @class Camera
1256  * @classdesc Holds information about a camera.
1257  */
1258 declare class Camera {
1259   /**
1260    * Create a new camera instance.
1261    * @param {Transform} [transform] - Optional transform instance.
1262    */
1263   constructor(transform?: Transform): this;
1264
1265   /**
1266    * Get focal.
1267    * @returns {number} The focal length.
1268    */
1269   focal: number;
1270
1271   /**
1272    * Set focal.
1273    */
1274   -focal: number;
1275
1276   /**
1277    * Update this camera to the linearly interpolated value of two other cameras.
1278    * @param {Camera} a - First camera.
1279    * @param {Camera} b - Second camera.
1280    * @param {number} alpha - Interpolation value on the interval [0, 1].
1281    */
1282   lerpCameras(a: Camera, b: Camera, alpha: number): void;
1283
1284   /**
1285    * Copy the properties of another camera to this camera.
1286    * @param {Camera} other - Another camera.
1287    */
1288   copy(other: Camera): void;
1289
1290   /**
1291    * Clone this camera.
1292    * @returns {Camera} A camera with cloned properties equal to this camera.
1293    */
1294   clone(): Camera;
1295
1296   /**
1297    * Determine the distance between this camera and another camera.
1298    * @param {Camera} other - Another camera.
1299    * @returns {number} The distance between the cameras.
1300    */
1301   diff(other: Camera): number;
1302 }
1303 declare var State: {|
1304   +Custom: 0, // 0
1305   +Earth: 1, // 1
1306   +Traversing: 2, // 2
1307   +Waiting: 3, // 3
1308   +WaitingInteractively: 4, // 4
1309 |};
1310
1311 /**
1312  * Enumeration for edge directions
1313  * @enum {number} *
1314  * @readonly
1315  * @description Directions for edges in image graph describing
1316  * sequence, spatial and image type relations between nodes.
1317  */
1318
1319 declare var NavigationDirection: {|
1320   +Next: 0, // 0
1321   +Prev: 1, // 1
1322   +StepLeft: 2, // 2
1323   +StepRight: 3, // 3
1324   +StepForward: 4, // 4
1325   +StepBackward: 5, // 5
1326   +TurnLeft: 6, // 6
1327   +TurnRight: 7, // 7
1328   +TurnU: 8, // 8
1329   +Spherical: 9, // 9
1330   +Similar: 10, // 10
1331 |};
1332
1333 /**
1334  * Interface that describes additional properties of an edge.
1335  * @interface NavigationEdgeData
1336  */
1337 export interface NavigationEdgeData {
1338   /**
1339    * The edge direction.
1340    */
1341   direction: $Values<typeof NavigationDirection>;
1342
1343   /**
1344    * The counter clockwise horizontal rotation angle from
1345    * the X-axis in a spherical coordiante system of the
1346    * motion from the source image to the destination node.
1347    */
1348   worldMotionAzimuth: number;
1349 }
1350 /**
1351  * Interface that describes the properties for a
1352  * navigation edge from a source image to a
1353  * target image.
1354  * @interface NavigationEdge
1355  */
1356 export interface NavigationEdge {
1357   /**
1358    * The id of the source image.
1359    */
1360   source: string;
1361
1362   /**
1363    * The id of the target image.
1364    */
1365   target: string;
1366
1367   /**
1368    * Additional data describing properties of the edge.
1369    */
1370   data: NavigationEdgeData;
1371 }
1372 /**
1373  * Interface that indicates edge status.
1374  * @interface NavigationEdgeStatus
1375  */
1376 export interface NavigationEdgeStatus {
1377   /**
1378    * Value indicating whether the edges have been cached.
1379    */
1380   cached: boolean;
1381
1382   /**
1383    * The edges.
1384    * @description If the cached property is false the edges
1385    * property will always be an empty array. If the cached
1386    * property is true, there will exist edges in the the
1387    * array if the image has edges.
1388    */
1389   edges: NavigationEdge[];
1390 }
1391 /**
1392  * @class ImageCache
1393  * @classdesc Represents the cached properties of a image.
1394  */
1395 declare class ImageCache {
1396   /**
1397    * Create a new image cache instance.
1398    */
1399   constructor(provider: IDataProvider): this;
1400
1401   /**
1402    * Get image.
1403    * @description Will not be set when assets have not been cached
1404    * or when the object has been disposed.
1405    * @returns {HTMLImageElement} Cached image element of the image.
1406    */
1407   image: HTMLImageElement;
1408
1409   /**
1410    * Get mesh.
1411    * @description Will not be set when assets have not been cached
1412    * or when the object has been disposed.
1413    * @returns {MeshContract} SfM triangulated mesh of reconstructed
1414    * atomic 3D points.
1415    */
1416   mesh: MeshContract;
1417
1418   /**
1419    * Get sequenceEdges.
1420    * @returns {NavigationEdgeStatus} Value describing the status of the
1421    * sequence edges.
1422    */
1423   sequenceEdges: NavigationEdgeStatus;
1424
1425   /**
1426    * Get spatialEdges.
1427    * @returns {NavigationEdgeStatus} Value describing the status of the
1428    * spatial edges.
1429    */
1430   spatialEdges: NavigationEdgeStatus;
1431
1432   /**
1433    * Cache the sequence edges.
1434    * @param {Array<NavigationEdge>} edges - Sequence edges to cache.
1435    */
1436   cacheSequenceEdges(edges: NavigationEdge[]): void;
1437
1438   /**
1439    * Cache the spatial edges.
1440    * @param {Array<NavigationEdge>} edges - Spatial edges to cache.
1441    */
1442   cacheSpatialEdges(edges: NavigationEdge[]): void;
1443
1444   /**
1445    * Dispose the image cache.
1446    * @description Disposes all cached assets and unsubscribes to
1447    * all streams.
1448    */
1449   dispose(): void;
1450
1451   /**
1452    * Reset the sequence edges.
1453    */
1454   resetSequenceEdges(): void;
1455
1456   /**
1457    * Reset the spatial edges.
1458    */
1459   resetSpatialEdges(): void;
1460 }
1461 /**
1462  * @class Image
1463  * @classdesc [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1464  */
1465 declare class Image {
1466   /**
1467    * Create a new image instance.
1468    * @description Images are always created internally by the library.
1469    * Images can not be added to the library through any API method.
1470    * @param {CoreImageEnt} core- Raw core image data.
1471    * @ignore
1472    */
1473   constructor(core: CoreImageEnt): this;
1474
1475   /**
1476    * Get assets cached.
1477    * @description The assets that need to be cached for this property
1478    * to report true are the following: fill properties, image and mesh.
1479    * The library ensures that the current image will always have the
1480    * assets cached.
1481    * @returns {boolean} Value indicating whether all assets have been
1482    * cached.
1483    * @ignore
1484    */
1485   assetsCached: boolean;
1486
1487   /**
1488    * Get cameraParameters.
1489    * @description Will be undefined if SfM has
1490    * not been run.
1491    *
1492    * Camera type dependent parameters.
1493    *
1494    * For perspective and fisheye camera types,
1495    * the camera parameters array should be
1496    * constructed according to
1497    *
1498    * `[focal, k1, k2]`
1499    *
1500    * where focal is the camera focal length,
1501    * and k1, k2 are radial distortion parameters.
1502    *
1503    * For spherical camera type the camera
1504    * parameters are unset or emtpy array.
1505    * @returns {Array<number>} The parameters
1506    * related to the camera type.
1507    */
1508   cameraParameters: number[];
1509
1510   /**
1511    * Get cameraType.
1512    * @description Will be undefined if SfM has not been run.
1513    * @returns {string} The camera type that captured the image.
1514    */
1515   cameraType: string;
1516
1517   /**
1518    * Get capturedAt.
1519    * @description Timestamp of the image capture date
1520    * and time represented as a Unix epoch timestamp in milliseconds.
1521    * @returns {number} Timestamp when the image was captured.
1522    */
1523   capturedAt: number;
1524
1525   /**
1526    * Get clusterId.
1527    * @returns {string} Globally unique id of the SfM cluster to which
1528    * the image belongs.
1529    */
1530   clusterId: string;
1531
1532   /**
1533    * Get clusterUrl.
1534    * @returns {string} Url to the cluster reconstruction file.
1535    * @ignore
1536    */
1537   clusterUrl: string;
1538
1539   /**
1540    * Get compassAngle.
1541    * @description If the SfM computed compass angle exists it will
1542    * be returned, otherwise the original EXIF compass angle.
1543    * @returns {number} Compass angle, measured in degrees
1544    * clockwise with respect to north.
1545    */
1546   compassAngle: number;
1547
1548   /**
1549    * Get complete.
1550    * @description The library ensures that the current image will
1551    * always be full.
1552    * @returns {boolean} Value indicating whether the image has all
1553    * properties filled.
1554    * @ignore
1555    */
1556   complete: boolean;
1557
1558   /**
1559    * Get computedAltitude.
1560    * @description If SfM has not been run the computed altitude is
1561    * set to a default value of two meters.
1562    * @returns {number} Altitude, in meters.
1563    */
1564   computedAltitude: number;
1565
1566   /**
1567    * Get computedCompassAngle.
1568    * @description Will not be set if SfM has not been run.
1569    * @returns {number} SfM computed compass angle, measured
1570    * in degrees clockwise with respect to north.
1571    */
1572   computedCompassAngle: number;
1573
1574   /**
1575    * Get computedLngLat.
1576    * @description Will not be set if SfM has not been run.
1577    * @returns {LngLat} SfM computed longitude, latitude in WGS84 datum,
1578    * measured in degrees.
1579    */
1580   computedLngLat: LngLat;
1581
1582   /**
1583    * Get creatorId.
1584    * @description Note that the creator ID will not be set when using
1585    * the Mapillary API.
1586    * @returns {string} Globally unique id of the user who uploaded
1587    * the image.
1588    */
1589   creatorId: string;
1590
1591   /**
1592    * Get creatorUsername.
1593    * @description Note that the creator username will not be set when
1594    * using the Mapillary API.
1595    * @returns {string} Username of the creator who uploaded
1596    * the image.
1597    */
1598   creatorUsername: string;
1599
1600   /**
1601    * Get exifOrientation.
1602    * @returns {number} EXIF orientation of original image.
1603    */
1604   exifOrientation: number;
1605
1606   /**
1607    * Get height.
1608    * @returns {number} Height of original image, not adjusted
1609    * for orientation.
1610    */
1611   height: number;
1612
1613   /**
1614    * Get image.
1615    * @description The image will always be set on the current image.
1616    * @returns {HTMLImageElement} Cached image element of the image.
1617    */
1618   image: HTMLImageElement;
1619
1620   /**
1621    * Get id.
1622    * @returns {string} Globally unique id of the image.
1623    */
1624   id: string;
1625
1626   /**
1627    * Get lngLat.
1628    * @description If the SfM computed longitude, latitude exist
1629    * it will be returned, otherwise the original EXIF latitude
1630    * longitude.
1631    * @returns {LngLat} Longitude, latitude in WGS84 datum,
1632    * measured in degrees.
1633    */
1634   lngLat: LngLat;
1635
1636   /**
1637    * Get merged.
1638    * @returns {boolean} Value indicating whether SfM has been
1639    * run on the image and the image has been merged into a
1640    * connected component.
1641    */
1642   merged: boolean;
1643
1644   /**
1645    * Get mergeId.
1646    * @description Will not be set if SfM has not yet been run on
1647    * image.
1648    * @returns {stirng} Id of connected component to which image
1649    * belongs after the aligning merge.
1650    */
1651   mergeId: string;
1652
1653   /**
1654    * Get mesh.
1655    * @description The mesh will always be set on the current image.
1656    * @returns {MeshContract} SfM triangulated mesh of reconstructed
1657    * atomic 3D points.
1658    */
1659   mesh: MeshContract;
1660
1661   /**
1662    * Get originalAltitude.
1663    * @returns {number} EXIF altitude, in meters, if available.
1664    */
1665   originalAltitude: number;
1666
1667   /**
1668    * Get originalCompassAngle.
1669    * @returns {number} Original EXIF compass angle, measured in
1670    * degrees.
1671    */
1672   originalCompassAngle: number;
1673
1674   /**
1675    * Get originalLngLat.
1676    * @returns {LngLat} Original EXIF longitude, latitude in
1677    * WGS84 datum, measured in degrees.
1678    */
1679   originalLngLat: LngLat;
1680
1681   /**
1682    * Get ownerId.
1683    * @returns {string} Globally unique id of the owner to which
1684    * the image belongs. If the image does not belong to an
1685    * owner the owner id will be undefined.
1686    */
1687   ownerId: string;
1688
1689   /**
1690    * Get private.
1691    * @returns {boolean} Value specifying if image is accessible to
1692    * organization members only or to everyone.
1693    */
1694   private: boolean;
1695
1696   /**
1697    * Get qualityScore.
1698    * @returns {number} A number between zero and one
1699    * determining the quality of the image. Blurriness
1700    * (motion blur / out-of-focus), occlusion (camera
1701    * mount, ego vehicle, water-drops), windshield
1702    * reflections, bad illumination (exposure, glare),
1703    * and bad weather condition (fog, rain, snow)
1704    * affect the quality score.
1705    * @description Value should be on the interval [0, 1].
1706    */
1707   qualityScore: number;
1708
1709   /**
1710    * Get rotation.
1711    * @description Will not be set if SfM has not been run.
1712    * @returns {Array<number>} Rotation vector in angle axis representation.
1713    */
1714   rotation: number[];
1715
1716   /**
1717    * Get scale.
1718    * @description Will not be set if SfM has not been run.
1719    * @returns {number} Scale of reconstruction the image
1720    * belongs to.
1721    */
1722   scale: number;
1723
1724   /**
1725    * Get sequenceId.
1726    * @returns {string} Globally unique id of the sequence
1727    * to which the image belongs.
1728    */
1729   sequenceId: string;
1730
1731   /**
1732    * Get sequenceEdges.
1733    * @returns {NavigationEdgeStatus} Value describing the status of the
1734    * sequence edges.
1735    * @ignore
1736    */
1737   sequenceEdges: NavigationEdgeStatus;
1738
1739   /**
1740    * Get spatialEdges.
1741    * @returns {NavigationEdgeStatus} Value describing the status of the
1742    * spatial edges.
1743    * @ignore
1744    */
1745   spatialEdges: NavigationEdgeStatus;
1746
1747   /**
1748    * Get width.
1749    * @returns {number} Width of original image, not
1750    * adjusted for orientation.
1751    */
1752   width: number;
1753
1754   /**
1755    * Cache the sequence edges.
1756    * @description The sequence edges are cached asynchronously
1757    * internally by the library.
1758    * @param {Array<NavigationEdge>} edges - Sequence edges to cache.
1759    * @ignore
1760    */
1761   cacheSequenceEdges(edges: NavigationEdge[]): void;
1762
1763   /**
1764    * Cache the spatial edges.
1765    * @description The spatial edges are cached asynchronously
1766    * internally by the library.
1767    * @param {Array<NavigationEdge>} edges - Spatial edges to cache.
1768    * @ignore
1769    */
1770   cacheSpatialEdges(edges: NavigationEdge[]): void;
1771
1772   /**
1773    * Dispose the image.
1774    * @description Disposes all cached assets.
1775    * @ignore
1776    */
1777   dispose(): void;
1778
1779   /**
1780    * Initialize the image cache.
1781    * @description The image cache is initialized internally by
1782    * the library.
1783    * @param {ImageCache} cache - The image cache to set as cache.
1784    * @ignore
1785    */
1786   initializeCache(cache: ImageCache): void;
1787
1788   /**
1789    * Complete an image with spatial properties.
1790    * @description The image is completed internally by
1791    * the library.
1792    * @param {SpatialImageEnt} fill - The spatial image struct.
1793    * @ignore
1794    */
1795   makeComplete(fill: SpatialImageEnt): void;
1796
1797   /**
1798    * Reset the sequence edges.
1799    * @ignore
1800    */
1801   resetSequenceEdges(): void;
1802
1803   /**
1804    * Reset the spatial edges.
1805    * @ignore
1806    */
1807   resetSpatialEdges(): void;
1808
1809   /**
1810    * Clears the image and mesh assets, aborts
1811    * any outstanding requests and resets edges.
1812    * @ignore
1813    */
1814   uncache(): void;
1815 }
1816 declare interface IAnimationState {
1817   reference: LngLatAlt;
1818   alpha: number;
1819   camera: Camera;
1820   zoom: number;
1821   currentImage: Image;
1822   currentCamera: Camera;
1823   previousImage: Image;
1824   trajectory: Image[];
1825   currentIndex: number;
1826   lastImage: Image;
1827   imagesAhead: number;
1828   currentTransform: Transform;
1829   previousTransform: Transform;
1830   motionless: boolean;
1831   state: $Values<typeof State>;
1832 }
1833 declare interface AnimationFrame {
1834   id: number;
1835   fps: number;
1836   state: IAnimationState;
1837 }
1838 declare interface EulerRotation {
1839   phi: number;
1840   theta: number;
1841 }
1842 declare class RenderCamera {
1843   constructor(
1844     elementWidth: number,
1845     elementHeight: number,
1846     renderMode: $Values<typeof RenderMode>
1847   ): this;
1848   alpha: number;
1849   camera: Camera;
1850   changed: boolean;
1851   frameId: number;
1852   renderMode: $Values<typeof RenderMode>;
1853   rotation: EulerRotation;
1854   zoom: number;
1855   size: ViewportSize;
1856   getTilt(): number;
1857   fovToZoom(fov: number): number;
1858   setFrame(frame: AnimationFrame): void;
1859   setProjectionMatrix(matrix: number[]): void;
1860   setRenderMode(renderMode: $Values<typeof RenderMode>): void;
1861   setSize(size: ViewportSize): void;
1862 }
1863 declare class RenderService {
1864   constructor(
1865     element: HTMLElement,
1866     currentFrame$: mixed,
1867     renderMode: $Values<typeof RenderMode>,
1868     renderCamera?: RenderCamera
1869   ): this;
1870   element: HTMLElement;
1871   dispose(): void;
1872 }
1873 declare interface VirtualNodeHash {
1874   name: string;
1875 }
1876 declare class DOMRenderer {
1877   constructor(element: HTMLElement, renderService: RenderService): this;
1878   clear(name: string): void;
1879   remove(): void;
1880 }
1881 declare type GLRenderFunction = {
1882   (): void,
1883 };
1884
1885 declare var RenderPass$1: {|
1886   +Background: 0, // 0
1887   +Opaque: 1, // 1
1888 |};
1889 declare interface GLFrameRenderer {
1890   frameId: number;
1891   needsRender: boolean;
1892   render: GLRenderFunction;
1893   pass: $Values<typeof RenderPass$1>;
1894 }
1895 declare interface GLRenderHash {
1896   name: string;
1897   renderer: GLFrameRenderer;
1898 }
1899 declare class GLRenderer {
1900   constructor(
1901     canvas: HTMLCanvasElement,
1902     canvasContainer: HTMLElement,
1903     renderService: RenderService
1904   ): this;
1905   clear(name: string): void;
1906   remove(): void;
1907   triggerRerender(): void;
1908 }
1909 /**
1910  * Enumeration for transition mode
1911  * @enum {number} *
1912  * @readonly
1913  * @description Modes for specifying how transitions
1914  * between images are performed.
1915  */
1916
1917 declare var TransitionMode: {|
1918   +Default: 0, // 0
1919   +Instantaneous: 1, // 1
1920 |};
1921 declare class StateService {
1922   constructor(
1923     initialState: $Values<typeof State>,
1924     transitionMode?: $Values<typeof TransitionMode>
1925   ): this;
1926   dispose(): void;
1927   custom(): void;
1928   earth(): void;
1929   traverse(): void;
1930   wait(): void;
1931   waitInteractively(): void;
1932   appendImagess(images: Image[]): void;
1933   prependImages(images: Image[]): void;
1934   removeImages(n: number): void;
1935   clearImages(): void;
1936   clearPriorImages(): void;
1937   cutImages(): void;
1938   setImages(images: Image[]): void;
1939   setViewMatrix(matrix: number[]): void;
1940   rotate(delta: EulerRotation): void;
1941   rotateUnbounded(delta: EulerRotation): void;
1942   rotateWithoutInertia(delta: EulerRotation): void;
1943   rotateBasic(basicRotation: number[]): void;
1944   rotateBasicUnbounded(basicRotation: number[]): void;
1945   rotateBasicWithoutInertia(basicRotation: number[]): void;
1946   rotateToBasic(basic: number[]): void;
1947   move(delta: number): void;
1948   moveTo(position: number): void;
1949   dolly(delta: number): void;
1950   orbit(rotation: EulerRotation): void;
1951   truck(direction: number[]): void;
1952
1953   /**
1954    * Change zoom level while keeping the reference point position approximately static.
1955    * @parameter {number} delta - Change in zoom level.
1956    * @parameter {Array<number>} reference - Reference point in basic coordinates.
1957    */
1958   zoomIn(delta: number, reference: number[]): void;
1959   setCenter(center: number[]): void;
1960   setSpeed(speed: number): void;
1961   setTransitionMode(mode: $Values<typeof TransitionMode>): void;
1962   setZoom(zoom: number): void;
1963   start(): void;
1964   stop(): void;
1965 }
1966 declare class DOM {
1967   constructor(doc?: Node): this;
1968 }
1969 /**
1970  * Enumeration for component size.
1971  * @enum {number} *
1972  * @readonly
1973  * @description May be used by a component to allow for resizing
1974  * of the UI elements rendered by the component.
1975  */
1976
1977 declare var ComponentSize: {|
1978   +Automatic: 0, // 0
1979   +Large: 1, // 1
1980   +Small: 2, // 2
1981 |};
1982 export type BearingConfiguration = {
1983   /**
1984    * The size of the ui elements.
1985    * @default ComponentSize.Automatic
1986    */
1987   size?: $Values<typeof ComponentSize>,
1988   ...
1989 } & ComponentConfiguration;
1990
1991 /**
1992  * Interface for configuration of cache depth.
1993  * @interface
1994  * @example ```js
1995  * var viewer = new Viewer({
1996  *     ...
1997  *     component: {
1998  *         cache: {
1999  *             depth: {
2000  *                 spherical: 2,
2001  *                 sequence: 3,
2002  *             }
2003  *         },
2004  *     },
2005  *     ...
2006  * });
2007  * ```
2008  */
2009 export interface CacheDepthConfiguration {
2010   /**
2011    * Cache depth in the sequence directions.
2012    * @description Max value is 4. Value will be clamped
2013    * to the interval [0, 4].
2014    * @default 2
2015    */
2016   sequence: number;
2017
2018   /**
2019    * Cache depth in the spherical direction.
2020    * @description Max value is 2. Value will be clamped
2021    * to the interval [0, 2].
2022    * @default 1
2023    */
2024   spherical: number;
2025
2026   /**
2027    * Cache depth in the step directions.
2028    * @description Max value is 3. Value will be clamped
2029    * to the interval [0, 3].
2030    * @default 1
2031    */
2032   step: number;
2033
2034   /**
2035    * Cache depth in the turn directions.
2036    * @description Max value is 1. Value will be clamped
2037    * to the interval [0, 1].
2038    * @default 0
2039    */
2040   turn: number;
2041 }
2042 /**
2043  * Interface for configuration of cache component.
2044  * @interface
2045  */
2046 export type CacheConfiguration = {
2047   /**
2048    * Cache depth struct.
2049    */
2050   depth?: CacheDepthConfiguration,
2051   ...
2052 } & ComponentConfiguration;
2053
2054 /**
2055  * Interface for configuration of direction component.
2056  * @interface
2057  * @example ```js
2058  * var viewer = new Viewer({
2059  *     ...
2060  *     component: {
2061  *         direction: {
2062  *             minWidth: 140,
2063  *             maxWidth: 340,
2064  *         },
2065  *     },
2066  *     ...
2067  * });
2068  * ```
2069  */
2070 export type DirectionConfiguration = {
2071   /**
2072    * Determines if the sequence arrow appearance should be different from
2073    * the non sequence arrows.
2074    * @description Needs to be set to true for the sequence suffixed classes
2075    * to be applied to the navigation elements. Additional calculations will be
2076    * performed resulting in a performance cost.
2077    * @default false
2078    */
2079   distinguishSequence?: boolean,
2080
2081   /**
2082    * The image id representing the direction arrow to be highlighted.
2083    * @description The arrow pointing towards the image corresponding to the
2084    * highlight id will be highlighted.
2085    * @default undefined
2086    */
2087   highlightId?: string,
2088
2089   /**
2090    * The min width of the non transformed container element holding
2091    * the navigation arrows.
2092    * @description Set min width of the non transformed
2093    * container element holding the navigation arrows.
2094    * If the min width is larger than the max width the
2095    * min width value will be used.
2096    *
2097    * The container element is automatically resized when the resize
2098    * method on the Viewer class is called.
2099    * @default 260
2100    */
2101   minWidth?: number,
2102
2103   /**
2104    * The max width of the non transformed container element holding
2105    * the navigation arrows.
2106    * @description Set max width of the non transformed
2107    * container element holding the navigation arrows.
2108    * If the min width is larger than the max width the
2109    * min width value will be used.
2110    *
2111    * The container element is automatically resized when the resize
2112    * method on the Viewer class is called.
2113    * @default 460
2114    */
2115   maxWidth?: number,
2116   ...
2117 } & ComponentConfiguration;
2118
2119 /**
2120  * Interface for configuration of keyboard component.
2121  * @interface
2122  * @example ```js
2123  * var viewer = new Viewer({
2124  *     ...
2125  *     component: {
2126  *         keyboard: {
2127  *             keyZoom: false,
2128  *             keySequenceNavigation: false,
2129  *             keySpatialNavigation: false,
2130  *         },
2131  *     },
2132  *     ...
2133  * });
2134  * ```
2135  */
2136 export type KeyboardConfiguration = {
2137   /**
2138    * Enable or disable the `KeyPlayHandler`.
2139    * @default true
2140    */
2141   keyPlay?: boolean,
2142
2143   /**
2144    * Enable or disable the `KeySequenceNavigationHandler`.
2145    * @default true
2146    */
2147   keySequenceNavigation?: boolean,
2148
2149   /**
2150    * Enable or disable the `KeySpatialNavigationHandler`.
2151    * @default true
2152    */
2153   keySpatialNavigation?: boolean,
2154
2155   /**
2156    * Enable or disable the `KeyZoomHandler`.
2157    * @default true
2158    */
2159   keyZoom?: boolean,
2160   ...
2161 } & ComponentConfiguration;
2162
2163 /**
2164  * Interface for configuration of marker component.
2165  * @interface
2166  * @example ```js
2167  * var viewer = new Viewer({
2168  *     ...
2169  *     component: {
2170  *         marker: {
2171  *             visibleBBoxSize: 80,
2172  *         },
2173  *     },
2174  *     ...
2175  * });
2176  * ```
2177  */
2178 export type MarkerConfiguration = {
2179   /**
2180    * The size of the bounding box for which markers will be visible.
2181    * @description Provided values will be clamped to the [1, 200]
2182    * interval.
2183    * @default 100
2184    */
2185   visibleBBoxSize?: number,
2186   ...
2187 } & ComponentConfiguration;
2188
2189 /**
2190  * Interface for configuration of mouse component.
2191  * @interface
2192  * @example ```js
2193  * var viewer = new Viewer({
2194  *     ...
2195  *     component: {
2196  *         pointer: {
2197  *             dragPan: false,
2198  *             scrollZoom: false,
2199  *             touchZoom: false,
2200  *         },
2201  *     },
2202  *     ...
2203  * });
2204  * ```
2205  */
2206 export type PointerConfiguration = {
2207   /**
2208    * Activate or deactivate the `DragPanHandler`.
2209    * @default true
2210    */
2211   dragPan?: boolean,
2212
2213   /**
2214    * Activate or deactivate the `EarthControlHandler`.
2215    * @default true
2216    */
2217   earthControl?: boolean,
2218
2219   /**
2220    * Activate or deactivate the `ScrollZoomHandler`.
2221    * @default true
2222    */
2223   scrollZoom?: boolean,
2224
2225   /**
2226    * Activate or deactivate the `TouchZoomHandler`.
2227    * @default true
2228    */
2229   touchZoom?: boolean,
2230   ...
2231 } & ComponentConfiguration;
2232
2233 /**
2234  * Interface for configuration of sequence component.
2235  * @interface
2236  * @example ```js
2237  * const viewer = new Viewer({
2238  *     ...
2239  *     component: {
2240  *         sequence: {
2241  *             minWidth: 40,
2242  *             maxWidth: 80,
2243  *             visible: false,
2244  *         },
2245  *     },
2246  *     ...
2247  * });
2248  * ```
2249  */
2250 export type SequenceConfiguration = {
2251   /**
2252    * Set the direction to follow when playing.
2253    * @default EdgeDirection.Next
2254    */
2255   direction?: $Values<typeof NavigationDirection>,
2256
2257   /**
2258    * The node id representing the direction arrow to be highlighted.
2259    * @description When set to null no direction will be highlighted.
2260    * The arrow pointing towards the node corresponding to the
2261    * highlight id will be highlighted.
2262    * @default undefined
2263    * @ignore
2264    */
2265   highlightId?: string,
2266
2267   /**
2268    * The max width of the sequence container.
2269    * @description Set max width of the container element holding
2270    * the sequence navigation elements. If the min width is larger than the
2271    * max width the min width value will be used.
2272    *
2273    * The container element is automatically resized when the resize
2274    * method on the Viewer class is called.
2275    * @default 117
2276    */
2277   maxWidth?: number,
2278
2279   /**
2280    * The min width of the sequence container.
2281    * @description Set min width of the container element holding
2282    * the sequence navigation elements. If the min width is larger than the
2283    * max width the min width value will be used.
2284    *
2285    * The container element is automatically resized when the resize
2286    * method on the Viewer class is called.
2287    * @default 70
2288    */
2289   minWidth?: number,
2290
2291   /**
2292    * Indicating whether the component is playing.
2293    * @default false
2294    */
2295   playing?: boolean,
2296
2297   /**
2298    * Determine whether the sequence UI elements
2299    * should be visible.
2300    * @default true
2301    */
2302   visible?: boolean,
2303   ...
2304 } & ComponentConfiguration;
2305
2306 /**
2307  * Enumeration for slider mode.
2308  * @enum {number} *
2309  * @readonly
2310  * @description Modes for specifying how transitions
2311  * between images are performed in slider mode. Only
2312  * applicable when the slider component determines
2313  * that transitions with motion is possilble. When it
2314  * is not, the stationary mode will be applied.
2315  */
2316
2317 declare var SliderConfigurationMode: {|
2318   +Motion: 0, // 0
2319   +Stationary: 1, // 1
2320 |};
2321
2322 /**
2323  * Interface for configuration of slider ids.
2324  * @interface
2325  */
2326 export interface SliderConfigurationIds {
2327   /**
2328    * Id for the image plane in the background.
2329    */
2330   background: string;
2331
2332   /**
2333    * Id for the image plane in the foreground.
2334    */
2335   foreground: string;
2336 }
2337 /**
2338  * Interface for configuration of slider component.
2339  * @interface ```js
2340  * var viewer = new Viewer({
2341  *     ...
2342  *     component: {
2343  *         slider: {
2344  *             initialPosition: 0.5,
2345  *             ids: {
2346  *                 background: '<background-id>',
2347  *                 foreground: '<foreground-id>',
2348  *             },
2349  *             sliderVisible: true,
2350  *         },
2351  *     },
2352  *     ...
2353  * });
2354  * ```
2355  */
2356 export type SliderConfiguration = {
2357   /**
2358    * Initial position of the slider on the interval [0, 1].
2359    * @description Configures the initial position of the slider.
2360    * The inital position value will be used when the component
2361    * is activated.
2362    * @default 1
2363    */
2364   initialPosition?: number,
2365
2366   /**
2367    * Slider image ids.
2368    * @description Configures the component to show the image
2369    * planes for the supplied image ids  in the foreground
2370    * and the background.
2371    */
2372   ids?: SliderConfigurationIds,
2373
2374   /**
2375    * Value indicating whether the slider should be visible.
2376    * @description Set the value controlling if the
2377    * slider is visible.
2378    * @default true
2379    */
2380   sliderVisible?: boolean,
2381
2382   /**
2383    * Mode used for image pair transitions.
2384    * @description Configures the mode for transitions between
2385    * image pairs.
2386    */
2387   mode?: $Values<typeof SliderConfigurationMode>,
2388   ...
2389 } & ComponentConfiguration;
2390
2391 declare var CameraVisualizationMode: {|
2392   +Hidden: 0, // 0
2393   +Homogeneous: 1, // 1
2394   +Cluster: 2, // 2
2395   +ConnectedComponent: 3, // 3
2396   +Sequence: 4, // 4
2397 |};
2398
2399 declare var OriginalPositionMode: {|
2400   +Hidden: 0, // 0
2401   +Altitude: 1, // 1
2402   +Flat: 2, // 2
2403 |};
2404
2405 declare var PointVisualizationMode: {|
2406   +Hidden: 0, // 0
2407   +Original: 1, // 1
2408   +Cluster: 2, // 2
2409 |};
2410
2411 /**
2412  * Interface for configuration of spatial component.
2413  * @interface
2414  * @example ```js
2415  * var viewer = new Viewer({
2416  *     ...
2417  *     component: {
2418  *         spatial: {
2419  *             cameraSize: 0.5,
2420  *             cameraVisualizationMode: CameraVisualizationMode.Cluster,
2421  *             cellsVisible: true,
2422  *             originalPositionMode: OriginalPositionMode.Altitude,
2423  *             pointSize: 0.5,
2424  *             pointVisualizationMode: PointVisualizationMode.Hidden,
2425  *         },
2426  *     },
2427  *     ...
2428  * });
2429  * ```
2430  */
2431 export type SpatialConfiguration = {
2432   /**
2433    * The camera size on the interval [0.01, 1].
2434    * @default 0.1
2435    */
2436   cameraSize?: number,
2437
2438   /**
2439    * Specify the camera visualization mode.
2440    * @default CameraVisualizationMode.Homogeneous
2441    */
2442   cameraVisualizationMode?: $Values<typeof CameraVisualizationMode>,
2443
2444   /**
2445    * Specify if the currently rendered cells should be visualize on
2446    * an approximated ground plane.
2447    * @default false
2448    */
2449   cellsVisible?: boolean,
2450
2451   /**
2452    * Cell grid depth from the cell of the currently
2453    * selected camera.
2454    * @description Max value is 3. Value will be clamped
2455    * to the interval [1, 3].
2456    * @default 1
2457    */
2458   cellGridDepth?: number,
2459
2460   /**
2461    * Specify the original position visualization mode.
2462    * @description The original positions are hidden
2463    * by default.
2464    * @default OriginalPositionMode.Hidden
2465    */
2466   originalPositionMode?: $Values<typeof OriginalPositionMode>,
2467
2468   /**
2469    * The point size on the interval [0.01, 1].
2470    * @default 0.1
2471    */
2472   pointSize?: number,
2473
2474   /**
2475    * Specify if the points should be visible or not.
2476    * @deprecated `pointsVisible` will be removed in
2477    * v5.x. Use {@link pointVisualizationMode} instead.
2478    * @default true
2479    */
2480   pointsVisible?: boolean,
2481
2482   /**
2483    * Specify how point clouds should be visualized.
2484    * @default PointVisualizationMode.Original
2485    */
2486   pointVisualizationMode?: $Values<typeof PointVisualizationMode>,
2487   ...
2488 } & ComponentConfiguration;
2489
2490 /**
2491  * Enumeration for tag modes
2492  * @enum {number} *
2493  * @readonly
2494  * @description Modes for the interaction in the tag component.
2495  */
2496
2497 declare var TagMode: {|
2498   +Default: 0, // 0
2499   +CreatePoint: 1, // 1
2500   +CreatePoints: 2, // 2
2501   +CreatePolygon: 3, // 3
2502   +CreateRect: 4, // 4
2503   +CreateRectDrag: 5, // 5
2504 |};
2505
2506 /**
2507  * Interface for configuration of tag component.
2508  * @interface
2509  * @example ```js
2510  * var viewer = new Viewer({
2511  *     ...
2512  *     component: {
2513  *         tag: {
2514  *             createColor: 0xFF0000,
2515  *             mode: TagMode.CreateRect,
2516  *         },
2517  *     },
2518  *     ...
2519  * });
2520  * ```
2521  */
2522 export type TagConfiguration = {
2523   /**
2524    * The color of vertices and edges for tags that
2525    * are being created.
2526    * @default 0xFFFFFF
2527    */
2528   createColor?: number,
2529
2530   /**
2531    * Show an indicator at the centroid of the points geometry
2532    * that creates the geometry when clicked.
2533    * @default true
2534    */
2535   indicatePointsCompleter?: boolean,
2536
2537   /**
2538    * The interaction mode of the tag component.
2539    * @default TagMode.Default
2540    */
2541   mode?: $Values<typeof TagMode>,
2542   ...
2543 } & ComponentConfiguration;
2544 export type ZoomConfiguration = {
2545   /**
2546    * The size of the ui elements.
2547    * @default ComponentSize.Automatic
2548    */
2549   size?: $Values<typeof ComponentSize>,
2550   ...
2551 } & ComponentConfiguration;
2552
2553 /**
2554  * Interface for configuration of navigation component.
2555  * @interface
2556  * @example ```js
2557  * var viewer = new Viewer({
2558  *     ...
2559  *     component: {
2560  *         fallback: {
2561  *             navigation: {
2562  *                 spatial: false,
2563  *             },
2564  *         },
2565  *     },
2566  *     ...
2567  * });
2568  * ```
2569  */
2570 export type NavigationFallbackConfiguration = {
2571   /**
2572    * Enable or disable the sequence arrows.
2573    * @default true
2574    */
2575   sequence?: boolean,
2576
2577   /**
2578    * Enable or disable the spatial arrows.
2579    * @default true
2580    */
2581   spatial?: boolean,
2582   ...
2583 } & ComponentConfiguration;
2584
2585 /**
2586  * Interface for the fallback component options that can be
2587  * provided to the viewer when the browser does not have
2588  * WebGL support.
2589  * @interface
2590  */
2591 export interface FallbackOptions {
2592   /**
2593    * Show static images without pan, zoom, or transitions.
2594    * @description Fallback for `image` when WebGL is not supported.
2595    * @default false
2596    */
2597   image?: boolean;
2598
2599   /**
2600    * Show static navigation arrows in the corners.
2601    * @description Fallback for `direction` and `sequence` when WebGL is not supported.
2602    * @default false
2603    */
2604   navigation?: boolean | NavigationFallbackConfiguration;
2605 }
2606 /**
2607  * Interface for the component options that can be provided to the viewer.
2608  * @interface
2609  */
2610 export interface ComponentOptions {
2611   /**
2612    * Show attribution.
2613    * @default true
2614    */
2615   attribution?: boolean;
2616
2617   /**
2618    * Show indicator for bearing and field of view.
2619    * @default true
2620    */
2621   bearing?: boolean | BearingConfiguration;
2622
2623   /**
2624    * Cache images around the current one.
2625    * @default true
2626    */
2627   cache?: boolean | CacheConfiguration;
2628
2629   /**
2630    * Use a cover to avoid loading data until viewer interaction.
2631    * @default true
2632    */
2633   cover?: boolean;
2634
2635   /**
2636    * Show spatial direction arrows for navigation.
2637    * @description Default spatial navigation when there is WebGL support.
2638    * Requires WebGL support.
2639    * @default true
2640    */
2641   direction?: boolean | DirectionConfiguration;
2642
2643   /**
2644    * Enable fallback component options
2645    * when the browser does not have WebGL support.
2646    * @default undefined
2647    */
2648   fallback?: FallbackOptions;
2649
2650   /**
2651    * Show image planes in 3D.
2652    * @description Requires WebGL support.
2653    * @default true
2654    */
2655   image?: boolean;
2656
2657   /**
2658    * Enable use of keyboard commands.
2659    * @description Requires WebGL support.
2660    * @default true
2661    */
2662   keyboard?: boolean | KeyboardConfiguration;
2663
2664   /**
2665    * Enable an interface for showing 3D markers in the viewer.
2666    * @description Requires WebGL support.
2667    * @default false
2668    */
2669   marker?: boolean | MarkerConfiguration;
2670
2671   /**
2672    * Enable mouse, pen, and touch interaction for zoom and pan.
2673    * @description Requires WebGL support.
2674    * @default true
2675    */
2676   pointer?: boolean | PointerConfiguration;
2677
2678   /**
2679    * Show HTML popups over images.
2680    * @description Requires WebGL support.
2681    * @default false
2682    */
2683   popup?: boolean;
2684
2685   /**
2686    * Show sequence related navigation.
2687    * @description Default sequence navigation when there is WebGL support.
2688    * @default true
2689    */
2690   sequence?: boolean | SequenceConfiguration;
2691
2692   /**
2693    * Show a slider for transitioning between image planes.
2694    * @description Requires WebGL support.
2695    * @default false
2696    */
2697   slider?: boolean | SliderConfiguration;
2698
2699   /**
2700    * Enable an interface for showing spatial data in the viewer.
2701    * @description Requires WebGL support.
2702    * @default false
2703    */
2704   spatial?: boolean | SpatialConfiguration;
2705
2706   /**
2707    * Enable an interface for drawing 2D geometries on top of images.
2708    * @description Requires WebGL support.
2709    * @default false
2710    */
2711   tag?: boolean | TagConfiguration;
2712
2713   /**
2714    * Show buttons for zooming in and out.
2715    * @description Requires WebGL support.
2716    * @default true
2717    */
2718   zoom?: boolean | ZoomConfiguration;
2719 }
2720 /**
2721  * Interface for the URL options that can be provided to the viewer.
2722  * @interface
2723  */
2724 export interface UrlOptions {
2725   /**
2726    * Explore host.
2727    * @description Host used for links to the full
2728    * mapillary website.
2729    * @default {"www.mapillary.com"}
2730    */
2731   exploreHost?: string;
2732
2733   /**
2734    * Scheme.
2735    * @description Used for all hosts.
2736    * @default {"https"}
2737    */
2738   scheme?: string;
2739 }
2740 /**
2741  * Enumeration for camera controls.
2742  * @description Specifies different modes for how the
2743  * camera is controlled through pointer, keyboard or
2744  * other modes of input.
2745  * @enum {number} *
2746  * @readonly
2747  */
2748
2749 declare var CameraControls: {|
2750   +Custom: 0, // 0
2751   +Earth: 1, // 1
2752   +Street: 2, // 2
2753 |};
2754
2755 /**
2756  * [object Object],[object Object],[object Object]
2757  */
2758 export interface ViewerOptions {
2759   /**
2760    * Optional access token for API requests of
2761    * resources.
2762    * @description [object Object],[object Object],[object Object]
2763    */
2764   accessToken?: string;
2765
2766   /**
2767    * Value specifying the initial camera controls of
2768    * the viewer.
2769    * @default [object Object],[object Object]
2770    */
2771   cameraControls?: $Values<typeof CameraControls>;
2772
2773   /**
2774    * Value specifying if combined panning should be activated.
2775    * @default true
2776    */
2777   combinedPanning?: boolean;
2778
2779   /**
2780    * Component options.
2781    */
2782   component?: ComponentOptions;
2783
2784   /**
2785    * The HTML element in which MapillaryJS will render the
2786    * viewer, or the element's string `id`. The
2787    * specified element must have no children.
2788    */
2789   container: string | HTMLElement;
2790
2791   /**
2792    * Optional data provider class instance for API and static
2793    * resource requests.
2794    * @description [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2795    */
2796   dataProvider?: IDataProvider;
2797
2798   /**
2799    * Optional `image-id` to start from. The id
2800    * can be any Mapillary image. If a id is provided the viewer is
2801    * bound to that id until it has been fully loaded. If null is provided
2802    * no image is loaded at viewer initialization and the viewer is not
2803    * bound to any particular id. Any image can then be navigated to
2804    * with e.g. `viewer.moveTo("<my-image-id>")`.
2805    */
2806   imageId?: string;
2807
2808   /**
2809    * Value indicating if the viewer should fetch high resolution
2810    * image tiles.
2811    * @description Can be used when extending MapillaryJS with
2812    * a custom data provider. If no image tiling server exists
2813    * the image tiling can be inactivated to avoid error
2814    * messages about non-existing tiles in the console.
2815    * @default true
2816    */
2817   imageTiling?: boolean;
2818
2819   /**
2820    * The render mode in the viewer.
2821    * @default [object Object],[object Object]
2822    */
2823   renderMode?: $Values<typeof RenderMode>;
2824
2825   /**
2826    * A base URL for retrieving a PNG sprite image and json metadata file.
2827    * File name extensions will be automatically appended.
2828    */
2829   sprite?: string;
2830
2831   /**
2832    * If `true`, the viewer will automatically resize when the
2833    * browser window resizes.
2834    * @default true
2835    */
2836   trackResize?: boolean;
2837
2838   /**
2839    * The transtion mode in the viewer.
2840    * @default [object Object],[object Object]
2841    */
2842   transitionMode?: $Values<typeof TransitionMode>;
2843
2844   /**
2845    * The URL options.
2846    */
2847   url?: UrlOptions;
2848 }
2849 declare class KeyboardService {
2850   constructor(canvasContainer: HTMLElement): this;
2851 }
2852 declare class MouseService {
2853   constructor(
2854     container: EventTarget,
2855     canvasContainer: EventTarget,
2856     domContainer: EventTarget,
2857     doc: EventTarget
2858   ): this;
2859   dispose(): void;
2860   claimMouse(name: string, zindex: number): void;
2861   unclaimMouse(name: string): void;
2862   deferPixels(name: string, deferPixels: number): void;
2863   undeferPixels(name: string): void;
2864   claimWheel(name: string, zindex: number): void;
2865   unclaimWheel(name: string): void;
2866 }
2867 /**
2868  * Enumeration for alignments
2869  * @enum {number} *
2870  * @readonly
2871  */
2872
2873 declare var Alignment: {|
2874   +Bottom: 0, // 0
2875   +BottomLeft: 1, // 1
2876   +BottomRight: 2, // 2
2877   +Center: 3, // 3
2878   +Left: 4, // 4
2879   +Right: 5, // 5
2880   +Top: 6, // 6
2881   +TopLeft: 7, // 7
2882   +TopRight: 8, // 8
2883 |};
2884 declare interface ISpriteAtlas {
2885   loaded: boolean;
2886 }
2887 declare class SpriteAtlas implements ISpriteAtlas {
2888   -json: mixed;
2889   -image: mixed;
2890   loaded: boolean;
2891 }
2892 declare interface Sprite {
2893   width: number;
2894   height: number;
2895   x: number;
2896   y: number;
2897   pixelRatio: number;
2898 }
2899 declare interface Sprites {
2900   [key: string]: Sprite;
2901 }
2902 declare class SpriteService {
2903   constructor(sprite?: string): this;
2904   dispose(): void;
2905 }
2906 declare interface TouchPinch {
2907   /**
2908    * X client coordinate for center of pinch.
2909    */
2910   clientX: number;
2911
2912   /**
2913    * Y client coordinate for center of pinch.
2914    */
2915   clientY: number;
2916
2917   /**
2918    * X page coordinate for center of pinch.
2919    */
2920   pageX: number;
2921
2922   /**
2923    * Y page coordinate for center of pinch.
2924    */
2925   pageY: number;
2926
2927   /**
2928    * X screen coordinate for center of pinch.
2929    */
2930   screenX: number;
2931
2932   /**
2933    * Y screen coordinate for center of pinch.
2934    */
2935   screenY: number;
2936
2937   /**
2938    * Distance change in X direction between touches
2939    * compared to previous event.
2940    */
2941   changeX: number;
2942
2943   /**
2944    * Distance change in Y direction between touches
2945    * compared to previous event.
2946    */
2947   changeY: number;
2948
2949   /**
2950    * Pixel distance between touches.
2951    */
2952   distance: number;
2953
2954   /**
2955    * Change in pixel distance between touches compared
2956    * to previous event.
2957    */
2958   distanceChange: number;
2959
2960   /**
2961    * Distance in X direction between touches.
2962    */
2963   distanceX: number;
2964
2965   /**
2966    * Distance in Y direction between touches.
2967    */
2968   distanceY: number;
2969
2970   /**
2971    * Original touch event.
2972    */
2973   originalEvent: TouchEvent;
2974
2975   /**
2976    * First touch.
2977    */
2978   touch1: Touch;
2979
2980   /**
2981    * Second touch.
2982    */
2983   touch2: Touch;
2984 }
2985 declare class TouchService {
2986   constructor(canvasContainer: HTMLElement, domContainer: HTMLElement): this;
2987   dispose(): void;
2988 }
2989 /**
2990  * Test whether the current browser supports the full
2991  * functionality of MapillaryJS.
2992  * @description The full functionality includes WebGL rendering.
2993  * @return {boolean}
2994  * @example `var supported = isSupported();`
2995  */
2996 declare function isSupported(): boolean;
2997
2998 /**
2999  * Test whether the current browser supports the fallback
3000  * functionality of MapillaryJS.
3001  * @description The fallback functionality does not include WebGL
3002  * rendering, only 2D canvas rendering.
3003  * @return {boolean}
3004  * @example `var fallbackSupported = isFallbackSupported();`
3005  */
3006 declare function isFallbackSupported(): boolean;
3007 export type ComparisonFilterOperator = "==" | "!=" | ">" | ">=" | "<" | "<=";
3008 export type SetMembershipFilterOperator = "in" | "!in";
3009 export type CombiningFilterOperator = "all";
3010 export type FilterOperator =
3011   | CombiningFilterOperator
3012   | ComparisonFilterOperator
3013   | SetMembershipFilterOperator;
3014 declare type FilterKey =
3015   | "cameraType"
3016   | "capturedAt"
3017   | "clusterId"
3018   | "creatorId"
3019   | "creatorUsername"
3020   | "exifOrientation"
3021   | "height"
3022   | "id"
3023   | "mergeId"
3024   | "merged"
3025   | "ownerId"
3026   | "private"
3027   | "qualityScore"
3028   | "sequenceId"
3029   | "width";
3030 export type FilterValue = boolean | number | string;
3031 export type ComparisonFilterExpression = [
3032   ComparisonFilterOperator,
3033   FilterKey,
3034   FilterValue
3035 ];
3036 export type SetMembershipFilterExpression = (
3037   | SetMembershipFilterOperator
3038   | FilterKey
3039   | FilterValue
3040 )[];
3041 export type CombiningFilterExpression = (
3042   | CombiningFilterOperator
3043   | ComparisonFilterExpression
3044   | SetMembershipFilterExpression
3045 )[];
3046 export type FilterExpression =
3047   | ComparisonFilterExpression
3048   | SetMembershipFilterExpression
3049   | CombiningFilterExpression;
3050 /**
3051  * @event
3052  */
3053 export type ViewerEventType =
3054   | "bearing"
3055   | "click"
3056   | "contextmenu"
3057   | "dblclick"
3058   | "fov"
3059   | "dataloading"
3060   | "load"
3061   | "mousedown"
3062   | "mousemove"
3063   | "mouseout"
3064   | "mouseover"
3065   | "mouseup"
3066   | "moveend"
3067   | "movestart"
3068   | "navigable"
3069   | "image"
3070   | "position"
3071   | "pov"
3072   | "reference"
3073   | "remove"
3074   | "sequenceedges"
3075   | "spatialedges";
3076
3077 declare var RenderPass: {|
3078   +Opaque: 0, // 0
3079 |};
3080
3081 /**
3082  * @interface
3083  * @description [object Object],[object Object],[object Object],[object Object],[object Object]
3084  */
3085 export interface ICustomRenderer {
3086   /**
3087    * A unique renderer id.
3088    */
3089   id: string;
3090
3091   /**
3092    * The custom renderer's render pass.
3093    * @description [object Object],[object Object],[object Object]
3094    */
3095   renderPass: $Values<typeof RenderPass>;
3096
3097   /**
3098    * Method called when the renderer has been added to the
3099    * viewer. This gives the
3100    * renderer a chance to initialize gl resources and
3101    * register event listeners.
3102    * @description [object Object],[object Object],[object Object],[object Object],[object Object]
3103    * @param {IViewer} viewer - The viewer this custom renderer
3104    * was just added to.
3105    * @param {LngLatAlt} reference - The viewer's current
3106    * reference position.
3107    * @param {WebGLRenderingContext | WebGL2RenderingContext} context -
3108    * The viewer's gl context.
3109    */
3110   onAdd(
3111     viewer: IViewer,
3112     reference: LngLatAlt,
3113     context: WebGLRenderingContext
3114   ): void;
3115
3116   /**
3117    * Method called when the viewer's reference position has changed.
3118    * This gives the renderer a chance to reposition its scene objects.
3119    * @description [object Object],[object Object],[object Object]
3120    * @param {IViewer} viewer - The viewer this custom renderer
3121    * is added to.
3122    * @param {LngLatAlt} reference - The viewer's current
3123    * reference position.
3124    */
3125   onReference(viewer: IViewer, reference: LngLatAlt): void;
3126
3127   /**
3128    * Method called when the renderer has been removed from the
3129    * viewer. This gives the
3130    * renderer a chance to clean up gl resources and event
3131    * listeners.
3132    * @description [object Object],[object Object],[object Object]
3133    * @param {IViewer} viewer - The viewer this custom renderer
3134    * was just removed from.
3135    * @param {WebGLRenderingContext | WebGL2RenderingContext} context -
3136    * The viewer's gl context.
3137    */
3138   onRemove(viewer: IViewer, context: WebGLRenderingContext): void;
3139
3140   /**
3141    * Called during an animation frame allowing the renderer to draw
3142    * into the GL context. The layer cannot make assumptions
3143    * about the current GL state.
3144    * @description Take a look at the
3145    * [WebGL model view projection article](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_model_view_projection)
3146    * on MDN for an introduction to the view and projection matrices.
3147    * @param {WebGLRenderingContext | WebGL2RenderingContext} context The
3148    * viewer's WebGL context.
3149    * @param {Array<number>} viewMatrix The viewer's view matrix.
3150    * @param {Array<number>} projectionMatrix The viewers's projection
3151    * matrix.
3152    */
3153   render(
3154     context: WebGLRenderingContext,
3155     viewMatrix: number[],
3156     projectionMatrix: number[]
3157   ): void;
3158 }
3159 /**
3160  * @interface PointOfView
3161  *
3162  * Interface that represents the point of view of the viewer.
3163  */
3164 export interface PointOfView {
3165   /**
3166    * Value indicating the current bearing of the viewer
3167    * measured in degrees clockwise with respect to north.
3168    * Ranges from 0° to 360°.
3169    */
3170   bearing: number;
3171
3172   /**
3173    * The camera tilt in degrees, relative to a horizontal plane.
3174    * Ranges from 90° (directly upwards) to -90° (directly downwards).
3175    */
3176   tilt: number;
3177 }
3178 export interface IViewer {
3179   +dataProvider: IDataProvider;
3180   +isNavigable: boolean;
3181   activateCombinedPanning(): void;
3182   activateComponent(name: string): void;
3183   activateCover(): void;
3184   addCustomRenderer(renderer: ICustomRenderer): void;
3185   attachCustomCameraControls(controls: ICustomCameraControls): void;
3186   deactivateCombinedPanning(): void;
3187   deactivateComponent(name: string): void;
3188   deactivateCover(): void;
3189   detachCustomCameraControls(): Promise<ICustomCameraControls>;
3190   fire<T>(type: ViewerEventType, event: T): void;
3191   getBearing(): Promise<number>;
3192   getCameraControls(): Promise<$Values<typeof CameraControls>>;
3193   getCanvas(): HTMLCanvasElement;
3194   getCanvasContainer(): HTMLDivElement;
3195   getCenter(): Promise<number[]>;
3196   getComponent<TComponent: Component<ComponentConfiguration>>(
3197     name: string
3198   ): TComponent;
3199   getContainer(): HTMLElement;
3200   getFieldOfView(): Promise<number>;
3201   getImage(): Promise<Image>;
3202   getPointOfView(): Promise<PointOfView>;
3203   getPosition(): Promise<LngLat>;
3204   getReference(): Promise<LngLatAlt>;
3205   getZoom(): Promise<number>;
3206   hasCustomCameraControls(controls: ICustomCameraControls): boolean;
3207   hasCustomRenderer(rendererId: string): boolean;
3208   moveDir(direction: $Values<typeof NavigationDirection>): Promise<Image>;
3209   moveTo(imageId: string): Promise<Image>;
3210   off<T>(type: ViewerEventType, handler: (event: T) => void): void;
3211   on<T>(type: ViewerEventType, handler: (event: T) => void): void;
3212   project(lngLat: LngLat): Promise<number[]>;
3213   projectFromBasic(basicPoint: number[]): Promise<number[]>;
3214   remove(): void;
3215   removeCustomRenderer(rendererId: string): void;
3216   resize(): void;
3217   setCameraControls(controls: $Values<typeof CameraControls>): void;
3218   setCenter(center: number[]): void;
3219   setFieldOfView(fov: number): void;
3220   setFilter(filter?: FilterExpression): Promise<void>;
3221   setRenderMode(renderMode: $Values<typeof RenderMode>): void;
3222   setTransitionMode(transitionMode: $Values<typeof TransitionMode>): void;
3223   setAccessToken(accessToken?: string): Promise<void>;
3224   setZoom(zoom: number): void;
3225   triggerRerender(): void;
3226   unproject(pixelPoint: number[]): Promise<LngLat>;
3227   unprojectToBasic(pixelPoint: number[]): Promise<number[]>;
3228 }
3229 /**
3230  * @interface
3231  * @description [object Object],[object Object],[object Object]
3232  */
3233 export interface ICustomCameraControls {
3234   /**
3235    * Method called when the camera controls have been
3236    * activated and is responsible for moving the
3237    * viewer's camera and defining its projection. This
3238    * method gives the camera controls a chance to initialize
3239    * resources, perform any transitions, and determine
3240    * initial state.
3241    * @description [object Object],[object Object],[object Object]
3242    * @param {IViewer} viewer - The viewer this custom
3243    * camera controls instance was just added to.
3244    * @param {Array<number>} viewMatrix - The viewer's view matrix.
3245    * @param {Array<number>} projectionMatrix - The viewers's
3246    * projection matrix.
3247    * @param {LngLatAlt} reference - The viewer's reference.
3248    */
3249   onActivate(
3250     viewer: IViewer,
3251     viewMatrix: number[],
3252     projectionMatrix: number[],
3253     reference: LngLatAlt
3254   ): void;
3255
3256   /**
3257    * Method called for each animation frame.
3258    * @desdcription Custom camera controls can choose to
3259    * make updates on each animation frame or only based on
3260    * user input. Invoking updates on each animation frame is
3261    * more resource intensive.
3262    * @param {IViewer} viewer - The viewer this custom
3263    * camera controls instance is attached to.
3264    * @param {number} frameId - The request animation frame's id.
3265    */
3266   onAnimationFrame(viewer: IViewer, frameId: number): void;
3267
3268   /**
3269    * Method called when the camera controls have been
3270    * attached to the viewer.
3271    * This gives the camera controls a chance to initialize
3272    * resources.
3273    * @description [object Object],[object Object],[object Object]
3274    * @param {IViewer} viewer - The viewer this custom
3275    * camera controls instance was just added to.
3276    */
3277   onAttach(
3278     viewer: IViewer,
3279     viewMatrixCallback: (viewMatrix: number[]) => void,
3280     projectionMatrixCallback: (projectionMatrix: number[]) => void
3281   ): void;
3282
3283   /**
3284    * Method called when the camera controls have been deactivated.
3285    * This gives the camera controls a chance to clean up resources
3286    * and event listeners.
3287    * @param {IViewer} viewer - The viewer this custom camera controls
3288    * instance is attached to.
3289    */
3290   onDeactivate(viewer: IViewer): void;
3291
3292   /**
3293    * Method called when the camera controls have been detached from
3294    * the viewer. This gives the camera controls a chance to clean
3295    * up resources and event listeners.
3296    * @description [object Object],[object Object],[object Object]
3297    * @param {IViewer} viewer - The viewer this custom camera
3298    * controls instance was just detached from.
3299    */
3300   onDetach(viewer: IViewer): void;
3301
3302   /**
3303    * Method called when the viewer's reference position has changed.
3304    * This gives the custom camera controls a chance to reposition
3305    * the camera.
3306    * @description [object Object],[object Object],[object Object],[object Object],[object Object]
3307    * @param {IViewer} viewer - The viewer this custom renderer
3308    * is added to.
3309    * @param {LngLatAlt} reference - The viewer's current
3310    * reference position.
3311    */
3312   onReference(viewer: IViewer, reference: LngLatAlt): void;
3313
3314   /**
3315    * Method called when the viewer has been resized.
3316    * @description Use this method to modify the projection.
3317    */
3318   onResize(viewer: IViewer): void;
3319 }
3320 /**
3321  * Interface for general viewer events.
3322  */
3323 export interface ViewerEvent {
3324   /**
3325    * The viewer object that fired the event.
3326    */
3327   target: IViewer;
3328
3329   /**
3330    * The event type.
3331    */
3332   type: ViewerEventType;
3333 }
3334 /**
3335  * Interface for bearing viewer events.
3336  */
3337 export type ViewerBearingEvent = {
3338   /**
3339    * Bearing is measured in degrees
3340    * clockwise with respect to north.
3341    * @description [object Object],[object Object],[object Object]
3342    */
3343   bearing: number,
3344   type: "bearing",
3345   ...
3346 } & ViewerEvent;
3347
3348 /**
3349  * Interface for viewer data loading events.
3350  * @description Fired when any viewer data (image, mesh, metadata, etc)
3351  * begins loading or changing asyncronously as a result of viewer
3352  * navigation.
3353  *
3354  * Also fired when the data has finished loading and the viewer
3355  * is able to perform the navigation.
3356  */
3357 export type ViewerDataLoadingEvent = {
3358   /**
3359    * Indicates if the viewer navigation is awaiting data load.
3360    */
3361   loading: boolean,
3362   type: "dataloading",
3363   ...
3364 } & ViewerEvent;
3365
3366 /**
3367  * Interface for mouse-related viewer events.
3368  * @example ```js
3369  * // The `click` event is an example of a `ViewerMouseEvent`.
3370  * // Set up an event listener on the viewer.
3371  * viewer.on('click', function(e) {
3372  *   // The event object contains information like the
3373  *   // coordinates of the point in the viewer that was clicked.
3374  *   console.log('A click event has occurred at ' + e.lngLat);
3375  * });
3376  * ```
3377  */
3378 export type ViewerMouseEvent = {
3379   /**
3380    * The basic coordinates in the current image of the mouse
3381    * event target.
3382    * @description [object Object],[object Object],[object Object]
3383    */
3384   basicPoint: number[],
3385
3386   /**
3387    * The geographic location in the viewer of the mouse event target.
3388    * @description In some situations the viewer can not determine a valid
3389    * geographic location for the mouse event target. In that case the
3390    * geographic coordinates will be `null`.
3391    */
3392   lngLat: LngLat,
3393
3394   /**
3395    * The pixel coordinates of the mouse event target, relative to
3396    * the viewer and measured from the top left corner.
3397    */
3398   pixelPoint: number[],
3399
3400   /**
3401    * The original event that triggered the viewer event.
3402    */
3403   originalEvent: MouseEvent,
3404
3405   /**
3406    * The event type.
3407    */
3408   type:
3409     | "click"
3410     | "contextmenu"
3411     | "dblclick"
3412     | "mousedown"
3413     | "mousemove"
3414     | "mouseout"
3415     | "mouseover"
3416     | "mouseup",
3417   ...
3418 } & ViewerEvent;
3419
3420 /**
3421  * Interface for navigable viewer events.
3422  */
3423 export type ViewerNavigableEvent = {
3424   /**
3425    * The navigable state indicates if the viewer supports
3426    * moving, i.e. calling the `moveTo` and `moveDir`
3427    * methods. The viewer will not be in a navigable state if the cover
3428    * is activated and the viewer has been supplied a id. When the cover
3429    * is deactivated or activated without being supplied a id it will
3430    * be navigable.
3431    */
3432   navigable: boolean,
3433   type: "navigable",
3434   ...
3435 } & ViewerEvent;
3436
3437 /**
3438  * Interface for navigation edge viewer events.
3439  */
3440 export type ViewerNavigationEdgeEvent = {
3441   /**
3442    * The viewer's current navigation edge status.
3443    */
3444   status: NavigationEdgeStatus,
3445   type: "sequenceedges" | "spatialedges",
3446   ...
3447 } & ViewerEvent;
3448
3449 /**
3450  * Interface for viewer image events.
3451  */
3452 export type ViewerImageEvent = {
3453   /**
3454    * The viewer's current image.
3455    */
3456   image: Image,
3457   type: "image",
3458   ...
3459 } & ViewerEvent;
3460
3461 /**
3462  * Interface for viewer state events.
3463  * @example ```js
3464  * // The `fov` event is an example of a `ViewerStateEvent`.
3465  * // Set up an event listener on the viewer.
3466  * viewer.on('fov', function(e) {
3467  *   console.log('A fov event has occured');
3468  * });
3469  * ```
3470  */
3471 export type ViewerStateEvent = {
3472   /**
3473    * The event type.
3474    */
3475   type: "fov" | "moveend" | "movestart" | "position" | "pov" | "remove",
3476   ...
3477 } & ViewerEvent;
3478 export type ComponentName =
3479   | "attribution"
3480   | "bearing"
3481   | "cache"
3482   | "cover"
3483   | "direction"
3484   | "image"
3485   | "keyboard"
3486   | "marker"
3487   | "pointer"
3488   | "popup"
3489   | "sequence"
3490   | "slider"
3491   | "spatial"
3492   | "tag"
3493   | "zoom";
3494 export type FallbackComponentName = "imagefallback" | "navigationfallback";
3495 /**
3496  * Interface for viewer load events.
3497  * @description Fired immediately after all necessary resources
3498  * have been downloaded and the first visually complete
3499  * rendering of the viewer has occurred.
3500  *
3501  * The visually complete rendering does not include custom
3502  * renderers.
3503  *
3504  * This event is only fired for viewer configurations where
3505  * the WebGL context is created, i.e. not when using the
3506  * fallback functionality only.
3507  * @example ```js
3508  * // Set up an event listener on the viewer.
3509  * viewer.on('load', function(e) {
3510  *   console.log('A load event has occured');
3511  * });
3512  * ```
3513  */
3514 export type ViewerLoadEvent = {
3515   type: "load",
3516   ...
3517 } & ViewerEvent;
3518
3519 /**
3520  * Interface for viewer reference events.
3521  */
3522 export type ViewerReferenceEvent = {
3523   /**
3524    * The viewer's current reference.
3525    */
3526   reference: LngLatAlt,
3527   type: "reference",
3528   ...
3529 } & ViewerEvent;
3530
3531 /**
3532  * @class Viewer
3533  * @classdesc The Viewer object represents the navigable image viewer.
3534  * Create a Viewer by specifying a container, client ID, image ID and
3535  * other options. The viewer exposes methods and events for programmatic
3536  * interaction.
3537  *
3538  * In the case of asynchronous methods, MapillaryJS returns promises to
3539  * the results. Notifications are always emitted through JavaScript events.
3540  */
3541 declare class Viewer implements IEventEmitter, IViewer {
3542   /**
3543    * Create a new viewer instance.
3544    * @description The `Viewer` object represents the street imagery
3545    * viewer on your web page. It exposes methods and properties that
3546    * you can use to programatically change the view, and fires
3547    * events as users interact with it.
3548    *
3549    * It is possible to initialize the viewer with or
3550    * without a ID.
3551    *
3552    * When you want to show a specific image in the viewer from
3553    * the start you should initialize it with a ID.
3554    *
3555    * When you do not know the first image ID at implementation
3556    * time, e.g. in a map-viewer application you should initialize
3557    * the viewer without a ID and call `moveTo` instead.
3558    *
3559    * When initializing with an ID the viewer is bound to that ID
3560    * until the image for that ID has been successfully loaded.
3561    * Also, a cover with the image of the ID will be shown.
3562    * If the data for that ID can not be loaded because the ID is
3563    * faulty or other errors occur it is not possible to navigate
3564    * to another ID because the viewer is not navigable. The viewer
3565    * becomes navigable when the data for the ID has been loaded and
3566    * the image is shown in the viewer. This way of initializing
3567    * the viewer is mostly for embedding in blog posts and similar
3568    * where one wants to show a specific image initially.
3569    *
3570    * If the viewer is initialized without a ID (with null or
3571    * undefined) it is not bound to any particular ID and it is
3572    * possible to move to any ID with `viewer.moveTo("<my-image-id>")`.
3573    * If the first move to a ID fails it is possible to move to another
3574    * ID. The viewer will show a black background until a move
3575    * succeeds. This way of intitializing is suited for a map-viewer
3576    * application when the initial ID is not known at implementation
3577    * time.
3578    * @param {ViewerOptions} options - Optional configuration object
3579    * specifying Viewer's and the components' initial setup.
3580    * @example ```js
3581    * var viewer = new Viewer({
3582    *     accessToken: "<my-access-token>",
3583    *     container: "<my-container-id>",
3584    * });
3585    * ```
3586    */
3587   constructor(options: ViewerOptions): this;
3588
3589   /**
3590    * Returns the data provider used by the viewer to fetch
3591    * all contracts, ents, and buffers.
3592    * @description [object Object],[object Object],[object Object]
3593    * @returns {IDataProvider} The viewer's data provider.
3594    */
3595   dataProvider: IDataProvider;
3596
3597   /**
3598    * Return a boolean indicating if the viewer is in a navigable state.
3599    * @description [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3600    * @returns {boolean} Boolean indicating whether the viewer is navigable.
3601    */
3602   isNavigable: boolean;
3603
3604   /**
3605    * Activate the combined panning functionality.
3606    * @description The combined panning functionality is active by default.
3607    */
3608   activateCombinedPanning(): void;
3609
3610   /**
3611    * Activate a component.
3612    * @param {string} name - Name of
3613    * the component which will become active.
3614    * @example ```js
3615    * viewer.activateComponent("marker");
3616    * ```
3617    */
3618   activateComponent(name: string): void;
3619
3620   /**
3621    * Activate the cover (deactivates all other components).
3622    */
3623   activateCover(): void;
3624
3625   /**
3626    * Add a custom renderer to the viewer's rendering pipeline.
3627    * @description During a render pass, custom renderers
3628    * are called in the order they were added.
3629    * @param renderer - The custom renderer implementation.
3630    */
3631   addCustomRenderer(renderer: ICustomRenderer): void;
3632
3633   /**
3634    * Attach custom camera controls to control the viewer's
3635    * camera pose and projection.
3636    * @description [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3637    * @param controls - The custom camera controls implementation.
3638    * @throws {MapillaryError} When camera controls attached
3639    * are already attached to the viewer.
3640    */
3641   attachCustomCameraControls(controls: ICustomCameraControls): void;
3642
3643   /**
3644    * Deactivate the combined panning functionality.
3645    * @description Deactivating the combined panning functionality
3646    * could be needed in scenarios involving sequence only navigation.
3647    */
3648   deactivateCombinedPanning(): void;
3649
3650   /**
3651    * Deactivate a component.
3652    * @param {string} name - Name
3653    * of component which become inactive.
3654    * @example ```js
3655    * viewer.deactivateComponent("pointer");
3656    * ```
3657    */
3658   deactivateComponent(name: string): void;
3659
3660   /**
3661    * Deactivate the cover (activates all components marked as active).
3662    */
3663   deactivateCover(): void;
3664
3665   /**
3666    * Detach a previously attached custom camera control
3667    * instance from the viewer.
3668    * @description If no custom camera control instance
3669    * has previously been attached, calling this method
3670    * has no effect.
3671    *
3672    * Already attached custom camera controls need to
3673    * be detached before attaching another custom camera
3674    * control instance.
3675    */
3676   detachCustomCameraControls(): Promise<ICustomCameraControls>;
3677
3678   /**
3679    * Get the bearing of the current viewer camera.
3680    * @description The bearing depends on how the camera
3681    * is currently rotated and does not correspond
3682    * to the compass angle of the current image if the view
3683    * has been panned.
3684    *
3685    * Bearing is measured in degrees clockwise with respect to
3686    * north.
3687    * @returns {Promise<number>} Promise to the bearing
3688    * of the current viewer camera.
3689    * @example ```js
3690    * viewer.getBearing().then(b => { console.log(b); });
3691    * ```
3692    */
3693   getBearing(): Promise<number>;
3694
3695   /**
3696  * Get the viewer's camera control mode.
3697  * @description The camera control mode determines
3698  * how the camera is controlled when the viewer
3699  * receives pointer and keyboard input.
3700  * @returns {$Values<
3701                 typeof
3702                 CameraControls>} controls - Camera control mode.
3703  * @example ```js
3704  * viewer.getCameraControls().then(c => { console.log(c); });
3705  * ```
3706  */
3707   getCameraControls(): Promise<$Values<typeof CameraControls>>;
3708
3709   /**
3710    * Returns the viewer's canvas element.
3711    * @description This is the element onto which the viewer renders
3712    * the WebGL content.
3713    * @returns {HTMLCanvasElement} The viewer's canvas element, or
3714    * null or not initialized.
3715    */
3716   getCanvas(): HTMLCanvasElement;
3717
3718   /**
3719    * Returns the HTML element containing the viewer's canvas element.
3720    * @description This is the element to which event bindings for viewer
3721    * interactivity (such as panning and zooming) are attached.
3722    * @returns {HTMLDivElement} The container for the viewer's
3723    * canvas element.
3724    */
3725   getCanvasContainer(): HTMLDivElement;
3726
3727   /**
3728    * Get the basic coordinates of the current image that is
3729    * at the center of the viewport.
3730    * @description Basic coordinates are 2D coordinates on the [0, 1] interval
3731    * and have the origin point, (0, 0), at the top left corner and the
3732    * maximum value, (1, 1), at the bottom right corner of the original
3733    * image.
3734    * @returns {Promise<number[]>} Promise to the basic coordinates
3735    * of the current image at the center for the viewport.
3736    * @example ```js
3737    * viewer.getCenter().then(c => { console.log(c); });
3738    * ```
3739    */
3740   getCenter(): Promise<number[]>;
3741
3742   /**
3743    * Get a component.
3744    * @param {string} name - Name of component.
3745    * @returns {Component} The requested component.
3746    * @example ```js
3747    * var pointerComponent = viewer.getComponent("pointer");
3748    * ```
3749    */
3750   getComponent<TComponent: Component<ComponentConfiguration>>(
3751     name: string
3752   ): TComponent;
3753
3754   /**
3755    * Returns the viewer's containing HTML element.
3756    * @returns {HTMLElement} The viewer's container.
3757    */
3758   getContainer(): HTMLElement;
3759
3760   /**
3761    * Get the viewer's current vertical field of view.
3762    * @description The vertical field of view rendered on the viewer canvas
3763    * measured in degrees.
3764    * @returns {Promise<number>} Promise to the current field of view
3765    * of the viewer camera.
3766    * @example ```js
3767    * viewer.getFieldOfView().then(fov => { console.log(fov); });
3768    * ```
3769    */
3770   getFieldOfView(): Promise<number>;
3771
3772   /**
3773    * Get the viewer's current image.
3774    * @returns {Promise<Image>} Promise to the current image.
3775    * @example ```js
3776    * viewer.getImage().then(image => { console.log(image.id); });
3777    * ```
3778    */
3779   getImage(): Promise<Image>;
3780
3781   /**
3782    * Get the viewer's current point of view.
3783    * @returns {Promise<PointOfView>} Promise to the current point of view
3784    * of the viewer camera.
3785    * @example ```js
3786    * viewer.getPointOfView().then(pov => { console.log(pov); });
3787    * ```
3788    */
3789   getPointOfView(): Promise<PointOfView>;
3790
3791   /**
3792    * Get the viewer's current position
3793    * @returns {Promise<LngLat>} Promise to the viewers's current
3794    * position.
3795    * @example ```js
3796    * viewer.getPosition().then(pos => { console.log(pos); });
3797    * ```
3798    */
3799   getPosition(): Promise<LngLat>;
3800
3801   /**
3802    * Get the viewer's current reference position.
3803    * @description The reference position specifies the origin in
3804    * the viewer's topocentric coordinate system.
3805    * @returns {Promise<LngLatAlt>} Promise to the reference position.
3806    * @example ```js
3807    * viewer.getReference().then(reference => { console.log(reference); });
3808    * ```
3809    */
3810   getReference(): Promise<LngLatAlt>;
3811
3812   /**
3813    * Get the image's current zoom level.
3814    * @returns {Promise<number>} Promise to the viewers's current
3815    * zoom level.
3816    * @example ```js
3817    * viewer.getZoom().then(z => { console.log(z); });
3818    * ```
3819    */
3820   getZoom(): Promise<number>;
3821
3822   /**
3823    * Check if a controls instance is the camera controls that are
3824    * currently attached to the viewer.
3825    * @param {ICustomCameraControls} controls - Camera controls instance.
3826    * @returns {boolean} Value indicating whether the controls instance
3827    * is currently attached.
3828    */
3829   hasCustomCameraControls(controls: ICustomCameraControls): boolean;
3830
3831   /**
3832    * Check if a custom renderer has been added to the viewer's
3833    * rendering pipeline.
3834    * @param {string} id - Unique ID of the custom renderer.
3835    * @returns {boolean} Value indicating whether the customer
3836    * renderer has been added.
3837    */
3838   hasCustomRenderer(rendererId: string): boolean;
3839
3840   /**
3841  * Navigate in a given direction.
3842  * @param {$Values<
3843                 typeof
3844                 NavigationDirection>} direction - Direction in which which to move.
3845  * @returns {Promise<Image>} Promise to the image that was navigated to.
3846  * @throws If the current image does not have the edge direction
3847  * or the edges has not yet been cached.
3848  * @throws Propagates any IO errors to the caller.
3849  * @throws When viewer is not navigable.
3850  * @throws [object Object],[object Object],[object Object]
3851  * @example ```js
3852  * viewer.moveDir(NavigationDirection.Next).then(
3853  *     image => { console.log(image); },
3854  *     error => { console.error(error); });
3855  * ```
3856  */
3857   moveDir(direction: $Values<typeof NavigationDirection>): Promise<Image>;
3858
3859   /**
3860    * Navigate to a given image ID.
3861    * @param {string} imageId - Id of the image to move to.
3862    * @returns {Promise<Image>} Promise to the image that was navigated to.
3863    * @throws Propagates any IO errors to the caller.
3864    * @throws When viewer is not navigable.
3865    * @throws [object Object],[object Object],[object Object]
3866    * @example ```js
3867    * viewer.moveTo("<my-image-id>").then(
3868    *     image => { console.log(image); },
3869    *     error => { console.error(error); });
3870    * ```
3871    */
3872   moveTo(imageId: string): Promise<Image>;
3873
3874   /**
3875    * Project geodetic coordinates to canvas pixel coordinates.
3876    * @description The geodetic coordinates may not always correspond to pixel
3877    * coordinates, e.g. if the geodetic coordinates have a position behind the
3878    * viewer camera. In the case of no correspondence the returned value will
3879    * be `null`.
3880    *
3881    * If the distance from the viewer camera position to the provided
3882    * longitude-latitude is more than 1000 meters `null` will be returned.
3883    *
3884    * The projection is performed from the ground plane, i.e.
3885    * the altitude with respect to the ground plane for the geodetic
3886    * point is zero.
3887    *
3888    * Note that whenever the camera moves, the result of the method will be
3889    * different.
3890    * @param {LngLat} lngLat - Geographical coordinates to project.
3891    * @returns {Promise<Array<number>>} Promise to the pixel coordinates corresponding
3892    * to the lngLat.
3893    * @example ```js
3894    * viewer.project({ lat: 0, lng: 0 })
3895    *     .then(pixelPoint => {
3896    *          if (!pixelPoint) {
3897    *              console.log("no correspondence");
3898    *          }
3899    *
3900    *          console.log(pixelPoint);
3901    *     });
3902    * ```
3903    */
3904   project(lngLat: LngLat): Promise<number[]>;
3905
3906   /**
3907    * Project basic image coordinates for the current image to canvas pixel
3908    * coordinates.
3909    * @description The basic image coordinates may not always correspond to a
3910    * pixel point that lies in the visible area of the viewer container. In the
3911    * case of no correspondence the returned value can be `null`.
3912    * @param {Array<number>} basicPoint - Basic images coordinates to project.
3913    * @returns {Promise<Array<number>>} Promise to the pixel coordinates corresponding
3914    * to the basic image point.
3915    * @example ```js
3916    * viewer.projectFromBasic([0.3, 0.7])
3917    *     .then(pixelPoint => { console.log(pixelPoint); });
3918    * ```
3919    */
3920   projectFromBasic(basicPoint: number[]): Promise<number[]>;
3921
3922   /**
3923    * Clean up and release all internal resources associated with
3924    * this viewer.
3925    * @description This includes DOM elements, event bindings, and
3926    * WebGL resources.
3927    *
3928    * Use this method when you are done using the viewer and wish to
3929    * ensure that it no longer consumes browser resources. Afterwards,
3930    * you must not call any other methods on the viewer.
3931    * @fires remove
3932    * @example ```js
3933    * viewer.remove();
3934    * ```
3935    */
3936   remove(): void;
3937
3938   /**
3939    * Remove a custom renderer from the viewer's rendering pipeline.
3940    * @param id - Unique ID of the custom renderer.
3941    */
3942   removeCustomRenderer(rendererId: string): void;
3943
3944   /**
3945    * Detect the viewer's new width and height and resize it
3946    * manually.
3947    * @description [object Object],[object Object],[object Object],[object Object],[object Object]
3948    * @example ```js
3949    * viewer.resize();
3950    * ```
3951    */
3952   resize(): void;
3953
3954   /**
3955  * Set the viewer's camera control mode.
3956  * @description The camera control mode determines
3957  * how the camera is controlled when the viewer
3958  * receives pointer and keyboard input.
3959  *
3960  * Changing the camera control mode is not possible
3961  * when the slider component is active and attempts
3962  * to do so will be ignored.
3963  * @param {$Values<
3964                 typeof
3965                 CameraControls>} controls - Camera control mode.
3966  * @example ```js
3967  * viewer.setCameraControls(CameraControls.Street);
3968  * ```
3969  */
3970   setCameraControls(controls: $Values<typeof CameraControls>): void;
3971
3972   /**
3973    * Set the basic coordinates of the current image to be in the
3974    * center of the viewport.
3975    * @description Basic coordinates are 2D coordinates on the [0, 1] interval
3976    * and has the origin point, (0, 0), at the top left corner and the
3977    * maximum value, (1, 1), at the bottom right corner of the original
3978    * image.
3979    * @param {number[]} The basic coordinates of the current
3980    * image to be at the center for the viewport.
3981    * @example ```js
3982    * viewer.setCenter([0.5, 0.5]);
3983    * ```
3984    */
3985   setCenter(center: number[]): void;
3986
3987   /**
3988    * Set the viewer's current vertical field of view.
3989    * @description Sets the vertical field of view rendered
3990    * on the viewer canvas measured in degrees. The value
3991    * will be clamped to be able to set a valid zoom level
3992    * based on the projection model of the current image and
3993    * the viewer's current render mode.
3994    * @param {number} fov - Vertical field of view in degrees.
3995    * @example ```js
3996    * viewer.setFieldOfView(45);
3997    * ```
3998    */
3999   setFieldOfView(fov: number): void;
4000
4001   /**
4002    * Set the filter selecting images to use when calculating
4003    * the spatial edges.
4004    * @description [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4005    * @param {FilterExpression} [filter] - The filter expression.
4006    * Applied filter is cleared if omitted.
4007    * @returns {Promise<void>} Promise that resolves after filter is applied.
4008    * @example ```js
4009    * // Examples
4010    * viewer.setFilter(["==", "cameraType", "spherical"]);
4011    * viewer.setFilter([">=", "capturedAt", <my-time-stamp>]);
4012    * viewer.setFilter(["in", "sequenceId", "<sequence-id-1>", "<sequence-id-2>"]);
4013    * ```
4014    */
4015   setFilter(filter?: FilterExpression): Promise<void>;
4016
4017   /**
4018  * Set the viewer's render mode.
4019  * @param {$Values<
4020                 typeof
4021                 RenderMode>} renderMode - Render mode.
4022  * @example ```js
4023  * viewer.setRenderMode(RenderMode.Letterbox);
4024  * ```
4025  */
4026   setRenderMode(renderMode: $Values<typeof RenderMode>): void;
4027
4028   /**
4029  * Set the viewer's transition mode.
4030  * @param {$Values<
4031                 typeof
4032                 TransitionMode>} transitionMode - Transition mode.
4033  * @example ```js
4034  * viewer.setTransitionMode(TransitionMode.Instantaneous);
4035  * ```
4036  */
4037   setTransitionMode(transitionMode: $Values<typeof TransitionMode>): void;
4038
4039   /**
4040    * Set an access token for authenticated API requests of protected
4041    * resources.
4042    *
4043    * The token may be a user access token or a client access token.
4044    * @description [object Object],[object Object],[object Object]
4045    * @param {string} [accessToken] accessToken - Optional user
4046    * access token or client access token.
4047    * @returns {Promise<void>} Promise that resolves after token
4048    * is set.
4049    * @throws When viewer is not navigable.
4050    * @example ```js
4051    * viewer.setAccessToken("<my access token>")
4052    *     .then(() => { console.log("user token set"); });
4053    * ```
4054    */
4055   setAccessToken(accessToken?: string): Promise<void>;
4056
4057   /**
4058    * Set the image's current zoom level.
4059    * @description Possible zoom level values are on the [0, 3] interval.
4060    * Zero means zooming out to fit the image to the view whereas three
4061    * shows the highest level of detail.
4062    * @param {number} The image's current zoom level.
4063    * @example ```js
4064    * viewer.setZoom(2);
4065    * ```
4066    */
4067   setZoom(zoom: number): void;
4068
4069   /**
4070    * Trigger the rendering of a single frame.
4071    * @description Use this method with custom renderers to
4072    * force the viewer to rerender when the custom content
4073    * changes. Calling this multiple times before the next
4074    * frame is rendered will still result in only a single
4075    * frame being rendered.
4076    */
4077   triggerRerender(): void;
4078
4079   /**
4080    * Unproject canvas pixel coordinates to geodetic
4081    * coordinates.
4082    * @description The pixel point may not always correspond to geodetic
4083    * coordinates. In the case of no correspondence the returned value will
4084    * be `null`.
4085    *
4086    * The unprojection to a lngLat will be performed towards the ground plane, i.e.
4087    * the altitude with respect to the ground plane for the returned lngLat is zero.
4088    * @param {Array<number>} pixelPoint - Pixel coordinates to unproject.
4089    * @returns {Promise<LngLat>} Promise to the lngLat corresponding to the pixel point.
4090    * @example ```js
4091    * viewer.unproject([100, 100])
4092    *     .then(lngLat => { console.log(lngLat); });
4093    * ```
4094    */
4095   unproject(pixelPoint: number[]): Promise<LngLat>;
4096
4097   /**
4098    * Unproject canvas pixel coordinates to basic image coordinates for the
4099    * current image.
4100    * @description The pixel point may not always correspond to basic image
4101    * coordinates. In the case of no correspondence the returned value will
4102    * be `null`.
4103    * @param {Array<number>} pixelPoint - Pixel coordinates to unproject.
4104    * @returns {Promise<LngLat>} Promise to the basic coordinates corresponding
4105    * to the pixel point.
4106    * @example ```js
4107    * viewer.unprojectToBasic([100, 100])
4108    *     .then(basicPoint => { console.log(basicPoint); });
4109    * ```
4110    */
4111   unprojectToBasic(pixelPoint: number[]): Promise<number[]>;
4112
4113   fire<T>(type: string, event: T): void;
4114   off<T>(type: string, handler: (event: T) => void): void;
4115   on<T>(type: string, handler: (event: T) => void): void;
4116 }
4117 /**
4118  * @class MapillaryError
4119  * @classdesc Generic Mapillary error.
4120  */
4121 declare class MapillaryError extends Error {
4122   constructor(message?: string): this;
4123 }
4124 /**
4125  * @class CancelMapillaryError
4126  * @classdesc Error thrown when a move to request has been
4127  * cancelled before completing because of a subsequent request.
4128  */
4129 declare class CancelMapillaryError extends MapillaryError {
4130   constructor(message?: string): this;
4131 }
4132 declare class ArgumentMapillaryError extends MapillaryError {
4133   constructor(message?: string): this;
4134 }
4135 declare class GraphMapillaryError extends MapillaryError {
4136   constructor(message: string): this;
4137 }
4138 declare class ConfigurationService {
4139   constructor(options: ViewerOptions): this;
4140 }
4141 declare class Container {
4142   id: string;
4143   renderService: RenderService;
4144   glRenderer: GLRenderer;
4145   domRenderer: DOMRenderer;
4146   keyboardService: KeyboardService;
4147   mouseService: MouseService;
4148   touchService: TouchService;
4149   spriteService: SpriteService;
4150   +configurationService: ConfigurationService;
4151   constructor(
4152     options: ViewerOptions,
4153     stateService: StateService,
4154     dom?: DOM
4155   ): this;
4156   canvas: HTMLCanvasElement;
4157   canvasContainer: HTMLDivElement;
4158   container: HTMLElement;
4159   domContainer: HTMLDivElement;
4160   remove(): void;
4161 }
4162 declare type Func<T, TResult> = (item: T) => TResult;
4163 declare type FilterFunction = Func<Image, boolean>;
4164 /**
4165  * @class Filter
4166  * @classdesc Represents a class for creating image filters. Implementation and
4167  * definitions based on https://github.com/mapbox/feature-filter.
4168  */
4169 declare class FilterCreator {
4170   /**
4171    * Create a filter from a filter expression.
4172    * @description The following filters are supported:
4173    *
4174    * Comparison
4175    * `==`
4176    * `!=`
4177    * `<`
4178    * `<=`
4179    * `>`
4180    * `>=`
4181    *
4182    * Set membership
4183    * `in`
4184    * `!in`
4185    *
4186    * Combining
4187    * `all`
4188    * @param {FilterExpression} filter - Comparison, set membership or combinding filter
4189    * expression.
4190    * @returns {FilterFunction} Function taking a image and returning a boolean that
4191    * indicates whether the image passed the test or not.
4192    */
4193   createFilter(filter: FilterExpression): FilterFunction;
4194 }
4195 /**
4196  * @class GraphCalculator
4197  * @classdesc Represents a calculator for graph entities.
4198  */
4199 declare class GraphCalculator {
4200   /**
4201    * Get the bounding box corners for a circle with radius of a threshold
4202    * with center in a geodetic position.
4203    * @param {LngLat} lngLat - Longitude, latitude to encode.
4204    * @param {number} threshold - Threshold distance from the position in meters.
4205    * @returns {Array<LngLat>} The south west and north east corners of the
4206    * bounding box.
4207    */
4208   boundingBoxCorners(lngLat: LngLat, threshold: number): [LngLat, LngLat];
4209
4210   /**
4211    * Convert a compass angle to an angle axis rotation vector.
4212    * @param {number} compassAngle - The compass angle in degrees.
4213    * @param {number} orientation - The orientation of the original image.
4214    * @returns {Array<number>} Angle axis rotation vector.
4215    */
4216   rotationFromCompass(compassAngle: number, orientation: number): number[];
4217 }
4218 /**
4219  * @class Sequence
4220  * @classdesc Represents a sequence of ordered images.
4221  */
4222 declare class Sequence {
4223   /**
4224    * Create a new sequene instance.
4225    * @param {SequenceEnt} sequence - Raw sequence data.
4226    */
4227   constructor(sequence: SequenceEnt): this;
4228
4229   /**
4230    * Get id.
4231    * @returns {string} Unique sequence id.
4232    */
4233   id: string;
4234
4235   /**
4236    * Get ids.
4237    * @returns {Array<string>} Array of ordered image ids in the sequence.
4238    */
4239   imageIds: string[];
4240
4241   /**
4242    * Dispose the sequence.
4243    * @description Disposes all cached assets.
4244    */
4245   dispose(): void;
4246
4247   /**
4248    * Find the next image id in the sequence with respect to
4249    * the provided image id.
4250    * @param {string} id - Reference image id.
4251    * @returns {string} Next id in sequence if it exists, null otherwise.
4252    */
4253   findNext(id: string): string;
4254
4255   /**
4256    * Find the previous image id in the sequence with respect to
4257    * the provided image id.
4258    * @param {string} id - Reference image id.
4259    * @returns {string} Previous id in sequence if it exists, null otherwise.
4260    */
4261   findPrev(id: string): string;
4262 }
4263 /**
4264  * Interface for graph configuration.
4265  * @interface GraphConfiguration
4266  */
4267 export interface GraphConfiguration {
4268   /**
4269    * The maximum number of cached sequences left
4270    * after uncache.
4271    */
4272   maxSequences: number;
4273
4274   /**
4275    * The maximum number of unused cached images left
4276    * after uncache.
4277    */
4278   maxUnusedImages: number;
4279
4280   /**
4281    * The maximum number of unused pre-stored cached images left
4282    * after uncache.
4283    */
4284   maxUnusedPreStoredImages: number;
4285
4286   /**
4287    * The maximum number of unused cached tiles left
4288    * after uncache.
4289    */
4290   maxUnusedTiles: number;
4291 }
4292 declare class EdgeCalculatorCoefficients {
4293   sphericalPreferredDistance: number;
4294   sphericalMotion: number;
4295   sphericalSequencePenalty: number;
4296   sphericalMergeCCPenalty: number;
4297   stepPreferredDistance: number;
4298   stepMotion: number;
4299   stepRotation: number;
4300   stepSequencePenalty: number;
4301   stepMergeCCPenalty: number;
4302   similarDistance: number;
4303   similarRotation: number;
4304   turnDistance: number;
4305   turnMotion: number;
4306   turnSequencePenalty: number;
4307   turnMergeCCPenalty: number;
4308   constructor(): this;
4309 }
4310 declare interface SphericalDirection {
4311   direction: $Values<typeof NavigationDirection>;
4312   prev: $Values<typeof NavigationDirection>;
4313   next: $Values<typeof NavigationDirection>;
4314   directionChange: number;
4315 }
4316 declare interface StepDirection {
4317   direction: $Values<typeof NavigationDirection>;
4318   motionChange: number;
4319   useFallback: boolean;
4320 }
4321 declare interface TurnDirection {
4322   direction: $Values<typeof NavigationDirection>;
4323   directionChange: number;
4324   motionChange?: number;
4325 }
4326 declare class EdgeCalculatorDirections {
4327   steps: {
4328     [direction: string]: StepDirection,
4329     ...
4330   };
4331   turns: {
4332     [direction: string]: TurnDirection,
4333     ...
4334   };
4335   spherical: {
4336     [direction: string]: SphericalDirection,
4337     ...
4338   };
4339   constructor(): this;
4340 }
4341 declare class EdgeCalculatorSettings {
4342   sphericalMinDistance: number;
4343   sphericalMaxDistance: number;
4344   sphericalPreferredDistance: number;
4345   sphericalMaxItems: number;
4346   sphericalMaxStepTurnChange: number;
4347   rotationMaxDistance: number;
4348   rotationMaxDirectionChange: number;
4349   rotationMaxVerticalDirectionChange: number;
4350   similarMaxDirectionChange: number;
4351   similarMaxDistance: number;
4352   similarMinTimeDifference: number;
4353   stepMaxDistance: number;
4354   stepMaxDirectionChange: number;
4355   stepMaxDrift: number;
4356   stepPreferredDistance: number;
4357   turnMaxDistance: number;
4358   turnMaxDirectionChange: number;
4359   turnMaxRigDistance: number;
4360   turnMinRigDirectionChange: number;
4361   constructor(): this;
4362   maxDistance: number;
4363 }
4364 /**
4365  * Interface that describes the properties for a image that is the destination of a
4366  * potential edge from an origin image.
4367  * @interface PotentialEdge
4368  */
4369 declare interface PotentialEdge {
4370   /**
4371    * Timestamp when the image was captured.
4372    * @property {number} capturedAt
4373    */
4374   capturedAt: number;
4375
4376   /**
4377    * Change in viewing direction with respect to the origin image.
4378    * @property {number} directionChange
4379    */
4380   directionChange: number;
4381
4382   /**
4383    * Distance to the origin image.
4384    * @property {number} distance
4385    */
4386   distance: number;
4387
4388   /**
4389    * Determines if the destination image is spherical.
4390    * @property {boolean} spherical
4391    */
4392   spherical: boolean;
4393
4394   /**
4395    * Unique image id.
4396    * @property {string} id
4397    */
4398   id: string;
4399
4400   /**
4401    * Change in motion with respect to the viewing direction
4402    * of the origin image.
4403    * @property {number} motionChange
4404    */
4405   motionChange: number;
4406
4407   /**
4408    * General camera rotation with respect to the origin image.
4409    * @property {number} rotation
4410    */
4411   rotation: number;
4412
4413   /**
4414    * Determines if the origin and destination image are considered
4415    * to be in the same merge connected component.
4416    * @property {boolean} sameMergeCC
4417    */
4418   sameMergeCC: boolean;
4419
4420   /**
4421    * Determines if the origin and destination image are in the
4422    * same sequence.
4423    * @property {boolean} sameSequence
4424    */
4425   sameSequence: boolean;
4426
4427   /**
4428    * Determines if the origin and destination image have been captured
4429    * by the same user.
4430    * @property {boolean} sameUser
4431    */
4432   sameUser: boolean;
4433
4434   /**
4435    * Determines which sequence the destination image of the potential edge
4436    * belongs to.
4437    * @property {string} sequenceId
4438    */
4439   sequenceId: string;
4440
4441   /**
4442    * Change in viewing direction with respect to the XY-plane.
4443    * @property {number} verticalDirectionChange
4444    */
4445   verticalDirectionChange: number;
4446
4447   /**
4448    * The angle between motion vector and the XY-plane
4449    * @property {number} verticalMotion
4450    */
4451   verticalMotion: number;
4452
4453   /**
4454    * The counter clockwise horizontal rotation angle from
4455    * the X-axis in a spherical coordiante system.
4456    * @property {number} worldMotionAzimuth
4457    */
4458   worldMotionAzimuth: number;
4459 }
4460 /**
4461  * @class EdgeCalculator
4462  * @classdesc Represents a class for calculating node edges.
4463  */
4464 declare class EdgeCalculator {
4465   /**
4466    * Create a new edge calculator instance.
4467    * @param {EdgeCalculatorSettings} settings - Settings struct.
4468    * @param {EdgeCalculatorDirections} directions - Directions struct.
4469    * @param {EdgeCalculatorCoefficients} coefficients - Coefficients struct.
4470    */
4471   constructor(
4472     settings?: EdgeCalculatorSettings,
4473     directions?: EdgeCalculatorDirections,
4474     coefficients?: EdgeCalculatorCoefficients
4475   ): this;
4476
4477   /**
4478    * Returns the potential edges to destination nodes for a set
4479    * of nodes with respect to a source node.
4480    * @param {Image} node - Source node.
4481    * @param {Array<Image>} nodes - Potential destination nodes.
4482    * @param {Array<string>} fallbackIds - Ids for destination nodes
4483    * that should be returned even if they do not meet the
4484    * criteria for a potential edge.
4485    * @throws {ArgumentMapillaryError} If node is not full.
4486    */
4487   getPotentialEdges(
4488     node: Image,
4489     potentialImages: Image[],
4490     fallbackIds: string[]
4491   ): PotentialEdge[];
4492
4493   /**
4494    * Computes the sequence edges for a node.
4495    * @param {Image} node - Source node.
4496    * @throws {ArgumentMapillaryError} If node is not full.
4497    */
4498   computeSequenceEdges(node: Image, sequence: Sequence): NavigationEdge[];
4499
4500   /**
4501    * Computes the similar edges for a node.
4502    * @description Similar edges for perspective images
4503    * look roughly in the same direction and are positioned closed to the node.
4504    * Similar edges for spherical only target other spherical.
4505    * @param {Image} node - Source node.
4506    * @param {Array<PotentialEdge>} potentialEdges - Potential edges.
4507    * @throws {ArgumentMapillaryError} If node is not full.
4508    */
4509   computeSimilarEdges(
4510     node: Image,
4511     potentialEdges: PotentialEdge[]
4512   ): NavigationEdge[];
4513
4514   /**
4515    * Computes the step edges for a perspective node.
4516    * @description Step edge targets can only be other perspective nodes.
4517    * Returns an empty array for spherical.
4518    * @param {Image} node - Source node.
4519    * @param {Array<PotentialEdge>} potentialEdges - Potential edges.
4520    * @param {string} prevId - Id of previous node in sequence.
4521    * @param {string} nextId - Id of next node in sequence.
4522    * @throws {ArgumentMapillaryError} If node is not full.
4523    */
4524   computeStepEdges(
4525     node: Image,
4526     potentialEdges: PotentialEdge[],
4527     prevId: string,
4528     nextId: string
4529   ): NavigationEdge[];
4530
4531   /**
4532    * Computes the turn edges for a perspective node.
4533    * @description Turn edge targets can only be other perspective images.
4534    * Returns an empty array for spherical.
4535    * @param {Image} node - Source node.
4536    * @param {Array<PotentialEdge>} potentialEdges - Potential edges.
4537    * @throws {ArgumentMapillaryError} If node is not full.
4538    */
4539   computeTurnEdges(
4540     node: Image,
4541     potentialEdges: PotentialEdge[]
4542   ): NavigationEdge[];
4543
4544   /**
4545    * Computes the spherical edges for a perspective node.
4546    * @description Perspective to spherical edge targets can only be
4547    * spherical nodes. Returns an empty array for spherical.
4548    * @param {Image} node - Source node.
4549    * @param {Array<PotentialEdge>} potentialEdges - Potential edges.
4550    * @throws {ArgumentMapillaryError} If node is not full.
4551    */
4552   computePerspectiveToSphericalEdges(
4553     node: Image,
4554     potentialEdges: PotentialEdge[]
4555   ): NavigationEdge[];
4556
4557   /**
4558    * Computes the spherical and step edges for a spherical node.
4559    * @description Spherical to spherical edge targets can only be
4560    * spherical nodes. spherical to step edge targets can only be perspective
4561    * nodes.
4562    * @param {Image} node - Source node.
4563    * @param {Array<PotentialEdge>} potentialEdges - Potential edges.
4564    * @throws {ArgumentMapillaryError} If node is not full.
4565    */
4566   computeSphericalEdges(
4567     node: Image,
4568     potentialEdges: PotentialEdge[]
4569   ): NavigationEdge[];
4570 }
4571 /**
4572  * @class API
4573  * @classdesc Provides methods for access to the API.
4574  */
4575 declare class APIWrapper {
4576   constructor(_data: IDataProvider): this;
4577   data: IDataProvider;
4578   setAccessToken(accessToken?: string): void;
4579 }
4580 /**
4581  * @class Graph
4582  * @classdesc Represents a graph of nodes with edges.
4583  */
4584 declare class Graph {
4585   /**
4586    * Create a new graph instance.
4587    * @param {APIWrapper} [api] - API instance for retrieving data.
4588    * @param {rbush.RBush<NodeIndexItem>} [nodeIndex] - Node index for fast spatial retreival.
4589    * @param {GraphCalculator} [graphCalculator] - Instance for graph calculations.
4590    * @param {EdgeCalculator} [edgeCalculator] - Instance for edge calculations.
4591    * @param {FilterCreator} [filterCreator] - Instance for  filter creation.
4592    * @param {GraphConfiguration} [configuration] - Configuration struct.
4593    */
4594   constructor(
4595     api: APIWrapper,
4596     nodeIndex?: mixed,
4597     graphCalculator?: GraphCalculator,
4598     edgeCalculator?: EdgeCalculator,
4599     filterCreator?: FilterCreator,
4600     configuration?: GraphConfiguration
4601   ): this;
4602   static register(spatialIndex: (...args: mixed[]) => mixed): void;
4603
4604   /**
4605    * Get api.
4606    * @returns {APIWrapper} The API instance used by
4607    * the graph.
4608    */
4609   api: APIWrapper;
4610
4611   /**
4612    * Cache sequence edges for a node.
4613    * @param {string} key - Key of node.
4614    * @throws {GraphMapillaryError} When the operation is not valid on the
4615    * current graph.
4616    */
4617   cacheSequenceEdges(key: string): void;
4618
4619   /**
4620    * Cache spatial edges for a node.
4621    * @param {string} key - Key of node.
4622    * @throws {GraphMapillaryError} When the operation is not valid on the
4623    * current graph.
4624    */
4625   cacheSpatialEdges(key: string): void;
4626
4627   /**
4628    * Initialize the cache for a node.
4629    * @param {string} key - Key of node.
4630    * @throws {GraphMapillaryError} When the operation is not valid on the
4631    * current graph.
4632    */
4633   initializeCache(key: string): void;
4634
4635   /**
4636    * Get a value indicating if the graph is fill caching a node.
4637    * @param {string} key - Key of node.
4638    * @returns {boolean} Value indicating if the node is being fill cached.
4639    */
4640   isCachingFill(key: string): boolean;
4641
4642   /**
4643    * Get a value indicating if the graph is fully caching a node.
4644    * @param {string} key - Key of node.
4645    * @returns {boolean} Value indicating if the node is being fully cached.
4646    */
4647   isCachingFull(key: string): boolean;
4648
4649   /**
4650    * Get a value indicating if the graph is caching a sequence of a node.
4651    * @param {string} key - Key of node.
4652    * @returns {boolean} Value indicating if the sequence of a node is
4653    * being cached.
4654    */
4655   isCachingNodeSequence(key: string): boolean;
4656
4657   /**
4658    * Get a value indicating if the graph is caching a sequence.
4659    * @param {string} sequenceKey - Key of sequence.
4660    * @returns {boolean} Value indicating if the sequence is
4661    * being cached.
4662    */
4663   isCachingSequence(sequenceKey: string): boolean;
4664
4665   /**
4666    * Get a value indicating if the graph is caching sequence nodes.
4667    * @param {string} sequenceKey - Key of sequence.
4668    * @returns {boolean} Value indicating if the sequence nodes are
4669    * being cached.
4670    */
4671   isCachingSequenceNodes(sequenceKey: string): boolean;
4672
4673   /**
4674    * Get a value indicating if the graph is caching the tiles
4675    * required for calculating spatial edges of a node.
4676    * @param {string} key - Key of node.
4677    * @returns {boolean} Value indicating if the tiles of
4678    * a node are being cached.
4679    */
4680   isCachingTiles(key: string): boolean;
4681
4682   /**
4683    * Get a value indicating if the cache has been initialized
4684    * for a node.
4685    * @param {string} key - Key of node.
4686    * @returns {boolean} Value indicating if the cache has been
4687    * initialized for a node.
4688    */
4689   hasInitializedCache(key: string): boolean;
4690
4691   /**
4692    * Get a value indicating if a node exist in the graph.
4693    * @param {string} key - Key of node.
4694    * @returns {boolean} Value indicating if a node exist in the graph.
4695    */
4696   hasNode(key: string): boolean;
4697
4698   /**
4699    * Get a value indicating if a node sequence exist in the graph.
4700    * @param {string} key - Key of node.
4701    * @returns {boolean} Value indicating if a node sequence exist
4702    * in the graph.
4703    */
4704   hasNodeSequence(key: string): boolean;
4705
4706   /**
4707    * Get a value indicating if a sequence exist in the graph.
4708    * @param {string} sequenceKey - Key of sequence.
4709    * @returns {boolean} Value indicating if a sequence exist
4710    * in the graph.
4711    */
4712   hasSequence(sequenceKey: string): boolean;
4713
4714   /**
4715    * Get a value indicating if sequence nodes has been cached in the graph.
4716    * @param {string} sequenceKey - Key of sequence.
4717    * @returns {boolean} Value indicating if a sequence nodes has been
4718    * cached in the graph.
4719    */
4720   hasSequenceNodes(sequenceKey: string): boolean;
4721
4722   /**
4723    * Get a value indicating if the graph has fully cached
4724    * all nodes in the spatial area of a node.
4725    * @param {string} key - Key of node.
4726    * @returns {boolean} Value indicating if the spatial area
4727    * of a node has been cached.
4728    */
4729   hasSpatialArea(key: string): boolean;
4730
4731   /**
4732    * Get a value indicating if the graph has a tiles required
4733    * for a node.
4734    * @param {string} key - Key of node.
4735    * @returns {boolean} Value indicating if the the tiles required
4736    * by a node has been cached.
4737    */
4738   hasTiles(key: string): boolean;
4739
4740   /**
4741    * Get a node.
4742    * @param {string} key - Key of node.
4743    * @returns {Image} Retrieved node.
4744    */
4745   getNode(key: string): Image;
4746
4747   /**
4748    * Get a sequence.
4749    * @param {string} sequenceKey - Key of sequence.
4750    * @returns {Image} Retrieved sequence.
4751    */
4752   getSequence(sequenceKey: string): Sequence;
4753
4754   /**
4755    * Reset all spatial edges of the graph nodes.
4756    */
4757   resetSpatialEdges(): void;
4758
4759   /**
4760    * Reset the complete graph but keep the nodes corresponding
4761    * to the supplied keys. All other nodes will be disposed.
4762    * @param {Array<string>} keepKeys - Keys for nodes to keep
4763    * in graph after reset.
4764    */
4765   reset(keepKeys: string[]): void;
4766
4767   /**
4768    * Set the spatial node filter.
4769    * @emits [object Object],[object Object],[object Object]
4770    * @param {FilterExpression} filter - Filter expression to be applied
4771    * when calculating spatial edges.
4772    */
4773   setFilter(filter: FilterExpression): void;
4774
4775   /**
4776    * Uncache the graph according to the graph configuration.
4777    * @description Uncaches unused tiles, unused nodes and
4778    * sequences according to the numbers specified in the
4779    * graph configuration. Sequences does not have a direct
4780    * reference to either tiles or nodes and may be uncached
4781    * even if they are related to the nodes that should be kept.
4782    * @param {Array<string>} keepIds - Ids of nodes to keep in
4783    * graph unrelated to last access. Tiles related to those keys
4784    * will also be kept in graph.
4785    * @param {Array<string>} keepCellIds - Ids of cells to keep in
4786    * graph unrelated to last access. The nodes of the cells may
4787    * still be uncached if not specified in the keep ids param
4788    * but are guaranteed to not be disposed.
4789    * @param {string} keepSequenceId - Optional id of sequence
4790    * for which the belonging nodes should not be disposed or
4791    * removed from the graph. These nodes may still be uncached if
4792    * not specified in keep ids param but are guaranteed to not
4793    * be disposed.
4794    */
4795   uncache(
4796     keepIds: string[],
4797     keepCellIds: string[],
4798     keepSequenceId?: string
4799   ): void;
4800
4801   /**
4802    * Unsubscribes all subscriptions.
4803    * @description Afterwards, you must not call any other methods
4804    * on the graph instance.
4805    */
4806   unsubscribe(): void;
4807 }
4808 /**
4809  * Enumeration for graph modes.
4810  * @enum {number} *
4811  * @readonly
4812  * @description Modes for the retrieval and caching performed
4813  * by the graph service on the graph.
4814  */
4815
4816 declare var GraphMode: {|
4817   +Sequence: 0, // 0
4818   +Spatial: 1, // 1
4819 |};
4820
4821 /**
4822  * @class GraphService
4823  * @classdesc Represents a service for graph operations.
4824  */
4825 declare class GraphService {
4826   /**
4827    * Create a new graph service instance.
4828    * @param {Graph} graph - Graph instance to be operated on.
4829    */
4830   constructor(graph: Graph): this;
4831
4832   /**
4833    * Dispose the graph service and its children.
4834    */
4835   dispose(): void;
4836
4837   /**
4838  * Set the graph mode.
4839  * @description If graph mode is set to spatial, caching
4840  * is performed with emphasis on spatial edges. If graph
4841  * mode is set to sequence no tile data is requested and
4842  * no spatial edges are computed.
4843  *
4844  * When setting graph mode to sequence all spatial
4845  * subscriptions are aborted.
4846  * @param {$Values<
4847                 typeof
4848                 GraphMode>} mode - Graph mode to set.
4849  */
4850   setGraphMode(mode: $Values<typeof GraphMode>): void;
4851 }
4852
4853 declare interface CacheServiceConfiguration {
4854   cellDepth: number;
4855 }
4856 declare class CacheService {
4857   constructor(
4858     _graphService: GraphService,
4859     _stateService: StateService,
4860     _api: APIWrapper
4861   ): this;
4862   started: boolean;
4863   configure(configuration?: CacheServiceConfiguration): void;
4864   start(): void;
4865   stop(): void;
4866 }
4867 declare class LoadingService {
4868   constructor(): this;
4869   startLoading(task: string): void;
4870   stopLoading(task: string): void;
4871 }
4872 /**
4873  * @class Spatial
4874  * @classdesc Provides methods for scalar, vector and matrix calculations.
4875  */
4876 declare class Spatial {
4877   /**
4878    * Converts azimuthal phi rotation (counter-clockwise with origin on X-axis) to
4879    * bearing (clockwise with origin at north or Y-axis).
4880    * @param {number} phi - Azimuthal phi angle in radians.
4881    * @returns {number} Bearing in radians.
4882    */
4883   azimuthalToBearing(phi: number): number;
4884
4885   /**
4886    * Converts degrees to radians.
4887    * @param {number} deg - Degrees.
4888    * @returns {number} Radians.
4889    */
4890   degToRad(deg: number): number;
4891
4892   /**
4893    * Converts radians to degrees.
4894    * @param {number} rad - Radians.
4895    * @returns {number} Degrees.
4896    */
4897   radToDeg(rad: number): number;
4898
4899   /**
4900    * Wrap a number on the interval [min, max].
4901    * @param {number} value - Value to wrap.
4902    * @param {number} min - Lower endpoint of interval.
4903    * @param {number} max - Upper endpoint of interval.
4904    * @returns {number} The wrapped number.
4905    */
4906   wrap(value: number, min: number, max: number): number;
4907
4908   /**
4909    * Wrap an angle on the interval [-Pi, Pi].
4910    * @param {number} angle - Value to wrap.
4911    * @returns {number} Wrapped angle.
4912    */
4913   wrapAngle(angle: number): number;
4914
4915   /**
4916    * Limit the value to the interval [min, max] by changing the value to
4917    * the nearest available one when it is outside the interval.
4918    * @param {number} value - Value to clamp.
4919    * @param {number} min - Minimum of the interval.
4920    * @param {number} max - Maximum of the interval.
4921    * @returns {number} Clamped value.
4922    */
4923   clamp(value: number, min: number, max: number): number;
4924
4925   /**
4926    * Calculates the counter-clockwise angle from the first
4927    * vector (x1, y1)^T to the second (x2, y2)^T.
4928    * @param {number} x1 - X coordinate of first vector.
4929    * @param {number} y1 - Y coordinate of first vector.
4930    * @param {number} x2 - X coordinate of second vector.
4931    * @param {number} y2 - Y coordinate of second vector.
4932    * @returns {number} Counter clockwise angle between the vectors.
4933    */
4934   angleBetweenVector2(x1: number, y1: number, x2: number, y2: number): number;
4935
4936   /**
4937    * Calculates the minimum (absolute) angle change for rotation
4938    * from one angle to another on the [-Pi, Pi] interval.
4939    * @param {number} angle1 - Start angle.
4940    * @param {number} angle2 - Destination angle.
4941    * @returns {number} Absolute angle change between angles.
4942    */
4943   angleDifference(angle1: number, angle2: number): number;
4944
4945   /**
4946    * Calculates the relative rotation angle between two
4947    * angle-axis vectors.
4948    * @param {number} rotation1 - First angle-axis vector.
4949    * @param {number} rotation2 - Second angle-axis vector.
4950    * @returns {number} Relative rotation angle.
4951    */
4952   relativeRotationAngle(rotation1: number[], rotation2: number[]): number;
4953
4954   /**
4955    * Calculates the angle from a vector to a plane.
4956    * @param {Array<number>} vector - The vector.
4957    * @param {Array<number>} planeNormal - Normal of the plane.
4958    * @returns {number} Angle from between plane and vector.
4959    */
4960   angleToPlane(vector: number[], planeNormal: number[]): number;
4961   azimuthal(direction: number[], up: number[]): number;
4962
4963   /**
4964    * Calculates the distance between two coordinates
4965    * (longitude, latitude pairs) in meters according to
4966    * the haversine formula.
4967    * @param {number} lat1 - Latitude of the first coordinate in degrees.
4968    * @param {number} lng1 - Longitude of the first coordinate in degrees.
4969    * @param {number} lat2 - Latitude of the second coordinate in degrees.
4970    * @param {number} lng2 - Longitude of the second coordinate in degrees.
4971    * @returns {number} Distance between lat lon positions in meters.
4972    */
4973   distanceFromLngLat(
4974     lng1: number,
4975     lat1: number,
4976     lng2: number,
4977     lat2: number
4978   ): number;
4979 }
4980 /**
4981  * @class ViewportCoords
4982  * @classdesc Provides methods for calculating 2D coordinate conversions
4983  * as well as 3D projection and unprojection.
4984  *
4985  * Basic coordinates are 2D coordinates on the [0, 1] interval and
4986  * have the origin point, (0, 0), at the top left corner and the
4987  * maximum value, (1, 1), at the bottom right corner of the original
4988  * image.
4989  *
4990  * Viewport coordinates are 2D coordinates on the [-1, 1] interval and
4991  * have the origin point in the center. The bottom left corner point is
4992  * (-1, -1) and the top right corner point is (1, 1).
4993  *
4994  * Canvas coordiantes are 2D pixel coordinates on the [0, canvasWidth] and
4995  * [0, canvasHeight] intervals. The origin point (0, 0) is in the top left
4996  * corner and the maximum value is (canvasWidth, canvasHeight) is in the
4997  * bottom right corner.
4998  *
4999  * 3D coordinates are in the topocentric world reference frame.
5000  */
5001 declare class ViewportCoords {
5002   /**
5003    * Convert basic coordinates to canvas coordinates.
5004    * @description Transform origin and camera position needs to be the
5005    * equal for reliable return value.
5006    * @param {number} basicX - Basic X coordinate.
5007    * @param {number} basicY - Basic Y coordinate.
5008    * @param {HTMLElement} container - The viewer container.
5009    * @param {Transform} transform - Transform of the image to unproject from.
5010    * @param {THREE.Camera} camera - Camera used in rendering.
5011    * @returns {Array<number>} 2D canvas coordinates.
5012    */
5013   basicToCanvas(
5014     basicX: number,
5015     basicY: number,
5016     container: {
5017       offsetHeight: number,
5018       offsetWidth: number,
5019       ...
5020     },
5021     transform: Transform
5022   ): number[];
5023
5024   /**
5025    * Convert basic coordinates to canvas coordinates safely. If 3D point is
5026    * behind camera null will be returned.
5027    * @description Transform origin and camera position needs to be the
5028    * equal for reliable return value.
5029    * @param {number} basicX - Basic X coordinate.
5030    * @param {number} basicY - Basic Y coordinate.
5031    * @param {HTMLElement} container - The viewer container.
5032    * @param {Transform} transform - Transform of the image to unproject from.
5033    * @param {THREE.Camera} camera - Camera used in rendering.
5034    * @returns {Array<number>} 2D canvas coordinates if the basic point represents a 3D point
5035    * in front of the camera, otherwise null.
5036    */
5037   basicToCanvasSafe(
5038     basicX: number,
5039     basicY: number,
5040     container: {
5041       offsetHeight: number,
5042       offsetWidth: number,
5043       ...
5044     },
5045     transform: Transform
5046   ): number[];
5047
5048   /**
5049    * Convert basic coordinates to viewport coordinates.
5050    * @description Transform origin and camera position needs to be the
5051    * equal for reliable return value.
5052    * @param {number} basicX - Basic X coordinate.
5053    * @param {number} basicY - Basic Y coordinate.
5054    * @param {Transform} transform - Transform of the image to unproject from.
5055    * @param {THREE.Camera} camera - Camera used in rendering.
5056    * @returns {Array<number>} 2D viewport coordinates.
5057    */
5058   basicToViewport(
5059     basicX: number,
5060     basicY: number,
5061     transform: Transform
5062   ): number[];
5063
5064   /**
5065    * Convert basic coordinates to viewport coordinates safely. If 3D point is
5066    * behind camera null will be returned.
5067    * @description Transform origin and camera position needs to be the
5068    * equal for reliable return value.
5069    * @param {number} basicX - Basic X coordinate.
5070    * @param {number} basicY - Basic Y coordinate.
5071    * @param {Transform} transform - Transform of the image to unproject from.
5072    * @param {THREE.Camera} camera - Camera used in rendering.
5073    * @returns {Array<number>} 2D viewport coordinates.
5074    */
5075   basicToViewportSafe(
5076     basicX: number,
5077     basicY: number,
5078     transform: Transform
5079   ): number[];
5080
5081   /**
5082    * Get canvas pixel position from event.
5083    * @param {Event} event - Event containing clientX and clientY properties.
5084    * @param {HTMLElement} element - HTML element.
5085    * @returns {Array<number>} 2D canvas coordinates.
5086    */
5087   canvasPosition(
5088     event: {
5089       clientX: number,
5090       clientY: number,
5091       ...
5092     },
5093     element: HTMLElement
5094   ): number[];
5095
5096   /**
5097    * Convert canvas coordinates to viewport coordinates.
5098    * @param {number} canvasX - Canvas X coordinate.
5099    * @param {number} canvasY - Canvas Y coordinate.
5100    * @param {HTMLElement} container - The viewer container.
5101    * @returns {Array<number>} 2D viewport coordinates.
5102    */
5103   canvasToViewport(
5104     canvasX: number,
5105     canvasY: number,
5106     container: {
5107       offsetHeight: number,
5108       offsetWidth: number,
5109       ...
5110     }
5111   ): number[];
5112
5113   /**
5114    * Determines the width and height of the container in canvas coordinates.
5115    * @param {HTMLElement} container - The viewer container.
5116    * @returns {Array<number>} 2D canvas coordinates.
5117    */
5118   containerToCanvas(container: {
5119     offsetHeight: number,
5120     offsetWidth: number,
5121     ...
5122   }): number[];
5123
5124   /**
5125    * Determine if an event occured inside an element.
5126    * @param {Event} event - Event containing clientX and clientY properties.
5127    * @param {HTMLElement} element - HTML element.
5128    * @returns {boolean} Value indicating if the event occured inside the element or not.
5129    */
5130   insideElement(
5131     event: {
5132       clientX: number,
5133       clientY: number,
5134       ...
5135     },
5136     element: HTMLElement
5137   ): boolean;
5138
5139   /**
5140    * Convert viewport coordinates to canvas coordinates.
5141    * @param {number} viewportX - Viewport X coordinate.
5142    * @param {number} viewportY - Viewport Y coordinate.
5143    * @param {HTMLElement} container - The viewer container.
5144    * @returns {Array<number>} 2D canvas coordinates.
5145    */
5146   viewportToCanvas(
5147     viewportX: number,
5148     viewportY: number,
5149     container: {
5150       offsetHeight: number,
5151       offsetWidth: number,
5152       ...
5153     }
5154   ): number[];
5155 }
5156 declare class PanService {
5157   constructor(
5158     graphService: GraphService,
5159     stateService: StateService,
5160     enabled?: boolean,
5161     graphCalculator?: GraphCalculator,
5162     spatial?: Spatial,
5163     viewportCoords?: ViewportCoords
5164   ): this;
5165   dispose(): void;
5166   enable(): void;
5167   disable(): void;
5168   start(): void;
5169   stop(): void;
5170 }
5171 declare class PlayService {
5172   static +sequenceSpeed: number;
5173   constructor(graphService: GraphService, stateService: StateService): this;
5174   playing: boolean;
5175   play(): void;
5176   dispose(): void;
5177   setDirection(direction: $Values<typeof NavigationDirection>): void;
5178   setSpeed(speed: number): void;
5179   stop(): void;
5180 }
5181 declare class Navigator {
5182   constructor(
5183     options: ViewerOptions,
5184     api?: APIWrapper,
5185     graphService?: GraphService,
5186     loadingService?: LoadingService,
5187     stateService?: StateService,
5188     cacheService?: CacheService,
5189     playService?: PlayService,
5190     panService?: PanService
5191   ): this;
5192   api: APIWrapper;
5193   cacheService: CacheService;
5194   graphService: GraphService;
5195   loadingService: LoadingService;
5196   panService: PanService;
5197   playService: PlayService;
5198   stateService: StateService;
5199   dispose(): void;
5200 }
5201 declare class SubscriptionHolder {
5202   unsubscribe(): void;
5203 }
5204 export interface IComponent {
5205   /**
5206    * Value indicating if the component is currently active.
5207    */
5208   +activated: boolean;
5209
5210   /**
5211    * Default configuration for the component.
5212    */
5213   +defaultConfiguration: ComponentConfiguration;
5214
5215   /**
5216    * The name of the component. Used when interacting with the
5217    * component through the Viewer's API.
5218    */
5219   +name: string;
5220
5221   /**
5222    * Configure the component.
5223    */
5224   configure(configuration: ComponentConfiguration): void;
5225 }
5226 /**
5227  * @event
5228  */
5229 export type ComponentEventType =
5230   | "geometrycreate"
5231   | "hover"
5232   | "markerdragend"
5233   | "markerdragstart"
5234   | "markerposition"
5235   | "playing"
5236   | "tagcreateend"
5237   | "tagcreatestart"
5238   | "tagmode"
5239   | "tags";
5240 declare class Component<TConfiguration: ComponentConfiguration>
5241   implements IEventEmitter, IComponent
5242 {
5243   static componentName: string;
5244   _activated: boolean;
5245   _container: Container;
5246   _name: string;
5247   _navigator: Navigator;
5248   +_subscriptions: SubscriptionHolder;
5249   constructor(name: string, container: Container, navigator: Navigator): this;
5250
5251   /**
5252    * Get activated.
5253    * @returns {boolean} Value indicating if the component is
5254    * currently active.
5255    */
5256   activated: boolean;
5257
5258   /**
5259    * Get default configuration.
5260    * @returns {TConfiguration} Default configuration for component.
5261    */
5262   defaultConfiguration: TConfiguration;
5263
5264   /**
5265    * Get name.
5266    * @description The name of the component. Used when interacting with the
5267    * component through the Viewer's API.
5268    */
5269   name: string;
5270
5271   /**
5272    * @ignore
5273    */
5274   activate(conf?: TConfiguration): void;
5275
5276   /**
5277    * Configure the component.
5278    * @param configuration Component configuration.
5279    */
5280   configure(configuration: ComponentConfiguration): void;
5281
5282   /**
5283    * @ignore
5284    */
5285   deactivate(): void;
5286
5287   /**
5288    * @inheritdoc
5289    */
5290   fire<T>(type: string, event: T): void;
5291
5292   /**
5293    * @inheritdoc
5294    */
5295   off<T>(type: string, handler: (event: T) => void): void;
5296
5297   /**
5298    * @inheritdoc
5299    */
5300   on<T>(type: string, handler: (event: T) => void): void;
5301
5302   /**
5303    * Detect the viewer's new width and height and resize the component's
5304    * rendered elements accordingly if applicable.
5305    * @ignore
5306    */
5307   resize(): void;
5308   _activate(): void;
5309   _deactivate(): void;
5310   _getDefaultConfiguration(): TConfiguration;
5311 }
5312 /**
5313  * @class BearingComponent
5314  * @classdesc Component for indicating bearing and field of view.
5315  * @example ```js
5316  * var viewer = new Viewer({ ... });
5317  * var bearingComponent = viewer.getComponent("bearing");
5318  * bearingComponent.configure({ size: ComponentSize.Small });
5319  * ```
5320  */
5321 declare class BearingComponent extends Component<BearingConfiguration> {
5322   static componentName: string;
5323
5324   /**
5325    * @ignore
5326    */
5327   constructor(name: string, container: Container, navigator: Navigator): this;
5328   _activate(): void;
5329   _deactivate(): void;
5330   _getDefaultConfiguration(): BearingConfiguration;
5331 }
5332 declare class CacheComponent extends Component<CacheConfiguration> {
5333   static componentName: string;
5334
5335   /**
5336    * @ignore
5337    */
5338   constructor(name: string, container: Container, navigator: Navigator): this;
5339   _activate(): void;
5340   _deactivate(): void;
5341   _getDefaultConfiguration(): CacheConfiguration;
5342 }
5343 /**
5344  * Interface for general component events.
5345  */
5346 export interface ComponentEvent {
5347   /**
5348    * The component object that fired the event.
5349    */
5350   target: IComponent;
5351
5352   /**
5353    * The event type.
5354    */
5355   type: ComponentEventType;
5356 }
5357 /**
5358  * Interface for component hover events.
5359  */
5360 export type ComponentHoverEvent = {
5361   /**
5362    * The image id corresponding to the element or object that
5363    * is being hovered. When the mouse leaves the element or
5364    * object the id will be null.
5365    */
5366   id: string,
5367   type: "hover",
5368   ...
5369 } & ComponentEvent;
5370
5371 /**
5372  * @class Geometry
5373  * @abstract
5374  * @classdesc Represents a geometry.
5375  */
5376 declare class Geometry {
5377   /**
5378    * Create a geometry.
5379    * @constructor
5380    * @ignore
5381    */
5382   constructor(): this;
5383
5384   /**
5385    * Get the 2D basic coordinates for the centroid of the geometry.
5386    * @returns {Array<number>} 2D basic coordinates representing the centroid.
5387    * @ignore
5388    */
5389   getCentroid2d(): number[];
5390
5391   /**
5392    * Get the 3D world coordinates for the centroid of the geometry.
5393    * @param {Transform} transform - The transform of the image related to the geometry.
5394    * @returns {Array<number>} 3D world coordinates representing the centroid.
5395    * @ignore
5396    */
5397   getCentroid3d(transform: Transform): number[];
5398
5399   /**
5400    * Set the 2D centroid of the geometry.
5401    * @param {Array<number>} value - The new value of the centroid in basic coordinates.
5402    * @param {Transform} transform - The transform of the image related to the geometry.
5403    * @ignore
5404    */
5405   setCentroid2d(value: number[], transform: Transform): void;
5406 }
5407 /**
5408  * Interface for component geometry events.
5409  */
5410 export type ComponentGeometryEvent = {
5411   /**
5412    * Geometry related to the event.
5413    */
5414   geometry: Geometry,
5415   type: "geometrycreate",
5416   ...
5417 } & ComponentEvent;
5418
5419 /**
5420  * @class Marker
5421  * @classdesc Represents an abstract marker class that should be extended
5422  * by marker implementations used in the marker component.
5423  */
5424 declare class Marker {
5425   constructor(id: string, lngLat: LngLat): this;
5426
5427   /**
5428    * Get id.
5429    * @returns {string} The id of the marker.
5430    */
5431   id: string;
5432
5433   /**
5434    * Get lngLat.
5435    * @returns {LngLat} The geographic coordinates of the marker.
5436    */
5437   lngLat: LngLat;
5438
5439   /**
5440    * @ignore
5441    */
5442   createGeometry(position: number[]): void;
5443
5444   /**
5445    * @ignore
5446    */
5447   disposeGeometry(): void;
5448
5449   /**
5450    * @ignore
5451    */
5452   lerpAltitude(alt: number, alpha: number): void;
5453
5454   /**
5455    * @ignore
5456    */
5457   updatePosition(position: number[], lngLat?: LngLat): void;
5458   _createGeometry(position: number[]): void;
5459   _disposeGeometry(): void;
5460 }
5461 /**
5462  * Interface for component marker events.
5463  */
5464 export type ComponentMarkerEvent = {
5465   /**
5466    * The marker that was affected by the event.
5467    */
5468   marker: Marker,
5469   type: "markerdragend" | "markerdragstart" | "markerposition",
5470   ...
5471 } & ComponentEvent;
5472
5473 /**
5474  * Interface for component play events.
5475  */
5476 export type ComponentPlayEvent = {
5477   /**
5478    * Value indiciating if the component is playing or not.
5479    */
5480   playing: boolean,
5481   type: "playing",
5482   ...
5483 } & ComponentEvent;
5484
5485 /**
5486  * Interface for component state events.
5487  * @example ```js
5488  * // The `hover` event is an example of a `ComponentStateEvent`.
5489  * // Set up an event listener on the direction component.
5490  * var directionComponent = viewer.getComponent('direction');
5491  * directionComponent.on('hover', function(e) {
5492  *   console.log('A hover event has occured');
5493  * });
5494  * ```
5495  */
5496 export type ComponentStateEvent = {
5497   type: "tagcreateend" | "tagcreatestart" | "tags",
5498   ...
5499 } & ComponentEvent;
5500
5501 /**
5502  * Interface for component tag mode events.
5503  */
5504 export type ComponentTagModeEvent = {
5505   /**
5506    * Value indicating the current tag mode of the component.
5507    */
5508   mode: $Values<typeof TagMode>,
5509   type: "tagmode",
5510   ...
5511 } & ComponentEvent;
5512
5513 /**
5514  * @class DirectionDOMRenderer
5515  * @classdesc DOM renderer for direction arrows.
5516  */
5517 declare class DirectionDOMRenderer {
5518   constructor(configuration: DirectionConfiguration, size: ViewportSize): this;
5519
5520   /**
5521    * Get needs render.
5522    * @returns {boolean} Value indicating whether render should be called.
5523    */
5524   needsRender: boolean;
5525
5526   /**
5527    * Renders virtual DOM elements.
5528    * @description Calling render resets the needs render property.
5529    */
5530   setEdges(edgeStatus: NavigationEdgeStatus, sequence: Sequence): void;
5531
5532   /**
5533    * Set image for which to show edges.
5534    * @param {Image} image
5535    */
5536   setImage(image: Image): void;
5537
5538   /**
5539    * Set the render camera to use for calculating rotations.
5540    * @param {RenderCamera} renderCamera
5541    */
5542   setRenderCamera(renderCamera: RenderCamera): void;
5543
5544   /**
5545    * Set configuration values.
5546    * @param {DirectionConfiguration} configuration
5547    */
5548   setConfiguration(configuration: DirectionConfiguration): void;
5549
5550   /**
5551    * Detect the element's width and height and resize
5552    * elements accordingly.
5553    * @param {ViewportSize} size Size of vßiewer container element.
5554    */
5555   resize(size: ViewportSize): void;
5556 }
5557 /**
5558  * @class DirectionComponent
5559  * @classdesc Component showing navigation arrows for steps and turns.
5560  */
5561 declare class DirectionComponent extends Component<DirectionConfiguration> {
5562   /**
5563    * @inheritdoc
5564    */
5565   static componentName: string;
5566
5567   /**
5568    * @ignore
5569    */
5570   constructor(
5571     name: string,
5572     container: Container,
5573     navigator: Navigator,
5574     directionDOMRenderer?: DirectionDOMRenderer
5575   ): this;
5576
5577   _activate(): void;
5578   _deactivate(): void;
5579   _getDefaultConfiguration(): DirectionConfiguration;
5580 }
5581 declare class HandlerBase<TConfiguration: ComponentConfiguration> {
5582   _component: Component<TConfiguration>;
5583   _container: Container;
5584   _navigator: Navigator;
5585   _enabled: boolean;
5586
5587   /**
5588    * @ignore
5589    */
5590   constructor(
5591     component: Component<TConfiguration>,
5592     container: Container,
5593     navigator: Navigator
5594   ): this;
5595
5596   /**
5597    * Returns a Boolean indicating whether the interaction is enabled.
5598    * @returns {boolean} `true` if the interaction is enabled.
5599    */
5600   isEnabled: boolean;
5601
5602   /**
5603    * Enables the interaction.
5604    * @example ```js
5605    * <component-name>.<handler-name>.enable();
5606    * ```
5607    */
5608   enable(): void;
5609
5610   /**
5611    * Disables the interaction.
5612    * @example ```js
5613    * <component-name>.<handler-name>.disable();
5614    * ```
5615    */
5616   disable(): void;
5617   _enable(): void;
5618   _disable(): void;
5619   _getConfiguration(enable: boolean): TConfiguration;
5620 }
5621 /**
5622  * The `KeySequenceNavigationHandler` allows the user to navigate through a sequence using the
5623  * following key commands:
5624  *
5625  * `ALT` + `Up Arrow`: Navigate to next image in the sequence.
5626  * `ALT` + `Down Arrow`: Navigate to previous image in sequence.
5627  * @example ```js
5628  * var keyboardComponent = viewer.getComponent("keyboard");
5629  *
5630  * keyboardComponent.keySequenceNavigation.disable();
5631  * keyboardComponent.keySequenceNavigation.enable();
5632  *
5633  * var isEnabled = keyboardComponent.keySequenceNavigation.isEnabled;
5634  * ```
5635  */
5636 declare class KeySequenceNavigationHandler
5637   extends HandlerBase<KeyboardConfiguration>
5638 {
5639   _enable(): void;
5640   _disable(): void;
5641   _getConfiguration(enable: boolean): KeyboardConfiguration;
5642 }
5643 /**
5644  * The `KeySpatialNavigationHandler` allows the user to navigate through a sequence using the
5645  * following key commands:
5646  *
5647  * `Up Arrow`: Step forward.
5648  * `Down Arrow`: Step backward.
5649  * `Left Arrow`: Step to the left.
5650  * `Rigth Arrow`: Step to the right.
5651  * `SHIFT` + `Down Arrow`: Turn around.
5652  * `SHIFT` + `Left Arrow`: Turn to the left.
5653  * `SHIFT` + `Rigth Arrow`: Turn to the right.
5654  * @example ```js
5655  * var keyboardComponent = viewer.getComponent("keyboard");
5656  *
5657  * keyboardComponent.keySpatialNavigation.disable();
5658  * keyboardComponent.keySpatialNavigation.enable();
5659  *
5660  * var isEnabled = keyboardComponent.keySpatialNavigation.isEnabled;
5661  * ```
5662  */
5663 declare class KeySpatialNavigationHandler
5664   extends HandlerBase<KeyboardConfiguration>
5665 {
5666   /**
5667    * @ignore
5668    */
5669   constructor(
5670     component: Component<KeyboardConfiguration>,
5671     container: Container,
5672     navigator: Navigator,
5673     spatial: Spatial
5674   ): this;
5675   _enable(): void;
5676   _disable(): void;
5677   _getConfiguration(enable: boolean): KeyboardConfiguration;
5678 }
5679 /**
5680  * The `KeyZoomHandler` allows the user to zoom in and out using the
5681  * following key commands:
5682  *
5683  * `+`: Zoom in.
5684  * `-`: Zoom out.
5685  * @example ```js
5686  * var keyboardComponent = viewer.getComponent("keyboard");
5687  *
5688  * keyboardComponent.keyZoom.disable();
5689  * keyboardComponent.keyZoom.enable();
5690  *
5691  * var isEnabled = keyboardComponent.keyZoom.isEnabled;
5692  * ```
5693  */
5694 declare class KeyZoomHandler extends HandlerBase<KeyboardConfiguration> {
5695   /**
5696    * @ignore
5697    */
5698   constructor(
5699     component: Component<KeyboardConfiguration>,
5700     container: Container,
5701     navigator: Navigator,
5702     viewportCoords: ViewportCoords
5703   ): this;
5704   _enable(): void;
5705   _disable(): void;
5706   _getConfiguration(enable: boolean): KeyboardConfiguration;
5707 }
5708 /**
5709  * The `KeyPlayHandler` allows the user to control the play behavior
5710  * using the following key commands:
5711  *
5712  * `Spacebar`: Start or stop playing.
5713  * `SHIFT` + `D`: Switch direction.
5714  * `<`: Decrease speed.
5715  * `>`: Increase speed.
5716  * @example ```js
5717  * var keyboardComponent = viewer.getComponent("keyboard");
5718  *
5719  * keyboardComponent.keyPlay.disable();
5720  * keyboardComponent.keyPlay.enable();
5721  *
5722  * var isEnabled = keyboardComponent.keyPlay.isEnabled;
5723  * ```
5724  */
5725 declare class KeyPlayHandler extends HandlerBase<KeyboardConfiguration> {
5726   _enable(): void;
5727   _disable(): void;
5728   _getConfiguration(enable: boolean): KeyboardConfiguration;
5729 }
5730 /**
5731  * @class KeyboardComponent
5732  * @classdesc Component for keyboard event handling.
5733  *
5734  * To retrive and use the keyboard component
5735  * @example ```js
5736  * var viewer = new Viewer({ ... });
5737  *
5738  * var keyboardComponent = viewer.getComponent("keyboard");
5739  * ```
5740  */
5741 declare class KeyboardComponent extends Component<KeyboardConfiguration> {
5742   static componentName: string;
5743
5744   /**
5745    * @ignore
5746    */
5747   constructor(name: string, container: Container, navigator: Navigator): this;
5748
5749   /**
5750    * Get key play.
5751    * @returns {KeyPlayHandler} The key play handler.
5752    */
5753   keyPlay: KeyPlayHandler;
5754
5755   /**
5756    * Get key sequence navigation.
5757    * @returns {KeySequenceNavigationHandler} The key sequence navigation handler.
5758    */
5759   keySequenceNavigation: KeySequenceNavigationHandler;
5760
5761   /**
5762    * Get spatial.
5763    * @returns {KeySpatialNavigationHandler} The spatial handler.
5764    */
5765   keySpatialNavigation: KeySpatialNavigationHandler;
5766
5767   /**
5768    * Get key zoom.
5769    * @returns {KeyZoomHandler} The key zoom handler.
5770    */
5771   keyZoom: KeyZoomHandler;
5772   _activate(): void;
5773   _deactivate(): void;
5774   _getDefaultConfiguration(): KeyboardConfiguration;
5775 }
5776 /**
5777  * @interface CircleMarkerOptions
5778  *
5779  * Interface that represents the options for configuring a `CircleMarker`.
5780  */
5781 export interface CircleMarkerOptions {
5782   /**
5783    * The color of the marker.
5784    * @default "#fff"
5785    */
5786   color?: number | string;
5787
5788   /**
5789    * The opacity of the marker.
5790    * @default 0.4
5791    */
5792   opacity?: number;
5793
5794   /**
5795    * The radius of the circle in meters.
5796    * @default 1
5797    */
5798   radius?: number;
5799 }
5800 /**
5801  * @class CircleMarker
5802  * @classdesc Non-interactive marker with a flat circle shape. The circle
5803  * marker can not be configured to be interactive.
5804  *
5805  * Circle marker properties can not be updated after creation.
5806  *
5807  * To create and add one `CircleMarker` with default configuration
5808  * and one with configuration use
5809  * @example ```js
5810  * var defaultMarker = new CircleMarker(
5811  *     "id-1",
5812  *     { lat: 0, lng: 0, });
5813  *
5814  * var configuredMarker = new CircleMarker(
5815  *     "id-2",
5816  *     { lat: 0, lng: 0, },
5817  *     {
5818  *         color: "#0ff",
5819  *         opacity: 0.3,
5820  *         radius: 0.7,
5821  *     });
5822  *
5823  * markerComponent.add([defaultMarker, configuredMarker]);
5824  * ```
5825  */
5826 declare class CircleMarker extends Marker {
5827   constructor(id: string, lngLat: LngLat, options?: CircleMarkerOptions): this;
5828   _createGeometry(position: number[]): void;
5829   _disposeGeometry(): void;
5830 }
5831 /**
5832  * @class MarkerComponent
5833  * @classdesc Component for showing and editing 3D marker objects.
5834  *
5835  * The `add` method is used for adding new markers or replacing
5836  * markers already in the set.
5837  *
5838  * If a marker already in the set has the same
5839  * id as one of the markers added, the old marker will be removed and
5840  * the added marker will take its place.
5841  *
5842  * It is not possible to update markers in the set by updating any properties
5843  * directly on the marker object. Markers need to be replaced by
5844  * re-adding them for updates to geographic position or configuration
5845  * to be reflected.
5846  *
5847  * Markers added to the marker component can be either interactive
5848  * or non-interactive. Different marker types define their behavior.
5849  * Markers with interaction support can be configured with options
5850  * to respond to dragging inside the viewer and be detected when
5851  * retrieving markers from pixel points with the `getMarkerIdAt` method.
5852  *
5853  * To retrive and use the marker component
5854  * @example ```js
5855  * var viewer = new Viewer({ component: { marker: true }, ... });
5856  *
5857  * var markerComponent = viewer.getComponent("marker");
5858  * ```
5859  */
5860 declare class MarkerComponent extends Component<MarkerConfiguration> {
5861   static componentName: string;
5862
5863   /**
5864    * @ignore
5865    */
5866   constructor(name: string, container: Container, navigator: Navigator): this;
5867
5868   /**
5869    * Add markers to the marker set or replace markers in the marker set.
5870    * @description If a marker already in the set has the same
5871    * id as one of the markers added, the old marker will be removed
5872    * the added marker will take its place.
5873    *
5874    * Any marker inside the visible bounding bbox
5875    * will be initialized and placed in the viewer.
5876    * @param {Array<Marker>} markers - Markers to add.
5877    * @example ```js
5878    * markerComponent.add([marker1, marker2]);
5879    * ```
5880    */
5881   add(markers: Marker[]): void;
5882
5883   /**
5884    * Returns the marker in the marker set with the specified id, or
5885    * undefined if the id matches no marker.
5886    * @param {string} markerId - Id of the marker.
5887    * @example ```js
5888    * var marker = markerComponent.get("markerId");
5889    * ```
5890    */
5891   get(markerId: string): Marker;
5892
5893   /**
5894    * Returns an array of all markers.
5895    * @example ```js
5896    * var markers = markerComponent.getAll();
5897    * ```
5898    */
5899   getAll(): Marker[];
5900
5901   /**
5902    * Returns the id of the interactive marker closest to the current camera
5903    * position at the specified point.
5904    * @description Notice that the pixelPoint argument requires x, y
5905    * coordinates from pixel space.
5906    *
5907    * With this function, you can use the coordinates provided by mouse
5908    * events to get information out of the marker component.
5909    *
5910    * If no interactive geometry of an interactive marker exist at the pixel
5911    * point, `null` will be returned.
5912    * @param {Array<number>} pixelPoint - Pixel coordinates on the viewer element.
5913    * @returns {string} Id of the interactive marker closest to the camera. If no
5914    * interactive marker exist at the pixel point, `null` will be returned.
5915    * @example ```js
5916    * markerComponent.getMarkerIdAt([100, 100])
5917    *     .then((markerId) => { console.log(markerId); });
5918    * ```
5919    */
5920   getMarkerIdAt(pixelPoint: number[]): Promise<string>;
5921
5922   /**
5923    * Check if a marker exist in the marker set.
5924    * @param {string} markerId - Id of the marker.
5925    * @example ```js
5926    * var markerExists = markerComponent.has("markerId");
5927    * ```
5928    */
5929   has(markerId: string): boolean;
5930
5931   /**
5932    * Remove markers with the specified ids from the marker set.
5933    * @param {Array<string>} markerIds - Ids for markers to remove.
5934    * @example ```js
5935    * markerComponent.remove(["id-1", "id-2"]);
5936    * ```
5937    */
5938   remove(markerIds: string[]): void;
5939
5940   /**
5941    * Remove all markers from the marker set.
5942    * @example ```js
5943    * markerComponent.removeAll();
5944    * ```
5945    */
5946   removeAll(): void;
5947   _activate(): void;
5948   _deactivate(): void;
5949   _getDefaultConfiguration(): MarkerConfiguration;
5950 }
5951 /**
5952  * @interface SimpleMarkerOptions
5953  *
5954  * Interface that represents the options for configuring a `SimpleMarker`.
5955  */
5956 export interface SimpleMarkerOptions {
5957   /**
5958    * The color of the ball inside the marker.
5959    * @default "#f00"
5960    */
5961   ballColor?: number | string;
5962
5963   /**
5964    * The opacity of the ball inside the marker.
5965    * @default 0.8
5966    */
5967   ballOpacity?: number;
5968
5969   /**
5970    * The color of the ice creame shape.
5971    * @default "#f00"
5972    */
5973   color?: number | string;
5974
5975   /**
5976    * Value indicating if the marker should be interactive or not.
5977    * @description If the marker is configured to be interactive
5978    * it will be draggable in the viewer and retrievable with the
5979    * `getMarkerIdAt` method on the `MarkerComponent`.
5980    * @default false
5981    */
5982   interactive?: boolean;
5983
5984   /**
5985    * The opacity of the ice creame shape.
5986    * @default 0.4
5987    */
5988   opacity?: number;
5989
5990   /**
5991    * The radius of the ice cream shape in meters.
5992    * @default 1
5993    */
5994   radius?: number;
5995 }
5996 /**
5997  * @class SimpleMarker
5998  * @classdesc Interactive marker with ice cream shape. The sphere
5999  * inside the ice cream can be configured to be interactive.
6000  *
6001  * Simple marker properties can not be updated after creation.
6002  *
6003  * To create and add one `SimpleMarker` with default configuration
6004  * (non-interactive) and one interactive with configuration use
6005  * @example ```js
6006  * var defaultMarker = new SimpleMarker(
6007  *     "id-1",
6008  *     { lat: 0, lng: 0, });
6009  *
6010  * var interactiveMarker = new SimpleMarker(
6011  *     "id-2",
6012  *     { lat: 0, lng: 0, },
6013  *     {
6014  *         ballColor: "#00f",
6015  *         ballOpacity: 0.5,
6016  *         color: "#00f",
6017  *         interactive: true,
6018  *         opacity: 0.3,
6019  *         radius: 0.7,
6020  *     });
6021  *
6022  * markerComponent.add([defaultMarker, interactiveMarker]);
6023  * ```
6024  */
6025 declare class SimpleMarker extends Marker {
6026   constructor(id: string, lngLat: LngLat, options?: SimpleMarkerOptions): this;
6027   _createGeometry(position: number[]): void;
6028   _disposeGeometry(): void;
6029 }
6030 /**
6031  * The `DragPanHandler` allows the user to pan the viewer image by clicking and dragging the cursor.
6032  * @example ```js
6033  * var pointerComponent = viewer.getComponent("pointer");
6034  *
6035  * pointerComponent.dragPan.disable();
6036  * pointerComponent.dragPan.enable();
6037  *
6038  * var isEnabled = pointerComponent.dragPan.isEnabled;
6039  * ```
6040  */
6041 declare class DragPanHandler extends HandlerBase<PointerConfiguration> {
6042   /**
6043    * @ignore
6044    */
6045   constructor(
6046     component: Component<PointerConfiguration>,
6047     container: Container,
6048     navigator: Navigator,
6049     viewportCoords: ViewportCoords,
6050     spatial: Spatial
6051   ): this;
6052   _enable(): void;
6053   _disable(): void;
6054   _getConfiguration(enable: boolean): PointerConfiguration;
6055 }
6056 declare class EarthControlHandler extends HandlerBase<PointerConfiguration> {
6057   /**
6058    * @ignore
6059    */
6060   constructor(
6061     component: Component<PointerConfiguration>,
6062     container: Container,
6063     navigator: Navigator,
6064     viewportCoords: ViewportCoords,
6065     spatial: Spatial
6066   ): this;
6067   _enable(): void;
6068   _disable(): void;
6069   _getConfiguration(): PointerConfiguration;
6070 }
6071 /**
6072  * The `ScrollZoomHandler` allows the user to zoom the viewer image by scrolling.
6073  * @example ```js
6074  * var pointerComponent = viewer.getComponent("pointer");
6075  *
6076  * pointerComponent.scrollZoom.disable();
6077  * pointerComponent.scrollZoom.enable();
6078  *
6079  * var isEnabled = pointerComponent.scrollZoom.isEnabled;
6080  * ```
6081  */
6082 declare class ScrollZoomHandler extends HandlerBase<PointerConfiguration> {
6083   /**
6084    * @ignore
6085    */
6086   constructor(
6087     component: Component<PointerConfiguration>,
6088     container: Container,
6089     navigator: Navigator,
6090     viewportCoords: ViewportCoords
6091   ): this;
6092   _enable(): void;
6093   _disable(): void;
6094   _getConfiguration(enable: boolean): PointerConfiguration;
6095 }
6096 /**
6097  * The `TouchZoomHandler` allows the user to zoom the viewer image by pinching on a touchscreen.
6098  * @example ```js
6099  * var pointerComponent = viewer.getComponent("pointer");
6100  *
6101  * pointerComponent.touchZoom.disable();
6102  * pointerComponent.touchZoom.enable();
6103  *
6104  * var isEnabled = pointerComponent.touchZoom.isEnabled;
6105  * ```
6106  */
6107 declare class TouchZoomHandler extends HandlerBase<PointerConfiguration> {
6108   /**
6109    * @ignore
6110    */
6111   constructor(
6112     component: Component<PointerConfiguration>,
6113     container: Container,
6114     navigator: Navigator,
6115     viewportCoords: ViewportCoords
6116   ): this;
6117   _enable(): void;
6118   _disable(): void;
6119   _getConfiguration(enable: boolean): PointerConfiguration;
6120 }
6121 /**
6122  * @class PointerComponent
6123  * @classdesc Component handling mouse, pen, and touch events for camera movement.
6124  *
6125  * To retrive and use the mouse component
6126  * @example ```js
6127  * var viewer = new Viewer({ ... });
6128  *
6129  * var pointerComponent = viewer.getComponent("pointer");
6130  * ```
6131  */
6132 declare class PointerComponent extends Component<PointerConfiguration> {
6133   /**
6134    * @inheritdoc
6135    */
6136   static componentName: string;
6137
6138   /**
6139    * @ignore
6140    */
6141   constructor(name: string, container: Container, navigator: Navigator): this;
6142
6143   /**
6144    * Get drag pan.
6145    * @returns {DragPanHandler} The drag pan handler.
6146    */
6147   dragPan: DragPanHandler;
6148
6149   /**
6150    * Get earth control.
6151    * @returns {EarthControlHandler} The earth control handler.
6152    */
6153   earthControl: EarthControlHandler;
6154
6155   /**
6156    * Get scroll zoom.
6157    * @returns {ScrollZoomHandler} The scroll zoom handler.
6158    */
6159   scrollZoom: ScrollZoomHandler;
6160
6161   /**
6162    * Get touch zoom.
6163    * @returns {TouchZoomHandler} The touch zoom handler.
6164    */
6165   touchZoom: TouchZoomHandler;
6166   _activate(): void;
6167   _deactivate(): void;
6168   _getDefaultConfiguration(): PointerConfiguration;
6169 }
6170 /**
6171  * Interface for the popup offset with respect to its anchor point.
6172  * @description An object of number arrays specifying an offset for
6173  * each float direction. Negative offsets indicate left and up.
6174  * @interface
6175  * @example ```js
6176  * var offset = = {
6177  *     bottom: [0, 10],
6178  *     bottomLeft: [-10, 10],
6179  *     bottomRight: [10, 10],
6180  *     center: [0, 0],
6181  *     left: [-10, 0],
6182  *     right: [10, 0],
6183  *     top: [0, -10],
6184  *     topLeft: [-10, -10],
6185  *     topRight: [10, -10],
6186  * }
6187  *
6188  * var popup = new Popup({ offset: offset });
6189  * ```
6190  */
6191 export interface PopupOffset {
6192   bottom: number[];
6193   bottomLeft: number[];
6194   bottomRight: number[];
6195   center: number[];
6196   left: number[];
6197   right: number[];
6198   top: number[];
6199   topLeft: number[];
6200   topRight: number[];
6201 }
6202 /**
6203  * Interface for the options that define behavior and
6204  * appearance of a popup.
6205  * @interface
6206  */
6207 export interface PopupOptions {
6208   /**
6209    * Specify if the popup should capture pointer events.
6210    * @description If the popup is specified to not capture
6211    * pointer events the provided content can still override
6212    * this behavior for the individual content HTML elements
6213    * by specifying the appropriate CSS.
6214    * @default true
6215    */
6216   capturePointer?: boolean;
6217
6218   /**
6219    * Specify that the popup should not have any tooltip
6220    * like visuals around the provided content.
6221    * @default false
6222    */
6223   clean?: boolean;
6224
6225   /**
6226    * The direction in which the popup floats with respect to the
6227    * anchor point or points. If no value is supplied the popup
6228    * will change float automatically based on the its position
6229    * in the viewport so that as much of its area as possible is
6230    * visible.
6231    * @description For automatic floating (undefined) the popup
6232    * will float in eight directions around a point or a position
6233    * in a rect. When a rectangle is set without a position option
6234    * specified, the popup will float outward from the rectangle
6235    * center based on the side it is currently rendered in. The
6236    * default floating direction is to the bottom for both points
6237    * and rectangles.
6238    * @default undefined
6239    */
6240   float?: $Values<typeof Alignment>;
6241
6242   /**
6243    * A pixel offset applied to the popup's location specfied as:
6244    *
6245    * - A single number in pixels in the float direction that the popup
6246    * will be translated with respect to the current anchor point.
6247    *
6248    * - An object of number arrays specifying an offset for
6249    * each float direction. Negative offsets indicate left and up.
6250    * @default 0
6251    */
6252   offset?: number | PopupOffset;
6253
6254   /**
6255    * Opacity of the popup visuals.
6256    * @default 1
6257    */
6258   opacity?: number;
6259
6260   /**
6261    * The popup position in a rectangle (does not apply to points).
6262    * When not set the popup will change position automatically
6263    * based on the viewport so that as much of it as possible is
6264    * visible.
6265    * @default undefined
6266    */
6267   position?: $Values<typeof Alignment>;
6268 }
6269 /**
6270  * @class Popup
6271  * @classdesc [object Object],[object Object],[object Object]
6272  * @example ```js
6273  * var defaultSpan = document.createElement('span');
6274  * defaultSpan.innerHTML = 'hello default';
6275  *
6276  * var defaultPopup = new Popup();
6277  * defaultPopup.setDOMContent(defaultSpan);
6278  * defaultPopup.setBasicPoint([0.3, 0.3]);
6279  *
6280  * var cleanSpan = document.createElement('span');
6281  * cleanSpan.innerHTML = 'hello clean';
6282  *
6283  * var cleanPopup = new Popup({
6284  *     clean: true,
6285  *     float: Alignment.Top,
6286  *     offset: 10,
6287  *     opacity: 0.7,
6288  * });
6289  *
6290  * cleanPopup.setDOMContent(cleanSpan);
6291  * cleanPopup.setBasicPoint([0.6, 0.6]);
6292  *
6293  * popupComponent.add([defaultPopup, cleanPopup]);
6294  * ```
6295  * @description Implementation of API methods and API documentation inspired
6296  * by/used from https://github.com/mapbox/mapbox-gl-js/blob/v0.38.0/src/ui/popup.js
6297  */
6298 declare class Popup {
6299   constructor(
6300     options?: PopupOptions,
6301     viewportCoords?: ViewportCoords,
6302     dom?: DOM
6303   ): this;
6304
6305   /**
6306    * @description Internal method used by the component to
6307    * remove all references to the popup.
6308    * @ignore
6309    */
6310   remove(): void;
6311
6312   /**
6313    * Sets a 2D basic image coordinates point to the popup's anchor, and
6314    * moves the popup to it.
6315    * @description Overwrites any previously set point or rect.
6316    * @param {Array<number>} basicPoint - Point in 2D basic image coordinates.
6317    * @example ```js
6318    * var popup = new Popup();
6319    * popup.setText('hello image');
6320    * popup.setBasicPoint([0.3, 0.3]);
6321    *
6322    * popupComponent.add([popup]);
6323    * ```
6324    */
6325   setBasicPoint(basicPoint: number[]): void;
6326
6327   /**
6328    * Sets a 2D basic image coordinates rect to the popup's anchor, and
6329    * moves the popup to it.
6330    * @description Overwrites any previously set point or rect.
6331    * @param {Array<number>} basicRect - Rect in 2D basic image
6332    * coordinates ([topLeftX, topLeftY, bottomRightX, bottomRightY]) .
6333    * @example ```js
6334    * var popup = new Popup();
6335    * popup.setText('hello image');
6336    * popup.setBasicRect([0.3, 0.3, 0.5, 0.6]);
6337    *
6338    * popupComponent.add([popup]);
6339    * ```
6340    */
6341   setBasicRect(basicRect: number[]): void;
6342
6343   /**
6344    * Sets the popup's content to the element provided as a DOM node.
6345    * @param {Node} htmlNode - A DOM node to be used as content for the popup.
6346    * @example ```js
6347    * var div = document.createElement('div');
6348    * div.innerHTML = 'hello image';
6349    *
6350    * var popup = new Popup();
6351    * popup.setDOMContent(div);
6352    * popup.setBasicPoint([0.3, 0.3]);
6353    *
6354    * popupComponent.add([popup]);
6355    * ```
6356    */
6357   setDOMContent(htmlNode: Node): void;
6358
6359   /**
6360    * Sets the popup's content to the HTML provided as a string.
6361    * @description [object Object],[object Object],[object Object]
6362    * @param {string} html - A string representing HTML content for the popup.
6363    * @example ```js
6364    * var popup = new Popup();
6365    * popup.setHTML('<div>hello image</div>');
6366    * popup.setBasicPoint([0.3, 0.3]);
6367    *
6368    * popupComponent.add([popup]);
6369    * ```
6370    */
6371   setHTML(html: string): void;
6372
6373   /**
6374    * Sets the popup's content to a string of text.
6375    * @description This function creates a Text node in the DOM, so it cannot insert raw HTML.
6376    * Use this method for security against XSS if the popup content is user-provided.
6377    * @param {string} text - Textual content for the popup.
6378    * @example ```js
6379    * var popup = new Popup();
6380    * popup.setText('hello image');
6381    * popup.setBasicPoint([0.3, 0.3]);
6382    *
6383    * popupComponent.add([popup]);
6384    * ```
6385    */
6386   setText(text: string): void;
6387
6388   /**
6389    * @description Internal method for attaching the popup to
6390    * its parent container so that it is rendered in the DOM tree.
6391    * @ignore
6392    */
6393   setParentContainer(parentContainer: HTMLElement): void;
6394
6395   /**
6396    * @description Internal method for updating the rendered
6397    * position of the popup called by the popup component.
6398    * @ignore
6399    */
6400   update(
6401     renderCamera: RenderCamera,
6402     size: ViewportSize,
6403     transform: Transform
6404   ): void;
6405 }
6406 /**
6407  * @class PopupComponent
6408  * @classdesc Component for showing HTML popup objects.
6409  *
6410  * The `add` method is used for adding new popups. Popups are removed by reference.
6411  *
6412  * It is not possible to update popups in the set by updating any properties
6413  * directly on the popup object. Popups need to be replaced by
6414  * removing them and creating new ones with relevant changed properties and
6415  * adding those instead.
6416  *
6417  * Popups are only relevant to a single image because they are based on
6418  * 2D basic image coordinates. Popups related to a certain image should
6419  * be removed when the viewer is moved to another image.
6420  *
6421  * To retrive and use the popup component
6422  * @example ```js
6423  * var viewer = new Viewer({ component: { popup: true }, ... });
6424  *
6425  * var popupComponent = viewer.getComponent("popup");
6426  * ```
6427  */
6428 declare class PopupComponent extends Component<ComponentConfiguration> {
6429   static componentName: string;
6430
6431   /**
6432    * @ignore
6433    */
6434   constructor(
6435     name: string,
6436     container: Container,
6437     navigator: Navigator,
6438     dom?: DOM
6439   ): this;
6440
6441   /**
6442    * Add popups to the popups set.
6443    * @description Adding a new popup never replaces an old one
6444    * because they are stored by reference. Adding an already
6445    * existing popup has no effect.
6446    * @param {Array<Popup>} popups - Popups to add.
6447    * @example ```js
6448    * popupComponent.add([popup1, popup2]);
6449    * ```
6450    */
6451   add(popups: Popup[]): void;
6452
6453   /**
6454    * Returns an array of all popups.
6455    * @example ```js
6456    * var popups = popupComponent.getAll();
6457    * ```
6458    */
6459   getAll(): Popup[];
6460
6461   /**
6462    * Remove popups based on reference from the popup set.
6463    * @param {Array<Popup>} popups - Popups to remove.
6464    * @example ```js
6465    * popupComponent.remove([popup1, popup2]);
6466    * ```
6467    */
6468   remove(popups: Popup[]): void;
6469
6470   /**
6471    * Remove all popups from the popup set.
6472    * @example ```js
6473    * popupComponent.removeAll();
6474    * ```
6475    */
6476   removeAll(): void;
6477   _activate(): void;
6478   _deactivate(): void;
6479   _getDefaultConfiguration(): ComponentConfiguration;
6480 }
6481 declare class SequenceDOMRenderer {
6482   constructor(container: Container): this;
6483   activate(): void;
6484   deactivate(): void;
6485   getContainerWidth(
6486     size: ViewportSize,
6487     configuration: SequenceConfiguration
6488   ): number;
6489 }
6490 /**
6491  * @class SequenceComponent
6492  * @classdesc Component showing navigation arrows for sequence directions
6493  * as well as playing button. Exposes an API to start and stop play.
6494  */
6495 declare class SequenceComponent extends Component<SequenceConfiguration> {
6496   /**
6497    * @inheritdoc
6498    */
6499   static componentName: string;
6500   constructor(
6501     name: string,
6502     container: Container,
6503     navigator: Navigator,
6504     renderer?: SequenceDOMRenderer
6505   ): this;
6506
6507   /**
6508    * Start playing.
6509    * @fires playing
6510    */
6511   play(): void;
6512
6513   /**
6514    * Stop playing.
6515    * @fires playing
6516    */
6517   stop(): void;
6518   _activate(): void;
6519   _deactivate(): void;
6520   _getDefaultConfiguration(): SequenceConfiguration;
6521 }
6522 /**
6523  * @class SliderComponent
6524  * @classdesc Component for comparing pairs of images. Renders
6525  * a slider for adjusting the curtain of the first image.
6526  *
6527  * Deactivate the sequence, direction and image plane
6528  * components when activating the slider component to avoid
6529  * interfering UI elements.
6530  *
6531  * To retrive and use the slider component
6532  * @example ```js
6533  * var viewer = new Viewer({ ... });
6534  *
6535  * viewer.deactivateComponent("image");
6536  * viewer.deactivateComponent("direction");
6537  * viewer.deactivateComponent("sequence");
6538  *
6539  * viewer.activateComponent("slider");
6540  *
6541  * var sliderComponent = viewer.getComponent("slider");
6542  * ```
6543  */
6544 declare class SliderComponent extends Component<SliderConfiguration> {
6545   static componentName: string;
6546
6547   /**
6548    * @ignore
6549    */
6550   constructor(
6551     name: string,
6552     container: Container,
6553     navigator: Navigator,
6554     viewportCoords?: ViewportCoords
6555   ): this;
6556   _activate(): void;
6557   _deactivate(): void;
6558   _getDefaultConfiguration(): SliderConfiguration;
6559 }
6560 declare class SpatialComponent extends Component<SpatialConfiguration> {
6561   static componentName: string;
6562
6563   /**
6564    * @ignore
6565    */
6566   constructor(name: string, container: Container, navigator: Navigator): this;
6567
6568   /**
6569    * Returns the image id of the camera frame closest to the current
6570    * render camera position at the specified point.
6571    * @description Notice that the pixelPoint argument requires x, y
6572    * coordinates from pixel space.
6573    *
6574    * With this function, you can use the coordinates provided by mouse
6575    * events to get information out of the spatial component.
6576    *
6577    * If no camera frame exist at the pixel
6578    * point, `null` will be returned.
6579    * @param {Array<number>} pixelPoint - Pixel coordinates on
6580    * the viewer element.
6581    * @returns {string} Image id of the camera frame closest to
6582    * the camera. If no camera frame is intersected at the
6583    * pixel point, `null` will be returned.
6584    * @example ```js
6585    * spatialComponent.getFrameIdAt([100, 125])
6586    *     .then((imageId) => { console.log(imageId); });
6587    * ```
6588    */
6589   getFrameIdAt(pixelPoint: number[]): Promise<string>;
6590   _activate(): void;
6591   _deactivate(): void;
6592   _getDefaultConfiguration(): SpatialConfiguration;
6593 }
6594 declare class GeometryTagError extends MapillaryError {
6595   constructor(message?: string): this;
6596 }
6597 /**
6598  * @class PointGeometry
6599  * @classdesc Represents a point geometry in the 2D basic image coordinate system.
6600  * @example ```js
6601  * var basicPoint = [0.5, 0.7];
6602  * var pointGeometry = new PointGeometry(basicPoint);
6603  * ```
6604  */
6605 declare class PointGeometry extends Geometry {
6606   /**
6607    * Create a point geometry.
6608    * @constructor
6609    * @param {Array<number>} point - An array representing the basic coordinates of
6610    * the point.
6611    * @throws {GeometryTagError} Point coordinates must be valid basic coordinates.
6612    */
6613   constructor(point: number[]): this;
6614
6615   /**
6616    * Get point property.
6617    * @returns {Array<number>} Array representing the basic coordinates of the point.
6618    */
6619   point: number[];
6620
6621   /**
6622    * Get the 2D basic coordinates for the centroid of the point, i.e. the 2D
6623    * basic coordinates of the point itself.
6624    * @returns {Array<number>} 2D basic coordinates representing the centroid.
6625    * @ignore
6626    */
6627   getCentroid2d(): number[];
6628
6629   /**
6630    * Get the 3D world coordinates for the centroid of the point, i.e. the 3D
6631    * world coordinates of the point itself.
6632    * @param {Transform} transform - The transform of the image related to the point.
6633    * @returns {Array<number>} 3D world coordinates representing the centroid.
6634    * @ignore
6635    */
6636   getCentroid3d(transform: Transform): number[];
6637
6638   /**
6639    * Set the centroid of the point, i.e. the point coordinates.
6640    * @param {Array<number>} value - The new value of the centroid.
6641    * @param {Transform} transform - The transform of the image related to the point.
6642    * @ignore
6643    */
6644   setCentroid2d(value: number[], transform: Transform): void;
6645 }
6646 /**
6647  * @class PointsGeometry
6648  * @classdesc Represents a point set in the 2D basic image coordinate system.
6649  * @example ```js
6650  * var points = [[0.5, 0.3], [0.7, 0.3], [0.6, 0.5]];
6651  * var pointsGeometry = new PointsGeometry(points);
6652  * ```
6653  */
6654 declare class PointsGeometry extends Geometry {
6655   /**
6656    * Create a points geometry.
6657    * @constructor
6658    * @param {Array<Array<number>>} points - Array of 2D points on the basic coordinate
6659    * system. The number of points must be greater than or equal to two.
6660    * @throws {GeometryTagError} Point coordinates must be valid basic coordinates.
6661    */
6662   constructor(points: number[][]): this;
6663
6664   /**
6665    * Get points property.
6666    * @returns {Array<Array<number>>} Array of 2d points.
6667    */
6668   points: number[][];
6669
6670   /**
6671    * Add a point to the point set.
6672    * @param {Array<number>} point - Point to add.
6673    * @ignore
6674    */
6675   addPoint2d(point: number[]): void;
6676
6677   /**
6678    * Get the coordinates of a point from the point set representation of the geometry.
6679    * @param {number} index - Point index.
6680    * @returns {Array<number>} Array representing the 2D basic coordinates of the point.
6681    * @ignore
6682    */
6683   getPoint2d(index: number): number[];
6684
6685   /**
6686    * Remove a point from the point set.
6687    * @param {number} index - The index of the point to remove.
6688    * @ignore
6689    */
6690   removePoint2d(index: number): void;
6691
6692   /**
6693    * @ignore
6694    */
6695   setVertex2d(index: number, value: number[], transform: Transform): void;
6696
6697   /**
6698    * @ignore
6699    */
6700   setPoint2d(index: number, value: number[], transform: Transform): void;
6701
6702   /**
6703    * @ignore
6704    */
6705   getPoints3d(transform: Transform): number[][];
6706
6707   /**
6708    * @ignore
6709    */
6710   getPoint3d(index: number, transform: Transform): number[];
6711
6712   /**
6713    * @ignore
6714    */
6715   getPoints2d(): number[][];
6716
6717   /**
6718    * @ignore
6719    */
6720   getCentroid2d(transform?: Transform): number[];
6721
6722   /**
6723    * @ignore
6724    */
6725   getCentroid3d(transform: Transform): number[];
6726
6727   /**
6728    * @ignore
6729    */
6730   getRect2d(transform: Transform): number[];
6731
6732   /**
6733    * @ignore
6734    */
6735   setCentroid2d(value: number[], transform: Transform): void;
6736 }
6737 /**
6738  * @class VertexGeometry
6739  * @abstract
6740  * @classdesc Represents a vertex geometry.
6741  */
6742 declare class VertexGeometry extends Geometry {
6743   /**
6744    * Create a vertex geometry.
6745    * @constructor
6746    * @ignore
6747    */
6748   constructor(): this;
6749
6750   /**
6751    * Get the 3D coordinates for the vertices of the geometry with possibly
6752    * subsampled points along the lines.
6753    * @param {Transform} transform - The transform of the image related to
6754    * the geometry.
6755    * @returns {Array<Array<number>>} Polygon array of 3D world coordinates
6756    * representing the geometry.
6757    * @ignore
6758    */
6759   getPoints3d(transform: Transform): number[][];
6760
6761   /**
6762    * Get the polygon pole of inaccessibility, the most
6763    * distant internal point from the polygon outline.
6764    * @returns {Array<number>} 2D basic coordinates for the pole of inaccessibility.
6765    * @ignore
6766    */
6767   getPoleOfInaccessibility2d(): number[];
6768
6769   /**
6770    * Get the polygon pole of inaccessibility, the most
6771    * distant internal point from the polygon outline.
6772    * @param transform - The transform of the image related to
6773    * the geometry.
6774    * @returns {Array<number>} 3D world coordinates for the pole of inaccessibility.
6775    * @ignore
6776    */
6777   getPoleOfInaccessibility3d(transform: Transform): number[];
6778
6779   /**
6780    * Get the coordinates of a vertex from the polygon representation of the geometry.
6781    * @param {number} index - Vertex index.
6782    * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.
6783    * @ignore
6784    */
6785   getVertex2d(index: number): number[];
6786
6787   /**
6788    * Get a vertex from the polygon representation of the 3D coordinates for the
6789    * vertices of the geometry.
6790    * @param {number} index - Vertex index.
6791    * @param {Transform} transform - The transform of the image related to the geometry.
6792    * @returns {Array<number>} Array representing the 3D world coordinates of the vertex.
6793    * @ignore
6794    */
6795   getVertex3d(index: number, transform: Transform): number[];
6796
6797   /**
6798    * Get a polygon representation of the 2D basic coordinates for the vertices of the geometry.
6799    * @returns {Array<Array<number>>} Polygon array of 2D basic coordinates representing
6800    * the vertices of the geometry.
6801    * @ignore
6802    */
6803   getVertices2d(): number[][];
6804
6805   /**
6806    * Get a polygon representation of the 3D world coordinates for the vertices of the geometry.
6807    * @param {Transform} transform - The transform of the image related to the geometry.
6808    * @returns {Array<Array<number>>} Polygon array of 3D world coordinates representing
6809    * the vertices of the geometry.
6810    * @ignore
6811    */
6812   getVertices3d(transform: Transform): number[][];
6813
6814   /**
6815    * Get a flattend array of the 3D world coordinates for the
6816    * triangles filling the geometry.
6817    * @param {Transform} transform - The transform of the image related to the geometry.
6818    * @returns {Array<number>} Flattened array of 3D world coordinates of the triangles.
6819    * @ignore
6820    */
6821   getTriangles3d(transform: Transform): number[];
6822
6823   /**
6824    * Set the value of a vertex in the polygon representation of the geometry.
6825    * @description The polygon is defined to have the first vertex at the
6826    * bottom-left corner with the rest of the vertices following in clockwise order.
6827    * @param {number} index - The index of the vertex to be set.
6828    * @param {Array<number>} value - The new value of the vertex.
6829    * @param {Transform} transform - The transform of the image related to the geometry.
6830    * @ignore
6831    */
6832   setVertex2d(index: number, value: number[], transform: Transform): void;
6833
6834   /**
6835    * Finds the polygon pole of inaccessibility, the most distant internal
6836    * point from the polygon outline.
6837    * @param {Array<Array<number>>} points2d - 2d points of outline to triangulate.
6838    * @returns {Array<number>} Point of inaccessibility.
6839    * @ignore
6840    */
6841   _getPoleOfInaccessibility2d(points2d: number[][]): number[];
6842   _project(points2d: number[][], transform: Transform): number[][];
6843   _subsample(points2d: number[][], threshold?: number): number[][];
6844
6845   /**
6846    * Triangulates a 2d polygon and returns the triangle
6847    * representation as a flattened array of 3d points.
6848    * @param {Array<Array<number>>} points2d - 2d points of outline to triangulate.
6849    * @param {Array<Array<number>>} points3d - 3d points of outline corresponding to the 2d points.
6850    * @param {Array<Array<Array<number>>>} [holes2d] - 2d points of holes to triangulate.
6851    * @param {Array<Array<Array<number>>>} [holes3d] - 3d points of holes corresponding to the 2d points.
6852    * @returns {Array<number>} Flattened array of 3d points ordered based on the triangles.
6853    * @ignore
6854    */
6855   _triangulate(
6856     points2d: number[][],
6857     points3d: number[][],
6858     holes2d?: number[][][],
6859     holes3d?: number[][][]
6860   ): number[];
6861   _triangulateSpherical(
6862     points2d: number[][],
6863     holes2d: number[][][],
6864     transform: Transform
6865   ): number[];
6866   _unproject(
6867     points2d: number[][],
6868     transform: Transform,
6869     distance?: number
6870   ): number[][];
6871 }
6872 /**
6873  * @class PolygonGeometry
6874  * @classdesc Represents a polygon geometry in the 2D basic image coordinate system.
6875  * All polygons and holes provided to the constructor needs to be closed.
6876  * @example ```js
6877  * var basicPolygon = [[0.5, 0.3], [0.7, 0.3], [0.6, 0.5], [0.5, 0.3]];
6878  * var polygonGeometry = new PolygonGeometry(basicPolygon);
6879  * ```
6880  */
6881 declare class PolygonGeometry extends VertexGeometry {
6882   /**
6883    * Create a polygon geometry.
6884    * @constructor
6885    * @param {Array<Array<number>>} polygon - Array of polygon vertices. Must be closed.
6886    * @param {Array<Array<Array<number>>>} [holes] - Array of arrays of hole vertices.
6887    * Each array of holes vertices must be closed.
6888    * @throws {GeometryTagError} Polygon coordinates must be valid basic coordinates.
6889    */
6890   constructor(polygon: number[][], holes?: number[][][]): this;
6891
6892   /**
6893    * Get polygon property.
6894    * @returns {Array<Array<number>>} Closed 2d polygon.
6895    */
6896   polygon: number[][];
6897
6898   /**
6899    * Get holes property.
6900    * @returns {Array<Array<Array<number>>>} Holes of 2d polygon.
6901    */
6902   holes: number[][][];
6903
6904   /**
6905    * Add a vertex to the polygon by appending it after the last vertex.
6906    * @param {Array<number>} vertex - Vertex to add.
6907    * @ignore
6908    */
6909   addVertex2d(vertex: number[]): void;
6910
6911   /**
6912    * Get the coordinates of a vertex from the polygon representation of the geometry.
6913    * @param {number} index - Vertex index.
6914    * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.
6915    * @ignore
6916    */
6917   getVertex2d(index: number): number[];
6918
6919   /**
6920    * Remove a vertex from the polygon.
6921    * @param {number} index - The index of the vertex to remove.
6922    * @ignore
6923    */
6924   removeVertex2d(index: number): void;
6925
6926   /**
6927    * @ignore
6928    */
6929   setVertex2d(index: number, value: number[], transform: Transform): void;
6930
6931   /**
6932    * @ignore
6933    */
6934   setCentroid2d(value: number[], transform: Transform): void;
6935
6936   /**
6937    * @ignore
6938    */
6939   getPoints3d(transform: Transform): number[][];
6940
6941   /**
6942    * @ignore
6943    */
6944   getVertex3d(index: number, transform: Transform): number[];
6945
6946   /**
6947    * @ignore
6948    */
6949   getVertices2d(): number[][];
6950
6951   /**
6952    * @ignore
6953    */
6954   getVertices3d(transform: Transform): number[][];
6955
6956   /**
6957    * Get a polygon representation of the 3D coordinates for the vertices of each hole
6958    * of the geometry. Line segments between vertices will possibly be subsampled
6959    * resulting in a larger number of points than the total number of vertices.
6960    * @param {Transform} transform - The transform of the image related to the geometry.
6961    * @returns {Array<Array<Array<number>>>} Array of hole polygons in 3D world coordinates
6962    * representing the vertices of each hole of the geometry.
6963    * @ignore
6964    */
6965   getHolePoints3d(transform: Transform): number[][][];
6966
6967   /**
6968    * Get a polygon representation of the 3D coordinates for the vertices of each hole
6969    * of the geometry.
6970    * @param {Transform} transform - The transform of the image related to the geometry.
6971    * @returns {Array<Array<Array<number>>>} Array of hole polygons in 3D world coordinates
6972    * representing the vertices of each hole of the geometry.
6973    * @ignore
6974    */
6975   getHoleVertices3d(transform: Transform): number[][][];
6976
6977   /**
6978    * @ignore
6979    */
6980   getCentroid2d(): number[];
6981
6982   /**
6983    * @ignore
6984    */
6985   getCentroid3d(transform: Transform): number[];
6986
6987   /**
6988    * @ignore
6989    */
6990   get3dDomainTriangles3d(transform: Transform): number[];
6991
6992   /**
6993    * @ignore
6994    */
6995   getTriangles3d(transform: Transform): number[];
6996
6997   /**
6998    * @ignore
6999    */
7000   getPoleOfInaccessibility2d(): number[];
7001
7002   /**
7003    * @ignore
7004    */
7005   getPoleOfInaccessibility3d(transform: Transform): number[];
7006 }
7007 /**
7008  * @class RectGeometry
7009  * @classdesc Represents a rectangle geometry in the 2D basic image coordinate system.
7010  * @example ```js
7011  * var basicRect = [0.5, 0.3, 0.7, 0.4];
7012  * var rectGeometry = new RectGeometry(basicRect);
7013  * ```
7014  */
7015 declare class RectGeometry extends VertexGeometry {
7016   /**
7017    * Create a rectangle geometry.
7018    * @constructor
7019    * @param {Array<number>} rect - An array representing the top-left and bottom-right
7020    * corners of the rectangle in basic coordinates. Ordered according to [x0, y0, x1, y1].
7021    * @throws {GeometryTagError} Rectangle coordinates must be valid basic coordinates.
7022    */
7023   constructor(rect: number[]): this;
7024
7025   /**
7026    * Get anchor index property.
7027    * @returns {number} Index representing the current anchor property if
7028    * achoring indexing has been initialized. If anchor indexing has not been
7029    * initialized or has been terminated undefined will be returned.
7030    * @ignore
7031    */
7032   anchorIndex: number;
7033
7034   /**
7035    * Get inverted property.
7036    * @returns {boolean} Boolean determining whether the rect geometry is
7037    * inverted. For spherical the rect geometrye may be inverted.
7038    * @ignore
7039    */
7040   inverted: boolean;
7041
7042   /**
7043    * Get rect property.
7044    * @returns {Array<number>} Array representing the top-left and bottom-right
7045    * corners of the rectangle in basic coordinates.
7046    */
7047   rect: number[];
7048
7049   /**
7050    * Initialize anchor indexing to enable setting opposite vertex.
7051    * @param {number} [index] - The index of the vertex to use as anchor.
7052    * @throws {GeometryTagError} If anchor indexing has already been initialized.
7053    * @throws {GeometryTagError} If index is not valid (0 to 3).
7054    * @ignore
7055    */
7056   initializeAnchorIndexing(index?: number): void;
7057
7058   /**
7059    * Terminate anchor indexing to disable setting pposite vertex.
7060    * @ignore
7061    */
7062   terminateAnchorIndexing(): void;
7063
7064   /**
7065    * Set the value of the vertex opposite to the anchor in the polygon
7066    * representation of the rectangle.
7067    * @description Setting the opposite vertex may change the anchor index.
7068    * @param {Array<number>} opposite - The new value of the vertex opposite to the anchor.
7069    * @param {Transform} transform - The transform of the image related to the rectangle.
7070    * @throws {GeometryTagError} When anchor indexing has not been initialized.
7071    * @ignore
7072    */
7073   setOppositeVertex2d(opposite: number[], transform: Transform): void;
7074
7075   /**
7076    * Set the value of a vertex in the polygon representation of the rectangle.
7077    * @description The polygon is defined to have the first vertex at the
7078    * bottom-left corner with the rest of the vertices following in clockwise order.
7079    * @param {number} index - The index of the vertex to be set.
7080    * @param {Array<number>} value - The new value of the vertex.
7081    * @param {Transform} transform - The transform of the image related to the rectangle.
7082    * @ignore
7083    */
7084   setVertex2d(index: number, value: number[], transform: Transform): void;
7085
7086   /**
7087    * @ignore
7088    */
7089   setCentroid2d(value: number[], transform: Transform): void;
7090
7091   /**
7092    * Get the 3D coordinates for the vertices of the rectangle with
7093    * interpolated points along the lines.
7094    * @param {Transform} transform - The transform of the image related to
7095    * the rectangle.
7096    * @returns {Array<Array<number>>} Polygon array of 3D world coordinates
7097    * representing the rectangle.
7098    * @ignore
7099    */
7100   getPoints3d(transform: Transform): number[][];
7101
7102   /**
7103    * Get the coordinates of a vertex from the polygon representation of the geometry.
7104    * @description The first vertex represents the bottom-left corner with the rest of
7105    * the vertices following in clockwise order. The method shifts the right side
7106    * coordinates of the rectangle by one unit to ensure that the vertices are ordered
7107    * clockwise.
7108    * @param {number} index - Vertex index.
7109    * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.
7110    * @ignore
7111    */
7112   getVertex2d(index: number): number[];
7113
7114   /**
7115    * Get the coordinates of a vertex from the polygon representation of the geometry.
7116    * @description The first vertex represents the bottom-left corner with the rest of
7117    * the vertices following in clockwise order. The coordinates will not be shifted
7118    * so they may not appear in clockwise order when layed out on the plane.
7119    * @param {number} index - Vertex index.
7120    * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.
7121    * @ignore
7122    */
7123   getNonAdjustedVertex2d(index: number): number[];
7124
7125   /**
7126    * Get a vertex from the polygon representation of the 3D coordinates for the
7127    * vertices of the geometry.
7128    * @description The first vertex represents the bottom-left corner with the rest of
7129    * the vertices following in clockwise order.
7130    * @param {number} index - Vertex index.
7131    * @param {Transform} transform - The transform of the image related to the geometry.
7132    * @returns {Array<Array<number>>} Polygon array of 3D world coordinates representing
7133    * the vertices of the geometry.
7134    * @ignore
7135    */
7136   getVertex3d(index: number, transform: Transform): number[];
7137
7138   /**
7139    * Get a polygon representation of the 2D basic coordinates for the vertices of the rectangle.
7140    * @description The first vertex represents the bottom-left corner with the rest of
7141    * the vertices following in clockwise order.
7142    * @returns {Array<Array<number>>} Polygon array of 2D basic coordinates representing
7143    * the rectangle vertices.
7144    * @ignore
7145    */
7146   getVertices2d(): number[][];
7147
7148   /**
7149    * Get a polygon representation of the 3D coordinates for the vertices of the rectangle.
7150    * @description The first vertex represents the bottom-left corner with the rest of
7151    * the vertices following in clockwise order.
7152    * @param {Transform} transform - The transform of the image related to the rectangle.
7153    * @returns {Array<Array<number>>} Polygon array of 3D world coordinates representing
7154    * the rectangle vertices.
7155    * @ignore
7156    */
7157   getVertices3d(transform: Transform): number[][];
7158
7159   /**
7160    * @ignore
7161    */
7162   getCentroid2d(): number[];
7163
7164   /**
7165    * @ignore
7166    */
7167   getCentroid3d(transform: Transform): number[];
7168
7169   /**
7170    * @ignore
7171    */
7172   getPoleOfInaccessibility2d(): number[];
7173
7174   /**
7175    * @ignore
7176    */
7177   getPoleOfInaccessibility3d(transform: Transform): number[];
7178
7179   /**
7180    * @ignore
7181    */
7182   getTriangles3d(transform: Transform): number[];
7183
7184   /**
7185    * Check if a particular bottom-right value is valid according to the current
7186    * rectangle coordinates.
7187    * @param {Array<number>} bottomRight - The bottom-right coordinates to validate
7188    * @returns {boolean} Value indicating whether the provided bottom-right coordinates
7189    * are valid.
7190    * @ignore
7191    */
7192   validate(bottomRight: number[]): boolean;
7193 }
7194 /**
7195  * @event
7196  */
7197 export type TagEventType = "click" | "geometry" | "tag";
7198 /**
7199  * Interface for tag state events.
7200  * @example ```js
7201  * var tag = new OutlineTag({ // tag options });
7202  * // Set an event listener
7203  * tag.on('tag', function() {
7204  *   console.log("A tag event has occurred.");
7205  * });
7206  * ```
7207  */
7208 export interface TagStateEvent {
7209   /**
7210    * The component object that fired the event.
7211    */
7212   target: Tag;
7213
7214   /**
7215    * The event type.
7216    */
7217   type: TagEventType;
7218 }
7219 /**
7220  * @class Tag
7221  * @abstract
7222  * @classdesc Abstract class representing the basic functionality of for a tag.
7223  */
7224 declare class Tag extends EventEmitter {
7225   _id: string;
7226   _geometry: Geometry;
7227
7228   /**
7229    * Create a tag.
7230    * @constructor
7231    * @param {string} id
7232    * @param {Geometry} geometry
7233    */
7234   constructor(id: string, geometry: Geometry): this;
7235
7236   /**
7237    * Get id property.
7238    * @returns {string}
7239    */
7240   id: string;
7241
7242   /**
7243    * Get geometry property.
7244    * @returns {Geometry} The geometry of the tag.
7245    */
7246   geometry: Geometry;
7247 }
7248 /**
7249  * Interface for the options that define the behavior and
7250  * appearance of the outline tag.
7251  * @interface
7252  */
7253 export interface ExtremePointTagOptions {
7254   /**
7255    * Indicate whether the tag geometry should be editable.
7256    * @description Polygon tags with two dimensional domain
7257    * are never editable.
7258    * @default false
7259    */
7260   editable?: boolean;
7261
7262   /**
7263    * Color for the interior fill as a hexadecimal number.
7264    * @default 0xFFFFFF
7265    */
7266   fillColor?: number;
7267
7268   /**
7269    * Opacity of the interior fill between 0 and 1.
7270    * @default 0.3
7271    */
7272   fillOpacity?: number;
7273
7274   /**
7275    * Determines whether vertices should be indicated by points
7276    * when tag is editable.
7277    * @default true
7278    */
7279   indicateVertices?: boolean;
7280
7281   /**
7282    * Color for the edge lines as a hexadecimal number.
7283    * @default 0xFFFFFF
7284    */
7285   lineColor?: number;
7286
7287   /**
7288    * Opacity of the edge lines on [0, 1].
7289    * @default 1
7290    */
7291   lineOpacity?: number;
7292
7293   /**
7294    * Line width in pixels.
7295    * @default 1
7296    */
7297   lineWidth?: number;
7298 }
7299 /**
7300  * @class ExtremePointTag
7301  * @classdesc Tag holding properties for visualizing a extreme points
7302  * and their outline.
7303  * @example ```js
7304  * var geometry = new PointsGeometry([[0.3, 0.3], [0.5, 0.4]]);
7305  * var tag = new ExtremePointTag(
7306  *     "id-1",
7307  *     geometry
7308  *     { editable: true, lineColor: 0xff0000 });
7309  *
7310  * tagComponent.add([tag]);
7311  * ```
7312  */
7313 declare class ExtremePointTag extends Tag {
7314   /**
7315    * Create an extreme point tag.
7316    * @override
7317    * @constructor
7318    * @param {string} id - Unique identifier of the tag.
7319    * @param {PointsGeometry} geometry - Geometry defining points of tag.
7320    * @param {ExtremePointTagOptions} options - Options defining the visual appearance and
7321    * behavior of the extreme point tag.
7322    */
7323   constructor(
7324     id: string,
7325     geometry: PointsGeometry,
7326     options?: ExtremePointTagOptions
7327   ): this;
7328
7329   /**
7330    * Get editable property.
7331    * @returns {boolean} Value indicating if tag is editable.
7332    */
7333   editable: boolean;
7334
7335   /**
7336    * Set editable property.
7337    * @param {boolean}
7338    * @fires changed
7339    */
7340   -editable: boolean;
7341
7342   /**
7343    * Get fill color property.
7344    * @returns {number}
7345    */
7346   fillColor: number;
7347
7348   /**
7349    * Set fill color property.
7350    * @param {number}
7351    * @fires changed
7352    */
7353   -fillColor: number;
7354
7355   /**
7356    * Get fill opacity property.
7357    * @returns {number}
7358    */
7359   fillOpacity: number;
7360
7361   /**
7362    * Set fill opacity property.
7363    * @param {number}
7364    * @fires changed
7365    */
7366   -fillOpacity: number;
7367
7368   /**
7369    * @inheritdoc
7370    */
7371   geometry: Geometry;
7372
7373   /**
7374    * Get indicate vertices property.
7375    * @returns {boolean} Value indicating if vertices should be indicated
7376    * when tag is editable.
7377    */
7378   indicateVertices: boolean;
7379
7380   /**
7381    * Get line color property.
7382    * @returns {number}
7383    */
7384   lineColor: number;
7385
7386   /**
7387    * Get line opacity property.
7388    * @returns {number}
7389    */
7390   lineOpacity: number;
7391
7392   /**
7393    * Get line width property.
7394    * @returns {number}
7395    */
7396   lineWidth: number;
7397
7398   /**
7399    * Set options for tag.
7400    * @description Sets all the option properties provided and keeps
7401    * the rest of the values as is.
7402    * @param {ExtremePointTagOptions} options - Extreme point tag options
7403    * @fires changed
7404    */
7405   setOptions(options: ExtremePointTagOptions): void;
7406 }
7407 /**
7408  * Enumeration for tag domains.
7409  * @enum {number} *
7410  * @readonly
7411  * @description Defines where lines between two vertices are treated
7412  * as straight.
7413  *
7414  * Only applicable for polygons. For rectangles lines between
7415  * vertices are always treated as straight in the distorted 2D
7416  * projection and bended in the undistorted 3D space.
7417  */
7418
7419 declare var TagDomain: {|
7420   +TwoDimensional: 0, // 0
7421   +ThreeDimensional: 1, // 1
7422 |};
7423
7424 /**
7425  * Interface for the options that define the behavior and
7426  * appearance of the outline tag.
7427  * @interface
7428  */
7429 export interface OutlineTagOptions {
7430   /**
7431    * The domain where lines between vertices are treated as straight.
7432    * @description Only applicable for tags that renders polygons.
7433    *
7434    * If the domain is specified as two dimensional, editing of the
7435    * polygon will be disabled.
7436    * @default {TagDomain.TwoDimensional}
7437    */
7438   domain?: $Values<typeof TagDomain>;
7439
7440   /**
7441    * Indicate whether the tag geometry should be editable.
7442    * @description Polygon tags with two dimensional domain
7443    * are never editable.
7444    * @default false
7445    */
7446   editable?: boolean;
7447
7448   /**
7449    * Color for the interior fill as a hexadecimal number.
7450    * @default 0xFFFFFF
7451    */
7452   fillColor?: number;
7453
7454   /**
7455    * Opacity of the interior fill between 0 and 1.
7456    * @default 0.3
7457    */
7458   fillOpacity?: number;
7459
7460   /**
7461    * A string referencing the sprite data property to pull from.
7462    * @description Icon is not shown for tags with polygon
7463    * geometries in spherical.
7464    */
7465   icon?: string;
7466
7467   /**
7468    * Value determining how the icon will float with respect to its anchor
7469    * position when rendering.
7470    * @default {Alignment.Center}
7471    */
7472   iconFloat?: $Values<typeof Alignment>;
7473
7474   /**
7475    * Number representing the index for where to show the icon or
7476    * text for a rectangle geometry.
7477    * @description The default index corresponds to the bottom right corner.
7478    * @default 3
7479    */
7480   iconIndex?: number;
7481
7482   /**
7483    * Determines whether vertices should be indicated by points
7484    * when tag is editable.
7485    * @default true
7486    */
7487   indicateVertices?: boolean;
7488
7489   /**
7490    * Color for the edge lines as a hexadecimal number.
7491    * @default 0xFFFFFF
7492    */
7493   lineColor?: number;
7494
7495   /**
7496    * Opacity of the edge lines on [0, 1].
7497    * @default 1
7498    */
7499   lineOpacity?: number;
7500
7501   /**
7502    * Line width in pixels.
7503    * @default 1
7504    */
7505   lineWidth?: number;
7506
7507   /**
7508    * Text shown as label if no icon is provided.
7509    * @description Text is not shown for tags with
7510    * polygon geometries in spherical.
7511    */
7512   text?: string;
7513
7514   /**
7515    * Text color as hexadecimal number.
7516    * @default 0xFFFFFF
7517    */
7518   textColor?: number;
7519 }
7520 /**
7521  * Interface for the options that define the behavior and
7522  * appearance of the spot tag.
7523  * @interface
7524  */
7525 export interface SpotTagOptions {
7526   /**
7527    * Color for the spot specified as a hexadecimal number.
7528    * @default 0xFFFFFF
7529    */
7530   color?: number;
7531
7532   /**
7533    * Indicate whether the tag geometry should be editable.
7534    * @default false
7535    */
7536   editable?: boolean;
7537
7538   /**
7539    * A string referencing the sprite data property to pull from.
7540    */
7541   icon?: string;
7542
7543   /**
7544    * Text shown as label if no icon is provided.
7545    */
7546   text?: string;
7547
7548   /**
7549    * Text color as hexadecimal number.
7550    * @default 0xFFFFFF
7551    */
7552   textColor?: number;
7553 }
7554 /**
7555  * @class OutlineTag
7556  * @classdesc Tag holding properties for visualizing a geometry outline.
7557  * @example ```js
7558  * var geometry = new RectGeometry([0.3, 0.3, 0.5, 0.4]);
7559  * var tag = new OutlineTag(
7560  *     "id-1",
7561  *     geometry
7562  *     { editable: true, lineColor: 0xff0000 });
7563  *
7564  * tagComponent.add([tag]);
7565  * ```
7566  */
7567 declare class OutlineTag extends Tag {
7568   /**
7569    * Create an outline tag.
7570    * @override
7571    * @constructor
7572    * @param {string} id - Unique identifier of the tag.
7573    * @param {VertexGeometry} geometry - Geometry defining vertices of tag.
7574    * @param {OutlineTagOptions} options - Options defining the visual appearance and
7575    * behavior of the outline tag.
7576    */
7577   constructor(
7578     id: string,
7579     geometry: VertexGeometry,
7580     options?: OutlineTagOptions
7581   ): this;
7582
7583   /**
7584    * Get domain property.
7585    * @description Readonly property that can only be set in constructor.
7586    * @returns Value indicating the domain of the tag.
7587    */
7588   domain: $Values<typeof TagDomain>;
7589
7590   /**
7591    * Get editable property.
7592    * @returns {boolean} Value indicating if tag is editable.
7593    */
7594   editable: boolean;
7595
7596   /**
7597    * Set editable property.
7598    * @param {boolean}
7599    * @fires changed
7600    */
7601   -editable: boolean;
7602
7603   /**
7604    * Get fill color property.
7605    * @returns {number}
7606    */
7607   fillColor: number;
7608
7609   /**
7610    * Set fill color property.
7611    * @param {number}
7612    * @fires changed
7613    */
7614   -fillColor: number;
7615
7616   /**
7617    * Get fill opacity property.
7618    * @returns {number}
7619    */
7620   fillOpacity: number;
7621
7622   /**
7623    * Set fill opacity property.
7624    * @param {number}
7625    * @fires changed
7626    */
7627   -fillOpacity: number;
7628
7629   /**
7630    * @inheritdoc
7631    */
7632   geometry: Geometry;
7633
7634   /**
7635    * Get icon property.
7636    * @returns {string}
7637    */
7638   icon: string;
7639
7640   /**
7641    * Set icon property.
7642    * @param {string}
7643    * @fires changed
7644    */
7645   -icon: string;
7646
7647   /**
7648  * Get icon float property.
7649  * @returns {$Values<
7650                 typeof
7651                 Alignment>}
7652  */
7653   iconFloat: $Values<typeof Alignment>;
7654
7655   /**
7656  * Set icon float property.
7657  * @param {$Values<
7658                 typeof
7659                 Alignment>}
7660  * @fires changed
7661  */
7662   -iconFloat: $Values<typeof Alignment>;
7663
7664   /**
7665    * Get icon index property.
7666    * @returns {number}
7667    */
7668   iconIndex: number;
7669
7670   /**
7671    * Set icon index property.
7672    * @param {number}
7673    * @fires changed
7674    */
7675   -iconIndex: number;
7676
7677   /**
7678    * Get indicate vertices property.
7679    * @returns {boolean} Value indicating if vertices should be indicated
7680    * when tag is editable.
7681    */
7682   indicateVertices: boolean;
7683
7684   /**
7685    * Set indicate vertices property.
7686    * @param {boolean}
7687    * @fires changed
7688    */
7689   -indicateVertices: boolean;
7690
7691   /**
7692    * Get line color property.
7693    * @returns {number}
7694    */
7695   lineColor: number;
7696
7697   /**
7698    * Set line color property.
7699    * @param {number}
7700    * @fires changed
7701    */
7702   -lineColor: number;
7703
7704   /**
7705    * Get line opacity property.
7706    * @returns {number}
7707    */
7708   lineOpacity: number;
7709
7710   /**
7711    * Set line opacity property.
7712    * @param {number}
7713    * @fires changed
7714    */
7715   -lineOpacity: number;
7716
7717   /**
7718    * Get line width property.
7719    * @returns {number}
7720    */
7721   lineWidth: number;
7722
7723   /**
7724    * Set line width property.
7725    * @param {number}
7726    * @fires changed
7727    */
7728   -lineWidth: number;
7729
7730   /**
7731    * Get text property.
7732    * @returns {string}
7733    */
7734   text: string;
7735
7736   /**
7737    * Set text property.
7738    * @param {string}
7739    * @fires changed
7740    */
7741   -text: string;
7742
7743   /**
7744    * Get text color property.
7745    * @returns {number}
7746    */
7747   textColor: number;
7748
7749   /**
7750    * Set text color property.
7751    * @param {number}
7752    * @fires changed
7753    */
7754   -textColor: number;
7755
7756   /**
7757    * Set options for tag.
7758    * @description Sets all the option properties provided and keeps
7759    * the rest of the values as is.
7760    * @param {OutlineTagOptions} options - Outline tag options
7761    * @fires changed
7762    */
7763   setOptions(options: OutlineTagOptions): void;
7764 }
7765 /**
7766  * @class SpotTag
7767  * @classdesc Tag holding properties for visualizing the centroid of a geometry.
7768  * @example ```js
7769  * var geometry = new PointGeometry([0.3, 0.3]);
7770  * var tag = new SpotTag(
7771  *     "id-1",
7772  *     geometry
7773  *     { editable: true, color: 0xff0000 });
7774  *
7775  * tagComponent.add([tag]);
7776  * ```
7777  */
7778 declare class SpotTag extends Tag {
7779   _geometry: Geometry;
7780
7781   /**
7782    * Create a spot tag.
7783    * @override
7784    * @constructor
7785    * @param {string} id
7786    * @param {Geometry} geometry
7787    * @param {IOutlineTagOptions} options - Options defining the visual appearance and
7788    * behavior of the spot tag.
7789    */
7790   constructor(id: string, geometry: Geometry, options?: SpotTagOptions): this;
7791
7792   /**
7793    * Get color property.
7794    * @returns {number} The color of the spot as a hexagonal number;
7795    */
7796   color: number;
7797
7798   /**
7799    * Set color property.
7800    * @param {number}
7801    * @fires changed
7802    */
7803   -color: number;
7804
7805   /**
7806    * Get editable property.
7807    * @returns {boolean} Value indicating if tag is editable.
7808    */
7809   editable: boolean;
7810
7811   /**
7812    * Set editable property.
7813    * @param {boolean}
7814    * @fires changed
7815    */
7816   -editable: number;
7817
7818   /**
7819    * Get icon property.
7820    * @returns {string}
7821    */
7822   icon: string;
7823
7824   /**
7825    * Set icon property.
7826    * @param {string}
7827    * @fires changed
7828    */
7829   -icon: string;
7830
7831   /**
7832    * Get text property.
7833    * @returns {string}
7834    */
7835   text: string;
7836
7837   /**
7838    * Set text property.
7839    * @param {string}
7840    * @fires changed
7841    */
7842   -text: string;
7843
7844   /**
7845    * Get text color property.
7846    * @returns {number}
7847    */
7848   textColor: number;
7849
7850   /**
7851    * Set text color property.
7852    * @param {number}
7853    * @fires changed
7854    */
7855   -textColor: number;
7856
7857   /**
7858    * Set options for tag.
7859    * @description Sets all the option properties provided and keps
7860    * the rest of the values as is.
7861    * @param {SpotTagOptions} options - Spot tag options
7862    * @fires changed
7863    */
7864   setOptions(options: SpotTagOptions): void;
7865 }
7866 /**
7867  * @class TagComponent
7868  * @classdesc [object Object],[object Object],[object Object]
7869  * @example ```js
7870  * var viewer = new Viewer({ component: { tag: true } }, ...);
7871  *
7872  * var tagComponent = viewer.getComponent("tag");
7873  * ```
7874  */
7875 declare class TagComponent extends Component<TagConfiguration> {
7876   /**
7877    * @inheritdoc
7878    */
7879   static componentName: string;
7880
7881   /**
7882    * @ignore
7883    */
7884   constructor(name: string, container: Container, navigator: Navigator): this;
7885
7886   /**
7887    * Add tags to the tag set or replace tags in the tag set.
7888    * @description If a tag already in the set has the same
7889    * id as one of the tags added, the old tag will be removed
7890    * the added tag will take its place.
7891    * @param {Array<Tag>} tags - Tags to add.
7892    * @example ```js
7893    * tagComponent.add([tag1, tag2]);
7894    * ```
7895    */
7896   add(tags: Tag[]): void;
7897
7898   /**
7899    * Calculate the smallest rectangle containing all the points
7900    * in the points geometry.
7901    * @description The result may be different depending on if the
7902    * current image is an spherical or not. If the
7903    * current image is an spherical the rectangle may
7904    * wrap the horizontal border of the image.
7905    * @returns {Promise<Array<number>>} [object Object],[object Object],[object Object]
7906    */
7907   calculateRect(geometry: PointsGeometry): Promise<number[]>;
7908
7909   /**
7910    * Force the creation of a geometry programatically using its
7911    * current vertices.
7912    * @description [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
7913    * @fires geometrycreate
7914    * @example ```js
7915    * tagComponent.on("geometrycreate", function(geometry) {
7916    *     console.log(geometry);
7917    * });
7918    *
7919    * tagComponent.create();
7920    * ```
7921    */
7922   create(): void;
7923
7924   /**
7925  * Change the current tag mode.
7926  * @description Change the tag mode to one of the create modes for creating new geometries.
7927  * @param {$Values<
7928                 typeof
7929                 TagMode>} mode - New tag mode.
7930  * @fires tagmode
7931  * @example ```js
7932  * tagComponent.changeMode(TagMode.CreateRect);
7933  * ```
7934  */
7935   changeMode(mode: $Values<typeof TagMode>): void;
7936
7937   /**
7938    * Returns the tag in the tag set with the specified id, or
7939    * undefined if the id matches no tag.
7940    * @param {string} tagId - Id of the tag.
7941    * @example ```js
7942    * var tag = tagComponent.get("tagId");
7943    * ```
7944    */
7945   get(tagId: string): Tag;
7946
7947   /**
7948    * Returns an array of all tags.
7949    * @example ```js
7950    * var tags = tagComponent.getAll();
7951    * ```
7952    */
7953   getAll(): Tag[];
7954
7955   /**
7956    * Returns an array of tag ids for tags that contain the specified point.
7957    * @description The pixel point must lie inside the polygon or rectangle
7958    * of an added tag for the tag id to be returned. Tag ids for
7959    * tags that do not have a fill will also be returned if the point is inside
7960    * the geometry of the tag. Tags with point geometries can not be retrieved.
7961    *
7962    * No tag ids will be returned for polygons rendered in cropped spherical or
7963    * rectangles rendered in spherical.
7964    *
7965    * Notice that the pixelPoint argument requires x, y coordinates from pixel space.
7966    *
7967    * With this function, you can use the coordinates provided by mouse
7968    * events to get information out of the tag component.
7969    *
7970    * If no tag at exist the pixel point, an empty array will be returned.
7971    * @param {Array<number>} pixelPoint - Pixel coordinates on the viewer element.
7972    * @returns {Promise<Array<string>>} Promise to the ids of the tags that
7973    * contain the specified pixel point.
7974    * @example ```js
7975    * tagComponent.getTagIdsAt([100, 100])
7976    *     .then((tagIds) => { console.log(tagIds); });
7977    * ```
7978    */
7979   getTagIdsAt(pixelPoint: number[]): Promise<string[]>;
7980
7981   /**
7982    * Check if a tag exist in the tag set.
7983    * @param {string} tagId - Id of the tag.
7984    * @example ```js
7985    * var tagExists = tagComponent.has("tagId");
7986    * ```
7987    */
7988   has(tagId: string): boolean;
7989
7990   /**
7991    * Remove tags with the specified ids from the tag set.
7992    * @param {Array<string>} tagIds - Ids for tags to remove.
7993    * @example ```js
7994    * tagComponent.remove(["id-1", "id-2"]);
7995    * ```
7996    */
7997   remove(tagIds: string[]): void;
7998
7999   /**
8000    * Remove all tags from the tag set.
8001    * @example ```js
8002    * tagComponent.removeAll();
8003    * ```
8004    */
8005   removeAll(): void;
8006   _activate(): void;
8007   _deactivate(): void;
8008   _getDefaultConfiguration(): TagConfiguration;
8009 }
8010 /**
8011  * @class ZoomComponent
8012  * @classdesc Component rendering UI elements used for zooming.
8013  * @example ```js
8014  * var viewer = new Viewer({ ... });
8015  *
8016  * var zoomComponent = viewer.getComponent("zoom");
8017  * zoomComponent.configure({ size: ComponentSize.Small });
8018  * ```
8019  */
8020 declare class ZoomComponent extends Component<ZoomConfiguration> {
8021   static componentName: string;
8022   constructor(name: string, container: Container, navigator: Navigator): this;
8023   _activate(): void;
8024   _deactivate(): void;
8025   _getDefaultConfiguration(): ZoomConfiguration;
8026 }
8027 declare export {
8028   Alignment,
8029   ArgumentMapillaryError,
8030   BearingComponent,
8031   CacheComponent,
8032   CameraControls,
8033   CameraVisualizationMode,
8034   CancelMapillaryError,
8035   CircleMarker,
8036   Component,
8037   ComponentSize,
8038   DataProviderBase,
8039   DirectionComponent,
8040   DragPanHandler,
8041   EventEmitter,
8042   ExtremePointTag,
8043   Geometry,
8044   GeometryProviderBase,
8045   GeometryTagError,
8046   GraphDataProvider,
8047   GraphMapillaryError,
8048   Image,
8049   KeyPlayHandler,
8050   KeySequenceNavigationHandler,
8051   KeySpatialNavigationHandler,
8052   KeyZoomHandler,
8053   KeyboardComponent,
8054   MapillaryError,
8055   Marker,
8056   MarkerComponent,
8057   NavigationDirection,
8058   OriginalPositionMode,
8059   OutlineTag,
8060   PointGeometry,
8061   PointerComponent,
8062   PointsGeometry,
8063   PointVisualizationMode,
8064   PolygonGeometry,
8065   Popup,
8066   PopupComponent,
8067   RectGeometry,
8068   RenderMode,
8069   RenderPass,
8070   S2GeometryProvider,
8071   ScrollZoomHandler,
8072   SequenceComponent,
8073   SimpleMarker,
8074   SliderComponent,
8075   SliderConfigurationMode,
8076   SpatialComponent,
8077   SpotTag,
8078   Tag,
8079   TagComponent,
8080   TagDomain,
8081   TagMode,
8082   TouchZoomHandler,
8083   TransitionMode,
8084   VertexGeometry,
8085   Viewer,
8086   ZoomComponent,
8087   decompress,
8088   ecefToEnu,
8089   ecefToGeodetic,
8090   enuToEcef,
8091   enuToGeodetic,
8092   fetchArrayBuffer,
8093   geodeticToEcef,
8094   geodeticToEnu,
8095   isFallbackSupported,
8096   isSupported,
8097   readMeshPbf,
8098 };