1 |
|
2 |
|
3 | import Point from '@mapbox/point-geometry';
|
4 | import TinySDF from '@mapbox/tiny-sdf';
|
5 | import { VectorTileFeature, VectorTileLayer } from '@mapbox/vector-tile';
|
6 | import { mat2, mat4 } from 'gl-matrix';
|
7 | import { PotpackBox } from 'potpack';
|
8 |
|
9 | export declare type Callback<T> = (error?: Error | null, result?: T | null) => void;
|
10 | export declare type Cancelable = {
|
11 | cancel: () => void;
|
12 | };
|
13 | export interface IResourceType {
|
14 | Unknown: keyof this;
|
15 | Style: keyof this;
|
16 | Source: keyof this;
|
17 | Tile: keyof this;
|
18 | Glyphs: keyof this;
|
19 | SpriteImage: keyof this;
|
20 | SpriteJSON: keyof this;
|
21 | Image: keyof this;
|
22 | }
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | export declare type RequestParameters = {
|
47 | url: string;
|
48 | headers?: any;
|
49 | method?: "GET" | "POST" | "PUT";
|
50 | body?: string;
|
51 | type?: "string" | "json" | "arrayBuffer";
|
52 | credentials?: "same-origin" | "include";
|
53 | collectResourceTiming?: boolean;
|
54 | };
|
55 | export declare type ResponseCallback<T> = (error?: Error | null, data?: T | null, cacheControl?: string | null, expires?: string | null) => void;
|
56 | export declare class AJAXError extends Error {
|
57 | |
58 |
|
59 |
|
60 | status: number;
|
61 | |
62 |
|
63 |
|
64 | statusText: string;
|
65 | |
66 |
|
67 |
|
68 | url: string;
|
69 | |
70 |
|
71 |
|
72 | body: Blob;
|
73 | constructor(status: number, statusText: string, url: string, body: Blob);
|
74 | }
|
75 | export declare type ExpiryData = {
|
76 | cacheControl?: string | null;
|
77 | expires?: string | null;
|
78 | };
|
79 | export declare type GetImageCallback = (error?: Error | null, image?: HTMLImageElement | ImageBitmap | null, expiry?: ExpiryData | null) => void;
|
80 | export declare type ResourceTypeEnum = keyof IResourceType;
|
81 | export declare type RequestTransformFunction = (url: string, resourceType?: ResourceTypeEnum) => RequestParameters;
|
82 | export declare class RequestManager {
|
83 | _transformRequestFn: RequestTransformFunction;
|
84 | constructor(transformRequestFn?: RequestTransformFunction);
|
85 | transformRequest(url: string, type: ResourceTypeEnum): RequestParameters;
|
86 | normalizeSpriteURL(url: string, format: string, extension: string): string;
|
87 | setTransformRequest(transformRequest: RequestTransformFunction): void;
|
88 | }
|
89 | export declare type Listener = (a: any) => any;
|
90 | export declare type Listeners = {
|
91 | [_: string]: Array<Listener>;
|
92 | };
|
93 | export declare class Event {
|
94 | readonly type: string;
|
95 | constructor(type: string, data?: any);
|
96 | }
|
97 | export declare class Evented {
|
98 | _listeners: Listeners;
|
99 | _oneTimeListeners: Listeners;
|
100 | _eventedParent: Evented;
|
101 | _eventedParentData: any | (() => any);
|
102 | /**
|
103 | * Adds a listener to a specified event type.
|
104 | *
|
105 | * @param {string} type The event type to add a listen for.
|
106 | * @param {Function} listener The function to be called when the event is fired.
|
107 | * The listener function is called with the data object passed to `fire`,
|
108 | * extended with `target` and `type` properties.
|
109 | * @returns {Object} `this`
|
110 | */
|
111 | on(type: string, listener: Listener): this;
|
112 | /**
|
113 | * Removes a previously registered event listener.
|
114 | *
|
115 | * @param {string} type The event type to remove listeners for.
|
116 | * @param {Function} listener The listener function to remove.
|
117 | * @returns {Object} `this`
|
118 | */
|
119 | off(type: string, listener: Listener): this;
|
120 | /**
|
121 | * Adds a listener that will be called only once to a specified event type.
|
122 | *
|
123 | * The listener will be called first time the event fires after the listener is registered.
|
124 | *
|
125 | * @param {string} type The event type to listen for.
|
126 | * @param {Function} listener The function to be called when the event is fired the first time.
|
127 | * @returns {Object} `this`
|
128 | */
|
129 | once(type: string, listener: Listener): this;
|
130 | fire(event: Event | string, properties?: any): this;
|
131 | /**
|
132 | * Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.
|
133 | *
|
134 | * @param {string} type The event type
|
135 | * @returns {boolean} `true` if there is at least one registered listener for specified event type, `false` otherwise
|
136 | * @private
|
137 | */
|
138 | listens(type: string): any;
|
139 | /**
|
140 | * Bubble all events fired by this instance of Evented to this parent instance of Evented.
|
141 | *
|
142 | * @private
|
143 | * @returns {Object} `this`
|
144 | * @private
|
145 | */
|
146 | setEventedParent(parent?: Evented | null, data?: any | (() => any)): this;
|
147 | }
|
148 | export declare class Color {
|
149 | r: number;
|
150 | g: number;
|
151 | b: number;
|
152 | a: number;
|
153 | constructor(r: number, g: number, b: number, a?: number);
|
154 | static black: Color;
|
155 | static white: Color;
|
156 | static transparent: Color;
|
157 | static red: Color;
|
158 | /**
|
159 | * Parses valid CSS color strings and returns a `Color` instance.
|
160 | * @returns A `Color` instance, or `undefined` if the input is not a valid color string.
|
161 | */
|
162 | static parse(input?: string | Color | null): Color | void;
|
163 | /**
|
164 | * Returns an RGBA string representing the color value.
|
165 | *
|
166 | * @returns An RGBA string.
|
167 | * @example
|
168 | * var purple = new Color.parse('purple');
|
169 | * purple.toString; // = "rgba(128,0,128,1)"
|
170 | * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');
|
171 | * translucentGreen.toString(); // = "rgba(26,207,26,0.73)"
|
172 | */
|
173 | toString(): string;
|
174 | toArray(): [
|
175 | number,
|
176 | number,
|
177 | number,
|
178 | number
|
179 | ];
|
180 | }
|
181 | export declare class ZoomHistory {
|
182 | lastZoom: number;
|
183 | lastFloorZoom: number;
|
184 | lastIntegerZoom: number;
|
185 | lastIntegerZoomTime: number;
|
186 | first: boolean;
|
187 | constructor();
|
188 | update(z: number, now: number): boolean;
|
189 | }
|
190 | export declare type ColorSpecification = string;
|
191 | export declare type FormattedSpecification = string;
|
192 | export declare type ResolvedImageSpecification = string;
|
193 | export declare type PromoteIdSpecification = {
|
194 | [_: string]: string;
|
195 | } | string;
|
196 | export declare type FilterSpecificationInputType = string | number | boolean;
|
197 | export declare type FilterSpecification = [
|
198 | "at",
|
199 | number,
|
200 | (number | string)[]
|
201 | ] | [
|
202 | "get",
|
203 | string,
|
204 | Record<string, unknown>?
|
205 | ] | [
|
206 | "has",
|
207 | string,
|
208 | Record<string, unknown>?
|
209 | ] | [
|
210 | "in",
|
211 | ...FilterSpecificationInputType[],
|
212 | FilterSpecificationInputType | FilterSpecificationInputType[]
|
213 | ] | [
|
214 | "index-of",
|
215 | FilterSpecificationInputType,
|
216 | FilterSpecificationInputType | FilterSpecificationInputType[]
|
217 | ] | [
|
218 | "length",
|
219 | string | string[]
|
220 | ] | [
|
221 | "slice",
|
222 | string | string[],
|
223 | number
|
224 | ] | [
|
225 | "!",
|
226 | FilterSpecification
|
227 | ] | [
|
228 | "!=",
|
229 | string | FilterSpecification,
|
230 | FilterSpecificationInputType
|
231 | ] | [
|
232 | "<",
|
233 | string | FilterSpecification,
|
234 | FilterSpecificationInputType
|
235 | ] | [
|
236 | "<=",
|
237 | string | FilterSpecification,
|
238 | FilterSpecificationInputType
|
239 | ] | [
|
240 | "==",
|
241 | string | FilterSpecification,
|
242 | FilterSpecificationInputType
|
243 | ] | [
|
244 | ">",
|
245 | string | FilterSpecification,
|
246 | FilterSpecificationInputType
|
247 | ] | [
|
248 | ">=",
|
249 | string | FilterSpecification,
|
250 | FilterSpecificationInputType
|
251 | ] | [
|
252 | "all",
|
253 | ...FilterSpecification[],
|
254 | FilterSpecificationInputType
|
255 | ] | [
|
256 | "any",
|
257 | ...FilterSpecification[],
|
258 | FilterSpecificationInputType
|
259 | ] | [
|
260 | "case",
|
261 | ...FilterSpecification[],
|
262 | FilterSpecificationInputType
|
263 | ] | [
|
264 | "coalesce",
|
265 | ...FilterSpecification[],
|
266 | FilterSpecificationInputType
|
267 | ] | [
|
268 | "match",
|
269 | ...FilterSpecification[],
|
270 | FilterSpecificationInputType
|
271 | ] | [
|
272 | "within",
|
273 | ...FilterSpecification[],
|
274 | FilterSpecificationInputType
|
275 | ] | [
|
276 | "!in",
|
277 | ...FilterSpecification[],
|
278 | FilterSpecificationInputType
|
279 | ] | [
|
280 | "!has",
|
281 | ...FilterSpecification[],
|
282 | FilterSpecificationInputType
|
283 | ] | [
|
284 | "none",
|
285 | ...FilterSpecification[],
|
286 | FilterSpecificationInputType
|
287 | ] | Array<string | FilterSpecification>;
|
288 | export declare type TransitionSpecification = {
|
289 | duration?: number;
|
290 | delay?: number;
|
291 | };
|
292 | export declare type CameraFunctionSpecification<T> = {
|
293 | type: "exponential";
|
294 | stops: Array<[
|
295 | number,
|
296 | T
|
297 | ]>;
|
298 | } | {
|
299 | type: "interval";
|
300 | stops: Array<[
|
301 | number,
|
302 | T
|
303 | ]>;
|
304 | };
|
305 | export declare type SourceFunctionSpecification<T> = {
|
306 | type: "exponential";
|
307 | stops: Array<[
|
308 | number,
|
309 | T
|
310 | ]>;
|
311 | property: string;
|
312 | default?: T;
|
313 | } | {
|
314 | type: "interval";
|
315 | stops: Array<[
|
316 | number,
|
317 | T
|
318 | ]>;
|
319 | property: string;
|
320 | default?: T;
|
321 | } | {
|
322 | type: "categorical";
|
323 | stops: Array<[
|
324 | string | number | boolean,
|
325 | T
|
326 | ]>;
|
327 | property: string;
|
328 | default?: T;
|
329 | } | {
|
330 | type: "identity";
|
331 | property: string;
|
332 | default?: T;
|
333 | };
|
334 | export declare type CompositeFunctionSpecification<T> = {
|
335 | type: "exponential";
|
336 | stops: Array<[
|
337 | {
|
338 | zoom: number;
|
339 | value: number;
|
340 | },
|
341 | T
|
342 | ]>;
|
343 | property: string;
|
344 | default?: T;
|
345 | } | {
|
346 | type: "interval";
|
347 | stops: Array<[
|
348 | {
|
349 | zoom: number;
|
350 | value: number;
|
351 | },
|
352 | T
|
353 | ]>;
|
354 | property: string;
|
355 | default?: T;
|
356 | } | {
|
357 | type: "categorical";
|
358 | stops: Array<[
|
359 | {
|
360 | zoom: number;
|
361 | value: string | number | boolean;
|
362 | },
|
363 | T
|
364 | ]>;
|
365 | property: string;
|
366 | default?: T;
|
367 | };
|
368 | export declare type ExpressionSpecificationArray = Array<unknown>;
|
369 | export declare type PropertyValueSpecification<T> = T | CameraFunctionSpecification<T> | ExpressionSpecificationArray;
|
370 | export declare type DataDrivenPropertyValueSpecification<T> = T | CameraFunctionSpecification<T> | SourceFunctionSpecification<T> | CompositeFunctionSpecification<T> | ExpressionSpecificationArray;
|
371 | export declare type StyleSpecification = {
|
372 | "version": 8;
|
373 | "name"?: string;
|
374 | "metadata"?: unknown;
|
375 | "center"?: Array<number>;
|
376 | "zoom"?: number;
|
377 | "bearing"?: number;
|
378 | "pitch"?: number;
|
379 | "light"?: LightSpecification;
|
380 | "sources": {
|
381 | [_: string]: SourceSpecification;
|
382 | };
|
383 | "sprite"?: string;
|
384 | "glyphs"?: string;
|
385 | "transition"?: TransitionSpecification;
|
386 | "layers": Array<LayerSpecification>;
|
387 | };
|
388 | export declare type LightSpecification = {
|
389 | "anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
390 | "position"?: PropertyValueSpecification<[
|
391 | number,
|
392 | number,
|
393 | number
|
394 | ]>;
|
395 | "color"?: PropertyValueSpecification<ColorSpecification>;
|
396 | "intensity"?: PropertyValueSpecification<number>;
|
397 | };
|
398 | export declare type VectorSourceSpecification = {
|
399 | "type": "vector";
|
400 | "url"?: string;
|
401 | "tiles"?: Array<string>;
|
402 | "bounds"?: [
|
403 | number,
|
404 | number,
|
405 | number,
|
406 | number
|
407 | ];
|
408 | "scheme"?: "xyz" | "tms";
|
409 | "minzoom"?: number;
|
410 | "maxzoom"?: number;
|
411 | "attribution"?: string;
|
412 | "promoteId"?: PromoteIdSpecification;
|
413 | "volatile"?: boolean;
|
414 | };
|
415 | export declare type RasterSourceSpecification = {
|
416 | "type": "raster";
|
417 | "url"?: string;
|
418 | "tiles"?: Array<string>;
|
419 | "bounds"?: [
|
420 | number,
|
421 | number,
|
422 | number,
|
423 | number
|
424 | ];
|
425 | "minzoom"?: number;
|
426 | "maxzoom"?: number;
|
427 | "tileSize"?: number;
|
428 | "scheme"?: "xyz" | "tms";
|
429 | "attribution"?: string;
|
430 | "volatile"?: boolean;
|
431 | };
|
432 | export declare type RasterDEMSourceSpecification = {
|
433 | "type": "raster-dem";
|
434 | "url"?: string;
|
435 | "tiles"?: Array<string>;
|
436 | "bounds"?: [
|
437 | number,
|
438 | number,
|
439 | number,
|
440 | number
|
441 | ];
|
442 | "minzoom"?: number;
|
443 | "maxzoom"?: number;
|
444 | "tileSize"?: number;
|
445 | "attribution"?: string;
|
446 | "encoding"?: "terrarium" | "mapbox";
|
447 | "volatile"?: boolean;
|
448 | };
|
449 | export declare type GeoJSONSourceSpecification = {
|
450 | "type": "geojson";
|
451 | "data"?: unknown;
|
452 | "maxzoom"?: number;
|
453 | "attribution"?: string;
|
454 | "buffer"?: number;
|
455 | "filter"?: unknown;
|
456 | "tolerance"?: number;
|
457 | "cluster"?: boolean;
|
458 | "clusterRadius"?: number;
|
459 | "clusterMaxZoom"?: number;
|
460 | "clusterMinPoints"?: number;
|
461 | "clusterProperties"?: unknown;
|
462 | "lineMetrics"?: boolean;
|
463 | "generateId"?: boolean;
|
464 | "promoteId"?: PromoteIdSpecification;
|
465 | };
|
466 | export declare type VideoSourceSpecification = {
|
467 | "type": "video";
|
468 | "urls": Array<string>;
|
469 | "coordinates": [
|
470 | [
|
471 | number,
|
472 | number
|
473 | ],
|
474 | [
|
475 | number,
|
476 | number
|
477 | ],
|
478 | [
|
479 | number,
|
480 | number
|
481 | ],
|
482 | [
|
483 | number,
|
484 | number
|
485 | ]
|
486 | ];
|
487 | };
|
488 | export declare type ImageSourceSpecification = {
|
489 | "type": "image";
|
490 | "url": string;
|
491 | "coordinates": [
|
492 | [
|
493 | number,
|
494 | number
|
495 | ],
|
496 | [
|
497 | number,
|
498 | number
|
499 | ],
|
500 | [
|
501 | number,
|
502 | number
|
503 | ],
|
504 | [
|
505 | number,
|
506 | number
|
507 | ]
|
508 | ];
|
509 | };
|
510 | export declare type SourceSpecification = VectorSourceSpecification | RasterSourceSpecification | RasterDEMSourceSpecification | GeoJSONSourceSpecification | VideoSourceSpecification | ImageSourceSpecification;
|
511 | export declare type FillLayerSpecification = {
|
512 | "id": string;
|
513 | "type": "fill";
|
514 | "metadata"?: unknown;
|
515 | "source": string;
|
516 | "source-layer"?: string;
|
517 | "minzoom"?: number;
|
518 | "maxzoom"?: number;
|
519 | "filter"?: FilterSpecification;
|
520 | "layout"?: {
|
521 | "fill-sort-key"?: DataDrivenPropertyValueSpecification<number>;
|
522 | "visibility"?: "visible" | "none";
|
523 | };
|
524 | "paint"?: {
|
525 | "fill-antialias"?: PropertyValueSpecification<boolean>;
|
526 | "fill-opacity"?: DataDrivenPropertyValueSpecification<number>;
|
527 | "fill-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
528 | "fill-outline-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
529 | "fill-translate"?: PropertyValueSpecification<[
|
530 | number,
|
531 | number
|
532 | ]>;
|
533 | "fill-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
534 | "fill-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
|
535 | };
|
536 | };
|
537 | export declare type LineLayerSpecification = {
|
538 | "id": string;
|
539 | "type": "line";
|
540 | "metadata"?: unknown;
|
541 | "source": string;
|
542 | "source-layer"?: string;
|
543 | "minzoom"?: number;
|
544 | "maxzoom"?: number;
|
545 | "filter"?: FilterSpecification;
|
546 | "layout"?: {
|
547 | "line-cap"?: PropertyValueSpecification<"butt" | "round" | "square">;
|
548 | "line-join"?: DataDrivenPropertyValueSpecification<"bevel" | "round" | "miter">;
|
549 | "line-miter-limit"?: PropertyValueSpecification<number>;
|
550 | "line-round-limit"?: PropertyValueSpecification<number>;
|
551 | "line-sort-key"?: DataDrivenPropertyValueSpecification<number>;
|
552 | "visibility"?: "visible" | "none";
|
553 | };
|
554 | "paint"?: {
|
555 | "line-opacity"?: DataDrivenPropertyValueSpecification<number>;
|
556 | "line-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
557 | "line-translate"?: PropertyValueSpecification<[
|
558 | number,
|
559 | number
|
560 | ]>;
|
561 | "line-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
562 | "line-width"?: DataDrivenPropertyValueSpecification<number>;
|
563 | "line-gap-width"?: DataDrivenPropertyValueSpecification<number>;
|
564 | "line-offset"?: DataDrivenPropertyValueSpecification<number>;
|
565 | "line-blur"?: DataDrivenPropertyValueSpecification<number>;
|
566 | "line-dasharray"?: PropertyValueSpecification<Array<number>>;
|
567 | "line-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
|
568 | "line-gradient"?: ExpressionSpecificationArray;
|
569 | };
|
570 | };
|
571 | export declare type SymbolLayerSpecification = {
|
572 | "id": string;
|
573 | "type": "symbol";
|
574 | "metadata"?: unknown;
|
575 | "source": string;
|
576 | "source-layer"?: string;
|
577 | "minzoom"?: number;
|
578 | "maxzoom"?: number;
|
579 | "filter"?: FilterSpecification;
|
580 | "layout"?: {
|
581 | "symbol-placement"?: PropertyValueSpecification<"point" | "line" | "line-center">;
|
582 | "symbol-spacing"?: PropertyValueSpecification<number>;
|
583 | "symbol-avoid-edges"?: PropertyValueSpecification<boolean>;
|
584 | "symbol-sort-key"?: DataDrivenPropertyValueSpecification<number>;
|
585 | "symbol-z-order"?: PropertyValueSpecification<"auto" | "viewport-y" | "source">;
|
586 | "icon-allow-overlap"?: PropertyValueSpecification<boolean>;
|
587 | "icon-overlap"?: PropertyValueSpecification<"never" | "always" | "cooperative">;
|
588 | "icon-ignore-placement"?: PropertyValueSpecification<boolean>;
|
589 | "icon-optional"?: PropertyValueSpecification<boolean>;
|
590 | "icon-rotation-alignment"?: PropertyValueSpecification<"map" | "viewport" | "auto">;
|
591 | "icon-size"?: DataDrivenPropertyValueSpecification<number>;
|
592 | "icon-text-fit"?: PropertyValueSpecification<"none" | "width" | "height" | "both">;
|
593 | "icon-text-fit-padding"?: PropertyValueSpecification<[
|
594 | number,
|
595 | number,
|
596 | number,
|
597 | number
|
598 | ]>;
|
599 | "icon-image"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
|
600 | "icon-rotate"?: DataDrivenPropertyValueSpecification<number>;
|
601 | "icon-padding"?: PropertyValueSpecification<number>;
|
602 | "icon-keep-upright"?: PropertyValueSpecification<boolean>;
|
603 | "icon-offset"?: DataDrivenPropertyValueSpecification<[
|
604 | number,
|
605 | number
|
606 | ]>;
|
607 | "icon-anchor"?: DataDrivenPropertyValueSpecification<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
608 | "icon-pitch-alignment"?: PropertyValueSpecification<"map" | "viewport" | "auto">;
|
609 | "text-pitch-alignment"?: PropertyValueSpecification<"map" | "viewport" | "auto">;
|
610 | "text-rotation-alignment"?: PropertyValueSpecification<"map" | "viewport" | "viewport-glyph" | "auto">;
|
611 | "text-field"?: DataDrivenPropertyValueSpecification<FormattedSpecification>;
|
612 | "text-font"?: DataDrivenPropertyValueSpecification<Array<string>>;
|
613 | "text-size"?: DataDrivenPropertyValueSpecification<number>;
|
614 | "text-max-width"?: DataDrivenPropertyValueSpecification<number>;
|
615 | "text-line-height"?: PropertyValueSpecification<number>;
|
616 | "text-letter-spacing"?: DataDrivenPropertyValueSpecification<number>;
|
617 | "text-justify"?: DataDrivenPropertyValueSpecification<"auto" | "left" | "center" | "right">;
|
618 | "text-radial-offset"?: DataDrivenPropertyValueSpecification<number>;
|
619 | "text-variable-anchor"?: PropertyValueSpecification<Array<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">>;
|
620 | "text-anchor"?: DataDrivenPropertyValueSpecification<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
621 | "text-max-angle"?: PropertyValueSpecification<number>;
|
622 | "text-writing-mode"?: PropertyValueSpecification<Array<"horizontal" | "vertical">>;
|
623 | "text-rotate"?: DataDrivenPropertyValueSpecification<number>;
|
624 | "text-padding"?: PropertyValueSpecification<number>;
|
625 | "text-keep-upright"?: PropertyValueSpecification<boolean>;
|
626 | "text-transform"?: DataDrivenPropertyValueSpecification<"none" | "uppercase" | "lowercase">;
|
627 | "text-offset"?: DataDrivenPropertyValueSpecification<[
|
628 | number,
|
629 | number
|
630 | ]>;
|
631 | "text-allow-overlap"?: PropertyValueSpecification<boolean>;
|
632 | "text-overlap"?: PropertyValueSpecification<"never" | "always" | "cooperative">;
|
633 | "text-ignore-placement"?: PropertyValueSpecification<boolean>;
|
634 | "text-optional"?: PropertyValueSpecification<boolean>;
|
635 | "visibility"?: "visible" | "none";
|
636 | };
|
637 | "paint"?: {
|
638 | "icon-opacity"?: DataDrivenPropertyValueSpecification<number>;
|
639 | "icon-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
640 | "icon-halo-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
641 | "icon-halo-width"?: DataDrivenPropertyValueSpecification<number>;
|
642 | "icon-halo-blur"?: DataDrivenPropertyValueSpecification<number>;
|
643 | "icon-translate"?: PropertyValueSpecification<[
|
644 | number,
|
645 | number
|
646 | ]>;
|
647 | "icon-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
648 | "text-opacity"?: DataDrivenPropertyValueSpecification<number>;
|
649 | "text-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
650 | "text-halo-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
651 | "text-halo-width"?: DataDrivenPropertyValueSpecification<number>;
|
652 | "text-halo-blur"?: DataDrivenPropertyValueSpecification<number>;
|
653 | "text-translate"?: PropertyValueSpecification<[
|
654 | number,
|
655 | number
|
656 | ]>;
|
657 | "text-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
658 | };
|
659 | };
|
660 | export declare type CircleLayerSpecification = {
|
661 | "id": string;
|
662 | "type": "circle";
|
663 | "metadata"?: unknown;
|
664 | "source": string;
|
665 | "source-layer"?: string;
|
666 | "minzoom"?: number;
|
667 | "maxzoom"?: number;
|
668 | "filter"?: FilterSpecification;
|
669 | "layout"?: {
|
670 | "circle-sort-key"?: DataDrivenPropertyValueSpecification<number>;
|
671 | "visibility"?: "visible" | "none";
|
672 | };
|
673 | "paint"?: {
|
674 | "circle-radius"?: DataDrivenPropertyValueSpecification<number>;
|
675 | "circle-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
676 | "circle-blur"?: DataDrivenPropertyValueSpecification<number>;
|
677 | "circle-opacity"?: DataDrivenPropertyValueSpecification<number>;
|
678 | "circle-translate"?: PropertyValueSpecification<[
|
679 | number,
|
680 | number
|
681 | ]>;
|
682 | "circle-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
683 | "circle-pitch-scale"?: PropertyValueSpecification<"map" | "viewport">;
|
684 | "circle-pitch-alignment"?: PropertyValueSpecification<"map" | "viewport">;
|
685 | "circle-stroke-width"?: DataDrivenPropertyValueSpecification<number>;
|
686 | "circle-stroke-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
687 | "circle-stroke-opacity"?: DataDrivenPropertyValueSpecification<number>;
|
688 | };
|
689 | };
|
690 | export declare type HeatmapLayerSpecification = {
|
691 | "id": string;
|
692 | "type": "heatmap";
|
693 | "metadata"?: unknown;
|
694 | "source": string;
|
695 | "source-layer"?: string;
|
696 | "minzoom"?: number;
|
697 | "maxzoom"?: number;
|
698 | "filter"?: FilterSpecification;
|
699 | "layout"?: {
|
700 | "visibility"?: "visible" | "none";
|
701 | };
|
702 | "paint"?: {
|
703 | "heatmap-radius"?: DataDrivenPropertyValueSpecification<number>;
|
704 | "heatmap-weight"?: DataDrivenPropertyValueSpecification<number>;
|
705 | "heatmap-intensity"?: PropertyValueSpecification<number>;
|
706 | "heatmap-color"?: ExpressionSpecificationArray;
|
707 | "heatmap-opacity"?: PropertyValueSpecification<number>;
|
708 | };
|
709 | };
|
710 | export declare type FillExtrusionLayerSpecification = {
|
711 | "id": string;
|
712 | "type": "fill-extrusion";
|
713 | "metadata"?: unknown;
|
714 | "source": string;
|
715 | "source-layer"?: string;
|
716 | "minzoom"?: number;
|
717 | "maxzoom"?: number;
|
718 | "filter"?: FilterSpecification;
|
719 | "layout"?: {
|
720 | "visibility"?: "visible" | "none";
|
721 | };
|
722 | "paint"?: {
|
723 | "fill-extrusion-opacity"?: PropertyValueSpecification<number>;
|
724 | "fill-extrusion-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
725 | "fill-extrusion-translate"?: PropertyValueSpecification<[
|
726 | number,
|
727 | number
|
728 | ]>;
|
729 | "fill-extrusion-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
730 | "fill-extrusion-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
|
731 | "fill-extrusion-height"?: DataDrivenPropertyValueSpecification<number>;
|
732 | "fill-extrusion-base"?: DataDrivenPropertyValueSpecification<number>;
|
733 | "fill-extrusion-vertical-gradient"?: PropertyValueSpecification<boolean>;
|
734 | };
|
735 | };
|
736 | export declare type RasterLayerSpecification = {
|
737 | "id": string;
|
738 | "type": "raster";
|
739 | "metadata"?: unknown;
|
740 | "source": string;
|
741 | "source-layer"?: string;
|
742 | "minzoom"?: number;
|
743 | "maxzoom"?: number;
|
744 | "filter"?: FilterSpecification;
|
745 | "layout"?: {
|
746 | "visibility"?: "visible" | "none";
|
747 | };
|
748 | "paint"?: {
|
749 | "raster-opacity"?: PropertyValueSpecification<number>;
|
750 | "raster-hue-rotate"?: PropertyValueSpecification<number>;
|
751 | "raster-brightness-min"?: PropertyValueSpecification<number>;
|
752 | "raster-brightness-max"?: PropertyValueSpecification<number>;
|
753 | "raster-saturation"?: PropertyValueSpecification<number>;
|
754 | "raster-contrast"?: PropertyValueSpecification<number>;
|
755 | "raster-resampling"?: PropertyValueSpecification<"linear" | "nearest">;
|
756 | "raster-fade-duration"?: PropertyValueSpecification<number>;
|
757 | };
|
758 | };
|
759 | export declare type HillshadeLayerSpecification = {
|
760 | "id": string;
|
761 | "type": "hillshade";
|
762 | "metadata"?: unknown;
|
763 | "source": string;
|
764 | "source-layer"?: string;
|
765 | "minzoom"?: number;
|
766 | "maxzoom"?: number;
|
767 | "filter"?: FilterSpecification;
|
768 | "layout"?: {
|
769 | "visibility"?: "visible" | "none";
|
770 | };
|
771 | "paint"?: {
|
772 | "hillshade-illumination-direction"?: PropertyValueSpecification<number>;
|
773 | "hillshade-illumination-anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
774 | "hillshade-exaggeration"?: PropertyValueSpecification<number>;
|
775 | "hillshade-shadow-color"?: PropertyValueSpecification<ColorSpecification>;
|
776 | "hillshade-highlight-color"?: PropertyValueSpecification<ColorSpecification>;
|
777 | "hillshade-accent-color"?: PropertyValueSpecification<ColorSpecification>;
|
778 | };
|
779 | };
|
780 | export declare type BackgroundLayerSpecification = {
|
781 | "id": string;
|
782 | "type": "background";
|
783 | "metadata"?: unknown;
|
784 | "minzoom"?: number;
|
785 | "maxzoom"?: number;
|
786 | "layout"?: {
|
787 | "visibility"?: "visible" | "none";
|
788 | };
|
789 | "paint"?: {
|
790 | "background-color"?: PropertyValueSpecification<ColorSpecification>;
|
791 | "background-pattern"?: PropertyValueSpecification<ResolvedImageSpecification>;
|
792 | "background-opacity"?: PropertyValueSpecification<number>;
|
793 | };
|
794 | };
|
795 | export declare type LayerSpecification = FillLayerSpecification | LineLayerSpecification | SymbolLayerSpecification | CircleLayerSpecification | HeatmapLayerSpecification | FillExtrusionLayerSpecification | RasterLayerSpecification | HillshadeLayerSpecification | BackgroundLayerSpecification;
|
796 | export declare type CrossfadeParameters = {
|
797 | fromScale: number;
|
798 | toScale: number;
|
799 | t: number;
|
800 | };
|
801 | export declare class EvaluationParameters {
|
802 | zoom: number;
|
803 | now: number;
|
804 | fadeDuration: number;
|
805 | zoomHistory: ZoomHistory;
|
806 | transition: TransitionSpecification;
|
807 | constructor(zoom: number, options?: any);
|
808 | isSupportedScript(str: string): boolean;
|
809 | crossFadingFactor(): number;
|
810 | getCrossfadeParameters(): CrossfadeParameters;
|
811 | }
|
812 | export declare class LngLatBounds {
|
813 | _ne: LngLat;
|
814 | _sw: LngLat;
|
815 | constructor(sw?: any, ne?: any);
|
816 | /**
|
817 | * Set the northeast corner of the bounding box
|
818 | *
|
819 | * @param {LngLatLike} ne a {@link LngLatLike} object describing the northeast corner of the bounding box.
|
820 | * @returns {LngLatBounds} `this`
|
821 | */
|
822 | setNorthEast(ne: LngLatLike): this;
|
823 | /**
|
824 | * Set the southwest corner of the bounding box
|
825 | *
|
826 | * @param {LngLatLike} sw a {@link LngLatLike} object describing the southwest corner of the bounding box.
|
827 | * @returns {LngLatBounds} `this`
|
828 | */
|
829 | setSouthWest(sw: LngLatLike): this;
|
830 | /**
|
831 | * Extend the bounds to include a given LngLatLike or LngLatBoundsLike.
|
832 | *
|
833 | * @param {LngLatLike|LngLatBoundsLike} obj object to extend to
|
834 | * @returns {LngLatBounds} `this`
|
835 | */
|
836 | extend(obj: LngLatLike | LngLatBoundsLike): any;
|
837 | /**
|
838 | * Returns the geographical coordinate equidistant from the bounding box's corners.
|
839 | *
|
840 | * @returns {LngLat} The bounding box's center.
|
841 | * @example
|
842 | * var llb = new maplibregl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);
|
843 | * llb.getCenter(); // = LngLat {lng: -73.96365, lat: 40.78315}
|
844 | */
|
845 | getCenter(): LngLat;
|
846 | /**
|
847 | * Returns the southwest corner of the bounding box.
|
848 | *
|
849 | * @returns {LngLat} The southwest corner of the bounding box.
|
850 | */
|
851 | getSouthWest(): LngLat;
|
852 | /**
|
853 | * Returns the northeast corner of the bounding box.
|
854 | *
|
855 | * @returns {LngLat} The northeast corner of the bounding box.
|
856 | */
|
857 | getNorthEast(): LngLat;
|
858 | /**
|
859 | * Returns the northwest corner of the bounding box.
|
860 | *
|
861 | * @returns {LngLat} The northwest corner of the bounding box.
|
862 | */
|
863 | getNorthWest(): LngLat;
|
864 | /**
|
865 | * Returns the southeast corner of the bounding box.
|
866 | *
|
867 | * @returns {LngLat} The southeast corner of the bounding box.
|
868 | */
|
869 | getSouthEast(): LngLat;
|
870 | /**
|
871 | * Returns the west edge of the bounding box.
|
872 | *
|
873 | * @returns {number} The west edge of the bounding box.
|
874 | */
|
875 | getWest(): number;
|
876 | /**
|
877 | * Returns the south edge of the bounding box.
|
878 | *
|
879 | * @returns {number} The south edge of the bounding box.
|
880 | */
|
881 | getSouth(): number;
|
882 | /**
|
883 | * Returns the east edge of the bounding box.
|
884 | *
|
885 | * @returns {number} The east edge of the bounding box.
|
886 | */
|
887 | getEast(): number;
|
888 | /**
|
889 | * Returns the north edge of the bounding box.
|
890 | *
|
891 | * @returns {number} The north edge of the bounding box.
|
892 | */
|
893 | getNorth(): number;
|
894 | /**
|
895 | * Returns the bounding box represented as an array.
|
896 | *
|
897 | * @returns {Array<Array<number>>} The bounding box represented as an array, consisting of the
|
898 | * southwest and northeast coordinates of the bounding represented as arrays of numbers.
|
899 | * @example
|
900 | * var llb = new maplibregl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);
|
901 | * llb.toArray(); // = [[-73.9876, 40.7661], [-73.9397, 40.8002]]
|
902 | */
|
903 | toArray(): number[][];
|
904 | /**
|
905 | * Return the bounding box represented as a string.
|
906 | *
|
907 | * @returns {string} The bounding box represents as a string of the format
|
908 | * `'LngLatBounds(LngLat(lng, lat), LngLat(lng, lat))'`.
|
909 | * @example
|
910 | * var llb = new maplibregl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);
|
911 | * llb.toString(); // = "LngLatBounds(LngLat(-73.9876, 40.7661), LngLat(-73.9397, 40.8002))"
|
912 | */
|
913 | toString(): string;
|
914 | /**
|
915 | * Check if the bounding box is an empty/`null`-type box.
|
916 | *
|
917 | * @returns {boolean} True if bounds have been defined, otherwise false.
|
918 | */
|
919 | isEmpty(): boolean;
|
920 | /**
|
921 | * Check if the point is within the bounding box.
|
922 | *
|
923 | * @param {LngLatLike} lnglat geographic point to check against.
|
924 | * @returns {boolean} True if the point is within the bounding box.
|
925 | * @example
|
926 | * var llb = new maplibregl.LngLatBounds(
|
927 | * new maplibregl.LngLat(-73.9876, 40.7661),
|
928 | * new maplibregl.LngLat(-73.9397, 40.8002)
|
929 | * );
|
930 | *
|
931 | * var ll = new maplibregl.LngLat(-73.9567, 40.7789);
|
932 | *
|
933 | * console.log(llb.contains(ll)); // = true
|
934 | */
|
935 | contains(lnglat: LngLatLike): boolean;
|
936 | /**
|
937 | * Converts an array to a `LngLatBounds` object.
|
938 | *
|
939 | * If a `LngLatBounds` object is passed in, the function returns it unchanged.
|
940 | *
|
941 | * Internally, the function calls `LngLat#convert` to convert arrays to `LngLat` values.
|
942 | *
|
943 | * @param {LngLatBoundsLike} input An array of two coordinates to convert, or a `LngLatBounds` object to return.
|
944 | * @returns {LngLatBounds} A new `LngLatBounds` object, if a conversion occurred, or the original `LngLatBounds` object.
|
945 | * @example
|
946 | * var arr = [[-73.9876, 40.7661], [-73.9397, 40.8002]];
|
947 | * var llb = maplibregl.LngLatBounds.convert(arr);
|
948 | * llb; // = LngLatBounds {_sw: LngLat {lng: -73.9876, lat: 40.7661}, _ne: LngLat {lng: -73.9397, lat: 40.8002}}
|
949 | */
|
950 | static convert(input: LngLatBoundsLike | null): LngLatBounds;
|
951 | }
|
952 | /**
|
953 | * A {@link LngLatBounds} object, an array of {@link LngLatLike} objects in [sw, ne] order,
|
954 | * or an array of numbers in [west, south, east, north] order.
|
955 | *
|
956 | * @typedef {LngLatBounds | [LngLatLike, LngLatLike] | [number, number, number, number]} LngLatBoundsLike
|
957 | * @example
|
958 | * var v1 = new maplibregl.LngLatBounds(
|
959 | * new maplibregl.LngLat(-73.9876, 40.7661),
|
960 | * new maplibregl.LngLat(-73.9397, 40.8002)
|
961 | * );
|
962 | * var v2 = new maplibregl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002])
|
963 | * var v3 = [[-73.9876, 40.7661], [-73.9397, 40.8002]];
|
964 | */
|
965 | export declare type LngLatBoundsLike = LngLatBounds | [
|
966 | LngLatLike,
|
967 | LngLatLike
|
968 | ] | [
|
969 | number,
|
970 | number,
|
971 | number,
|
972 | number
|
973 | ];
|
974 | export declare class LngLat {
|
975 | lng: number;
|
976 | lat: number;
|
977 | constructor(lng: number, lat: number);
|
978 | /**
|
979 | * Returns a new `LngLat` object whose longitude is wrapped to the range (-180, 180).
|
980 | *
|
981 | * @returns {LngLat} The wrapped `LngLat` object.
|
982 | * @example
|
983 | * var ll = new maplibregl.LngLat(286.0251, 40.7736);
|
984 | * var wrapped = ll.wrap();
|
985 | * wrapped.lng; // = -73.9749
|
986 | */
|
987 | wrap(): LngLat;
|
988 | /**
|
989 | * Returns the coordinates represented as an array of two numbers.
|
990 | *
|
991 | * @returns {Array<number>} The coordinates represeted as an array of longitude and latitude.
|
992 | * @example
|
993 | * var ll = new maplibregl.LngLat(-73.9749, 40.7736);
|
994 | * ll.toArray(); // = [-73.9749, 40.7736]
|
995 | */
|
996 | toArray(): number[];
|
997 | /**
|
998 | * Returns the coordinates represent as a string.
|
999 | *
|
1000 | * @returns {string} The coordinates represented as a string of the format `'LngLat(lng, lat)'`.
|
1001 | * @example
|
1002 | * var ll = new maplibregl.LngLat(-73.9749, 40.7736);
|
1003 | * ll.toString(); // = "LngLat(-73.9749, 40.7736)"
|
1004 | */
|
1005 | toString(): string;
|
1006 | /**
|
1007 | * Returns the approximate distance between a pair of coordinates in meters
|
1008 | * Uses the Haversine Formula (from R.W. Sinnott, "Virtues of the Haversine", Sky and Telescope, vol. 68, no. 2, 1984, p. 159)
|
1009 | *
|
1010 | * @param {LngLat} lngLat coordinates to compute the distance to
|
1011 | * @returns {number} Distance in meters between the two coordinates.
|
1012 | * @example
|
1013 | * var new_york = new maplibregl.LngLat(-74.0060, 40.7128);
|
1014 | * var los_angeles = new maplibregl.LngLat(-118.2437, 34.0522);
|
1015 | * new_york.distanceTo(los_angeles); // = 3935751.690893987, "true distance" using a non-spherical approximation is ~3966km
|
1016 | */
|
1017 | distanceTo(lngLat: LngLat): number;
|
1018 | /**
|
1019 | * Returns a `LngLatBounds` from the coordinates extended by a given `radius`. The returned `LngLatBounds` completely contains the `radius`.
|
1020 | *
|
1021 | * @param {number} [radius=0] Distance in meters from the coordinates to extend the bounds.
|
1022 | * @returns {LngLatBounds} A new `LngLatBounds` object representing the coordinates extended by the `radius`.
|
1023 | * @example
|
1024 | * var ll = new maplibregl.LngLat(-73.9749, 40.7736);
|
1025 | * ll.toBounds(100).toArray(); // = [[-73.97501862141328, 40.77351016847229], [-73.97478137858673, 40.77368983152771]]
|
1026 | */
|
1027 | toBounds(radius?: number): LngLatBounds;
|
1028 | /**
|
1029 | * Converts an array of two numbers or an object with `lng` and `lat` or `lon` and `lat` properties
|
1030 | * to a `LngLat` object.
|
1031 | *
|
1032 | * If a `LngLat` object is passed in, the function returns it unchanged.
|
1033 | *
|
1034 | * @param {LngLatLike} input An array of two numbers or object to convert, or a `LngLat` object to return.
|
1035 | * @returns {LngLat} A new `LngLat` object, if a conversion occurred, or the original `LngLat` object.
|
1036 | * @example
|
1037 | * var arr = [-73.9749, 40.7736];
|
1038 | * var ll = maplibregl.LngLat.convert(arr);
|
1039 | * ll; // = LngLat {lng: -73.9749, lat: 40.7736}
|
1040 | */
|
1041 | static convert(input: LngLatLike): LngLat;
|
1042 | }
|
1043 | /**
|
1044 | * A {@link LngLat} object, an array of two numbers representing longitude and latitude,
|
1045 | * or an object with `lng` and `lat` or `lon` and `lat` properties.
|
1046 | *
|
1047 | * @typedef {LngLat | {lng: number, lat: number} | {lon: number, lat: number} | [number, number]} LngLatLike
|
1048 | * @example
|
1049 | * var v1 = new maplibregl.LngLat(-122.420679, 37.772537);
|
1050 | * var v2 = [-122.420679, 37.772537];
|
1051 | * var v3 = {lon: -122.420679, lat: 37.772537};
|
1052 | */
|
1053 | export declare type LngLatLike = LngLat | {
|
1054 | lng: number;
|
1055 | lat: number;
|
1056 | } | {
|
1057 | lon: number;
|
1058 | lat: number;
|
1059 | } | [
|
1060 | number,
|
1061 | number
|
1062 | ];
|
1063 | export declare class MercatorCoordinate {
|
1064 | x: number;
|
1065 | y: number;
|
1066 | z: number;
|
1067 | constructor(x: number, y: number, z?: number);
|
1068 | /**
|
1069 | * Project a `LngLat` to a `MercatorCoordinate`.
|
1070 | *
|
1071 | * @param {LngLatLike} lngLatLike The location to project.
|
1072 | * @param {number} altitude The altitude in meters of the position.
|
1073 | * @returns {MercatorCoordinate} The projected mercator coordinate.
|
1074 | * @example
|
1075 | * var coord = maplibregl.MercatorCoordinate.fromLngLat({ lng: 0, lat: 0}, 0);
|
1076 | * coord; // MercatorCoordinate(0.5, 0.5, 0)
|
1077 | */
|
1078 | static fromLngLat(lngLatLike: LngLatLike, altitude?: number): MercatorCoordinate;
|
1079 | /**
|
1080 | * Returns the `LngLat` for the coordinate.
|
1081 | *
|
1082 | * @returns {LngLat} The `LngLat` object.
|
1083 | * @example
|
1084 | * var coord = new maplibregl.MercatorCoordinate(0.5, 0.5, 0);
|
1085 | * var lngLat = coord.toLngLat(); // LngLat(0, 0)
|
1086 | */
|
1087 | toLngLat(): LngLat;
|
1088 | /**
|
1089 | * Returns the altitude in meters of the coordinate.
|
1090 | *
|
1091 | * @returns {number} The altitude in meters.
|
1092 | * @example
|
1093 | * var coord = new maplibregl.MercatorCoordinate(0, 0, 0.02);
|
1094 | * coord.toAltitude(); // 6914.281956295339
|
1095 | */
|
1096 | toAltitude(): number;
|
1097 | /**
|
1098 | * Returns the distance of 1 meter in `MercatorCoordinate` units at this latitude.
|
1099 | *
|
1100 | * For coordinates in real world units using meters, this naturally provides the scale
|
1101 | * to transform into `MercatorCoordinate`s.
|
1102 | *
|
1103 | * @returns {number} Distance of 1 meter in `MercatorCoordinate` units.
|
1104 | */
|
1105 | meterInMercatorCoordinateUnits(): number;
|
1106 | }
|
1107 | export declare class CanonicalTileID {
|
1108 | z: number;
|
1109 | x: number;
|
1110 | y: number;
|
1111 | key: string;
|
1112 | constructor(z: number, x: number, y: number);
|
1113 | equals(id: CanonicalTileID): boolean;
|
1114 | url(urls: Array<string>, pixelRatio: number, scheme?: string | null): string;
|
1115 | getTilePoint(coord: MercatorCoordinate): Point;
|
1116 | toString(): string;
|
1117 | }
|
1118 | export declare class UnwrappedTileID {
|
1119 | wrap: number;
|
1120 | canonical: CanonicalTileID;
|
1121 | key: string;
|
1122 | constructor(wrap: number, canonical: CanonicalTileID);
|
1123 | }
|
1124 | export declare class OverscaledTileID {
|
1125 | overscaledZ: number;
|
1126 | wrap: number;
|
1127 | canonical: CanonicalTileID;
|
1128 | key: string;
|
1129 | posMatrix: mat4;
|
1130 | constructor(overscaledZ: number, wrap: number, z: number, x: number, y: number);
|
1131 | equals(id: OverscaledTileID): boolean;
|
1132 | scaledTo(targetZ: number): OverscaledTileID;
|
1133 | calculateScaledKey(targetZ: number, withWrap: boolean): string;
|
1134 | isChildOf(parent: OverscaledTileID): boolean;
|
1135 | children(sourceMaxZoom: number): OverscaledTileID[];
|
1136 | isLessThan(rhs: OverscaledTileID): boolean;
|
1137 | wrapped(): OverscaledTileID;
|
1138 | unwrapTo(wrap: number): OverscaledTileID;
|
1139 | overscaleFactor(): number;
|
1140 | toUnwrapped(): UnwrappedTileID;
|
1141 | toString(): string;
|
1142 | getTilePoint(coord: MercatorCoordinate): Point;
|
1143 | }
|
1144 | export declare class Intl$Collator {
|
1145 | constructor(locales?: string | string[], options?: CollatorOptions);
|
1146 | compare(a: string, b: string): number;
|
1147 | resolvedOptions(): any;
|
1148 | }
|
1149 | export declare type CollatorOptions = {
|
1150 | localeMatcher?: "lookup" | "best fit";
|
1151 | usage?: "sort" | "search";
|
1152 | sensitivity?: "base" | "accent" | "case" | "variant";
|
1153 | ignorePunctuation?: boolean;
|
1154 | numeric?: boolean;
|
1155 | caseFirst?: "upper" | "lower" | "false";
|
1156 | };
|
1157 | export declare class Collator {
|
1158 | locale: string | null;
|
1159 | sensitivity: "base" | "accent" | "case" | "variant";
|
1160 | collator: Intl$Collator;
|
1161 | constructor(caseSensitive: boolean, diacriticSensitive: boolean, locale: string | null);
|
1162 | compare(lhs: string, rhs: string): number;
|
1163 | resolvedLocale(): string;
|
1164 | }
|
1165 | export declare type ResolvedImageOptions = {
|
1166 | name: string;
|
1167 | available: boolean;
|
1168 | };
|
1169 | export declare class ResolvedImage {
|
1170 | name: string;
|
1171 | available: boolean;
|
1172 | constructor(options: ResolvedImageOptions);
|
1173 | toString(): string;
|
1174 | static fromString(name: string): ResolvedImage | null;
|
1175 | serialize(): Array<string>;
|
1176 | }
|
1177 | export declare class FormattedSection {
|
1178 | text: string;
|
1179 | image: ResolvedImage | null;
|
1180 | scale: number | null;
|
1181 | fontStack: string | null;
|
1182 | textColor: Color | null;
|
1183 | constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null);
|
1184 | }
|
1185 | export declare class Formatted {
|
1186 | sections: Array<FormattedSection>;
|
1187 | constructor(sections: Array<FormattedSection>);
|
1188 | static fromString(unformatted: string): Formatted;
|
1189 | isEmpty(): boolean;
|
1190 | static factory(text: Formatted | string): Formatted;
|
1191 | toString(): string;
|
1192 | serialize(): Array<unknown>;
|
1193 | }
|
1194 | export declare type Value = null | string | boolean | number | Color | Collator | Formatted | ResolvedImage | ReadonlyArray<Value> | {
|
1195 | readonly [x: string]: Value;
|
1196 | };
|
1197 | export declare type InterpolationType = {
|
1198 | name: "linear";
|
1199 | } | {
|
1200 | name: "exponential";
|
1201 | base: number;
|
1202 | } | {
|
1203 | name: "cubic-bezier";
|
1204 | controlPoints: [
|
1205 | number,
|
1206 | number,
|
1207 | number,
|
1208 | number
|
1209 | ];
|
1210 | };
|
1211 | export declare type Feature = {
|
1212 | readonly type: 1 | 2 | 3 | "Unknown" | "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon";
|
1213 | readonly id?: any;
|
1214 | readonly properties: {
|
1215 | [_: string]: any;
|
1216 | };
|
1217 | readonly patterns?: {
|
1218 | [_: string]: {
|
1219 | "min": string;
|
1220 | "mid": string;
|
1221 | "max": string;
|
1222 | };
|
1223 | };
|
1224 | readonly geometry?: Array<Array<Point>>;
|
1225 | };
|
1226 | export declare type FeatureState = {
|
1227 | [_: string]: any;
|
1228 | };
|
1229 | export declare type GlobalProperties = Readonly<{
|
1230 | zoom: number;
|
1231 | heatmapDensity?: number;
|
1232 | lineProgress?: number;
|
1233 | isSupportedScript?: (_: string) => boolean;
|
1234 | accumulated?: Value;
|
1235 | }>;
|
1236 | export declare type ConstantExpression = {
|
1237 | kind: "constant";
|
1238 | readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any;
|
1239 | };
|
1240 | export declare type SourceExpression = {
|
1241 | kind: "source";
|
1242 | isStateDependent: boolean;
|
1243 | readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any;
|
1244 | };
|
1245 | export declare type CameraExpression = {
|
1246 | kind: "camera";
|
1247 | readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any;
|
1248 | readonly interpolationFactor: (input: number, lower: number, upper: number) => number;
|
1249 | zoomStops: Array<number>;
|
1250 | interpolationType: InterpolationType;
|
1251 | };
|
1252 | export declare type CompositeExpression = {
|
1253 | kind: "composite";
|
1254 | isStateDependent: boolean;
|
1255 | readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any;
|
1256 | readonly interpolationFactor: (input: number, lower: number, upper: number) => number;
|
1257 | zoomStops: Array<number>;
|
1258 | interpolationType: InterpolationType;
|
1259 | };
|
1260 | export declare type StylePropertyExpression = ConstantExpression | SourceExpression | CameraExpression | CompositeExpression;
|
1261 | export declare type FilterExpression = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => boolean;
|
1262 | export declare type FeatureFilter = {
|
1263 | filter: FilterExpression;
|
1264 | needGeometry: boolean;
|
1265 | };
|
1266 | export declare type ExpressionType = "data-driven" | "cross-faded" | "cross-faded-data-driven" | "color-ramp" | "data-constant" | "constant";
|
1267 | export declare type ExpressionParameters = Array<"zoom" | "feature" | "feature-state" | "heatmap-density" | "line-progress">;
|
1268 | export declare type ExpressionSpecification = {
|
1269 | interpolated: boolean;
|
1270 | parameters: ExpressionParameters;
|
1271 | };
|
1272 | export declare type StylePropertySpecification = {
|
1273 | type: "number";
|
1274 | "property-type": ExpressionType;
|
1275 | expression?: ExpressionSpecification;
|
1276 | transition: boolean;
|
1277 | default?: number;
|
1278 | } | {
|
1279 | type: "string";
|
1280 | "property-type": ExpressionType;
|
1281 | expression?: ExpressionSpecification;
|
1282 | transition: boolean;
|
1283 | default?: string;
|
1284 | tokens?: boolean;
|
1285 | } | {
|
1286 | type: "boolean";
|
1287 | "property-type": ExpressionType;
|
1288 | expression?: ExpressionSpecification;
|
1289 | transition: boolean;
|
1290 | default?: boolean;
|
1291 | } | {
|
1292 | type: "enum";
|
1293 | "property-type": ExpressionType;
|
1294 | expression?: ExpressionSpecification;
|
1295 | values: {
|
1296 | [_: string]: {};
|
1297 | };
|
1298 | transition: boolean;
|
1299 | default?: string;
|
1300 | } | {
|
1301 | type: "color";
|
1302 | "property-type": ExpressionType;
|
1303 | expression?: ExpressionSpecification;
|
1304 | transition: boolean;
|
1305 | default?: string;
|
1306 | overridable: boolean;
|
1307 | } | {
|
1308 | type: "array";
|
1309 | value: "number";
|
1310 | "property-type": ExpressionType;
|
1311 | expression?: ExpressionSpecification;
|
1312 | length?: number;
|
1313 | transition: boolean;
|
1314 | default?: Array<number>;
|
1315 | } | {
|
1316 | type: "array";
|
1317 | value: "string";
|
1318 | "property-type": ExpressionType;
|
1319 | expression?: ExpressionSpecification;
|
1320 | length?: number;
|
1321 | transition: boolean;
|
1322 | default?: Array<string>;
|
1323 | };
|
1324 | export declare type TimePoint = number;
|
1325 | export declare type CrossFaded<T> = {
|
1326 | to: T;
|
1327 | from: T;
|
1328 | };
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 |
|
1341 |
|
1342 |
|
1343 |
|
1344 |
|
1345 |
|
1346 |
|
1347 |
|
1348 |
|
1349 |
|
1350 |
|
1351 |
|
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 |
|
1359 |
|
1360 |
|
1361 |
|
1362 |
|
1363 | export interface Property<T, R> {
|
1364 | specification: StylePropertySpecification;
|
1365 | possiblyEvaluate(value: PropertyValue<T, R>, parameters: EvaluationParameters, canonical?: CanonicalTileID, availableImages?: Array<string>): R;
|
1366 | interpolate(a: R, b: R, t: number): R;
|
1367 | }
|
1368 | export declare class PropertyValue<T, R> {
|
1369 | property: Property<T, R>;
|
1370 | value: PropertyValueSpecification<T> | void;
|
1371 | expression: StylePropertyExpression;
|
1372 | constructor(property: Property<T, R>, value: PropertyValueSpecification<T> | void);
|
1373 | isDataDriven(): boolean;
|
1374 | possiblyEvaluate(parameters: EvaluationParameters, canonical?: CanonicalTileID, availableImages?: Array<string>): R;
|
1375 | }
|
1376 | export declare type TransitionParameters = {
|
1377 | now: TimePoint;
|
1378 | transition: TransitionSpecification;
|
1379 | };
|
1380 | export declare class TransitionablePropertyValue<T, R> {
|
1381 | property: Property<T, R>;
|
1382 | value: PropertyValue<T, R>;
|
1383 | transition: TransitionSpecification | void;
|
1384 | constructor(property: Property<T, R>);
|
1385 | transitioned(parameters: TransitionParameters, prior: TransitioningPropertyValue<T, R>): TransitioningPropertyValue<T, R>;
|
1386 | untransitioned(): TransitioningPropertyValue<T, R>;
|
1387 | }
|
1388 | export declare class Transitionable<Props> {
|
1389 | _properties: Properties<Props>;
|
1390 | _values: {
|
1391 | [K in keyof Props]: TransitionablePropertyValue<any, unknown>;
|
1392 | };
|
1393 | constructor(properties: Properties<Props>);
|
1394 | getValue<S extends keyof Props, T>(name: S): PropertyValueSpecification<T> | void;
|
1395 | setValue<S extends keyof Props, T>(name: S, value: PropertyValueSpecification<T> | void): void;
|
1396 | getTransition<S extends keyof Props>(name: S): TransitionSpecification | void;
|
1397 | setTransition<S extends keyof Props>(name: S, value: TransitionSpecification | void): void;
|
1398 | serialize(): any;
|
1399 | transitioned(parameters: TransitionParameters, prior: Transitioning<Props>): Transitioning<Props>;
|
1400 | untransitioned(): Transitioning<Props>;
|
1401 | }
|
1402 | export declare class TransitioningPropertyValue<T, R> {
|
1403 | property: Property<T, R>;
|
1404 | value: PropertyValue<T, R>;
|
1405 | prior: TransitioningPropertyValue<T, R>;
|
1406 | begin: TimePoint;
|
1407 | end: TimePoint;
|
1408 | constructor(property: Property<T, R>, value: PropertyValue<T, R>, prior: TransitioningPropertyValue<T, R>, transition: TransitionSpecification, now: TimePoint);
|
1409 | possiblyEvaluate(parameters: EvaluationParameters, canonical: CanonicalTileID, availableImages: Array<string>): R;
|
1410 | }
|
1411 | export declare class Transitioning<Props> {
|
1412 | _properties: Properties<Props>;
|
1413 | _values: {
|
1414 | [K in keyof Props]: PossiblyEvaluatedPropertyValue<unknown>;
|
1415 | };
|
1416 | constructor(properties: Properties<Props>);
|
1417 | possiblyEvaluate(parameters: EvaluationParameters, canonical?: CanonicalTileID, availableImages?: Array<string>): PossiblyEvaluated<Props, any>;
|
1418 | hasTransition(): boolean;
|
1419 | }
|
1420 | export declare class Layout<Props> {
|
1421 | _properties: Properties<Props>;
|
1422 | _values: {
|
1423 | [K in keyof Props]: PropertyValue<any, PossiblyEvaluatedPropertyValue<any>>;
|
1424 | };
|
1425 | constructor(properties: Properties<Props>);
|
1426 | getValue<S extends keyof Props>(name: S): any;
|
1427 | setValue<S extends keyof Props>(name: S, value: any): void;
|
1428 | serialize(): any;
|
1429 | possiblyEvaluate(parameters: EvaluationParameters, canonical?: CanonicalTileID, availableImages?: Array<string>): PossiblyEvaluated<Props, any>;
|
1430 | }
|
1431 | /**
|
1432 | * "Possibly evaluated value" is an intermediate stage in the evaluation chain for both paint and layout property
|
1433 | * values. The purpose of this stage is to optimize away unnecessary recalculations for data-driven properties. Code
|
1434 | * which uses data-driven property values must assume that the value is dependent on feature data, and request that it
|
1435 | * be evaluated for each feature. But when that property value is in fact a constant or camera function, the calculation
|
1436 | * will not actually depend on the feature, and we can benefit from returning the prior result of having done the
|
1437 | * evaluation once, ahead of time, in an intermediate step whose inputs are just the value and "global" parameters
|
1438 | * such as current zoom level.
|
1439 | *
|
1440 | * `PossiblyEvaluatedValue` represents the three possible outcomes of this step: if the input value was a constant or
|
1441 | * camera expression, then the "possibly evaluated" result is a constant value. Otherwise, the input value was either
|
1442 | * a source or composite expression, and we must defer final evaluation until supplied a feature. We separate
|
1443 | * the source and composite cases because they are handled differently when generating GL attributes, buffers, and
|
1444 | * uniforms.
|
1445 | *
|
1446 | * Note that `PossiblyEvaluatedValue` (and `PossiblyEvaluatedPropertyValue`, below) are _not_ used for properties that
|
1447 | * do not allow data-driven values. For such properties, we know that the "possibly evaluated" result is always a constant
|
1448 | * scalar value. See below.
|
1449 | *
|
1450 | * @private
|
1451 | */
|
1452 | export declare type PossiblyEvaluatedValue<T> = {
|
1453 | kind: "constant";
|
1454 | value: T;
|
1455 | } | SourceExpression | CompositeExpression;
|
1456 | export declare class PossiblyEvaluatedPropertyValue<T> {
|
1457 | property: DataDrivenProperty<T>;
|
1458 | value: PossiblyEvaluatedValue<T>;
|
1459 | parameters: EvaluationParameters;
|
1460 | constructor(property: DataDrivenProperty<T>, value: PossiblyEvaluatedValue<T>, parameters: EvaluationParameters);
|
1461 | isConstant(): boolean;
|
1462 | constantOr(value: T): T;
|
1463 | evaluate(feature: Feature, featureState: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>): T;
|
1464 | }
|
1465 | export declare class PossiblyEvaluated<Props, PossibleEvaluatedProps> {
|
1466 | _properties: Properties<Props>;
|
1467 | _values: PossibleEvaluatedProps;
|
1468 | constructor(properties: Properties<Props>);
|
1469 | get<S extends keyof PossibleEvaluatedProps>(name: S): PossibleEvaluatedProps[S];
|
1470 | }
|
1471 | export declare class DataConstantProperty<T> implements Property<T, T> {
|
1472 | specification: StylePropertySpecification;
|
1473 | constructor(specification: StylePropertySpecification);
|
1474 | possiblyEvaluate(value: PropertyValue<T, T>, parameters: EvaluationParameters): T;
|
1475 | interpolate(a: T, b: T, t: number): T;
|
1476 | }
|
1477 | export declare class DataDrivenProperty<T> implements Property<T, PossiblyEvaluatedPropertyValue<T>> {
|
1478 | specification: StylePropertySpecification;
|
1479 | overrides: any;
|
1480 | constructor(specification: StylePropertySpecification, overrides?: any);
|
1481 | possiblyEvaluate(value: PropertyValue<T, PossiblyEvaluatedPropertyValue<T>>, parameters: EvaluationParameters, canonical?: CanonicalTileID, availableImages?: Array<string>): PossiblyEvaluatedPropertyValue<T>;
|
1482 | interpolate(a: PossiblyEvaluatedPropertyValue<T>, b: PossiblyEvaluatedPropertyValue<T>, t: number): PossiblyEvaluatedPropertyValue<T>;
|
1483 | evaluate(value: PossiblyEvaluatedValue<T>, parameters: EvaluationParameters, feature: Feature, featureState: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>): T;
|
1484 | }
|
1485 | export declare class CrossFadedDataDrivenProperty<T> extends DataDrivenProperty<CrossFaded<T>> {
|
1486 | possiblyEvaluate(value: PropertyValue<CrossFaded<T>, PossiblyEvaluatedPropertyValue<CrossFaded<T>>>, parameters: EvaluationParameters, canonical?: CanonicalTileID, availableImages?: Array<string>): PossiblyEvaluatedPropertyValue<CrossFaded<T>>;
|
1487 | evaluate(value: PossiblyEvaluatedValue<CrossFaded<T>>, globals: EvaluationParameters, feature: Feature, featureState: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>): CrossFaded<T>;
|
1488 | _calculate(min: T, mid: T, max: T, parameters: EvaluationParameters): CrossFaded<T>;
|
1489 | interpolate(a: PossiblyEvaluatedPropertyValue<CrossFaded<T>>): PossiblyEvaluatedPropertyValue<CrossFaded<T>>;
|
1490 | }
|
1491 | export declare class CrossFadedProperty<T> implements Property<T, CrossFaded<T>> {
|
1492 | specification: StylePropertySpecification;
|
1493 | constructor(specification: StylePropertySpecification);
|
1494 | possiblyEvaluate(value: PropertyValue<T, CrossFaded<T>>, parameters: EvaluationParameters, canonical?: CanonicalTileID, availableImages?: Array<string>): CrossFaded<T>;
|
1495 | _calculate(min: T, mid: T, max: T, parameters: EvaluationParameters): CrossFaded<T>;
|
1496 | interpolate(a?: CrossFaded<T> | null): CrossFaded<T>;
|
1497 | }
|
1498 | export declare class ColorRampProperty implements Property<Color, boolean> {
|
1499 | specification: StylePropertySpecification;
|
1500 | constructor(specification: StylePropertySpecification);
|
1501 | possiblyEvaluate(value: PropertyValue<Color, boolean>, parameters: EvaluationParameters, canonical?: CanonicalTileID, availableImages?: Array<string>): boolean;
|
1502 | interpolate(): boolean;
|
1503 | }
|
1504 | export declare class Properties<Props> {
|
1505 | properties: Props;
|
1506 | defaultPropertyValues: {
|
1507 | [K in keyof Props]: PropertyValue<unknown, any>;
|
1508 | };
|
1509 | defaultTransitionablePropertyValues: {
|
1510 | [K in keyof Props]: TransitionablePropertyValue<unknown, unknown>;
|
1511 | };
|
1512 | defaultTransitioningPropertyValues: {
|
1513 | [K in keyof Props]: TransitioningPropertyValue<unknown, unknown>;
|
1514 | };
|
1515 | defaultPossiblyEvaluatedValues: {
|
1516 | [K in keyof Props]: PossiblyEvaluatedPropertyValue<unknown>;
|
1517 | };
|
1518 | overridableProperties: Array<string>;
|
1519 | constructor(properties: Props);
|
1520 | }
|
1521 | export declare type Transferable = ArrayBuffer | MessagePort | ImageBitmap;
|
1522 | declare const viewTypes: {
|
1523 | Int8: Int8ArrayConstructor;
|
1524 | Uint8: Uint8ArrayConstructor;
|
1525 | Int16: Int16ArrayConstructor;
|
1526 | Uint16: Uint16ArrayConstructor;
|
1527 | Int32: Int32ArrayConstructor;
|
1528 | Uint32: Uint32ArrayConstructor;
|
1529 | Float32: Float32ArrayConstructor;
|
1530 | };
|
1531 | export declare type ViewType = keyof typeof viewTypes;
|
1532 | export declare class Struct {
|
1533 | _pos1: number;
|
1534 | _pos2: number;
|
1535 | _pos4: number;
|
1536 | _pos8: number;
|
1537 | readonly _structArray: StructArray;
|
1538 | size: number;
|
1539 | |
1540 |
|
1541 |
|
1542 |
|
1543 |
|
1544 | constructor(structArray: StructArray, index: number);
|
1545 | }
|
1546 | export declare type StructArrayMember = {
|
1547 | name: string;
|
1548 | type: ViewType;
|
1549 | components: number;
|
1550 | offset: number;
|
1551 | };
|
1552 | export declare type SerializedStructArray = {
|
1553 | length: number;
|
1554 | arrayBuffer: ArrayBuffer;
|
1555 | };
|
1556 | declare abstract class StructArray {
|
1557 | capacity: number;
|
1558 | length: number;
|
1559 | isTransferred: boolean;
|
1560 | arrayBuffer: ArrayBuffer;
|
1561 | uint8: Uint8Array;
|
1562 | members: Array<StructArrayMember>;
|
1563 | bytesPerElement: number;
|
1564 | abstract emplaceBack(...v: number[]): any;
|
1565 | abstract emplace(i: number, ...v: number[]): any;
|
1566 | constructor();
|
1567 | /**
|
1568 | * Serialize a StructArray instance. Serializes both the raw data and the
|
1569 | * metadata needed to reconstruct the StructArray base class during
|
1570 | * deserialization.
|
1571 | * @private
|
1572 | */
|
1573 | static serialize(array: StructArray, transferables?: Array<Transferable>): SerializedStructArray;
|
1574 | static deserialize(input: SerializedStructArray): any;
|
1575 | /**
|
1576 | * Resize the array to discard unused capacity.
|
1577 | */
|
1578 | _trim(): void;
|
1579 | /**
|
1580 | * Resets the the length of the array to 0 without de-allocating capcacity.
|
1581 | */
|
1582 | clear(): void;
|
1583 | /**
|
1584 | * Resize the array.
|
1585 | * If `n` is greater than the current length then additional elements with undefined values are added.
|
1586 | * If `n` is less than the current length then the array will be reduced to the first `n` elements.
|
1587 | * @param {number} n The new size of the array.
|
1588 | */
|
1589 | resize(n: number): void;
|
1590 | |
1591 |
|
1592 |
|
1593 |
|
1594 |
|
1595 | reserve(n: number): void;
|
1596 | |
1597 |
|
1598 |
|
1599 | _refreshViews(): void;
|
1600 | }
|
1601 | export declare class StructArrayLayout2i4 extends StructArray {
|
1602 | uint8: Uint8Array;
|
1603 | int16: Int16Array;
|
1604 | _refreshViews(): void;
|
1605 | emplaceBack(v0: number, v1: number): number;
|
1606 | emplace(i: number, v0: number, v1: number): number;
|
1607 | }
|
1608 | export declare class StructArrayLayout4i8 extends StructArray {
|
1609 | uint8: Uint8Array;
|
1610 | int16: Int16Array;
|
1611 | _refreshViews(): void;
|
1612 | emplaceBack(v0: number, v1: number, v2: number, v3: number): number;
|
1613 | emplace(i: number, v0: number, v1: number, v2: number, v3: number): number;
|
1614 | }
|
1615 | export declare class StructArrayLayout2i4i12 extends StructArray {
|
1616 | uint8: Uint8Array;
|
1617 | int16: Int16Array;
|
1618 | _refreshViews(): void;
|
1619 | emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number): number;
|
1620 | emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number): number;
|
1621 | }
|
1622 | export declare class StructArrayLayout2i4ub8 extends StructArray {
|
1623 | uint8: Uint8Array;
|
1624 | int16: Int16Array;
|
1625 | _refreshViews(): void;
|
1626 | emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number): number;
|
1627 | emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number): number;
|
1628 | }
|
1629 | export declare class StructArrayLayout2f8 extends StructArray {
|
1630 | uint8: Uint8Array;
|
1631 | float32: Float32Array;
|
1632 | _refreshViews(): void;
|
1633 | emplaceBack(v0: number, v1: number): number;
|
1634 | emplace(i: number, v0: number, v1: number): number;
|
1635 | }
|
1636 | export declare class StructArrayLayout4i4ui4i24 extends StructArray {
|
1637 | uint8: Uint8Array;
|
1638 | int16: Int16Array;
|
1639 | uint16: Uint16Array;
|
1640 | _refreshViews(): void;
|
1641 | emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number): number;
|
1642 | emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number): number;
|
1643 | }
|
1644 | export declare class StructArrayLayout3f12 extends StructArray {
|
1645 | uint8: Uint8Array;
|
1646 | float32: Float32Array;
|
1647 | _refreshViews(): void;
|
1648 | emplaceBack(v0: number, v1: number, v2: number): number;
|
1649 | emplace(i: number, v0: number, v1: number, v2: number): number;
|
1650 | }
|
1651 | export declare class StructArrayLayout1ul4 extends StructArray {
|
1652 | uint8: Uint8Array;
|
1653 | uint32: Uint32Array;
|
1654 | _refreshViews(): void;
|
1655 | emplaceBack(v0: number): number;
|
1656 | emplace(i: number, v0: number): number;
|
1657 | }
|
1658 | export declare class StructArrayLayout6i1ul2ui20 extends StructArray {
|
1659 | uint8: Uint8Array;
|
1660 | int16: Int16Array;
|
1661 | uint32: Uint32Array;
|
1662 | uint16: Uint16Array;
|
1663 | _refreshViews(): void;
|
1664 | emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number): number;
|
1665 | emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number): number;
|
1666 | }
|
1667 | export declare class StructArrayLayout2ub2f12 extends StructArray {
|
1668 | uint8: Uint8Array;
|
1669 | float32: Float32Array;
|
1670 | _refreshViews(): void;
|
1671 | emplaceBack(v0: number, v1: number, v2: number, v3: number): number;
|
1672 | emplace(i: number, v0: number, v1: number, v2: number, v3: number): number;
|
1673 | }
|
1674 | export declare class StructArrayLayout3ui6 extends StructArray {
|
1675 | uint8: Uint8Array;
|
1676 | uint16: Uint16Array;
|
1677 | _refreshViews(): void;
|
1678 | emplaceBack(v0: number, v1: number, v2: number): number;
|
1679 | emplace(i: number, v0: number, v1: number, v2: number): number;
|
1680 | }
|
1681 | export declare class StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48 extends StructArray {
|
1682 | uint8: Uint8Array;
|
1683 | int16: Int16Array;
|
1684 | uint16: Uint16Array;
|
1685 | uint32: Uint32Array;
|
1686 | float32: Float32Array;
|
1687 | _refreshViews(): void;
|
1688 | emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number, v16: number): number;
|
1689 | emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number, v16: number): number;
|
1690 | }
|
1691 | export declare class StructArrayLayout8i15ui1ul4f68 extends StructArray {
|
1692 | uint8: Uint8Array;
|
1693 | int16: Int16Array;
|
1694 | uint16: Uint16Array;
|
1695 | uint32: Uint32Array;
|
1696 | float32: Float32Array;
|
1697 | _refreshViews(): void;
|
1698 | emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number, v16: number, v17: number, v18: number, v19: number, v20: number, v21: number, v22: number, v23: number, v24: number, v25: number, v26: number, v27: number): number;
|
1699 | emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number, v16: number, v17: number, v18: number, v19: number, v20: number, v21: number, v22: number, v23: number, v24: number, v25: number, v26: number, v27: number): number;
|
1700 | }
|
1701 | export declare class StructArrayLayout1f4 extends StructArray {
|
1702 | uint8: Uint8Array;
|
1703 | float32: Float32Array;
|
1704 | _refreshViews(): void;
|
1705 | emplaceBack(v0: number): number;
|
1706 | emplace(i: number, v0: number): number;
|
1707 | }
|
1708 | export declare class StructArrayLayout3i6 extends StructArray {
|
1709 | uint8: Uint8Array;
|
1710 | int16: Int16Array;
|
1711 | _refreshViews(): void;
|
1712 | emplaceBack(v0: number, v1: number, v2: number): number;
|
1713 | emplace(i: number, v0: number, v1: number, v2: number): number;
|
1714 | }
|
1715 | export declare class StructArrayLayout1ul2ui8 extends StructArray {
|
1716 | uint8: Uint8Array;
|
1717 | uint32: Uint32Array;
|
1718 | uint16: Uint16Array;
|
1719 | _refreshViews(): void;
|
1720 | emplaceBack(v0: number, v1: number, v2: number): number;
|
1721 | emplace(i: number, v0: number, v1: number, v2: number): number;
|
1722 | }
|
1723 | export declare class StructArrayLayout2ui4 extends StructArray {
|
1724 | uint8: Uint8Array;
|
1725 | uint16: Uint16Array;
|
1726 | _refreshViews(): void;
|
1727 | emplaceBack(v0: number, v1: number): number;
|
1728 | emplace(i: number, v0: number, v1: number): number;
|
1729 | }
|
1730 | export declare class StructArrayLayout1ui2 extends StructArray {
|
1731 | uint8: Uint8Array;
|
1732 | uint16: Uint16Array;
|
1733 | _refreshViews(): void;
|
1734 | emplaceBack(v0: number): number;
|
1735 | emplace(i: number, v0: number): number;
|
1736 | }
|
1737 | export declare class CollisionBoxStruct extends Struct {
|
1738 | _structArray: CollisionBoxArray;
|
1739 | get anchorPointX(): number;
|
1740 | get anchorPointY(): number;
|
1741 | get x1(): number;
|
1742 | get y1(): number;
|
1743 | get x2(): number;
|
1744 | get y2(): number;
|
1745 | get featureIndex(): number;
|
1746 | get sourceLayerIndex(): number;
|
1747 | get bucketIndex(): number;
|
1748 | get anchorPoint(): Point;
|
1749 | }
|
1750 | export declare class CollisionBoxArray extends StructArrayLayout6i1ul2ui20 {
|
1751 | |
1752 |
|
1753 |
|
1754 |
|
1755 |
|
1756 | get(index: number): CollisionBoxStruct;
|
1757 | }
|
1758 | export declare class PlacedSymbolStruct extends Struct {
|
1759 | _structArray: PlacedSymbolArray;
|
1760 | get anchorX(): number;
|
1761 | get anchorY(): number;
|
1762 | get glyphStartIndex(): number;
|
1763 | get numGlyphs(): number;
|
1764 | get vertexStartIndex(): number;
|
1765 | get lineStartIndex(): number;
|
1766 | get lineLength(): number;
|
1767 | get segment(): number;
|
1768 | get lowerSize(): number;
|
1769 | get upperSize(): number;
|
1770 | get lineOffsetX(): number;
|
1771 | get lineOffsetY(): number;
|
1772 | get writingMode(): number;
|
1773 | get placedOrientation(): number;
|
1774 | set placedOrientation(x: number);
|
1775 | get hidden(): number;
|
1776 | set hidden(x: number);
|
1777 | get crossTileID(): number;
|
1778 | set crossTileID(x: number);
|
1779 | get associatedIconIndex(): number;
|
1780 | }
|
1781 | export declare class PlacedSymbolArray extends StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48 {
|
1782 | |
1783 |
|
1784 |
|
1785 |
|
1786 |
|
1787 | get(index: number): PlacedSymbolStruct;
|
1788 | }
|
1789 | export declare class SymbolInstanceStruct extends Struct {
|
1790 | _structArray: SymbolInstanceArray;
|
1791 | get anchorX(): number;
|
1792 | get anchorY(): number;
|
1793 | get rightJustifiedTextSymbolIndex(): number;
|
1794 | get centerJustifiedTextSymbolIndex(): number;
|
1795 | get leftJustifiedTextSymbolIndex(): number;
|
1796 | get verticalPlacedTextSymbolIndex(): number;
|
1797 | get placedIconSymbolIndex(): number;
|
1798 | get verticalPlacedIconSymbolIndex(): number;
|
1799 | get key(): number;
|
1800 | get textBoxStartIndex(): number;
|
1801 | get textBoxEndIndex(): number;
|
1802 | get verticalTextBoxStartIndex(): number;
|
1803 | get verticalTextBoxEndIndex(): number;
|
1804 | get iconBoxStartIndex(): number;
|
1805 | get iconBoxEndIndex(): number;
|
1806 | get verticalIconBoxStartIndex(): number;
|
1807 | get verticalIconBoxEndIndex(): number;
|
1808 | get featureIndex(): number;
|
1809 | get numHorizontalGlyphVertices(): number;
|
1810 | get numVerticalGlyphVertices(): number;
|
1811 | get numIconVertices(): number;
|
1812 | get numVerticalIconVertices(): number;
|
1813 | get useRuntimeCollisionCircles(): number;
|
1814 | get crossTileID(): number;
|
1815 | set crossTileID(x: number);
|
1816 | get textBoxScale(): number;
|
1817 | get textOffset0(): number;
|
1818 | get textOffset1(): number;
|
1819 | get collisionCircleDiameter(): number;
|
1820 | }
|
1821 | export declare type SymbolInstance = SymbolInstanceStruct;
|
1822 | export declare class SymbolInstanceArray extends StructArrayLayout8i15ui1ul4f68 {
|
1823 | |
1824 |
|
1825 |
|
1826 |
|
1827 |
|
1828 | get(index: number): SymbolInstanceStruct;
|
1829 | }
|
1830 | export declare class GlyphOffsetArray extends StructArrayLayout1f4 {
|
1831 | getoffsetX(index: number): number;
|
1832 | }
|
1833 | export declare class SymbolLineVertexArray extends StructArrayLayout3i6 {
|
1834 | getx(index: number): number;
|
1835 | gety(index: number): number;
|
1836 | gettileUnitDistanceFromAnchor(index: number): number;
|
1837 | }
|
1838 | export declare class FeatureIndexStruct extends Struct {
|
1839 | _structArray: FeatureIndexArray;
|
1840 | get featureIndex(): number;
|
1841 | get sourceLayerIndex(): number;
|
1842 | get bucketIndex(): number;
|
1843 | }
|
1844 | export declare class FeatureIndexArray extends StructArrayLayout1ul2ui8 {
|
1845 | |
1846 |
|
1847 |
|
1848 |
|
1849 |
|
1850 | get(index: number): FeatureIndexStruct;
|
1851 | }
|
1852 | export declare class RasterBoundsArray extends StructArrayLayout4i8 {
|
1853 | }
|
1854 | export declare class CircleLayoutArray extends StructArrayLayout2i4 {
|
1855 | }
|
1856 | export declare class FillLayoutArray extends StructArrayLayout2i4 {
|
1857 | }
|
1858 | export declare class FillExtrusionLayoutArray extends StructArrayLayout2i4i12 {
|
1859 | }
|
1860 | export declare class LineLayoutArray extends StructArrayLayout2i4ub8 {
|
1861 | }
|
1862 | export declare class LineExtLayoutArray extends StructArrayLayout2f8 {
|
1863 | }
|
1864 | export declare class SymbolLayoutArray extends StructArrayLayout4i4ui4i24 {
|
1865 | }
|
1866 | export declare class SymbolDynamicLayoutArray extends StructArrayLayout3f12 {
|
1867 | }
|
1868 | export declare class SymbolOpacityArray extends StructArrayLayout1ul4 {
|
1869 | }
|
1870 | export declare class CollisionVertexArray extends StructArrayLayout2ub2f12 {
|
1871 | }
|
1872 | export declare class TriangleIndexArray extends StructArrayLayout3ui6 {
|
1873 | }
|
1874 | export declare class LineIndexArray extends StructArrayLayout2ui4 {
|
1875 | }
|
1876 | export declare class LineStripIndexArray extends StructArrayLayout1ui2 {
|
1877 | }
|
1878 | export declare type SerializedFeaturePositionMap = {
|
1879 | ids: Float64Array;
|
1880 | positions: Uint32Array;
|
1881 | };
|
1882 | export declare type FeaturePosition = {
|
1883 | index: number;
|
1884 | start: number;
|
1885 | end: number;
|
1886 | };
|
1887 | export declare class FeaturePositionMap {
|
1888 | ids: Array<number>;
|
1889 | positions: Array<number>;
|
1890 | indexed: boolean;
|
1891 | constructor();
|
1892 | add(id: unknown, index: number, start: number, end: number): void;
|
1893 | getPositions(id: unknown): Array<FeaturePosition>;
|
1894 | static serialize(map: FeaturePositionMap, transferables: Array<ArrayBuffer>): SerializedFeaturePositionMap;
|
1895 | static deserialize(obj: SerializedFeaturePositionMap): FeaturePositionMap;
|
1896 | }
|
1897 | export declare class IndexBuffer {
|
1898 | context: Context;
|
1899 | buffer: WebGLBuffer;
|
1900 | dynamicDraw: boolean;
|
1901 | constructor(context: Context, array: TriangleIndexArray | LineIndexArray | LineStripIndexArray, dynamicDraw?: boolean);
|
1902 | bind(): void;
|
1903 | updateData(array: StructArray): void;
|
1904 | destroy(): void;
|
1905 | }
|
1906 | export declare class VertexBuffer {
|
1907 | length: number;
|
1908 | attributes: ReadonlyArray<StructArrayMember>;
|
1909 | itemSize: number;
|
1910 | dynamicDraw: boolean;
|
1911 | context: Context;
|
1912 | buffer: WebGLBuffer;
|
1913 | |
1914 |
|
1915 |
|
1916 |
|
1917 | constructor(context: Context, array: StructArray, attributes: ReadonlyArray<StructArrayMember>, dynamicDraw?: boolean);
|
1918 | bind(): void;
|
1919 | updateData(array: StructArray): void;
|
1920 | enableAttributes(gl: WebGLRenderingContext, program: Program<any>): void;
|
1921 | /**
|
1922 | * Set the attribute pointers in a WebGL context
|
1923 | * @param gl The WebGL context
|
1924 | * @param program The active WebGL program
|
1925 | * @param vertexOffset Index of the starting vertex of the segment
|
1926 | */
|
1927 | setVertexAttribPointers(gl: WebGLRenderingContext, program: Program<any>, vertexOffset?: number | null): void;
|
1928 | /**
|
1929 | * Destroy the GL buffer bound to the given WebGL context
|
1930 | */
|
1931 | destroy(): void;
|
1932 | }
|
1933 | export declare type BlendFuncConstant = WebGLRenderingContext["ZERO"] | WebGLRenderingContext["ONE"] | WebGLRenderingContext["SRC_COLOR"] | WebGLRenderingContext["ONE_MINUS_SRC_COLOR"] | WebGLRenderingContext["DST_COLOR"] | WebGLRenderingContext["ONE_MINUS_DST_COLOR"] | WebGLRenderingContext["SRC_ALPHA"] | WebGLRenderingContext["ONE_MINUS_SRC_ALPHA"] | WebGLRenderingContext["DST_ALPHA"] | WebGLRenderingContext["ONE_MINUS_DST_ALPHA"] | WebGLRenderingContext["CONSTANT_COLOR"] | WebGLRenderingContext["ONE_MINUS_CONSTANT_COLOR"] | WebGLRenderingContext["CONSTANT_ALPHA"] | WebGLRenderingContext["ONE_MINUS_CONSTANT_ALPHA"] | WebGLRenderingContext["BLEND_COLOR"];
|
1934 | export declare type BlendFuncType = [
|
1935 | BlendFuncConstant,
|
1936 | BlendFuncConstant
|
1937 | ];
|
1938 | export declare type BlendEquationType = WebGLRenderingContext["FUNC_ADD"] | WebGLRenderingContext["FUNC_SUBTRACT"] | WebGLRenderingContext["FUNC_REVERSE_SUBTRACT"];
|
1939 | export declare type ColorMaskType = [
|
1940 | boolean,
|
1941 | boolean,
|
1942 | boolean,
|
1943 | boolean
|
1944 | ];
|
1945 | export declare type CompareFuncType = WebGLRenderingContext["NEVER"] | WebGLRenderingContext["LESS"] | WebGLRenderingContext["EQUAL"] | WebGLRenderingContext["LEQUAL"] | WebGLRenderingContext["GREATER"] | WebGLRenderingContext["NOTEQUAL"] | WebGLRenderingContext["GEQUAL"] | WebGLRenderingContext["ALWAYS"];
|
1946 | export declare type DepthMaskType = boolean;
|
1947 | export declare type DepthRangeType = [
|
1948 | number,
|
1949 | number
|
1950 | ];
|
1951 | export declare type DepthFuncType = CompareFuncType;
|
1952 | export declare type StencilFuncType = {
|
1953 | func: CompareFuncType;
|
1954 | ref: number;
|
1955 | mask: number;
|
1956 | };
|
1957 | export declare type StencilOpConstant = WebGLRenderingContext["KEEP"] | WebGLRenderingContext["ZERO"] | WebGLRenderingContext["REPLACE"] | WebGLRenderingContext["INCR"] | WebGLRenderingContext["INCR_WRAP"] | WebGLRenderingContext["DECR"] | WebGLRenderingContext["DECR_WRAP"] | WebGLRenderingContext["INVERT"];
|
1958 | export declare type StencilOpType = [
|
1959 | StencilOpConstant,
|
1960 | StencilOpConstant,
|
1961 | StencilOpConstant
|
1962 | ];
|
1963 | export declare type TextureUnitType = number;
|
1964 | export declare type ViewportType = [
|
1965 | number,
|
1966 | number,
|
1967 | number,
|
1968 | number
|
1969 | ];
|
1970 | export declare type StencilTestGL = {
|
1971 | func: WebGLRenderingContext["NEVER"];
|
1972 | mask: 0;
|
1973 | } | {
|
1974 | func: WebGLRenderingContext["LESS"];
|
1975 | mask: number;
|
1976 | } | {
|
1977 | func: WebGLRenderingContext["EQUAL"];
|
1978 | mask: number;
|
1979 | } | {
|
1980 | func: WebGLRenderingContext["LEQUAL"];
|
1981 | mask: number;
|
1982 | } | {
|
1983 | func: WebGLRenderingContext["GREATER"];
|
1984 | mask: number;
|
1985 | } | {
|
1986 | func: WebGLRenderingContext["NOTEQUAL"];
|
1987 | mask: number;
|
1988 | } | {
|
1989 | func: WebGLRenderingContext["GEQUAL"];
|
1990 | mask: number;
|
1991 | } | {
|
1992 | func: WebGLRenderingContext["ALWAYS"];
|
1993 | mask: 0;
|
1994 | };
|
1995 | export declare type CullFaceModeType = WebGLRenderingContext["FRONT"] | WebGLRenderingContext["BACK"] | WebGLRenderingContext["FRONT_AND_BACK"];
|
1996 | export declare type FrontFaceType = WebGLRenderingContext["CW"] | WebGLRenderingContext["CCW"];
|
1997 | export interface IValue<T> {
|
1998 | current: T;
|
1999 | default: T;
|
2000 | dirty: boolean;
|
2001 | get(): T;
|
2002 | setDefault(): void;
|
2003 | set(value: T): void;
|
2004 | }
|
2005 | export declare class BaseValue<T> implements IValue<T> {
|
2006 | gl: WebGLRenderingContext;
|
2007 | current: T;
|
2008 | default: T;
|
2009 | dirty: boolean;
|
2010 | constructor(context: Context);
|
2011 | get(): T;
|
2012 | set(value: T): void;
|
2013 | getDefault(): T;
|
2014 | setDefault(): void;
|
2015 | }
|
2016 | export declare class ClearColor extends BaseValue<Color> {
|
2017 | getDefault(): Color;
|
2018 | set(v: Color): void;
|
2019 | }
|
2020 | export declare class ClearDepth extends BaseValue<number> {
|
2021 | getDefault(): number;
|
2022 | set(v: number): void;
|
2023 | }
|
2024 | export declare class ClearStencil extends BaseValue<number> {
|
2025 | getDefault(): number;
|
2026 | set(v: number): void;
|
2027 | }
|
2028 | export declare class ColorMask extends BaseValue<ColorMaskType> {
|
2029 | getDefault(): ColorMaskType;
|
2030 | set(v: ColorMaskType): void;
|
2031 | }
|
2032 | export declare class DepthMask extends BaseValue<DepthMaskType> {
|
2033 | getDefault(): DepthMaskType;
|
2034 | set(v: DepthMaskType): void;
|
2035 | }
|
2036 | export declare class StencilMask extends BaseValue<number> {
|
2037 | getDefault(): number;
|
2038 | set(v: number): void;
|
2039 | }
|
2040 | export declare class StencilFunc extends BaseValue<StencilFuncType> {
|
2041 | getDefault(): StencilFuncType;
|
2042 | set(v: StencilFuncType): void;
|
2043 | }
|
2044 | export declare class StencilOp extends BaseValue<StencilOpType> {
|
2045 | getDefault(): StencilOpType;
|
2046 | set(v: StencilOpType): void;
|
2047 | }
|
2048 | export declare class StencilTest extends BaseValue<boolean> {
|
2049 | getDefault(): boolean;
|
2050 | set(v: boolean): void;
|
2051 | }
|
2052 | export declare class DepthRange extends BaseValue<DepthRangeType> {
|
2053 | getDefault(): DepthRangeType;
|
2054 | set(v: DepthRangeType): void;
|
2055 | }
|
2056 | export declare class DepthTest extends BaseValue<boolean> {
|
2057 | getDefault(): boolean;
|
2058 | set(v: boolean): void;
|
2059 | }
|
2060 | export declare class DepthFunc extends BaseValue<DepthFuncType> {
|
2061 | getDefault(): DepthFuncType;
|
2062 | set(v: DepthFuncType): void;
|
2063 | }
|
2064 | export declare class Blend extends BaseValue<boolean> {
|
2065 | getDefault(): boolean;
|
2066 | set(v: boolean): void;
|
2067 | }
|
2068 | export declare class BlendFunc extends BaseValue<BlendFuncType> {
|
2069 | getDefault(): BlendFuncType;
|
2070 | set(v: BlendFuncType): void;
|
2071 | }
|
2072 | export declare class BlendColor extends BaseValue<Color> {
|
2073 | getDefault(): Color;
|
2074 | set(v: Color): void;
|
2075 | }
|
2076 | export declare class BlendEquation extends BaseValue<BlendEquationType> {
|
2077 | getDefault(): BlendEquationType;
|
2078 | set(v: BlendEquationType): void;
|
2079 | }
|
2080 | export declare class CullFace extends BaseValue<boolean> {
|
2081 | getDefault(): boolean;
|
2082 | set(v: boolean): void;
|
2083 | }
|
2084 | export declare class CullFaceSide extends BaseValue<CullFaceModeType> {
|
2085 | getDefault(): CullFaceModeType;
|
2086 | set(v: CullFaceModeType): void;
|
2087 | }
|
2088 | export declare class FrontFace extends BaseValue<FrontFaceType> {
|
2089 | getDefault(): FrontFaceType;
|
2090 | set(v: FrontFaceType): void;
|
2091 | }
|
2092 | export declare class ProgramValue extends BaseValue<WebGLProgram> {
|
2093 | getDefault(): WebGLProgram;
|
2094 | set(v?: WebGLProgram | null): void;
|
2095 | }
|
2096 | export declare class ActiveTextureUnit extends BaseValue<TextureUnitType> {
|
2097 | getDefault(): TextureUnitType;
|
2098 | set(v: TextureUnitType): void;
|
2099 | }
|
2100 | export declare class Viewport extends BaseValue<ViewportType> {
|
2101 | getDefault(): ViewportType;
|
2102 | set(v: ViewportType): void;
|
2103 | }
|
2104 | export declare class BindFramebuffer extends BaseValue<WebGLFramebuffer> {
|
2105 | getDefault(): WebGLFramebuffer;
|
2106 | set(v?: WebGLFramebuffer | null): void;
|
2107 | }
|
2108 | export declare class BindRenderbuffer extends BaseValue<WebGLRenderbuffer> {
|
2109 | getDefault(): WebGLRenderbuffer;
|
2110 | set(v?: WebGLRenderbuffer | null): void;
|
2111 | }
|
2112 | export declare class BindTexture extends BaseValue<WebGLTexture> {
|
2113 | getDefault(): WebGLTexture;
|
2114 | set(v?: WebGLTexture | null): void;
|
2115 | }
|
2116 | export declare class BindVertexBuffer extends BaseValue<WebGLBuffer> {
|
2117 | getDefault(): WebGLBuffer;
|
2118 | set(v?: WebGLBuffer | null): void;
|
2119 | }
|
2120 | export declare class BindElementBuffer extends BaseValue<WebGLBuffer> {
|
2121 | getDefault(): WebGLBuffer;
|
2122 | set(v?: WebGLBuffer | null): void;
|
2123 | }
|
2124 | export declare class BindVertexArrayOES extends BaseValue<any> {
|
2125 | vao: any;
|
2126 | constructor(context: Context);
|
2127 | getDefault(): any;
|
2128 | set(v: any): void;
|
2129 | }
|
2130 | export declare class PixelStoreUnpack extends BaseValue<number> {
|
2131 | getDefault(): number;
|
2132 | set(v: number): void;
|
2133 | }
|
2134 | export declare class PixelStoreUnpackPremultiplyAlpha extends BaseValue<boolean> {
|
2135 | getDefault(): boolean;
|
2136 | set(v: boolean): void;
|
2137 | }
|
2138 | export declare class PixelStoreUnpackFlipY extends BaseValue<boolean> {
|
2139 | getDefault(): boolean;
|
2140 | set(v: boolean): void;
|
2141 | }
|
2142 | export declare class FramebufferAttachment<T> extends BaseValue<T> {
|
2143 | parent: WebGLFramebuffer;
|
2144 | context: Context;
|
2145 | constructor(context: Context, parent: WebGLFramebuffer);
|
2146 | getDefault(): any;
|
2147 | }
|
2148 | export declare class ColorAttachment extends FramebufferAttachment<WebGLTexture> {
|
2149 | setDirty(): void;
|
2150 | set(v?: WebGLTexture | null): void;
|
2151 | }
|
2152 | export declare class DepthAttachment extends FramebufferAttachment<WebGLRenderbuffer> {
|
2153 | set(v?: WebGLRenderbuffer | null): void;
|
2154 | }
|
2155 | export declare class Framebuffer {
|
2156 | context: Context;
|
2157 | width: number;
|
2158 | height: number;
|
2159 | framebuffer: WebGLFramebuffer;
|
2160 | colorAttachment: ColorAttachment;
|
2161 | depthAttachment: DepthAttachment;
|
2162 | constructor(context: Context, width: number, height: number, hasDepth: boolean);
|
2163 | destroy(): void;
|
2164 | }
|
2165 | export declare class DepthMode {
|
2166 | func: DepthFuncType;
|
2167 | mask: DepthMaskType;
|
2168 | range: DepthRangeType;
|
2169 | static ReadOnly: boolean;
|
2170 | static ReadWrite: boolean;
|
2171 | constructor(depthFunc: DepthFuncType, depthMask: DepthMaskType, depthRange: DepthRangeType);
|
2172 | static disabled: Readonly<DepthMode>;
|
2173 | }
|
2174 | export declare class StencilMode {
|
2175 | test: StencilTestGL;
|
2176 | ref: number;
|
2177 | mask: number;
|
2178 | fail: StencilOpConstant;
|
2179 | depthFail: StencilOpConstant;
|
2180 | pass: StencilOpConstant;
|
2181 | constructor(test: StencilTestGL, ref: number, mask: number, fail: StencilOpConstant, depthFail: StencilOpConstant, pass: StencilOpConstant);
|
2182 | static disabled: Readonly<StencilMode>;
|
2183 | }
|
2184 | export declare class ColorMode {
|
2185 | blendFunction: BlendFuncType;
|
2186 | blendColor: Color;
|
2187 | mask: ColorMaskType;
|
2188 | constructor(blendFunction: BlendFuncType, blendColor: Color, mask: ColorMaskType);
|
2189 | static Replace: BlendFuncType;
|
2190 | static disabled: Readonly<ColorMode>;
|
2191 | static unblended: Readonly<ColorMode>;
|
2192 | static alphaBlended: Readonly<ColorMode>;
|
2193 | }
|
2194 | export declare class CullFaceMode {
|
2195 | enable: boolean;
|
2196 | mode: CullFaceModeType;
|
2197 | frontFace: FrontFaceType;
|
2198 | constructor(enable: boolean, mode: CullFaceModeType, frontFace: FrontFaceType);
|
2199 | static disabled: Readonly<CullFaceMode>;
|
2200 | static backCCW: Readonly<CullFaceMode>;
|
2201 | }
|
2202 | export declare type ClearArgs = {
|
2203 | color?: Color;
|
2204 | depth?: number;
|
2205 | stencil?: number;
|
2206 | };
|
2207 | export declare class Context {
|
2208 | gl: WebGLRenderingContext;
|
2209 | extVertexArrayObject: any;
|
2210 | currentNumAttributes: number;
|
2211 | maxTextureSize: number;
|
2212 | clearColor: ClearColor;
|
2213 | clearDepth: ClearDepth;
|
2214 | clearStencil: ClearStencil;
|
2215 | colorMask: ColorMask;
|
2216 | depthMask: DepthMask;
|
2217 | stencilMask: StencilMask;
|
2218 | stencilFunc: StencilFunc;
|
2219 | stencilOp: StencilOp;
|
2220 | stencilTest: StencilTest;
|
2221 | depthRange: DepthRange;
|
2222 | depthTest: DepthTest;
|
2223 | depthFunc: DepthFunc;
|
2224 | blend: Blend;
|
2225 | blendFunc: BlendFunc;
|
2226 | blendColor: BlendColor;
|
2227 | blendEquation: BlendEquation;
|
2228 | cullFace: CullFace;
|
2229 | cullFaceSide: CullFaceSide;
|
2230 | frontFace: FrontFace;
|
2231 | program: ProgramValue;
|
2232 | activeTexture: ActiveTextureUnit;
|
2233 | viewport: Viewport;
|
2234 | bindFramebuffer: BindFramebuffer;
|
2235 | bindRenderbuffer: BindRenderbuffer;
|
2236 | bindTexture: BindTexture;
|
2237 | bindVertexBuffer: BindVertexBuffer;
|
2238 | bindElementBuffer: BindElementBuffer;
|
2239 | bindVertexArrayOES: BindVertexArrayOES;
|
2240 | pixelStoreUnpack: PixelStoreUnpack;
|
2241 | pixelStoreUnpackPremultiplyAlpha: PixelStoreUnpackPremultiplyAlpha;
|
2242 | pixelStoreUnpackFlipY: PixelStoreUnpackFlipY;
|
2243 | extTextureFilterAnisotropic: any;
|
2244 | extTextureFilterAnisotropicMax: any;
|
2245 | extTextureHalfFloat: any;
|
2246 | extRenderToTextureHalfFloat: any;
|
2247 | extTimerQuery: any;
|
2248 | constructor(gl: WebGLRenderingContext);
|
2249 | setDefault(): void;
|
2250 | setDirty(): void;
|
2251 | createIndexBuffer(array: TriangleIndexArray | LineIndexArray | LineStripIndexArray, dynamicDraw?: boolean): IndexBuffer;
|
2252 | createVertexBuffer(array: StructArray, attributes: ReadonlyArray<StructArrayMember>, dynamicDraw?: boolean): VertexBuffer;
|
2253 | createRenderbuffer(storageFormat: number, width: number, height: number): WebGLRenderbuffer;
|
2254 | createFramebuffer(width: number, height: number, hasDepth: boolean): Framebuffer;
|
2255 | clear({ color, depth }: ClearArgs): void;
|
2256 | setCullFace(cullFaceMode: Readonly<CullFaceMode>): void;
|
2257 | setDepthMode(depthMode: Readonly<DepthMode>): void;
|
2258 | setStencilMode(stencilMode: Readonly<StencilMode>): void;
|
2259 | setColorMode(colorMode: Readonly<ColorMode>): void;
|
2260 | unbindVAO(): void;
|
2261 | }
|
2262 | export declare type $ObjMap<T extends {}, F extends (v: any) => any> = {
|
2263 | [K in keyof T]: F extends (v: T[K]) => infer R ? R : never;
|
2264 | };
|
2265 | export declare type UniformValues<Us extends {}> = $ObjMap<Us, <V>(u: Uniform<V>) => V>;
|
2266 | export declare type UniformLocations = {
|
2267 | [_: string]: WebGLUniformLocation;
|
2268 | };
|
2269 | declare abstract class Uniform<T> {
|
2270 | gl: WebGLRenderingContext;
|
2271 | location: WebGLUniformLocation;
|
2272 | current: T;
|
2273 | constructor(context: Context, location: WebGLUniformLocation);
|
2274 | abstract set(v: T): void;
|
2275 | }
|
2276 | export declare type UniformBindings = {
|
2277 | [_: string]: Uniform<any>;
|
2278 | };
|
2279 | export declare type Size = {
|
2280 | width: number;
|
2281 | height: number;
|
2282 | };
|
2283 | export declare type Point2D = {
|
2284 | x: number;
|
2285 | y: number;
|
2286 | };
|
2287 | export declare class AlphaImage {
|
2288 | width: number;
|
2289 | height: number;
|
2290 | data: Uint8Array;
|
2291 | constructor(size: Size, data?: Uint8Array | Uint8ClampedArray);
|
2292 | resize(size: Size): void;
|
2293 | clone(): AlphaImage;
|
2294 | static copy(srcImg: AlphaImage, dstImg: AlphaImage, srcPt: Point2D, dstPt: Point2D, size: Size): void;
|
2295 | }
|
2296 | export declare class RGBAImage {
|
2297 | width: number;
|
2298 | height: number;
|
2299 | data: Uint8Array;
|
2300 | constructor(size: Size, data?: Uint8Array | Uint8ClampedArray);
|
2301 | resize(size: Size): void;
|
2302 | replace(data: Uint8Array | Uint8ClampedArray, copy?: boolean): void;
|
2303 | clone(): RGBAImage;
|
2304 | static copy(srcImg: RGBAImage | ImageData, dstImg: RGBAImage, srcPt: Point2D, dstPt: Point2D, size: Size): void;
|
2305 | }
|
2306 | export declare type StyleImageData = {
|
2307 | data: RGBAImage;
|
2308 | version: number;
|
2309 | hasRenderCallback?: boolean;
|
2310 | userImage?: StyleImageInterface;
|
2311 | };
|
2312 | export declare type StyleImageMetadata = {
|
2313 | pixelRatio: number;
|
2314 | sdf: boolean;
|
2315 | stretchX?: Array<[
|
2316 | number,
|
2317 | number
|
2318 | ]>;
|
2319 | stretchY?: Array<[
|
2320 | number,
|
2321 | number
|
2322 | ]>;
|
2323 | content?: [
|
2324 | number,
|
2325 | number,
|
2326 | number,
|
2327 | number
|
2328 | ];
|
2329 | };
|
2330 | export declare type StyleImage = StyleImageData & StyleImageMetadata;
|
2331 |
|
2332 |
|
2333 |
|
2334 |
|
2335 |
|
2336 |
|
2337 |
|
2338 |
|
2339 |
|
2340 |
|
2341 |
|
2342 |
|
2343 |
|
2344 |
|
2345 |
|
2346 |
|
2347 |
|
2348 |
|
2349 |
|
2350 |
|
2351 |
|
2352 |
|
2353 |
|
2354 |
|
2355 |
|
2356 |
|
2357 |
|
2358 |
|
2359 |
|
2360 |
|
2361 |
|
2362 |
|
2363 |
|
2364 |
|
2365 |
|
2366 |
|
2367 |
|
2368 |
|
2369 |
|
2370 |
|
2371 |
|
2372 |
|
2373 |
|
2374 |
|
2375 |
|
2376 |
|
2377 |
|
2378 |
|
2379 |
|
2380 |
|
2381 |
|
2382 |
|
2383 | export interface StyleImageInterface {
|
2384 | |
2385 |
|
2386 |
|
2387 | width: number;
|
2388 | |
2389 |
|
2390 |
|
2391 | height: number;
|
2392 | |
2393 |
|
2394 |
|
2395 | data: Uint8Array | Uint8ClampedArray;
|
2396 | |
2397 |
|
2398 |
|
2399 |
|
2400 |
|
2401 |
|
2402 |
|
2403 |
|
2404 |
|
2405 |
|
2406 |
|
2407 |
|
2408 |
|
2409 |
|
2410 |
|
2411 |
|
2412 | render?: () => boolean;
|
2413 | |
2414 |
|
2415 |
|
2416 |
|
2417 |
|
2418 |
|
2419 |
|
2420 |
|
2421 |
|
2422 | onAdd?: (map: Map, id: string) => void;
|
2423 | |
2424 |
|
2425 |
|
2426 |
|
2427 |
|
2428 |
|
2429 |
|
2430 |
|
2431 |
|
2432 | onRemove?: () => void;
|
2433 | }
|
2434 | export declare type TextureFormat = WebGLRenderingContext["RGBA"] | WebGLRenderingContext["ALPHA"];
|
2435 | export declare type TextureFilter = WebGLRenderingContext["LINEAR"] | WebGLRenderingContext["LINEAR_MIPMAP_NEAREST"] | WebGLRenderingContext["NEAREST"];
|
2436 | export declare type TextureWrap = WebGLRenderingContext["REPEAT"] | WebGLRenderingContext["CLAMP_TO_EDGE"] | WebGLRenderingContext["MIRRORED_REPEAT"];
|
2437 | export declare type EmptyImage = {
|
2438 | width: number;
|
2439 | height: number;
|
2440 | data: null;
|
2441 | };
|
2442 | export declare type DataTextureImage = RGBAImage | AlphaImage | EmptyImage;
|
2443 | export declare type TextureImage = TexImageSource | DataTextureImage;
|
2444 | export declare class Texture {
|
2445 | context: Context;
|
2446 | size: [
|
2447 | number,
|
2448 | number
|
2449 | ];
|
2450 | texture: WebGLTexture;
|
2451 | format: TextureFormat;
|
2452 | filter: TextureFilter;
|
2453 | wrap: TextureWrap;
|
2454 | useMipmap: boolean;
|
2455 | constructor(context: Context, image: TextureImage, format: TextureFormat, options?: {
|
2456 | premultiply?: boolean;
|
2457 | useMipmap?: boolean;
|
2458 | } | null);
|
2459 | update(image: TextureImage, options?: {
|
2460 | premultiply?: boolean;
|
2461 | useMipmap?: boolean;
|
2462 | } | null, position?: {
|
2463 | x: number;
|
2464 | y: number;
|
2465 | }): void;
|
2466 | bind(filter: TextureFilter, wrap: TextureWrap, minFilter?: TextureFilter | null): void;
|
2467 | isSizePowerOfTwo(): boolean;
|
2468 | destroy(): void;
|
2469 | }
|
2470 | export declare type Pattern = {
|
2471 | bin: PotpackBox;
|
2472 | position: ImagePosition;
|
2473 | };
|
2474 | export declare class ImageManager extends Evented {
|
2475 | images: {
|
2476 | [_: string]: StyleImage;
|
2477 | };
|
2478 | updatedImages: {
|
2479 | [_: string]: boolean;
|
2480 | };
|
2481 | callbackDispatchedThisFrame: {
|
2482 | [_: string]: boolean;
|
2483 | };
|
2484 | loaded: boolean;
|
2485 | requestors: Array<{
|
2486 | ids: Array<string>;
|
2487 | callback: Callback<{
|
2488 | [_: string]: StyleImage;
|
2489 | }>;
|
2490 | }>;
|
2491 | patterns: {
|
2492 | [_: string]: Pattern;
|
2493 | };
|
2494 | atlasImage: RGBAImage;
|
2495 | atlasTexture: Texture;
|
2496 | dirty: boolean;
|
2497 | constructor();
|
2498 | isLoaded(): boolean;
|
2499 | setLoaded(loaded: boolean): void;
|
2500 | getImage(id: string): StyleImage;
|
2501 | addImage(id: string, image: StyleImage): void;
|
2502 | _validate(id: string, image: StyleImage): boolean;
|
2503 | _validateStretch(stretch: Array<[
|
2504 | number,
|
2505 | number
|
2506 | ]>, size: number): boolean;
|
2507 | _validateContent(content: [
|
2508 | number,
|
2509 | number,
|
2510 | number,
|
2511 | number
|
2512 | ], image: StyleImage): boolean;
|
2513 | updateImage(id: string, image: StyleImage): void;
|
2514 | removeImage(id: string): void;
|
2515 | listImages(): Array<string>;
|
2516 | getImages(ids: Array<string>, callback: Callback<{
|
2517 | [_: string]: StyleImage;
|
2518 | }>): void;
|
2519 | _notify(ids: Array<string>, callback: Callback<{
|
2520 | [_: string]: StyleImage;
|
2521 | }>): void;
|
2522 | getPixelSize(): {
|
2523 | width: number;
|
2524 | height: number;
|
2525 | };
|
2526 | getPattern(id: string): ImagePosition;
|
2527 | bind(context: Context): void;
|
2528 | _updatePatternAtlas(): void;
|
2529 | beginFrame(): void;
|
2530 | dispatchRenderCallbacks(ids: Array<string>): void;
|
2531 | }
|
2532 | export declare type GlyphMetrics = {
|
2533 | width: number;
|
2534 | height: number;
|
2535 | left: number;
|
2536 | top: number;
|
2537 | advance: number;
|
2538 | };
|
2539 | export declare type StyleGlyph = {
|
2540 | id: number;
|
2541 | bitmap: AlphaImage;
|
2542 | metrics: GlyphMetrics;
|
2543 | };
|
2544 | export declare type Rect = {
|
2545 | x: number;
|
2546 | y: number;
|
2547 | w: number;
|
2548 | h: number;
|
2549 | };
|
2550 | export declare type GlyphPosition = {
|
2551 | rect: Rect;
|
2552 | metrics: GlyphMetrics;
|
2553 | };
|
2554 | export declare type GlyphPositions = {
|
2555 | [_: string]: {
|
2556 | [_: number]: GlyphPosition;
|
2557 | };
|
2558 | };
|
2559 | export declare class ImagePosition {
|
2560 | paddedRect: Rect;
|
2561 | pixelRatio: number;
|
2562 | version: number;
|
2563 | stretchY: Array<[
|
2564 | number,
|
2565 | number
|
2566 | ]>;
|
2567 | stretchX: Array<[
|
2568 | number,
|
2569 | number
|
2570 | ]>;
|
2571 | content: [
|
2572 | number,
|
2573 | number,
|
2574 | number,
|
2575 | number
|
2576 | ];
|
2577 | constructor(paddedRect: Rect, { pixelRatio, version, stretchX, stretchY, content }: StyleImage);
|
2578 | get tl(): [
|
2579 | number,
|
2580 | number
|
2581 | ];
|
2582 | get br(): [
|
2583 | number,
|
2584 | number
|
2585 | ];
|
2586 | get tlbr(): Array<number>;
|
2587 | get displaySize(): [
|
2588 | number,
|
2589 | number
|
2590 | ];
|
2591 | }
|
2592 | export declare class ImageAtlas {
|
2593 | image: RGBAImage;
|
2594 | iconPositions: {
|
2595 | [_: string]: ImagePosition;
|
2596 | };
|
2597 | patternPositions: {
|
2598 | [_: string]: ImagePosition;
|
2599 | };
|
2600 | haveRenderCallbacks: Array<string>;
|
2601 | uploaded: boolean;
|
2602 | constructor(icons: {
|
2603 | [_: string]: StyleImage;
|
2604 | }, patterns: {
|
2605 | [_: string]: StyleImage;
|
2606 | });
|
2607 | addImages(images: {
|
2608 | [_: string]: StyleImage;
|
2609 | }, positions: {
|
2610 | [_: string]: ImagePosition;
|
2611 | }, bins: Array<Rect>): void;
|
2612 | patchUpdatedImages(imageManager: ImageManager, texture: Texture): void;
|
2613 | patchUpdatedImage(position: ImagePosition, image: StyleImage, texture: Texture): void;
|
2614 | }
|
2615 | export declare type SerializedGrid = {
|
2616 | buffer: ArrayBuffer;
|
2617 | };
|
2618 | export declare class TransferableGridIndex {
|
2619 | cells: number[][];
|
2620 | arrayBuffer: ArrayBuffer;
|
2621 | d: number;
|
2622 | keys: number[];
|
2623 | bboxes: number[];
|
2624 | n: number;
|
2625 | extent: number;
|
2626 | padding: number;
|
2627 | scale: any;
|
2628 | uid: number;
|
2629 | min: number;
|
2630 | max: number;
|
2631 | constructor(extent: number | ArrayBuffer, n?: number, padding?: number);
|
2632 | insert(key: number, x1: number, y1: number, x2: number, y2: number): void;
|
2633 | _insertReadonly(): void;
|
2634 | _insertCell(x1: number, y1: number, x2: number, y2: number, cellIndex: number, uid: number): void;
|
2635 | query(x1: number, y1: number, x2: number, y2: number, intersectionTest?: Function): number[];
|
2636 | _queryCell(x1: number, y1: number, x2: number, y2: number, cellIndex: number, result: any, seenUids: any, intersectionTest: Function): void;
|
2637 | _forEachCell(x1: number, y1: number, x2: number, y2: number, fn: Function, arg1: any, arg2: any, intersectionTest: any): void;
|
2638 | _convertFromCellCoord(x: any): number;
|
2639 | _convertToCellCoord(x: any): number;
|
2640 | toArrayBuffer(): ArrayBuffer;
|
2641 | static serialize(grid: TransferableGridIndex, transferables?: Array<Transferable>): SerializedGrid;
|
2642 | static deserialize(serialized: SerializedGrid): TransferableGridIndex;
|
2643 | }
|
2644 | export declare class DictionaryCoder {
|
2645 | _stringToNumber: {
|
2646 | [_: string]: number;
|
2647 | };
|
2648 | _numberToString: Array<string>;
|
2649 | constructor(strings: Array<string>);
|
2650 | encode(string: string): number;
|
2651 | decode(n: number): string;
|
2652 | }
|
2653 | export declare type MapGeoJSONFeature = GeoJSONFeature & {
|
2654 | layer: Omit<LayerSpecification, "source"> & {
|
2655 | source: string;
|
2656 | };
|
2657 | source: string;
|
2658 | sourceLayer?: string;
|
2659 | state: {
|
2660 | [key: string]: any;
|
2661 | };
|
2662 | };
|
2663 | export declare class GeoJSONFeature {
|
2664 | type: "Feature";
|
2665 | _geometry: GeoJSON.Geometry;
|
2666 | properties: {
|
2667 | [name: string]: any;
|
2668 | };
|
2669 | id: number | string | undefined;
|
2670 | _vectorTileFeature: VectorTileFeature;
|
2671 | constructor(vectorTileFeature: VectorTileFeature, z: number, x: number, y: number, id: string | number | undefined);
|
2672 | get geometry(): GeoJSON.Geometry;
|
2673 | set geometry(g: GeoJSON.Geometry);
|
2674 | toJSON(): any;
|
2675 | }
|
2676 | export declare class EdgeInsets {
|
2677 | top: number;
|
2678 | bottom: number;
|
2679 | left: number;
|
2680 | right: number;
|
2681 | constructor(top?: number, bottom?: number, left?: number, right?: number);
|
2682 | /**
|
2683 | * Interpolates the inset in-place.
|
2684 | * This maintains the current inset value for any inset not present in `target`.
|
2685 | * @param {PaddingOptions | EdgeInsets} start interpolation start
|
2686 | * @param {PaddingOptions} target interpolation target
|
2687 | * @param {number} t interpolation step/weight
|
2688 | * @returns {EdgeInsets} the insets
|
2689 | * @memberof EdgeInsets
|
2690 | */
|
2691 | interpolate(start: PaddingOptions | EdgeInsets, target: PaddingOptions, t: number): EdgeInsets;
|
2692 | |
2693 |
|
2694 |
|
2695 |
|
2696 |
|
2697 |
|
2698 |
|
2699 |
|
2700 |
|
2701 | getCenter(width: number, height: number): Point;
|
2702 | equals(other: PaddingOptions): boolean;
|
2703 | clone(): EdgeInsets;
|
2704 | |
2705 |
|
2706 |
|
2707 |
|
2708 |
|
2709 |
|
2710 |
|
2711 | toJSON(): PaddingOptions;
|
2712 | }
|
2713 |
|
2714 |
|
2715 |
|
2716 |
|
2717 |
|
2718 |
|
2719 |
|
2720 |
|
2721 |
|
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 |
|
2727 |
|
2728 |
|
2729 |
|
2730 |
|
2731 | export declare type PaddingOptions = {
|
2732 | |
2733 |
|
2734 |
|
2735 | top: number;
|
2736 | |
2737 |
|
2738 |
|
2739 | bottom: number;
|
2740 | |
2741 |
|
2742 |
|
2743 | right: number;
|
2744 | |
2745 |
|
2746 |
|
2747 | left: number;
|
2748 | };
|
2749 | export declare class Transform {
|
2750 | tileSize: number;
|
2751 | tileZoom: number;
|
2752 | lngRange: [
|
2753 | number,
|
2754 | number
|
2755 | ];
|
2756 | latRange: [
|
2757 | number,
|
2758 | number
|
2759 | ];
|
2760 | maxValidLatitude: number;
|
2761 | scale: number;
|
2762 | width: number;
|
2763 | height: number;
|
2764 | angle: number;
|
2765 | rotationMatrix: mat2;
|
2766 | zoomFraction: number;
|
2767 | pixelsToGLUnits: [
|
2768 | number,
|
2769 | number
|
2770 | ];
|
2771 | cameraToCenterDistance: number;
|
2772 | mercatorMatrix: mat4;
|
2773 | projMatrix: mat4;
|
2774 | invProjMatrix: mat4;
|
2775 | alignedProjMatrix: mat4;
|
2776 | pixelMatrix: mat4;
|
2777 | pixelMatrixInverse: mat4;
|
2778 | glCoordMatrix: mat4;
|
2779 | labelPlaneMatrix: mat4;
|
2780 | _fov: number;
|
2781 | _pitch: number;
|
2782 | _zoom: number;
|
2783 | _unmodified: boolean;
|
2784 | _renderWorldCopies: boolean;
|
2785 | _minZoom: number;
|
2786 | _maxZoom: number;
|
2787 | _minPitch: number;
|
2788 | _maxPitch: number;
|
2789 | _center: LngLat;
|
2790 | _edgeInsets: EdgeInsets;
|
2791 | _constraining: boolean;
|
2792 | _posMatrixCache: {
|
2793 | [_: string]: mat4;
|
2794 | };
|
2795 | _alignedPosMatrixCache: {
|
2796 | [_: string]: mat4;
|
2797 | };
|
2798 | constructor(minZoom?: number, maxZoom?: number, minPitch?: number, maxPitch?: number, renderWorldCopies?: boolean);
|
2799 | clone(): Transform;
|
2800 | get minZoom(): number;
|
2801 | set minZoom(zoom: number);
|
2802 | get maxZoom(): number;
|
2803 | set maxZoom(zoom: number);
|
2804 | get minPitch(): number;
|
2805 | set minPitch(pitch: number);
|
2806 | get maxPitch(): number;
|
2807 | set maxPitch(pitch: number);
|
2808 | get renderWorldCopies(): boolean;
|
2809 | set renderWorldCopies(renderWorldCopies: boolean);
|
2810 | get worldSize(): number;
|
2811 | get centerOffset(): Point;
|
2812 | get size(): Point;
|
2813 | get bearing(): number;
|
2814 | set bearing(bearing: number);
|
2815 | get pitch(): number;
|
2816 | set pitch(pitch: number);
|
2817 | get fov(): number;
|
2818 | set fov(fov: number);
|
2819 | get zoom(): number;
|
2820 | set zoom(zoom: number);
|
2821 | get center(): LngLat;
|
2822 | set center(center: LngLat);
|
2823 | get padding(): PaddingOptions;
|
2824 | set padding(padding: PaddingOptions);
|
2825 | /**
|
2826 | * The center of the screen in pixels with the top-left corner being (0,0)
|
2827 | * and +y axis pointing downwards. This accounts for padding.
|
2828 | *
|
2829 | * @readonly
|
2830 | * @type {Point}
|
2831 | * @memberof Transform
|
2832 | */
|
2833 | get centerPoint(): Point;
|
2834 | |
2835 |
|
2836 |
|
2837 |
|
2838 |
|
2839 |
|
2840 |
|
2841 | isPaddingEqual(padding: PaddingOptions): boolean;
|
2842 | |
2843 |
|
2844 |
|
2845 |
|
2846 |
|
2847 |
|
2848 |
|
2849 |
|
2850 | interpolatePadding(start: PaddingOptions, target: PaddingOptions, t: number): void;
|
2851 | |
2852 |
|
2853 |
|
2854 |
|
2855 |
|
2856 |
|
2857 |
|
2858 | coveringZoomLevel(options: {
|
2859 | roundZoom?: boolean;
|
2860 | tileSize: number;
|
2861 | }): number;
|
2862 | |
2863 |
|
2864 |
|
2865 |
|
2866 |
|
2867 |
|
2868 | getVisibleUnwrappedCoordinates(tileID: CanonicalTileID): UnwrappedTileID[];
|
2869 | |
2870 |
|
2871 |
|
2872 |
|
2873 |
|
2874 |
|
2875 |
|
2876 |
|
2877 |
|
2878 |
|
2879 |
|
2880 |
|
2881 |
|
2882 | coveringTiles(options: {
|
2883 | tileSize: number;
|
2884 | minzoom?: number;
|
2885 | maxzoom?: number;
|
2886 | roundZoom?: boolean;
|
2887 | reparseOverscaled?: boolean;
|
2888 | renderWorldCopies?: boolean;
|
2889 | }): Array<OverscaledTileID>;
|
2890 | resize(width: number, height: number): void;
|
2891 | get unmodified(): boolean;
|
2892 | zoomScale(zoom: number): number;
|
2893 | scaleZoom(scale: number): number;
|
2894 | project(lnglat: LngLat): Point;
|
2895 | unproject(point: Point): LngLat;
|
2896 | get point(): Point;
|
2897 | setLocationAtPoint(lnglat: LngLat, point: Point): void;
|
2898 | |
2899 |
|
2900 |
|
2901 |
|
2902 |
|
2903 |
|
2904 | locationPoint(lnglat: LngLat): Point;
|
2905 | |
2906 |
|
2907 |
|
2908 |
|
2909 |
|
2910 |
|
2911 | pointLocation(p: Point): LngLat;
|
2912 | |
2913 |
|
2914 |
|
2915 |
|
2916 |
|
2917 |
|
2918 |
|
2919 | locationCoordinate(lnglat: LngLat): MercatorCoordinate;
|
2920 | |
2921 |
|
2922 |
|
2923 |
|
2924 |
|
2925 |
|
2926 | coordinateLocation(coord: MercatorCoordinate): LngLat;
|
2927 | pointCoordinate(p: Point): MercatorCoordinate;
|
2928 | |
2929 |
|
2930 |
|
2931 |
|
2932 |
|
2933 |
|
2934 | coordinatePoint(coord: MercatorCoordinate): Point;
|
2935 | |
2936 |
|
2937 |
|
2938 |
|
2939 |
|
2940 | getBounds(): LngLatBounds;
|
2941 | |
2942 |
|
2943 |
|
2944 |
|
2945 | getMaxBounds(): LngLatBounds | null;
|
2946 | |
2947 |
|
2948 |
|
2949 |
|
2950 | setMaxBounds(bounds?: LngLatBounds | null): void;
|
2951 | |
2952 |
|
2953 |
|
2954 |
|
2955 |
|
2956 | calculatePosMatrix(unwrappedTileID: UnwrappedTileID, aligned?: boolean): mat4;
|
2957 | customLayerMatrix(): mat4;
|
2958 | _constrain(): void;
|
2959 | _calcMatrices(): void;
|
2960 | maxPitchScaleFactor(): number;
|
2961 | getCameraPoint(): Point;
|
2962 | getCameraQueryGeometry(queryGeometry: Array<Point>): Array<Point>;
|
2963 | }
|
2964 | export declare type QueryParameters = {
|
2965 | scale: number;
|
2966 | pixelPosMatrix: mat4;
|
2967 | transform: Transform;
|
2968 | tileSize: number;
|
2969 | queryGeometry: Array<Point>;
|
2970 | cameraQueryGeometry: Array<Point>;
|
2971 | queryPadding: number;
|
2972 | params: {
|
2973 | filter: FilterSpecification;
|
2974 | layers: Array<string>;
|
2975 | availableImages: Array<string>;
|
2976 | };
|
2977 | };
|
2978 | export declare class FeatureIndex {
|
2979 | tileID: OverscaledTileID;
|
2980 | x: number;
|
2981 | y: number;
|
2982 | z: number;
|
2983 | grid: TransferableGridIndex;
|
2984 | grid3D: TransferableGridIndex;
|
2985 | featureIndexArray: FeatureIndexArray;
|
2986 | promoteId?: PromoteIdSpecification;
|
2987 | rawTileData: ArrayBuffer;
|
2988 | bucketLayerIDs: Array<Array<string>>;
|
2989 | vtLayers: {
|
2990 | [_: string]: VectorTileLayer;
|
2991 | };
|
2992 | sourceLayerCoder: DictionaryCoder;
|
2993 | constructor(tileID: OverscaledTileID, promoteId?: PromoteIdSpecification | null);
|
2994 | insert(feature: VectorTileFeature, geometry: Array<Array<Point>>, featureIndex: number, sourceLayerIndex: number, bucketIndex: number, is3D?: boolean): void;
|
2995 | loadVTLayers(): {
|
2996 | [_: string]: VectorTileLayer;
|
2997 | };
|
2998 | query(args: QueryParameters, styleLayers: {
|
2999 | [_: string]: StyleLayer;
|
3000 | }, serializedLayers: {
|
3001 | [_: string]: any;
|
3002 | }, sourceFeatureState: SourceFeatureState): {
|
3003 | [_: string]: Array<{
|
3004 | featureIndex: number;
|
3005 | feature: GeoJSONFeature;
|
3006 | }>;
|
3007 | };
|
3008 | loadMatchingFeature(result: {
|
3009 | [_: string]: Array<{
|
3010 | featureIndex: number;
|
3011 | feature: GeoJSONFeature;
|
3012 | intersectionZ?: boolean | number;
|
3013 | }>;
|
3014 | }, bucketIndex: number, sourceLayerIndex: number, featureIndex: number, filter: FeatureFilter, filterLayerIDs: Array<string>, availableImages: Array<string>, styleLayers: {
|
3015 | [_: string]: StyleLayer;
|
3016 | }, serializedLayers: {
|
3017 | [_: string]: any;
|
3018 | }, sourceFeatureState?: SourceFeatureState, intersectionTest?: (feature: VectorTileFeature, styleLayer: StyleLayer, featureState: any, id: string | number | void) => boolean | number): void;
|
3019 | lookupSymbolFeatures(symbolFeatureIndexes: Array<number>, serializedLayers: {
|
3020 | [_: string]: StyleLayer;
|
3021 | }, bucketIndex: number, sourceLayerIndex: number, filterSpec: FilterSpecification, filterLayerIDs: Array<string>, availableImages: Array<string>, styleLayers: {
|
3022 | [_: string]: StyleLayer;
|
3023 | }): {};
|
3024 | hasLayer(id: string): boolean;
|
3025 | getId(feature: VectorTileFeature, sourceLayerId: string): string | number;
|
3026 | }
|
3027 | export declare class DEMData {
|
3028 | uid: string;
|
3029 | data: Uint32Array;
|
3030 | stride: number;
|
3031 | dim: number;
|
3032 | encoding: "mapbox" | "terrarium";
|
3033 | constructor(uid: string, data: RGBAImage, encoding: "mapbox" | "terrarium");
|
3034 | get(x: number, y: number): number;
|
3035 | getUnpackVector(): number[];
|
3036 | _idx(x: number, y: number): number;
|
3037 | _unpackMapbox(r: number, g: number, b: number): number;
|
3038 | _unpackTerrarium(r: number, g: number, b: number): number;
|
3039 | getPixels(): RGBAImage;
|
3040 | backfillBorder(borderTile: DEMData, dx: number, dy: number): void;
|
3041 | }
|
3042 | export declare type WorkerTileResult = {
|
3043 | buckets: Array<Bucket>;
|
3044 | imageAtlas: ImageAtlas;
|
3045 | glyphAtlasImage: AlphaImage;
|
3046 | featureIndex: FeatureIndex;
|
3047 | collisionBoxArray: CollisionBoxArray;
|
3048 | rawTileData?: ArrayBuffer;
|
3049 | resourceTiming?: Array<PerformanceResourceTiming>;
|
3050 | glyphMap?: {
|
3051 | [_: string]: {
|
3052 | [_: number]: StyleGlyph;
|
3053 | };
|
3054 | } | null;
|
3055 | iconMap?: {
|
3056 | [_: string]: StyleImage;
|
3057 | } | null;
|
3058 | glyphPositions?: GlyphPositions | null;
|
3059 | };
|
3060 | export declare class ThrottledInvoker {
|
3061 | _channel: MessageChannel;
|
3062 | _triggered: boolean;
|
3063 | _callback: Function;
|
3064 | constructor(callback: Function);
|
3065 | trigger(): void;
|
3066 | remove(): void;
|
3067 | }
|
3068 | export declare class Actor {
|
3069 | target: any;
|
3070 | parent: any;
|
3071 | mapId: number;
|
3072 | callbacks: {
|
3073 | number: any;
|
3074 | };
|
3075 | name: string;
|
3076 | tasks: {
|
3077 | number: any;
|
3078 | };
|
3079 | taskQueue: Array<number>;
|
3080 | cancelCallbacks: {
|
3081 | number: Cancelable;
|
3082 | };
|
3083 | invoker: ThrottledInvoker;
|
3084 | globalScope: any;
|
3085 | constructor(target: any, parent: any, mapId?: number | null);
|
3086 | /**
|
3087 | * Sends a message from a main-thread map to a Worker or from a Worker back to
|
3088 | * a main-thread map instance.
|
3089 | *
|
3090 | * @param type The name of the target method to invoke or '[source-type].[source-name].name' for a method on a WorkerSource.
|
3091 | * @param targetMapId A particular mapId to which to send this message.
|
3092 | * @private
|
3093 | */
|
3094 | send(type: string, data: unknown, callback?: Function | null, targetMapId?: string | null, mustQueue?: boolean): Cancelable;
|
3095 | receive(message: any): void;
|
3096 | process(): void;
|
3097 | processTask(id: number, task: any): void;
|
3098 | remove(): void;
|
3099 | }
|
3100 | export declare type TileState = // Tile data is in the process of loading.
|
3101 | "loading" | // Tile data has been loaded. Tile can be rendered.
|
3102 | "loaded" | // Tile data has been loaded and is being updated. Tile can be rendered.
|
3103 | "reloading" | // Tile data has been deleted.
|
3104 | "unloaded" | // Tile data was not loaded because of an error.
|
3105 | "errored" | "expired";
|
3106 | export declare class Tile {
|
3107 | tileID: OverscaledTileID;
|
3108 | uid: number;
|
3109 | uses: number;
|
3110 | tileSize: number;
|
3111 | buckets: {
|
3112 | [_: string]: Bucket;
|
3113 | };
|
3114 | latestFeatureIndex: FeatureIndex;
|
3115 | latestRawTileData: ArrayBuffer;
|
3116 | imageAtlas: ImageAtlas;
|
3117 | imageAtlasTexture: Texture;
|
3118 | glyphAtlasImage: AlphaImage;
|
3119 | glyphAtlasTexture: Texture;
|
3120 | expirationTime: any;
|
3121 | expiredRequestCount: number;
|
3122 | state: TileState;
|
3123 | timeAdded: any;
|
3124 | fadeEndTime: any;
|
3125 | collisionBoxArray: CollisionBoxArray;
|
3126 | redoWhenDone: boolean;
|
3127 | showCollisionBoxes: boolean;
|
3128 | placementSource: any;
|
3129 | actor: Actor;
|
3130 | vtLayers: {
|
3131 | [_: string]: VectorTileLayer;
|
3132 | };
|
3133 | neighboringTiles: any;
|
3134 | dem: DEMData;
|
3135 | aborted: boolean;
|
3136 | needsHillshadePrepare: boolean;
|
3137 | request: Cancelable;
|
3138 | texture: any;
|
3139 | fbo: Framebuffer;
|
3140 | demTexture: Texture;
|
3141 | refreshedUponExpiration: boolean;
|
3142 | reloadCallback: any;
|
3143 | resourceTiming: Array<PerformanceResourceTiming>;
|
3144 | queryPadding: number;
|
3145 | symbolFadeHoldUntil: number;
|
3146 | hasSymbolBuckets: boolean;
|
3147 | hasRTLText: boolean;
|
3148 | dependencies: any;
|
3149 | |
3150 |
|
3151 |
|
3152 |
|
3153 |
|
3154 | constructor(tileID: OverscaledTileID, size: number);
|
3155 | registerFadeDuration(duration: number): void;
|
3156 | wasRequested(): boolean;
|
3157 | /**
|
3158 | * Given a data object with a 'buffers' property, load it into
|
3159 | * this tile's elementGroups and buffers properties and set loaded
|
3160 | * to true. If the data is null, like in the case of an empty
|
3161 | * GeoJSON tile, no-op but still set loaded to true.
|
3162 | * @param {Object} data
|
3163 | * @param painter
|
3164 | * @returns {undefined}
|
3165 | * @private
|
3166 | */
|
3167 | loadVectorData(data: WorkerTileResult, painter: any, justReloaded?: boolean | null): void;
|
3168 | |
3169 |
|
3170 |
|
3171 |
|
3172 |
|
3173 | unloadVectorData(): void;
|
3174 | getBucket(layer: StyleLayer): Bucket;
|
3175 | upload(context: Context): void;
|
3176 | prepare(imageManager: ImageManager): void;
|
3177 | queryRenderedFeatures(layers: {
|
3178 | [_: string]: StyleLayer;
|
3179 | }, serializedLayers: {
|
3180 | [_: string]: any;
|
3181 | }, sourceFeatureState: SourceFeatureState, queryGeometry: Array<Point>, cameraQueryGeometry: Array<Point>, scale: number, params: {
|
3182 | filter: FilterSpecification;
|
3183 | layers: Array<string>;
|
3184 | availableImages: Array<string>;
|
3185 | }, transform: Transform, maxPitchScaleFactor: number, pixelPosMatrix: mat4): {
|
3186 | [_: string]: Array<{
|
3187 | featureIndex: number;
|
3188 | feature: GeoJSONFeature;
|
3189 | }>;
|
3190 | };
|
3191 | querySourceFeatures(result: Array<GeoJSONFeature>, params?: {
|
3192 | sourceLayer: string;
|
3193 | filter: Array<any>;
|
3194 | validate?: boolean;
|
3195 | }): void;
|
3196 | hasData(): boolean;
|
3197 | patternsLoaded(): boolean;
|
3198 | setExpiryData(data: ExpiryData): void;
|
3199 | getExpiryTimeout(): number;
|
3200 | setFeatureState(states: LayerFeatureStates, painter: any): void;
|
3201 | holdingForFade(): boolean;
|
3202 | symbolFadeFinished(): boolean;
|
3203 | clearFadeHold(): void;
|
3204 | setHoldDuration(duration: number): void;
|
3205 | setDependencies(namespace: string, dependencies: Array<string>): void;
|
3206 | hasDependency(namespaces: Array<string>, keys: Array<string>): boolean;
|
3207 | }
|
3208 | export declare type FeatureStates = {
|
3209 | [featureId: string]: FeatureState;
|
3210 | };
|
3211 | export declare type LayerFeatureStates = {
|
3212 | [layer: string]: FeatureStates;
|
3213 | };
|
3214 | export declare class SourceFeatureState {
|
3215 | state: LayerFeatureStates;
|
3216 | stateChanges: LayerFeatureStates;
|
3217 | deletedStates: {};
|
3218 | constructor();
|
3219 | updateState(sourceLayer: string, featureId: number | string, newState: any): void;
|
3220 | removeFeatureState(sourceLayer: string, featureId?: number | string, key?: string): void;
|
3221 | getState(sourceLayer: string, featureId: number | string): any;
|
3222 | initializeTileState(tile: Tile, painter: any): void;
|
3223 | coalesceChanges(tiles: {
|
3224 | [_ in any]: Tile;
|
3225 | }, painter: any): void;
|
3226 | }
|
3227 | export declare type BinderUniform = {
|
3228 | name: string;
|
3229 | property: string;
|
3230 | binding: Uniform<any>;
|
3231 | };
|
3232 |
|
3233 |
|
3234 |
|
3235 |
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 |
|
3241 |
|
3242 |
|
3243 |
|
3244 |
|
3245 |
|
3246 |
|
3247 |
|
3248 |
|
3249 |
|
3250 |
|
3251 |
|
3252 |
|
3253 |
|
3254 |
|
3255 |
|
3256 |
|
3257 |
|
3258 |
|
3259 | export interface AttributeBinder {
|
3260 | populatePaintArray(length: number, feature: Feature, imagePositions: {
|
3261 | [_: string]: ImagePosition;
|
3262 | }, canonical?: CanonicalTileID, formattedSection?: FormattedSection): void;
|
3263 | updatePaintArray(start: number, length: number, feature: Feature, featureState: FeatureState, imagePositions: {
|
3264 | [_: string]: ImagePosition;
|
3265 | }): void;
|
3266 | upload(a: Context): void;
|
3267 | destroy(): void;
|
3268 | }
|
3269 | export interface UniformBinder {
|
3270 | uniformNames: Array<string>;
|
3271 | setUniform(uniform: Uniform<any>, globals: GlobalProperties, currentValue: PossiblyEvaluatedPropertyValue<any>, uniformName: string): void;
|
3272 | getBinding(context: Context, location: WebGLUniformLocation, name: string): Partial<Uniform<any>>;
|
3273 | }
|
3274 | export declare class ProgramConfiguration {
|
3275 | binders: {
|
3276 | [_: string]: AttributeBinder | UniformBinder;
|
3277 | };
|
3278 | cacheKey: string;
|
3279 | _buffers: Array<VertexBuffer>;
|
3280 | constructor(layer: TypedStyleLayer, zoom: number, filterProperties: (_: string) => boolean);
|
3281 | getMaxValue(property: string): number;
|
3282 | populatePaintArrays(newLength: number, feature: Feature, imagePositions: {
|
3283 | [_: string]: ImagePosition;
|
3284 | }, canonical?: CanonicalTileID, formattedSection?: FormattedSection): void;
|
3285 | setConstantPatternPositions(posTo: ImagePosition, posFrom: ImagePosition): void;
|
3286 | updatePaintArrays(featureStates: FeatureStates, featureMap: FeaturePositionMap, vtLayer: VectorTileLayer, layer: TypedStyleLayer, imagePositions: {
|
3287 | [_: string]: ImagePosition;
|
3288 | }): boolean;
|
3289 | defines(): Array<string>;
|
3290 | getBinderAttributes(): Array<string>;
|
3291 | getBinderUniforms(): Array<string>;
|
3292 | getPaintVertexBuffers(): Array<VertexBuffer>;
|
3293 | getUniforms(context: Context, locations: UniformLocations): Array<BinderUniform>;
|
3294 | setUniforms(context: Context, binderUniforms: Array<BinderUniform>, properties: any, globals: GlobalProperties): void;
|
3295 | updatePaintBuffers(crossfade?: CrossfadeParameters): void;
|
3296 | upload(context: Context): void;
|
3297 | destroy(): void;
|
3298 | }
|
3299 | export declare class ProgramConfigurationSet<Layer extends TypedStyleLayer> {
|
3300 | programConfigurations: {
|
3301 | [_: string]: ProgramConfiguration;
|
3302 | };
|
3303 | needsUpload: boolean;
|
3304 | _featureMap: FeaturePositionMap;
|
3305 | _bufferOffset: number;
|
3306 | constructor(layers: ReadonlyArray<Layer>, zoom: number, filterProperties?: (_: string) => boolean);
|
3307 | populatePaintArrays(length: number, feature: Feature, index: number, imagePositions: {
|
3308 | [_: string]: ImagePosition;
|
3309 | }, canonical: CanonicalTileID, formattedSection?: FormattedSection): void;
|
3310 | updatePaintArrays(featureStates: FeatureStates, vtLayer: VectorTileLayer, layers: ReadonlyArray<TypedStyleLayer>, imagePositions: {
|
3311 | [_: string]: ImagePosition;
|
3312 | }): void;
|
3313 | get(layerId: string): ProgramConfiguration;
|
3314 | upload(context: Context): void;
|
3315 | destroy(): void;
|
3316 | }
|
3317 | export declare type DrawMode = WebGLRenderingContext["LINES"] | WebGLRenderingContext["TRIANGLES"] | WebGLRenderingContext["LINE_STRIP"];
|
3318 | export declare class Program<Us extends UniformBindings> {
|
3319 | program: WebGLProgram;
|
3320 | attributes: {
|
3321 | [_: string]: number;
|
3322 | };
|
3323 | numAttributes: number;
|
3324 | fixedUniforms: Us;
|
3325 | binderUniforms: Array<BinderUniform>;
|
3326 | failedToCreate: boolean;
|
3327 | constructor(context: Context, name: string, source: {
|
3328 | fragmentSource: string;
|
3329 | vertexSource: string;
|
3330 | staticAttributes: Array<string>;
|
3331 | staticUniforms: Array<string>;
|
3332 | }, configuration: ProgramConfiguration, fixedUniforms: (b: Context, a: UniformLocations) => Us, showOverdrawInspector: boolean);
|
3333 | draw(context: Context, drawMode: DrawMode, depthMode: Readonly<DepthMode>, stencilMode: Readonly<StencilMode>, colorMode: Readonly<ColorMode>, cullFaceMode: Readonly<CullFaceMode>, uniformValues: UniformValues<Us>, layerID: string, layoutVertexBuffer: VertexBuffer, indexBuffer: IndexBuffer, segments: SegmentVector, currentProperties?: any, zoom?: number | null, configuration?: ProgramConfiguration | null, dynamicLayoutBuffer?: VertexBuffer | null, dynamicLayoutBuffer2?: VertexBuffer | null): void;
|
3334 | }
|
3335 | export declare class VertexArrayObject {
|
3336 | context: Context;
|
3337 | boundProgram: Program<any>;
|
3338 | boundLayoutVertexBuffer: VertexBuffer;
|
3339 | boundPaintVertexBuffers: Array<VertexBuffer>;
|
3340 | boundIndexBuffer: IndexBuffer;
|
3341 | boundVertexOffset: number;
|
3342 | boundDynamicVertexBuffer: VertexBuffer;
|
3343 | boundDynamicVertexBuffer2: VertexBuffer;
|
3344 | vao: any;
|
3345 | constructor();
|
3346 | bind(context: Context, program: Program<any>, layoutVertexBuffer: VertexBuffer, paintVertexBuffers: Array<VertexBuffer>, indexBuffer?: IndexBuffer | null, vertexOffset?: number | null, dynamicVertexBuffer?: VertexBuffer | null, dynamicVertexBuffer2?: VertexBuffer | null): void;
|
3347 | freshBind(program: Program<any>, layoutVertexBuffer: VertexBuffer, paintVertexBuffers: Array<VertexBuffer>, indexBuffer?: IndexBuffer | null, vertexOffset?: number | null, dynamicVertexBuffer?: VertexBuffer | null, dynamicVertexBuffer2?: VertexBuffer | null): void;
|
3348 | destroy(): void;
|
3349 | }
|
3350 | export declare type Segment = {
|
3351 | sortKey?: number;
|
3352 | vertexOffset: number;
|
3353 | primitiveOffset: number;
|
3354 | vertexLength: number;
|
3355 | primitiveLength: number;
|
3356 | vaos: {
|
3357 | [_: string]: VertexArrayObject;
|
3358 | };
|
3359 | };
|
3360 | export declare class SegmentVector {
|
3361 | static MAX_VERTEX_ARRAY_LENGTH: number;
|
3362 | segments: Array<Segment>;
|
3363 | constructor(segments?: Array<Segment>);
|
3364 | prepareSegment(numVertices: number, layoutVertexArray: StructArray, indexArray: StructArray, sortKey?: number): Segment;
|
3365 | get(): Segment[];
|
3366 | destroy(): void;
|
3367 | static simpleSegment(vertexOffset: number, primitiveOffset: number, vertexLength: number, primitiveLength: number): SegmentVector;
|
3368 | }
|
3369 | export declare class HeatmapBucket extends CircleBucket<HeatmapStyleLayer> {
|
3370 | layers: Array<HeatmapStyleLayer>;
|
3371 | }
|
3372 | export declare type HeatmapPaintProps = {
|
3373 | "heatmap-radius": DataDrivenProperty<number>;
|
3374 | "heatmap-weight": DataDrivenProperty<number>;
|
3375 | "heatmap-intensity": DataConstantProperty<number>;
|
3376 | "heatmap-color": ColorRampProperty;
|
3377 | "heatmap-opacity": DataConstantProperty<number>;
|
3378 | };
|
3379 | export declare type HeatmapPaintPropsPossiblyEvaluated = {
|
3380 | "heatmap-radius": PossiblyEvaluatedPropertyValue<number>;
|
3381 | "heatmap-weight": PossiblyEvaluatedPropertyValue<number>;
|
3382 | "heatmap-intensity": number;
|
3383 | "heatmap-color": ColorRampProperty;
|
3384 | "heatmap-opacity": number;
|
3385 | };
|
3386 | export declare class HeatmapStyleLayer extends StyleLayer {
|
3387 | heatmapFbo: Framebuffer;
|
3388 | colorRamp: RGBAImage;
|
3389 | colorRampTexture: Texture;
|
3390 | _transitionablePaint: Transitionable<HeatmapPaintProps>;
|
3391 | _transitioningPaint: Transitioning<HeatmapPaintProps>;
|
3392 | paint: PossiblyEvaluated<HeatmapPaintProps, HeatmapPaintPropsPossiblyEvaluated>;
|
3393 | createBucket(options: any): HeatmapBucket;
|
3394 | constructor(layer: LayerSpecification);
|
3395 | _handleSpecialPaintPropertyUpdate(name: string): void;
|
3396 | _updateColorRamp(): void;
|
3397 | resize(): void;
|
3398 | queryRadius(): number;
|
3399 | queryIntersectsFeature(): boolean;
|
3400 | hasOffscreenPass(): boolean;
|
3401 | }
|
3402 | export declare class CircleBucket<Layer extends CircleStyleLayer | HeatmapStyleLayer> implements Bucket {
|
3403 | index: number;
|
3404 | zoom: number;
|
3405 | overscaling: number;
|
3406 | layerIds: Array<string>;
|
3407 | layers: Array<Layer>;
|
3408 | stateDependentLayers: Array<Layer>;
|
3409 | stateDependentLayerIds: Array<string>;
|
3410 | layoutVertexArray: CircleLayoutArray;
|
3411 | layoutVertexBuffer: VertexBuffer;
|
3412 | indexArray: TriangleIndexArray;
|
3413 | indexBuffer: IndexBuffer;
|
3414 | hasPattern: boolean;
|
3415 | programConfigurations: ProgramConfigurationSet<Layer>;
|
3416 | segments: SegmentVector;
|
3417 | uploaded: boolean;
|
3418 | constructor(options: BucketParameters<Layer>);
|
3419 | populate(features: Array<IndexedFeature>, options: PopulateParameters, canonical: CanonicalTileID): void;
|
3420 | update(states: FeatureStates, vtLayer: VectorTileLayer, imagePositions: {
|
3421 | [_: string]: ImagePosition;
|
3422 | }): void;
|
3423 | isEmpty(): boolean;
|
3424 | uploadPending(): boolean;
|
3425 | upload(context: Context): void;
|
3426 | destroy(): void;
|
3427 | addFeature(feature: BucketFeature, geometry: Array<Array<Point>>, index: number, canonical: CanonicalTileID): void;
|
3428 | }
|
3429 | export declare type CircleLayoutProps = {
|
3430 | "circle-sort-key": DataDrivenProperty<number>;
|
3431 | };
|
3432 | export declare type CircleLayoutPropsPossiblyEvaluated = {
|
3433 | "circle-sort-key": PossiblyEvaluatedPropertyValue<number>;
|
3434 | };
|
3435 | export declare type CirclePaintProps = {
|
3436 | "circle-radius": DataDrivenProperty<number>;
|
3437 | "circle-color": DataDrivenProperty<Color>;
|
3438 | "circle-blur": DataDrivenProperty<number>;
|
3439 | "circle-opacity": DataDrivenProperty<number>;
|
3440 | "circle-translate": DataConstantProperty<[
|
3441 | number,
|
3442 | number
|
3443 | ]>;
|
3444 | "circle-translate-anchor": DataConstantProperty<"map" | "viewport">;
|
3445 | "circle-pitch-scale": DataConstantProperty<"map" | "viewport">;
|
3446 | "circle-pitch-alignment": DataConstantProperty<"map" | "viewport">;
|
3447 | "circle-stroke-width": DataDrivenProperty<number>;
|
3448 | "circle-stroke-color": DataDrivenProperty<Color>;
|
3449 | "circle-stroke-opacity": DataDrivenProperty<number>;
|
3450 | };
|
3451 | export declare type CirclePaintPropsPossiblyEvaluated = {
|
3452 | "circle-radius": PossiblyEvaluatedPropertyValue<number>;
|
3453 | "circle-color": PossiblyEvaluatedPropertyValue<Color>;
|
3454 | "circle-blur": PossiblyEvaluatedPropertyValue<number>;
|
3455 | "circle-opacity": PossiblyEvaluatedPropertyValue<number>;
|
3456 | "circle-translate": [
|
3457 | number,
|
3458 | number
|
3459 | ];
|
3460 | "circle-translate-anchor": "map" | "viewport";
|
3461 | "circle-pitch-scale": "map" | "viewport";
|
3462 | "circle-pitch-alignment": "map" | "viewport";
|
3463 | "circle-stroke-width": PossiblyEvaluatedPropertyValue<number>;
|
3464 | "circle-stroke-color": PossiblyEvaluatedPropertyValue<Color>;
|
3465 | "circle-stroke-opacity": PossiblyEvaluatedPropertyValue<number>;
|
3466 | };
|
3467 | export declare class CircleStyleLayer extends StyleLayer {
|
3468 | _unevaluatedLayout: Layout<CircleLayoutProps>;
|
3469 | layout: PossiblyEvaluated<CircleLayoutProps, CircleLayoutPropsPossiblyEvaluated>;
|
3470 | _transitionablePaint: Transitionable<CirclePaintProps>;
|
3471 | _transitioningPaint: Transitioning<CirclePaintProps>;
|
3472 | paint: PossiblyEvaluated<CirclePaintProps, CirclePaintPropsPossiblyEvaluated>;
|
3473 | constructor(layer: LayerSpecification);
|
3474 | createBucket(parameters: BucketParameters<any>): CircleBucket<any>;
|
3475 | queryRadius(bucket: Bucket): number;
|
3476 | queryIntersectsFeature(queryGeometry: Array<Point>, feature: VectorTileFeature, featureState: FeatureState, geometry: Array<Array<Point>>, zoom: number, transform: Transform, pixelsToTileUnits: number, pixelPosMatrix: mat4): boolean;
|
3477 | }
|
3478 | export declare class FillBucket implements Bucket {
|
3479 | index: number;
|
3480 | zoom: number;
|
3481 | overscaling: number;
|
3482 | layers: Array<FillStyleLayer>;
|
3483 | layerIds: Array<string>;
|
3484 | stateDependentLayers: Array<FillStyleLayer>;
|
3485 | stateDependentLayerIds: Array<string>;
|
3486 | patternFeatures: Array<BucketFeature>;
|
3487 | layoutVertexArray: FillLayoutArray;
|
3488 | layoutVertexBuffer: VertexBuffer;
|
3489 | indexArray: TriangleIndexArray;
|
3490 | indexBuffer: IndexBuffer;
|
3491 | indexArray2: LineIndexArray;
|
3492 | indexBuffer2: IndexBuffer;
|
3493 | hasPattern: boolean;
|
3494 | programConfigurations: ProgramConfigurationSet<FillStyleLayer>;
|
3495 | segments: SegmentVector;
|
3496 | segments2: SegmentVector;
|
3497 | uploaded: boolean;
|
3498 | constructor(options: BucketParameters<FillStyleLayer>);
|
3499 | populate(features: Array<IndexedFeature>, options: PopulateParameters, canonical: CanonicalTileID): void;
|
3500 | update(states: FeatureStates, vtLayer: VectorTileLayer, imagePositions: {
|
3501 | [_: string]: ImagePosition;
|
3502 | }): void;
|
3503 | addFeatures(options: PopulateParameters, canonical: CanonicalTileID, imagePositions: {
|
3504 | [_: string]: ImagePosition;
|
3505 | }): void;
|
3506 | isEmpty(): boolean;
|
3507 | uploadPending(): boolean;
|
3508 | upload(context: Context): void;
|
3509 | destroy(): void;
|
3510 | addFeature(feature: BucketFeature, geometry: Array<Array<Point>>, index: number, canonical: CanonicalTileID, imagePositions: {
|
3511 | [_: string]: ImagePosition;
|
3512 | }): void;
|
3513 | }
|
3514 | export declare type FillLayoutProps = {
|
3515 | "fill-sort-key": DataDrivenProperty<number>;
|
3516 | };
|
3517 | export declare type FillLayoutPropsPossiblyEvaluated = {
|
3518 | "fill-sort-key": PossiblyEvaluatedPropertyValue<number>;
|
3519 | };
|
3520 | export declare type FillPaintProps = {
|
3521 | "fill-antialias": DataConstantProperty<boolean>;
|
3522 | "fill-opacity": DataDrivenProperty<number>;
|
3523 | "fill-color": DataDrivenProperty<Color>;
|
3524 | "fill-outline-color": DataDrivenProperty<Color>;
|
3525 | "fill-translate": DataConstantProperty<[
|
3526 | number,
|
3527 | number
|
3528 | ]>;
|
3529 | "fill-translate-anchor": DataConstantProperty<"map" | "viewport">;
|
3530 | "fill-pattern": CrossFadedDataDrivenProperty<ResolvedImage>;
|
3531 | };
|
3532 | export declare type FillPaintPropsPossiblyEvaluated = {
|
3533 | "fill-antialias": boolean;
|
3534 | "fill-opacity": PossiblyEvaluatedPropertyValue<number>;
|
3535 | "fill-color": PossiblyEvaluatedPropertyValue<Color>;
|
3536 | "fill-outline-color": PossiblyEvaluatedPropertyValue<Color>;
|
3537 | "fill-translate": [
|
3538 | number,
|
3539 | number
|
3540 | ];
|
3541 | "fill-translate-anchor": "map" | "viewport";
|
3542 | "fill-pattern": PossiblyEvaluatedPropertyValue<CrossFaded<ResolvedImage>>;
|
3543 | };
|
3544 | export declare class FillStyleLayer extends StyleLayer {
|
3545 | _unevaluatedLayout: Layout<FillLayoutProps>;
|
3546 | layout: PossiblyEvaluated<FillLayoutProps, FillLayoutPropsPossiblyEvaluated>;
|
3547 | _transitionablePaint: Transitionable<FillPaintProps>;
|
3548 | _transitioningPaint: Transitioning<FillPaintProps>;
|
3549 | paint: PossiblyEvaluated<FillPaintProps, FillPaintPropsPossiblyEvaluated>;
|
3550 | constructor(layer: LayerSpecification);
|
3551 | recalculate(parameters: EvaluationParameters, availableImages: Array<string>): void;
|
3552 | createBucket(parameters: BucketParameters<any>): FillBucket;
|
3553 | queryRadius(): number;
|
3554 | queryIntersectsFeature(queryGeometry: Array<Point>, feature: VectorTileFeature, featureState: FeatureState, geometry: Array<Array<Point>>, zoom: number, transform: Transform, pixelsToTileUnits: number): boolean;
|
3555 | isTileClipped(): boolean;
|
3556 | }
|
3557 | export declare class FillExtrusionBucket implements Bucket {
|
3558 | index: number;
|
3559 | zoom: number;
|
3560 | overscaling: number;
|
3561 | layers: Array<FillExtrusionStyleLayer>;
|
3562 | layerIds: Array<string>;
|
3563 | stateDependentLayers: Array<FillExtrusionStyleLayer>;
|
3564 | stateDependentLayerIds: Array<string>;
|
3565 | layoutVertexArray: FillExtrusionLayoutArray;
|
3566 | layoutVertexBuffer: VertexBuffer;
|
3567 | indexArray: TriangleIndexArray;
|
3568 | indexBuffer: IndexBuffer;
|
3569 | hasPattern: boolean;
|
3570 | programConfigurations: ProgramConfigurationSet<FillExtrusionStyleLayer>;
|
3571 | segments: SegmentVector;
|
3572 | uploaded: boolean;
|
3573 | features: Array<BucketFeature>;
|
3574 | constructor(options: BucketParameters<FillExtrusionStyleLayer>);
|
3575 | populate(features: Array<IndexedFeature>, options: PopulateParameters, canonical: CanonicalTileID): void;
|
3576 | addFeatures(options: PopulateParameters, canonical: CanonicalTileID, imagePositions: {
|
3577 | [_: string]: ImagePosition;
|
3578 | }): void;
|
3579 | update(states: FeatureStates, vtLayer: VectorTileLayer, imagePositions: {
|
3580 | [_: string]: ImagePosition;
|
3581 | }): void;
|
3582 | isEmpty(): boolean;
|
3583 | uploadPending(): boolean;
|
3584 | upload(context: Context): void;
|
3585 | destroy(): void;
|
3586 | addFeature(feature: BucketFeature, geometry: Array<Array<Point>>, index: number, canonical: CanonicalTileID, imagePositions: {
|
3587 | [_: string]: ImagePosition;
|
3588 | }): void;
|
3589 | }
|
3590 | export declare type FillExtrusionPaintProps = {
|
3591 | "fill-extrusion-opacity": DataConstantProperty<number>;
|
3592 | "fill-extrusion-color": DataDrivenProperty<Color>;
|
3593 | "fill-extrusion-translate": DataConstantProperty<[
|
3594 | number,
|
3595 | number
|
3596 | ]>;
|
3597 | "fill-extrusion-translate-anchor": DataConstantProperty<"map" | "viewport">;
|
3598 | "fill-extrusion-pattern": CrossFadedDataDrivenProperty<ResolvedImage>;
|
3599 | "fill-extrusion-height": DataDrivenProperty<number>;
|
3600 | "fill-extrusion-base": DataDrivenProperty<number>;
|
3601 | "fill-extrusion-vertical-gradient": DataConstantProperty<boolean>;
|
3602 | };
|
3603 | export declare type FillExtrusionPaintPropsPossiblyEvaluated = {
|
3604 | "fill-extrusion-opacity": number;
|
3605 | "fill-extrusion-color": PossiblyEvaluatedPropertyValue<Color>;
|
3606 | "fill-extrusion-translate": [
|
3607 | number,
|
3608 | number
|
3609 | ];
|
3610 | "fill-extrusion-translate-anchor": "map" | "viewport";
|
3611 | "fill-extrusion-pattern": PossiblyEvaluatedPropertyValue<CrossFaded<ResolvedImage>>;
|
3612 | "fill-extrusion-height": PossiblyEvaluatedPropertyValue<number>;
|
3613 | "fill-extrusion-base": PossiblyEvaluatedPropertyValue<number>;
|
3614 | "fill-extrusion-vertical-gradient": boolean;
|
3615 | };
|
3616 | export declare class FillExtrusionStyleLayer extends StyleLayer {
|
3617 | _transitionablePaint: Transitionable<FillExtrusionPaintProps>;
|
3618 | _transitioningPaint: Transitioning<FillExtrusionPaintProps>;
|
3619 | paint: PossiblyEvaluated<FillExtrusionPaintProps, FillExtrusionPaintPropsPossiblyEvaluated>;
|
3620 | constructor(layer: LayerSpecification);
|
3621 | createBucket(parameters: BucketParameters<FillExtrusionStyleLayer>): FillExtrusionBucket;
|
3622 | queryRadius(): number;
|
3623 | is3D(): boolean;
|
3624 | queryIntersectsFeature(queryGeometry: Array<Point>, feature: VectorTileFeature, featureState: FeatureState, geometry: Array<Array<Point>>, zoom: number, transform: Transform, pixelsToTileUnits: number, pixelPosMatrix: mat4): boolean | number;
|
3625 | }
|
3626 | export declare type HillshadePaintProps = {
|
3627 | "hillshade-illumination-direction": DataConstantProperty<number>;
|
3628 | "hillshade-illumination-anchor": DataConstantProperty<"map" | "viewport">;
|
3629 | "hillshade-exaggeration": DataConstantProperty<number>;
|
3630 | "hillshade-shadow-color": DataConstantProperty<Color>;
|
3631 | "hillshade-highlight-color": DataConstantProperty<Color>;
|
3632 | "hillshade-accent-color": DataConstantProperty<Color>;
|
3633 | };
|
3634 | export declare type HillshadePaintPropsPossiblyEvaluated = {
|
3635 | "hillshade-illumination-direction": number;
|
3636 | "hillshade-illumination-anchor": "map" | "viewport";
|
3637 | "hillshade-exaggeration": number;
|
3638 | "hillshade-shadow-color": Color;
|
3639 | "hillshade-highlight-color": Color;
|
3640 | "hillshade-accent-color": Color;
|
3641 | };
|
3642 | export declare class HillshadeStyleLayer extends StyleLayer {
|
3643 | _transitionablePaint: Transitionable<HillshadePaintProps>;
|
3644 | _transitioningPaint: Transitioning<HillshadePaintProps>;
|
3645 | paint: PossiblyEvaluated<HillshadePaintProps, HillshadePaintPropsPossiblyEvaluated>;
|
3646 | constructor(layer: LayerSpecification);
|
3647 | hasOffscreenPass(): boolean;
|
3648 | }
|
3649 | export declare type LineClips = {
|
3650 | start: number;
|
3651 | end: number;
|
3652 | };
|
3653 | export declare type GradientTexture = {
|
3654 | texture?: Texture;
|
3655 | gradient?: RGBAImage;
|
3656 | version?: number;
|
3657 | };
|
3658 | export declare class LineBucket implements Bucket {
|
3659 | distance: number;
|
3660 | totalDistance: number;
|
3661 | maxLineLength: number;
|
3662 | scaledDistance: number;
|
3663 | lineClips?: LineClips;
|
3664 | e1: number;
|
3665 | e2: number;
|
3666 | index: number;
|
3667 | zoom: number;
|
3668 | overscaling: number;
|
3669 | layers: Array<LineStyleLayer>;
|
3670 | layerIds: Array<string>;
|
3671 | gradients: {
|
3672 | [x: string]: GradientTexture;
|
3673 | };
|
3674 | stateDependentLayers: Array<any>;
|
3675 | stateDependentLayerIds: Array<string>;
|
3676 | patternFeatures: Array<BucketFeature>;
|
3677 | lineClipsArray: Array<LineClips>;
|
3678 | layoutVertexArray: LineLayoutArray;
|
3679 | layoutVertexBuffer: VertexBuffer;
|
3680 | layoutVertexArray2: LineExtLayoutArray;
|
3681 | layoutVertexBuffer2: VertexBuffer;
|
3682 | indexArray: TriangleIndexArray;
|
3683 | indexBuffer: IndexBuffer;
|
3684 | hasPattern: boolean;
|
3685 | programConfigurations: ProgramConfigurationSet<LineStyleLayer>;
|
3686 | segments: SegmentVector;
|
3687 | uploaded: boolean;
|
3688 | constructor(options: BucketParameters<LineStyleLayer>);
|
3689 | populate(features: Array<IndexedFeature>, options: PopulateParameters, canonical: CanonicalTileID): void;
|
3690 | update(states: FeatureStates, vtLayer: VectorTileLayer, imagePositions: {
|
3691 | [_: string]: ImagePosition;
|
3692 | }): void;
|
3693 | addFeatures(options: PopulateParameters, canonical: CanonicalTileID, imagePositions: {
|
3694 | [_: string]: ImagePosition;
|
3695 | }): void;
|
3696 | isEmpty(): boolean;
|
3697 | uploadPending(): boolean;
|
3698 | upload(context: Context): void;
|
3699 | destroy(): void;
|
3700 | lineFeatureClips(feature: BucketFeature): LineClips | undefined;
|
3701 | addFeature(feature: BucketFeature, geometry: Array<Array<Point>>, index: number, canonical: CanonicalTileID, imagePositions: {
|
3702 | [_: string]: ImagePosition;
|
3703 | }): void;
|
3704 | addLine(vertices: Array<Point>, feature: BucketFeature, join: string, cap: string, miterLimit: number, roundLimit: number): void;
|
3705 | /**
|
3706 | * Add two vertices to the buffers.
|
3707 | *
|
3708 | * @param p the line vertex to add buffer vertices for
|
3709 | * @param normal vertex normal
|
3710 | * @param endLeft extrude to shift the left vertex along the line
|
3711 | * @param endRight extrude to shift the left vertex along the line
|
3712 | * @param segment the segment object to add the vertex to
|
3713 | * @param round whether this is a round cap
|
3714 | * @private
|
3715 | */
|
3716 | addCurrentVertex(p: Point, normal: Point, endLeft: number, endRight: number, segment: Segment, round?: boolean): void;
|
3717 | addHalfVertex({ x, y }: Point, extrudeX: number, extrudeY: number, round: boolean, up: boolean, dir: number, segment: Segment): void;
|
3718 | updateScaledDistance(): void;
|
3719 | updateDistance(prev: Point, next: Point): void;
|
3720 | }
|
3721 | export declare type LineLayoutProps = {
|
3722 | "line-cap": DataConstantProperty<"butt" | "round" | "square">;
|
3723 | "line-join": DataDrivenProperty<"bevel" | "round" | "miter">;
|
3724 | "line-miter-limit": DataConstantProperty<number>;
|
3725 | "line-round-limit": DataConstantProperty<number>;
|
3726 | "line-sort-key": DataDrivenProperty<number>;
|
3727 | };
|
3728 | export declare type LineLayoutPropsPossiblyEvaluated = {
|
3729 | "line-cap": "butt" | "round" | "square";
|
3730 | "line-join": PossiblyEvaluatedPropertyValue<"bevel" | "round" | "miter">;
|
3731 | "line-miter-limit": number;
|
3732 | "line-round-limit": number;
|
3733 | "line-sort-key": PossiblyEvaluatedPropertyValue<number>;
|
3734 | };
|
3735 | export declare type LinePaintProps = {
|
3736 | "line-opacity": DataDrivenProperty<number>;
|
3737 | "line-color": DataDrivenProperty<Color>;
|
3738 | "line-translate": DataConstantProperty<[
|
3739 | number,
|
3740 | number
|
3741 | ]>;
|
3742 | "line-translate-anchor": DataConstantProperty<"map" | "viewport">;
|
3743 | "line-width": DataDrivenProperty<number>;
|
3744 | "line-gap-width": DataDrivenProperty<number>;
|
3745 | "line-offset": DataDrivenProperty<number>;
|
3746 | "line-blur": DataDrivenProperty<number>;
|
3747 | "line-dasharray": CrossFadedProperty<Array<number>>;
|
3748 | "line-pattern": CrossFadedDataDrivenProperty<ResolvedImage>;
|
3749 | "line-gradient": ColorRampProperty;
|
3750 | };
|
3751 | export declare type LinePaintPropsPossiblyEvaluated = {
|
3752 | "line-opacity": PossiblyEvaluatedPropertyValue<number>;
|
3753 | "line-color": PossiblyEvaluatedPropertyValue<Color>;
|
3754 | "line-translate": [
|
3755 | number,
|
3756 | number
|
3757 | ];
|
3758 | "line-translate-anchor": "map" | "viewport";
|
3759 | "line-width": PossiblyEvaluatedPropertyValue<number>;
|
3760 | "line-gap-width": PossiblyEvaluatedPropertyValue<number>;
|
3761 | "line-offset": PossiblyEvaluatedPropertyValue<number>;
|
3762 | "line-blur": PossiblyEvaluatedPropertyValue<number>;
|
3763 | "line-dasharray": CrossFaded<Array<number>>;
|
3764 | "line-pattern": PossiblyEvaluatedPropertyValue<CrossFaded<ResolvedImage>>;
|
3765 | "line-gradient": ColorRampProperty;
|
3766 | };
|
3767 | export declare class LineStyleLayer extends StyleLayer {
|
3768 | _unevaluatedLayout: Layout<LineLayoutProps>;
|
3769 | layout: PossiblyEvaluated<LineLayoutProps, LineLayoutPropsPossiblyEvaluated>;
|
3770 | gradientVersion: number;
|
3771 | stepInterpolant: boolean;
|
3772 | _transitionablePaint: Transitionable<LinePaintProps>;
|
3773 | _transitioningPaint: Transitioning<LinePaintProps>;
|
3774 | paint: PossiblyEvaluated<LinePaintProps, LinePaintPropsPossiblyEvaluated>;
|
3775 | constructor(layer: LayerSpecification);
|
3776 | _handleSpecialPaintPropertyUpdate(name: string): void;
|
3777 | gradientExpression(): StylePropertyExpression;
|
3778 | recalculate(parameters: EvaluationParameters, availableImages: Array<string>): void;
|
3779 | createBucket(parameters: BucketParameters<any>): LineBucket;
|
3780 | queryRadius(bucket: Bucket): number;
|
3781 | queryIntersectsFeature(queryGeometry: Array<Point>, feature: VectorTileFeature, featureState: FeatureState, geometry: Array<Array<Point>>, zoom: number, transform: Transform, pixelsToTileUnits: number): boolean;
|
3782 | isTileClipped(): boolean;
|
3783 | }
|
3784 | declare enum WritingMode {
|
3785 | none = 0,
|
3786 | horizontal = 1,
|
3787 | vertical = 2,
|
3788 | horizontalOnly = 3
|
3789 | }
|
3790 | export declare class Anchor extends Point {
|
3791 | angle: any;
|
3792 | segment?: number;
|
3793 | constructor(x: number, y: number, angle: number, segment?: number);
|
3794 | clone(): Anchor;
|
3795 | }
|
3796 | /**
|
3797 | * A textured quad for rendering a single icon or glyph.
|
3798 | *
|
3799 | * The zoom range the glyph can be shown is defined by minScale and maxScale.
|
3800 | *
|
3801 | * @param tl The offset of the top left corner from the anchor.
|
3802 | * @param tr The offset of the top right corner from the anchor.
|
3803 | * @param bl The offset of the bottom left corner from the anchor.
|
3804 | * @param br The offset of the bottom right corner from the anchor.
|
3805 | * @param tex The texture coordinates.
|
3806 | *
|
3807 | * @private
|
3808 | */
|
3809 | export declare type SymbolQuad = {
|
3810 | tl: Point;
|
3811 | tr: Point;
|
3812 | bl: Point;
|
3813 | br: Point;
|
3814 | tex: {
|
3815 | x: number;
|
3816 | y: number;
|
3817 | w: number;
|
3818 | h: number;
|
3819 | };
|
3820 | pixelOffsetTL: Point;
|
3821 | pixelOffsetBR: Point;
|
3822 | writingMode: any | void;
|
3823 | glyphOffset: [
|
3824 | number,
|
3825 | number
|
3826 | ];
|
3827 | sectionIndex: number;
|
3828 | isSDF: boolean;
|
3829 | minFontScaleX: number;
|
3830 | minFontScaleY: number;
|
3831 | };
|
3832 | export declare type SizeData = {
|
3833 | kind: "constant";
|
3834 | layoutSize: number;
|
3835 | } | {
|
3836 | kind: "source";
|
3837 | } | {
|
3838 | kind: "camera";
|
3839 | minZoom: number;
|
3840 | maxZoom: number;
|
3841 | minSize: number;
|
3842 | maxSize: number;
|
3843 | interpolationType: InterpolationType;
|
3844 | } | {
|
3845 | kind: "composite";
|
3846 | minZoom: number;
|
3847 | maxZoom: number;
|
3848 | interpolationType: InterpolationType;
|
3849 | };
|
3850 | export declare type SingleCollisionBox = {
|
3851 | x1: number;
|
3852 | y1: number;
|
3853 | x2: number;
|
3854 | y2: number;
|
3855 | anchorPointX: number;
|
3856 | anchorPointY: number;
|
3857 | };
|
3858 | export declare type CollisionArrays = {
|
3859 | textBox?: SingleCollisionBox;
|
3860 | verticalTextBox?: SingleCollisionBox;
|
3861 | iconBox?: SingleCollisionBox;
|
3862 | verticalIconBox?: SingleCollisionBox;
|
3863 | textFeatureIndex?: number;
|
3864 | verticalTextFeatureIndex?: number;
|
3865 | iconFeatureIndex?: number;
|
3866 | verticalIconFeatureIndex?: number;
|
3867 | };
|
3868 | export declare type SymbolFeature = {
|
3869 | sortKey: number | void;
|
3870 | text: Formatted | void;
|
3871 | icon: ResolvedImage;
|
3872 | index: number;
|
3873 | sourceLayerIndex: number;
|
3874 | geometry: Array<Array<Point>>;
|
3875 | properties: any;
|
3876 | type: "Point" | "LineString" | "Polygon";
|
3877 | id?: any;
|
3878 | };
|
3879 | export declare type SortKeyRange = {
|
3880 | sortKey: number;
|
3881 | symbolInstanceStart: number;
|
3882 | symbolInstanceEnd: number;
|
3883 | };
|
3884 | declare function addDynamicAttributes(dynamicLayoutVertexArray: StructArray, p: Point, angle: number): void;
|
3885 | export declare class SymbolBuffers {
|
3886 | layoutVertexArray: SymbolLayoutArray;
|
3887 | layoutVertexBuffer: VertexBuffer;
|
3888 | indexArray: TriangleIndexArray;
|
3889 | indexBuffer: IndexBuffer;
|
3890 | programConfigurations: ProgramConfigurationSet<SymbolStyleLayer>;
|
3891 | segments: SegmentVector;
|
3892 | dynamicLayoutVertexArray: SymbolDynamicLayoutArray;
|
3893 | dynamicLayoutVertexBuffer: VertexBuffer;
|
3894 | opacityVertexArray: SymbolOpacityArray;
|
3895 | opacityVertexBuffer: VertexBuffer;
|
3896 | collisionVertexArray: CollisionVertexArray;
|
3897 | collisionVertexBuffer: VertexBuffer;
|
3898 | placedSymbolArray: PlacedSymbolArray;
|
3899 | constructor(programConfigurations: ProgramConfigurationSet<SymbolStyleLayer>);
|
3900 | isEmpty(): boolean;
|
3901 | upload(context: Context, dynamicIndexBuffer: boolean, upload?: boolean, update?: boolean): void;
|
3902 | destroy(): void;
|
3903 | }
|
3904 | export declare class CollisionBuffers {
|
3905 | layoutVertexArray: StructArray;
|
3906 | layoutAttributes: Array<StructArrayMember>;
|
3907 | layoutVertexBuffer: VertexBuffer;
|
3908 | indexArray: TriangleIndexArray | LineIndexArray;
|
3909 | indexBuffer: IndexBuffer;
|
3910 | segments: SegmentVector;
|
3911 | collisionVertexArray: CollisionVertexArray;
|
3912 | collisionVertexBuffer: VertexBuffer;
|
3913 | constructor(LayoutArray: {
|
3914 | new (...args: any): StructArray;
|
3915 | }, layoutAttributes: Array<StructArrayMember>, IndexArray: {
|
3916 | new (...args: any): TriangleIndexArray | LineIndexArray;
|
3917 | });
|
3918 | upload(context: Context): void;
|
3919 | destroy(): void;
|
3920 | }
|
3921 | export declare class SymbolBucket implements Bucket {
|
3922 | static MAX_GLYPHS: number;
|
3923 | static addDynamicAttributes: typeof addDynamicAttributes;
|
3924 | collisionBoxArray: CollisionBoxArray;
|
3925 | zoom: number;
|
3926 | overscaling: number;
|
3927 | layers: Array<SymbolStyleLayer>;
|
3928 | layerIds: Array<string>;
|
3929 | stateDependentLayers: Array<SymbolStyleLayer>;
|
3930 | stateDependentLayerIds: Array<string>;
|
3931 | index: number;
|
3932 | sdfIcons: boolean;
|
3933 | iconsInText: boolean;
|
3934 | iconsNeedLinear: boolean;
|
3935 | bucketInstanceId: number;
|
3936 | justReloaded: boolean;
|
3937 | hasPattern: boolean;
|
3938 | textSizeData: SizeData;
|
3939 | iconSizeData: SizeData;
|
3940 | glyphOffsetArray: GlyphOffsetArray;
|
3941 | lineVertexArray: SymbolLineVertexArray;
|
3942 | features: Array<SymbolFeature>;
|
3943 | symbolInstances: SymbolInstanceArray;
|
3944 | collisionArrays: Array<CollisionArrays>;
|
3945 | sortKeyRanges: Array<SortKeyRange>;
|
3946 | pixelRatio: number;
|
3947 | tilePixelRatio: number;
|
3948 | compareText: {
|
3949 | [_: string]: Array<Point>;
|
3950 | };
|
3951 | fadeStartTime: number;
|
3952 | sortFeaturesByKey: boolean;
|
3953 | sortFeaturesByY: boolean;
|
3954 | canOverlap: boolean;
|
3955 | sortedAngle: number;
|
3956 | featureSortOrder: Array<number>;
|
3957 | collisionCircleArray: Array<number>;
|
3958 | placementInvProjMatrix: mat4;
|
3959 | placementViewportMatrix: mat4;
|
3960 | text: SymbolBuffers;
|
3961 | icon: SymbolBuffers;
|
3962 | textCollisionBox: CollisionBuffers;
|
3963 | iconCollisionBox: CollisionBuffers;
|
3964 | uploaded: boolean;
|
3965 | sourceLayerIndex: number;
|
3966 | sourceID: string;
|
3967 | symbolInstanceIndexes: Array<number>;
|
3968 | writingModes: WritingMode[];
|
3969 | allowVerticalPlacement: boolean;
|
3970 | hasRTLText: boolean;
|
3971 | constructor(options: BucketParameters<SymbolStyleLayer>);
|
3972 | createArrays(): void;
|
3973 | calculateGlyphDependencies(text: string, stack: {
|
3974 | [_: number]: boolean;
|
3975 | }, textAlongLine: boolean, allowVerticalPlacement: boolean, doesAllowVerticalWritingMode: boolean): void;
|
3976 | populate(features: Array<IndexedFeature>, options: PopulateParameters, canonical: CanonicalTileID): void;
|
3977 | update(states: FeatureStates, vtLayer: VectorTileLayer, imagePositions: {
|
3978 | [_: string]: ImagePosition;
|
3979 | }): void;
|
3980 | isEmpty(): boolean;
|
3981 | uploadPending(): boolean;
|
3982 | upload(context: Context): void;
|
3983 | destroyDebugData(): void;
|
3984 | destroy(): void;
|
3985 | addToLineVertexArray(anchor: Anchor, line: any): {
|
3986 | lineStartIndex: number;
|
3987 | lineLength: number;
|
3988 | };
|
3989 | addSymbols(arrays: SymbolBuffers, quads: Array<SymbolQuad>, sizeVertex: any, lineOffset: [
|
3990 | number,
|
3991 | number
|
3992 | ], alongLine: boolean, feature: SymbolFeature, writingMode: WritingMode, labelAnchor: Anchor, lineStartIndex: number, lineLength: number, associatedIconIndex: number, canonical: CanonicalTileID): void;
|
3993 | _addCollisionDebugVertex(layoutVertexArray: StructArray, collisionVertexArray: StructArray, point: Point, anchorX: number, anchorY: number, extrude: Point): any;
|
3994 | addCollisionDebugVertices(x1: number, y1: number, x2: number, y2: number, arrays: CollisionBuffers, boxAnchorPoint: Point, symbolInstance: SymbolInstance): void;
|
3995 | addDebugCollisionBoxes(startIndex: number, endIndex: number, symbolInstance: SymbolInstance, isText: boolean): void;
|
3996 | generateCollisionDebugBuffers(): void;
|
3997 | _deserializeCollisionBoxesForSymbol(collisionBoxArray: CollisionBoxArray, textStartIndex: number, textEndIndex: number, verticalTextStartIndex: number, verticalTextEndIndex: number, iconStartIndex: number, iconEndIndex: number, verticalIconStartIndex: number, verticalIconEndIndex: number): CollisionArrays;
|
3998 | deserializeCollisionBoxes(collisionBoxArray: CollisionBoxArray): void;
|
3999 | hasTextData(): boolean;
|
4000 | hasIconData(): boolean;
|
4001 | hasDebugData(): CollisionBuffers;
|
4002 | hasTextCollisionBoxData(): boolean;
|
4003 | hasIconCollisionBoxData(): boolean;
|
4004 | addIndicesForPlacedSymbol(iconOrText: SymbolBuffers, placedSymbolIndex: number): void;
|
4005 | getSortedSymbolIndexes(angle: number): any[];
|
4006 | addToSortKeyRanges(symbolInstanceIndex: number, sortKey: number): void;
|
4007 | sortFeatures(angle: number): void;
|
4008 | }
|
4009 | export declare type SymbolLayoutProps = {
|
4010 | "symbol-placement": DataConstantProperty<"point" | "line" | "line-center">;
|
4011 | "symbol-spacing": DataConstantProperty<number>;
|
4012 | "symbol-avoid-edges": DataConstantProperty<boolean>;
|
4013 | "symbol-sort-key": DataDrivenProperty<number>;
|
4014 | "symbol-z-order": DataConstantProperty<"auto" | "viewport-y" | "source">;
|
4015 | "icon-allow-overlap": DataConstantProperty<boolean>;
|
4016 | "icon-overlap": DataConstantProperty<"never" | "always" | "cooperative">;
|
4017 | "icon-ignore-placement": DataConstantProperty<boolean>;
|
4018 | "icon-optional": DataConstantProperty<boolean>;
|
4019 | "icon-rotation-alignment": DataConstantProperty<"map" | "viewport" | "auto">;
|
4020 | "icon-size": DataDrivenProperty<number>;
|
4021 | "icon-text-fit": DataConstantProperty<"none" | "width" | "height" | "both">;
|
4022 | "icon-text-fit-padding": DataConstantProperty<[
|
4023 | number,
|
4024 | number,
|
4025 | number,
|
4026 | number
|
4027 | ]>;
|
4028 | "icon-image": DataDrivenProperty<ResolvedImage>;
|
4029 | "icon-rotate": DataDrivenProperty<number>;
|
4030 | "icon-padding": DataConstantProperty<number>;
|
4031 | "icon-keep-upright": DataConstantProperty<boolean>;
|
4032 | "icon-offset": DataDrivenProperty<[
|
4033 | number,
|
4034 | number
|
4035 | ]>;
|
4036 | "icon-anchor": DataDrivenProperty<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
4037 | "icon-pitch-alignment": DataConstantProperty<"map" | "viewport" | "auto">;
|
4038 | "text-pitch-alignment": DataConstantProperty<"map" | "viewport" | "auto">;
|
4039 | "text-rotation-alignment": DataConstantProperty<"map" | "viewport" | "viewport-glyph" | "auto">;
|
4040 | "text-field": DataDrivenProperty<Formatted>;
|
4041 | "text-font": DataDrivenProperty<Array<string>>;
|
4042 | "text-size": DataDrivenProperty<number>;
|
4043 | "text-max-width": DataDrivenProperty<number>;
|
4044 | "text-line-height": DataConstantProperty<number>;
|
4045 | "text-letter-spacing": DataDrivenProperty<number>;
|
4046 | "text-justify": DataDrivenProperty<"auto" | "left" | "center" | "right">;
|
4047 | "text-radial-offset": DataDrivenProperty<number>;
|
4048 | "text-variable-anchor": DataConstantProperty<Array<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">>;
|
4049 | "text-anchor": DataDrivenProperty<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
4050 | "text-max-angle": DataConstantProperty<number>;
|
4051 | "text-writing-mode": DataConstantProperty<Array<"horizontal" | "vertical">>;
|
4052 | "text-rotate": DataDrivenProperty<number>;
|
4053 | "text-padding": DataConstantProperty<number>;
|
4054 | "text-keep-upright": DataConstantProperty<boolean>;
|
4055 | "text-transform": DataDrivenProperty<"none" | "uppercase" | "lowercase">;
|
4056 | "text-offset": DataDrivenProperty<[
|
4057 | number,
|
4058 | number
|
4059 | ]>;
|
4060 | "text-allow-overlap": DataConstantProperty<boolean>;
|
4061 | "text-overlap": DataConstantProperty<"never" | "always" | "cooperative">;
|
4062 | "text-ignore-placement": DataConstantProperty<boolean>;
|
4063 | "text-optional": DataConstantProperty<boolean>;
|
4064 | };
|
4065 | export declare type SymbolLayoutPropsPossiblyEvaluated = {
|
4066 | "symbol-placement": "point" | "line" | "line-center";
|
4067 | "symbol-spacing": number;
|
4068 | "symbol-avoid-edges": boolean;
|
4069 | "symbol-sort-key": PossiblyEvaluatedPropertyValue<number>;
|
4070 | "symbol-z-order": "auto" | "viewport-y" | "source";
|
4071 | "icon-allow-overlap": boolean;
|
4072 | "icon-overlap": "never" | "always" | "cooperative";
|
4073 | "icon-ignore-placement": boolean;
|
4074 | "icon-optional": boolean;
|
4075 | "icon-rotation-alignment": "map" | "viewport" | "auto";
|
4076 | "icon-size": PossiblyEvaluatedPropertyValue<number>;
|
4077 | "icon-text-fit": "none" | "width" | "height" | "both";
|
4078 | "icon-text-fit-padding": [
|
4079 | number,
|
4080 | number,
|
4081 | number,
|
4082 | number
|
4083 | ];
|
4084 | "icon-image": PossiblyEvaluatedPropertyValue<ResolvedImage>;
|
4085 | "icon-rotate": PossiblyEvaluatedPropertyValue<number>;
|
4086 | "icon-padding": number;
|
4087 | "icon-keep-upright": boolean;
|
4088 | "icon-offset": PossiblyEvaluatedPropertyValue<[
|
4089 | number,
|
4090 | number
|
4091 | ]>;
|
4092 | "icon-anchor": PossiblyEvaluatedPropertyValue<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
4093 | "icon-pitch-alignment": "map" | "viewport" | "auto";
|
4094 | "text-pitch-alignment": "map" | "viewport" | "auto";
|
4095 | "text-rotation-alignment": "map" | "viewport" | "viewport-glyph" | "auto";
|
4096 | "text-field": PossiblyEvaluatedPropertyValue<Formatted>;
|
4097 | "text-font": PossiblyEvaluatedPropertyValue<Array<string>>;
|
4098 | "text-size": PossiblyEvaluatedPropertyValue<number>;
|
4099 | "text-max-width": PossiblyEvaluatedPropertyValue<number>;
|
4100 | "text-line-height": number;
|
4101 | "text-letter-spacing": PossiblyEvaluatedPropertyValue<number>;
|
4102 | "text-justify": PossiblyEvaluatedPropertyValue<"auto" | "left" | "center" | "right">;
|
4103 | "text-radial-offset": PossiblyEvaluatedPropertyValue<number>;
|
4104 | "text-variable-anchor": Array<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
4105 | "text-anchor": PossiblyEvaluatedPropertyValue<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
4106 | "text-max-angle": number;
|
4107 | "text-writing-mode": Array<"horizontal" | "vertical">;
|
4108 | "text-rotate": PossiblyEvaluatedPropertyValue<number>;
|
4109 | "text-padding": number;
|
4110 | "text-keep-upright": boolean;
|
4111 | "text-transform": PossiblyEvaluatedPropertyValue<"none" | "uppercase" | "lowercase">;
|
4112 | "text-offset": PossiblyEvaluatedPropertyValue<[
|
4113 | number,
|
4114 | number
|
4115 | ]>;
|
4116 | "text-allow-overlap": boolean;
|
4117 | "text-overlap": "never" | "always" | "cooperative";
|
4118 | "text-ignore-placement": boolean;
|
4119 | "text-optional": boolean;
|
4120 | };
|
4121 | export declare type SymbolPaintProps = {
|
4122 | "icon-opacity": DataDrivenProperty<number>;
|
4123 | "icon-color": DataDrivenProperty<Color>;
|
4124 | "icon-halo-color": DataDrivenProperty<Color>;
|
4125 | "icon-halo-width": DataDrivenProperty<number>;
|
4126 | "icon-halo-blur": DataDrivenProperty<number>;
|
4127 | "icon-translate": DataConstantProperty<[
|
4128 | number,
|
4129 | number
|
4130 | ]>;
|
4131 | "icon-translate-anchor": DataConstantProperty<"map" | "viewport">;
|
4132 | "text-opacity": DataDrivenProperty<number>;
|
4133 | "text-color": DataDrivenProperty<Color>;
|
4134 | "text-halo-color": DataDrivenProperty<Color>;
|
4135 | "text-halo-width": DataDrivenProperty<number>;
|
4136 | "text-halo-blur": DataDrivenProperty<number>;
|
4137 | "text-translate": DataConstantProperty<[
|
4138 | number,
|
4139 | number
|
4140 | ]>;
|
4141 | "text-translate-anchor": DataConstantProperty<"map" | "viewport">;
|
4142 | };
|
4143 | export declare type SymbolPaintPropsPossiblyEvaluated = {
|
4144 | "icon-opacity": PossiblyEvaluatedPropertyValue<number>;
|
4145 | "icon-color": PossiblyEvaluatedPropertyValue<Color>;
|
4146 | "icon-halo-color": PossiblyEvaluatedPropertyValue<Color>;
|
4147 | "icon-halo-width": PossiblyEvaluatedPropertyValue<number>;
|
4148 | "icon-halo-blur": PossiblyEvaluatedPropertyValue<number>;
|
4149 | "icon-translate": [
|
4150 | number,
|
4151 | number
|
4152 | ];
|
4153 | "icon-translate-anchor": "map" | "viewport";
|
4154 | "text-opacity": PossiblyEvaluatedPropertyValue<number>;
|
4155 | "text-color": PossiblyEvaluatedPropertyValue<Color>;
|
4156 | "text-halo-color": PossiblyEvaluatedPropertyValue<Color>;
|
4157 | "text-halo-width": PossiblyEvaluatedPropertyValue<number>;
|
4158 | "text-halo-blur": PossiblyEvaluatedPropertyValue<number>;
|
4159 | "text-translate": [
|
4160 | number,
|
4161 | number
|
4162 | ];
|
4163 | "text-translate-anchor": "map" | "viewport";
|
4164 | };
|
4165 | export declare class SymbolStyleLayer extends StyleLayer {
|
4166 | _unevaluatedLayout: Layout<SymbolLayoutProps>;
|
4167 | layout: PossiblyEvaluated<SymbolLayoutProps, SymbolLayoutPropsPossiblyEvaluated>;
|
4168 | _transitionablePaint: Transitionable<SymbolPaintProps>;
|
4169 | _transitioningPaint: Transitioning<SymbolPaintProps>;
|
4170 | paint: PossiblyEvaluated<SymbolPaintProps, SymbolPaintPropsPossiblyEvaluated>;
|
4171 | constructor(layer: LayerSpecification);
|
4172 | recalculate(parameters: EvaluationParameters, availableImages: Array<string>): void;
|
4173 | getValueAndResolveTokens(name: any, feature: Feature, canonical: CanonicalTileID, availableImages: Array<string>): any;
|
4174 | createBucket(parameters: BucketParameters<any>): SymbolBucket;
|
4175 | queryRadius(): number;
|
4176 | queryIntersectsFeature(): boolean;
|
4177 | _setPaintOverrides(): void;
|
4178 | _handleOverridablePaintPropertyUpdate<T, R>(name: string, oldValue: PropertyValue<T, R>, newValue: PropertyValue<T, R>): boolean;
|
4179 | static hasPaintOverride(layout: PossiblyEvaluated<SymbolLayoutProps, SymbolLayoutPropsPossiblyEvaluated>, propertyName: string): boolean;
|
4180 | }
|
4181 | export declare type OverlapMode = "never" | "always" | "cooperative";
|
4182 | export declare type TypedStyleLayer = CircleStyleLayer | FillStyleLayer | FillExtrusionStyleLayer | HeatmapStyleLayer | HillshadeStyleLayer | LineStyleLayer | SymbolStyleLayer;
|
4183 | export declare type BucketParameters<Layer extends TypedStyleLayer> = {
|
4184 | index: number;
|
4185 | layers: Array<Layer>;
|
4186 | zoom: number;
|
4187 | pixelRatio: number;
|
4188 | overscaling: number;
|
4189 | collisionBoxArray: CollisionBoxArray;
|
4190 | sourceLayerIndex: number;
|
4191 | sourceID: string;
|
4192 | };
|
4193 | export declare type PopulateParameters = {
|
4194 | featureIndex: FeatureIndex;
|
4195 | iconDependencies: {};
|
4196 | patternDependencies: {};
|
4197 | glyphDependencies: {};
|
4198 | availableImages: Array<string>;
|
4199 | };
|
4200 | export declare type IndexedFeature = {
|
4201 | feature: VectorTileFeature;
|
4202 | id: number | string;
|
4203 | index: number;
|
4204 | sourceLayerIndex: number;
|
4205 | };
|
4206 | export declare type BucketFeature = {
|
4207 | index: number;
|
4208 | sourceLayerIndex: number;
|
4209 | geometry: Array<Array<Point>>;
|
4210 | properties: any;
|
4211 | type: 1 | 2 | 3;
|
4212 | id?: any;
|
4213 | readonly patterns: {
|
4214 | [_: string]: {
|
4215 | "min": string;
|
4216 | "mid": string;
|
4217 | "max": string;
|
4218 | };
|
4219 | };
|
4220 | sortKey?: number;
|
4221 | };
|
4222 |
|
4223 |
|
4224 |
|
4225 |
|
4226 |
|
4227 |
|
4228 |
|
4229 |
|
4230 |
|
4231 |
|
4232 |
|
4233 |
|
4234 |
|
4235 |
|
4236 |
|
4237 |
|
4238 |
|
4239 |
|
4240 |
|
4241 |
|
4242 |
|
4243 |
|
4244 |
|
4245 | export interface Bucket {
|
4246 | layerIds: Array<string>;
|
4247 | hasPattern: boolean;
|
4248 | readonly layers: Array<any>;
|
4249 | readonly stateDependentLayers: Array<any>;
|
4250 | readonly stateDependentLayerIds: Array<string>;
|
4251 | populate(features: Array<IndexedFeature>, options: PopulateParameters, canonical: CanonicalTileID): void;
|
4252 | update(states: FeatureStates, vtLayer: VectorTileLayer, imagePositions: {
|
4253 | [_: string]: ImagePosition;
|
4254 | }): void;
|
4255 | isEmpty(): boolean;
|
4256 | upload(context: Context): void;
|
4257 | uploadPending(): boolean;
|
4258 | |
4259 |
|
4260 |
|
4261 |
|
4262 |
|
4263 |
|
4264 |
|
4265 | destroy(): void;
|
4266 | }
|
4267 | export declare type CustomRenderMethod = (gl: WebGLRenderingContext, matrix: mat4) => void;
|
4268 |
|
4269 |
|
4270 |
|
4271 |
|
4272 |
|
4273 |
|
4274 |
|
4275 |
|
4276 |
|
4277 |
|
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 |
|
4285 |
|
4286 |
|
4287 |
|
4288 |
|
4289 |
|
4290 |
|
4291 |
|
4292 |
|
4293 |
|
4294 |
|
4295 |
|
4296 |
|
4297 |
|
4298 |
|
4299 |
|
4300 |
|
4301 |
|
4302 |
|
4303 |
|
4304 |
|
4305 |
|
4306 |
|
4307 |
|
4308 |
|
4309 |
|
4310 |
|
4311 |
|
4312 |
|
4313 |
|
4314 |
|
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 |
|
4320 |
|
4321 |
|
4322 |
|
4323 |
|
4324 |
|
4325 |
|
4326 |
|
4327 |
|
4328 |
|
4329 |
|
4330 |
|
4331 |
|
4332 |
|
4333 | export interface CustomLayerInterface {
|
4334 | |
4335 |
|
4336 |
|
4337 | id: string;
|
4338 | |
4339 |
|
4340 |
|
4341 | type: "custom";
|
4342 | |
4343 |
|
4344 |
|
4345 | renderingMode?: "2d" | "3d";
|
4346 | |
4347 |
|
4348 |
|
4349 |
|
4350 |
|
4351 |
|
4352 |
|
4353 |
|
4354 |
|
4355 |
|
4356 |
|
4357 |
|
4358 |
|
4359 |
|
4360 |
|
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 |
|
4367 |
|
4368 |
|
4369 |
|
4370 |
|
4371 |
|
4372 |
|
4373 |
|
4374 | render: CustomRenderMethod;
|
4375 | |
4376 |
|
4377 |
|
4378 |
|
4379 |
|
4380 |
|
4381 |
|
4382 |
|
4383 |
|
4384 |
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 |
|
4390 |
|
4391 |
|
4392 | prerender?: CustomRenderMethod;
|
4393 | |
4394 |
|
4395 |
|
4396 |
|
4397 |
|
4398 |
|
4399 |
|
4400 |
|
4401 |
|
4402 |
|
4403 |
|
4404 | onAdd?(map: Map, gl: WebGLRenderingContext): void;
|
4405 | |
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 |
|
4414 |
|
4415 |
|
4416 | onRemove?(map: Map, gl: WebGLRenderingContext): void;
|
4417 | }
|
4418 | declare abstract class StyleLayer extends Evented {
|
4419 | id: string;
|
4420 | metadata: unknown;
|
4421 | type: LayerSpecification["type"] | CustomLayerInterface["type"];
|
4422 | source: string;
|
4423 | sourceLayer: string;
|
4424 | minzoom: number;
|
4425 | maxzoom: number;
|
4426 | filter: FilterSpecification | void;
|
4427 | visibility: "visible" | "none" | void;
|
4428 | _crossfadeParameters: CrossfadeParameters;
|
4429 | _unevaluatedLayout: Layout<any>;
|
4430 | readonly layout: unknown;
|
4431 | _transitionablePaint: Transitionable<any>;
|
4432 | _transitioningPaint: Transitioning<any>;
|
4433 | readonly paint: unknown;
|
4434 | _featureFilter: FeatureFilter;
|
4435 | readonly onAdd: ((map: Map) => void);
|
4436 | readonly onRemove: ((map: Map) => void);
|
4437 | queryRadius?(bucket: Bucket): number;
|
4438 | queryIntersectsFeature?(queryGeometry: Array<Point>, feature: VectorTileFeature, featureState: FeatureState, geometry: Array<Array<Point>>, zoom: number, transform: Transform, pixelsToTileUnits: number, pixelPosMatrix: mat4): boolean | number;
|
4439 | constructor(layer: LayerSpecification | CustomLayerInterface, properties: Readonly<{
|
4440 | layout?: Properties<any>;
|
4441 | paint?: Properties<any>;
|
4442 | }>);
|
4443 | getCrossfadeParameters(): CrossfadeParameters;
|
4444 | getLayoutProperty(name: string): any;
|
4445 | setLayoutProperty(name: string, value: any, options?: StyleSetterOptions): void;
|
4446 | getPaintProperty(name: string): unknown;
|
4447 | setPaintProperty(name: string, value: unknown, options?: StyleSetterOptions): boolean;
|
4448 | _handleSpecialPaintPropertyUpdate(_: string): void;
|
4449 | _handleOverridablePaintPropertyUpdate<T, R>(name: string, oldValue: PropertyValue<T, R>, newValue: PropertyValue<T, R>): boolean;
|
4450 | isHidden(zoom: number): boolean;
|
4451 | updateTransitions(parameters: TransitionParameters): void;
|
4452 | hasTransition(): boolean;
|
4453 | recalculate(parameters: EvaluationParameters, availableImages: Array<string>): void;
|
4454 | serialize(): LayerSpecification;
|
4455 | _validate(validate: Function, key: string, name: string, value: unknown, options?: StyleSetterOptions): boolean;
|
4456 | is3D(): boolean;
|
4457 | isTileClipped(): boolean;
|
4458 | hasOffscreenPass(): boolean;
|
4459 | resize(): void;
|
4460 | isStateDependent(): boolean;
|
4461 | }
|
4462 | declare function loadGlyphRange(fontstack: string, range: number, urlTemplate: string, requestManager: RequestManager, callback: Callback<{
|
4463 | [_: number]: StyleGlyph | null;
|
4464 | }>): void;
|
4465 | export declare type Entry = {
|
4466 | glyphs: {
|
4467 | [id: number]: StyleGlyph | null;
|
4468 | };
|
4469 | requests: {
|
4470 | [range: number]: Array<Callback<{
|
4471 | [_: number]: StyleGlyph | null;
|
4472 | }>>;
|
4473 | };
|
4474 | ranges: {
|
4475 | [range: number]: boolean | null;
|
4476 | };
|
4477 | tinySDF?: TinySDF;
|
4478 | };
|
4479 | export declare class GlyphManager {
|
4480 | requestManager: RequestManager;
|
4481 | localIdeographFontFamily: string;
|
4482 | entries: {
|
4483 | [_: string]: Entry;
|
4484 | };
|
4485 | url: string;
|
4486 | static loadGlyphRange: typeof loadGlyphRange;
|
4487 | static TinySDF: typeof TinySDF;
|
4488 | constructor(requestManager: RequestManager, localIdeographFontFamily?: string | null);
|
4489 | setURL(url?: string | null): void;
|
4490 | getGlyphs(glyphs: {
|
4491 | [stack: string]: Array<number>;
|
4492 | }, callback: Callback<{
|
4493 | [stack: string]: {
|
4494 | [id: number]: StyleGlyph;
|
4495 | };
|
4496 | }>): void;
|
4497 | _doesCharSupportLocalGlyph(id: number): boolean;
|
4498 | _tinySDF(entry: Entry, stack: string, id: number): StyleGlyph;
|
4499 | }
|
4500 | export declare type LightPosition = {
|
4501 | x: number;
|
4502 | y: number;
|
4503 | z: number;
|
4504 | };
|
4505 | export declare class LightPositionProperty implements Property<[
|
4506 | number,
|
4507 | number,
|
4508 | number
|
4509 | ], LightPosition> {
|
4510 | specification: StylePropertySpecification;
|
4511 | constructor();
|
4512 | possiblyEvaluate(value: PropertyValue<[
|
4513 | number,
|
4514 | number,
|
4515 | number
|
4516 | ], LightPosition>, parameters: EvaluationParameters): LightPosition;
|
4517 | interpolate(a: LightPosition, b: LightPosition, t: number): LightPosition;
|
4518 | }
|
4519 | export declare type Props = {
|
4520 | "anchor": DataConstantProperty<"map" | "viewport">;
|
4521 | "position": LightPositionProperty;
|
4522 | "color": DataConstantProperty<Color>;
|
4523 | "intensity": DataConstantProperty<number>;
|
4524 | };
|
4525 | export declare type PropsPossiblyEvaluated = {
|
4526 | "anchor": "map" | "viewport";
|
4527 | "position": LightPosition;
|
4528 | "color": Color;
|
4529 | "intensity": number;
|
4530 | };
|
4531 | export declare class Light extends Evented {
|
4532 | _transitionable: Transitionable<Props>;
|
4533 | _transitioning: Transitioning<Props>;
|
4534 | properties: PossiblyEvaluated<Props, PropsPossiblyEvaluated>;
|
4535 | constructor(lightOptions?: LightSpecification);
|
4536 | getLight(): any;
|
4537 | setLight(light?: LightSpecification, options?: StyleSetterOptions): void;
|
4538 | updateTransitions(parameters: TransitionParameters): void;
|
4539 | hasTransition(): boolean;
|
4540 | recalculate(parameters: EvaluationParameters): void;
|
4541 | _validate(validate: Function, value: unknown, options?: {
|
4542 | validate?: boolean;
|
4543 | }): boolean;
|
4544 | }
|
4545 | export declare class LineAtlas {
|
4546 | width: number;
|
4547 | height: number;
|
4548 | nextRow: number;
|
4549 | bytes: number;
|
4550 | data: Uint8Array;
|
4551 | dashEntry: {
|
4552 | [_: string]: any;
|
4553 | };
|
4554 | dirty: boolean;
|
4555 | texture: WebGLTexture;
|
4556 | constructor(width: number, height: number);
|
4557 | /**
|
4558 | * Get or create a dash line pattern.
|
4559 | *
|
4560 | * @param {Array<number>} dasharray
|
4561 | * @param {boolean} round whether to add circle caps in between dash segments
|
4562 | * @returns {Object} position of dash texture in { y, height, width }
|
4563 | * @private
|
4564 | */
|
4565 | getDash(dasharray: Array<number>, round: boolean): any;
|
4566 | getDashRanges(dasharray: Array<number>, lineAtlasWidth: number, stretch: number): any[];
|
4567 | addRoundDash(ranges: any, stretch: number, n: number): void;
|
4568 | addRegularDash(ranges: any): void;
|
4569 | addDash(dasharray: Array<number>, round: boolean): {
|
4570 | y: number;
|
4571 | height: number;
|
4572 | width: number;
|
4573 | };
|
4574 | bind(context: Context): void;
|
4575 | }
|
4576 | export declare type MessageListener = (a: {
|
4577 | data: any;
|
4578 | target: any;
|
4579 | }) => unknown;
|
4580 | export interface WorkerInterface {
|
4581 | addEventListener(type: "message", listener: MessageListener): void;
|
4582 | removeEventListener(type: "message", listener: MessageListener): void;
|
4583 | postMessage(message: any): void;
|
4584 | terminate(): void;
|
4585 | }
|
4586 | export declare class WorkerPool {
|
4587 | static workerCount: number;
|
4588 | active: {
|
4589 | [_ in number | string]: boolean;
|
4590 | };
|
4591 | workers: Array<WorkerInterface>;
|
4592 | constructor();
|
4593 | acquire(mapId: number | string): Array<WorkerInterface>;
|
4594 | release(mapId: number | string): void;
|
4595 | isPreloaded(): boolean;
|
4596 | numActive(): number;
|
4597 | }
|
4598 | export declare class Dispatcher {
|
4599 | workerPool: WorkerPool;
|
4600 | actors: Array<Actor>;
|
4601 | currentActor: number;
|
4602 | id: number;
|
4603 | static Actor: {
|
4604 | new (...args: any): Actor;
|
4605 | };
|
4606 | constructor(workerPool: WorkerPool, parent: any);
|
4607 | /**
|
4608 | * Broadcast a message to all Workers.
|
4609 | * @private
|
4610 | */
|
4611 | broadcast(type: string, data: unknown, cb?: (...args: any[]) => any): void;
|
4612 | /**
|
4613 | * Acquires an actor to dispatch messages to. The actors are distributed in round-robin fashion.
|
4614 | * @returns An actor object backed by a web worker for processing messages.
|
4615 | */
|
4616 | getActor(): Actor;
|
4617 | remove(): void;
|
4618 | }
|
4619 | export declare class TileBounds {
|
4620 | bounds: LngLatBounds;
|
4621 | minzoom: number;
|
4622 | maxzoom: number;
|
4623 | constructor(bounds: [
|
4624 | number,
|
4625 | number,
|
4626 | number,
|
4627 | number
|
4628 | ], minzoom?: number | null, maxzoom?: number | null);
|
4629 | validateBounds(bounds: [
|
4630 | number,
|
4631 | number,
|
4632 | number,
|
4633 | number
|
4634 | ]): LngLatBoundsLike;
|
4635 | contains(tileID: CanonicalTileID): boolean;
|
4636 | }
|
4637 | export declare class VectorTileSource extends Evented implements Source {
|
4638 | type: "vector";
|
4639 | id: string;
|
4640 | minzoom: number;
|
4641 | maxzoom: number;
|
4642 | url: string;
|
4643 | scheme: string;
|
4644 | tileSize: number;
|
4645 | promoteId: PromoteIdSpecification;
|
4646 | _options: VectorSourceSpecification;
|
4647 | _collectResourceTiming: boolean;
|
4648 | dispatcher: Dispatcher;
|
4649 | map: Map;
|
4650 | bounds: [
|
4651 | number,
|
4652 | number,
|
4653 | number,
|
4654 | number
|
4655 | ];
|
4656 | tiles: Array<string>;
|
4657 | tileBounds: TileBounds;
|
4658 | reparseOverscaled: boolean;
|
4659 | isTileClipped: boolean;
|
4660 | _tileJSONRequest: Cancelable;
|
4661 | _loaded: boolean;
|
4662 | constructor(id: string, options: VectorSourceSpecification & {
|
4663 | collectResourceTiming: boolean;
|
4664 | }, dispatcher: Dispatcher, eventedParent: Evented);
|
4665 | load(): void;
|
4666 | loaded(): boolean;
|
4667 | hasTile(tileID: OverscaledTileID): boolean;
|
4668 | onAdd(map: Map): void;
|
4669 | setSourceProperty(callback: Function): void;
|
4670 | /**
|
4671 | * Sets the source `tiles` property and re-renders the map.
|
4672 | *
|
4673 | * @param {string[]} tiles An array of one or more tile source URLs, as in the TileJSON spec.
|
4674 | * @returns {VectorTileSource} this
|
4675 | */
|
4676 | setTiles(tiles: Array<string>): this;
|
4677 | |
4678 |
|
4679 |
|
4680 |
|
4681 |
|
4682 |
|
4683 | setUrl(url: string): this;
|
4684 | onRemove(): void;
|
4685 | serialize(): any;
|
4686 | loadTile(tile: Tile, callback: Callback<void>): void;
|
4687 | abortTile(tile: Tile): void;
|
4688 | unloadTile(tile: Tile): void;
|
4689 | hasTransition(): boolean;
|
4690 | }
|
4691 | export declare class RasterTileSource extends Evented implements Source {
|
4692 | type: "raster" | "raster-dem";
|
4693 | id: string;
|
4694 | minzoom: number;
|
4695 | maxzoom: number;
|
4696 | url: string;
|
4697 | scheme: string;
|
4698 | tileSize: number;
|
4699 | bounds: [
|
4700 | number,
|
4701 | number,
|
4702 | number,
|
4703 | number
|
4704 | ];
|
4705 | tileBounds: TileBounds;
|
4706 | roundZoom: boolean;
|
4707 | dispatcher: Dispatcher;
|
4708 | map: Map;
|
4709 | tiles: Array<string>;
|
4710 | _loaded: boolean;
|
4711 | _options: RasterSourceSpecification | RasterDEMSourceSpecification;
|
4712 | _tileJSONRequest: Cancelable;
|
4713 | constructor(id: string, options: RasterSourceSpecification | RasterDEMSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
4714 | load(): void;
|
4715 | loaded(): boolean;
|
4716 | onAdd(map: Map): void;
|
4717 | onRemove(): void;
|
4718 | serialize(): any;
|
4719 | hasTile(tileID: OverscaledTileID): boolean;
|
4720 | loadTile(tile: Tile, callback: Callback<void>): void;
|
4721 | abortTile(tile: Tile, callback: Callback<void>): void;
|
4722 | unloadTile(tile: Tile, callback: Callback<void>): void;
|
4723 | hasTransition(): boolean;
|
4724 | }
|
4725 | export declare type MapLayerMouseEvent = MapMouseEvent & {
|
4726 | features?: GeoJSON.Feature[];
|
4727 | };
|
4728 | export declare type MapLayerTouchEvent = MapTouchEvent & {
|
4729 | features?: GeoJSON.Feature[];
|
4730 | };
|
4731 | export declare type MapSourceDataType = "content" | "metadata";
|
4732 | export declare type MapLayerEventType = {
|
4733 | click: MapLayerMouseEvent;
|
4734 | dblclick: MapLayerMouseEvent;
|
4735 | mousedown: MapLayerMouseEvent;
|
4736 | mouseup: MapLayerMouseEvent;
|
4737 | mousemove: MapLayerMouseEvent;
|
4738 | mouseenter: MapLayerMouseEvent;
|
4739 | mouseleave: MapLayerMouseEvent;
|
4740 | mouseover: MapLayerMouseEvent;
|
4741 | mouseout: MapLayerMouseEvent;
|
4742 | contextmenu: MapLayerMouseEvent;
|
4743 | touchstart: MapLayerTouchEvent;
|
4744 | touchend: MapLayerTouchEvent;
|
4745 | touchcancel: MapLayerTouchEvent;
|
4746 | };
|
4747 | export interface MapLibreEvent<TOrig = undefined> {
|
4748 | type: string;
|
4749 | target: Map;
|
4750 | originalEvent: TOrig;
|
4751 | }
|
4752 | export interface MapStyleDataEvent extends MapLibreEvent {
|
4753 | dataType: "style";
|
4754 | }
|
4755 | export interface MapSourceDataEvent extends MapLibreEvent {
|
4756 | dataType: "source";
|
4757 | isSourceLoaded: boolean;
|
4758 | source: SourceSpecification;
|
4759 | sourceId: string;
|
4760 | sourceDataType: MapSourceDataType;
|
4761 | tile: any;
|
4762 | }
|
4763 | export declare class MapMouseEvent extends Event implements MapLibreEvent<MouseEvent> {
|
4764 | |
4765 |
|
4766 |
|
4767 |
|
4768 |
|
4769 |
|
4770 |
|
4771 |
|
4772 |
|
4773 |
|
4774 |
|
4775 |
|
4776 | type: "mousedown" | "mouseup" | "click" | "dblclick" | "mousemove" | "mouseover" | "mouseenter" | "mouseleave" | "mouseout" | "contextmenu";
|
4777 | |
4778 |
|
4779 |
|
4780 | target: Map;
|
4781 | |
4782 |
|
4783 |
|
4784 | originalEvent: MouseEvent;
|
4785 | |
4786 |
|
4787 |
|
4788 | point: Point;
|
4789 | |
4790 |
|
4791 |
|
4792 | lngLat: LngLat;
|
4793 | |
4794 |
|
4795 |
|
4796 |
|
4797 |
|
4798 |
|
4799 |
|
4800 |
|
4801 |
|
4802 |
|
4803 |
|
4804 | preventDefault(): void;
|
4805 | |
4806 |
|
4807 |
|
4808 |
|
4809 | get defaultPrevented(): boolean;
|
4810 | _defaultPrevented: boolean;
|
4811 | |
4812 |
|
4813 |
|
4814 | constructor(type: string, map: Map, originalEvent: MouseEvent, data?: any);
|
4815 | }
|
4816 | export declare class MapTouchEvent extends Event implements MapLibreEvent<TouchEvent> {
|
4817 | |
4818 |
|
4819 |
|
4820 | type: "touchstart" | "touchmove" | "touchend" | "touchcancel";
|
4821 | |
4822 |
|
4823 |
|
4824 | target: Map;
|
4825 | |
4826 |
|
4827 |
|
4828 | originalEvent: TouchEvent;
|
4829 | |
4830 |
|
4831 |
|
4832 | lngLat: LngLat;
|
4833 | |
4834 |
|
4835 |
|
4836 |
|
4837 | point: Point;
|
4838 | |
4839 |
|
4840 |
|
4841 |
|
4842 | points: Array<Point>;
|
4843 | |
4844 |
|
4845 |
|
4846 |
|
4847 | lngLats: Array<LngLat>;
|
4848 | |
4849 |
|
4850 |
|
4851 |
|
4852 |
|
4853 |
|
4854 |
|
4855 |
|
4856 |
|
4857 | preventDefault(): void;
|
4858 | |
4859 |
|
4860 |
|
4861 |
|
4862 | get defaultPrevented(): boolean;
|
4863 | _defaultPrevented: boolean;
|
4864 | |
4865 |
|
4866 |
|
4867 | constructor(type: string, map: Map, originalEvent: TouchEvent);
|
4868 | }
|
4869 | export declare class MapWheelEvent extends Event {
|
4870 | |
4871 |
|
4872 |
|
4873 | type: "wheel";
|
4874 | |
4875 |
|
4876 |
|
4877 | target: Map;
|
4878 | |
4879 |
|
4880 |
|
4881 | originalEvent: WheelEvent;
|
4882 | |
4883 |
|
4884 |
|
4885 |
|
4886 |
|
4887 | preventDefault(): void;
|
4888 | |
4889 |
|
4890 |
|
4891 |
|
4892 | get defaultPrevented(): boolean;
|
4893 | _defaultPrevented: boolean;
|
4894 | |
4895 |
|
4896 |
|
4897 | constructor(type: string, map: Map, originalEvent: WheelEvent);
|
4898 | }
|
4899 | /**
|
4900 | * A `MapLibreZoomEvent` is the event type for the boxzoom-related map events emitted by the {@link BoxZoomHandler}.
|
4901 | *
|
4902 | * @typedef {Object} MapLibreZoomEvent
|
4903 | * @property {MouseEvent} originalEvent The DOM event that triggered the boxzoom event. Can be a `MouseEvent` or `KeyboardEvent`
|
4904 | * @property {string} type The type of boxzoom event. One of `boxzoomstart`, `boxzoomend` or `boxzoomcancel`
|
4905 | * @property {Map} target The `Map` instance that triggerred the event
|
4906 | */
|
4907 | export declare type MapLibreZoomEvent = {
|
4908 | type: "boxzoomstart" | "boxzoomend" | "boxzoomcancel";
|
4909 | target: Map;
|
4910 | originalEvent: MouseEvent;
|
4911 | };
|
4912 |
|
4913 |
|
4914 |
|
4915 |
|
4916 |
|
4917 |
|
4918 |
|
4919 |
|
4920 |
|
4921 |
|
4922 |
|
4923 |
|
4924 |
|
4925 |
|
4926 |
|
4927 |
|
4928 |
|
4929 |
|
4930 |
|
4931 |
|
4932 |
|
4933 |
|
4934 |
|
4935 |
|
4936 |
|
4937 |
|
4938 |
|
4939 |
|
4940 | export declare type MapDataEvent = {
|
4941 | type: string;
|
4942 | dataType: string;
|
4943 | sourceDataType: MapSourceDataType;
|
4944 | };
|
4945 | export declare type MapContextEvent = {
|
4946 | type: "webglcontextlost" | "webglcontextrestored";
|
4947 | originalEvent: WebGLContextEvent;
|
4948 | };
|
4949 | export interface MapStyleImageMissingEvent extends MapLibreEvent {
|
4950 | type: "styleimagemissing";
|
4951 | id: string;
|
4952 | }
|
4953 |
|
4954 |
|
4955 |
|
4956 | export declare type MapEventType = {
|
4957 | error: ErrorEvent;
|
4958 | load: MapLibreEvent;
|
4959 | idle: MapLibreEvent;
|
4960 | remove: MapLibreEvent;
|
4961 | render: MapLibreEvent;
|
4962 | resize: MapLibreEvent;
|
4963 | webglcontextlost: MapContextEvent;
|
4964 | webglcontextrestored: MapContextEvent;
|
4965 | dataloading: MapDataEvent;
|
4966 | data: MapDataEvent;
|
4967 | tiledataloading: MapDataEvent;
|
4968 | sourcedataloading: MapSourceDataEvent;
|
4969 | styledataloading: MapStyleDataEvent;
|
4970 | sourcedata: MapSourceDataEvent;
|
4971 | styledata: MapStyleDataEvent;
|
4972 | styleimagemissing: MapStyleImageMissingEvent;
|
4973 | dataabort: MapDataEvent;
|
4974 | sourcedataabort: MapSourceDataEvent;
|
4975 | boxzoomcancel: MapLibreZoomEvent;
|
4976 | boxzoomstart: MapLibreZoomEvent;
|
4977 | boxzoomend: MapLibreZoomEvent;
|
4978 | touchcancel: MapTouchEvent;
|
4979 | touchmove: MapTouchEvent;
|
4980 | touchend: MapTouchEvent;
|
4981 | touchstart: MapTouchEvent;
|
4982 | click: MapMouseEvent;
|
4983 | contextmenu: MapMouseEvent;
|
4984 | dblclick: MapMouseEvent;
|
4985 | mousemove: MapMouseEvent;
|
4986 | mouseup: MapMouseEvent;
|
4987 | mousedown: MapMouseEvent;
|
4988 | mouseout: MapMouseEvent;
|
4989 | mouseover: MapMouseEvent;
|
4990 | movestart: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
|
4991 | move: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
|
4992 | moveend: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
|
4993 | zoomstart: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
|
4994 | zoom: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
|
4995 | zoomend: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
|
4996 | rotatestart: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
4997 | rotate: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
4998 | rotateend: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
4999 | dragstart: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
5000 | drag: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
5001 | dragend: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
5002 | pitchstart: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
5003 | pitch: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
5004 | pitchend: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
5005 | wheel: MapWheelEvent;
|
5006 | };
|
5007 | export declare type MapEvent =
|
5008 |
|
5009 |
|
5010 |
|
5011 |
|
5012 |
|
5013 |
|
5014 |
|
5015 |
|
5016 |
|
5017 |
|
5018 |
|
5019 |
|
5020 |
|
5021 |
|
5022 |
|
5023 |
|
5024 |
|
5025 |
|
5026 |
|
5027 |
|
5028 |
|
5029 |
|
5030 |
|
5031 |
|
5032 |
|
5033 |
|
5034 |
|
5035 | "mousedown"
|
5036 |
|
5037 |
|
5038 |
|
5039 |
|
5040 |
|
5041 |
|
5042 |
|
5043 |
|
5044 |
|
5045 |
|
5046 |
|
5047 |
|
5048 |
|
5049 |
|
5050 |
|
5051 |
|
5052 |
|
5053 |
|
5054 |
|
5055 |
|
5056 |
|
5057 |
|
5058 |
|
5059 |
|
5060 |
|
5061 |
|
5062 |
|
5063 | | "mouseup"
|
5064 |
|
5065 |
|
5066 |
|
5067 |
|
5068 |
|
5069 |
|
5070 |
|
5071 |
|
5072 |
|
5073 |
|
5074 |
|
5075 |
|
5076 |
|
5077 |
|
5078 |
|
5079 |
|
5080 |
|
5081 |
|
5082 |
|
5083 |
|
5084 |
|
5085 |
|
5086 |
|
5087 |
|
5088 |
|
5089 |
|
5090 |
|
5091 |
|
5092 |
|
5093 |
|
5094 |
|
5095 | | "mouseover"
|
5096 |
|
5097 |
|
5098 |
|
5099 |
|
5100 |
|
5101 |
|
5102 |
|
5103 |
|
5104 |
|
5105 |
|
5106 |
|
5107 |
|
5108 |
|
5109 |
|
5110 |
|
5111 |
|
5112 |
|
5113 |
|
5114 |
|
5115 |
|
5116 |
|
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 |
|
5124 |
|
5125 |
|
5126 | | "mousemove"
|
5127 |
|
5128 |
|
5129 |
|
5130 |
|
5131 |
|
5132 |
|
5133 |
|
5134 |
|
5135 |
|
5136 |
|
5137 |
|
5138 |
|
5139 |
|
5140 |
|
5141 |
|
5142 |
|
5143 |
|
5144 |
|
5145 |
|
5146 |
|
5147 |
|
5148 |
|
5149 |
|
5150 |
|
5151 |
|
5152 |
|
5153 |
|
5154 |
|
5155 | | "click"
|
5156 |
|
5157 |
|
5158 |
|
5159 |
|
5160 |
|
5161 |
|
5162 |
|
5163 |
|
5164 |
|
5165 |
|
5166 |
|
5167 |
|
5168 |
|
5169 |
|
5170 |
|
5171 |
|
5172 |
|
5173 |
|
5174 |
|
5175 |
|
5176 |
|
5177 |
|
5178 |
|
5179 |
|
5180 |
|
5181 |
|
5182 |
|
5183 | | "dblclick"
|
5184 |
|
5185 |
|
5186 |
|
5187 |
|
5188 |
|
5189 |
|
5190 |
|
5191 |
|
5192 |
|
5193 |
|
5194 |
|
5195 |
|
5196 |
|
5197 |
|
5198 |
|
5199 |
|
5200 |
|
5201 |
|
5202 |
|
5203 |
|
5204 |
|
5205 | | "mouseenter"
|
5206 |
|
5207 |
|
5208 |
|
5209 |
|
5210 |
|
5211 |
|
5212 |
|
5213 |
|
5214 |
|
5215 |
|
5216 |
|
5217 |
|
5218 |
|
5219 |
|
5220 |
|
5221 |
|
5222 |
|
5223 |
|
5224 |
|
5225 |
|
5226 |
|
5227 |
|
5228 |
|
5229 | | "mouseleave"
|
5230 |
|
5231 |
|
5232 |
|
5233 |
|
5234 |
|
5235 |
|
5236 |
|
5237 |
|
5238 |
|
5239 |
|
5240 |
|
5241 |
|
5242 |
|
5243 |
|
5244 |
|
5245 |
|
5246 |
|
5247 | | "mouseout"
|
5248 |
|
5249 |
|
5250 |
|
5251 |
|
5252 |
|
5253 |
|
5254 |
|
5255 |
|
5256 |
|
5257 |
|
5258 |
|
5259 |
|
5260 |
|
5261 |
|
5262 |
|
5263 |
|
5264 |
|
5265 | | "contextmenu"
|
5266 |
|
5267 |
|
5268 |
|
5269 |
|
5270 |
|
5271 |
|
5272 |
|
5273 |
|
5274 |
|
5275 |
|
5276 |
|
5277 |
|
5278 |
|
5279 |
|
5280 |
|
5281 |
|
5282 | | "wheel"
|
5283 |
|
5284 |
|
5285 |
|
5286 |
|
5287 |
|
5288 |
|
5289 |
|
5290 |
|
5291 |
|
5292 |
|
5293 |
|
5294 |
|
5295 |
|
5296 |
|
5297 |
|
5298 |
|
5299 | | "touchstart"
|
5300 |
|
5301 |
|
5302 |
|
5303 |
|
5304 |
|
5305 |
|
5306 |
|
5307 |
|
5308 |
|
5309 |
|
5310 |
|
5311 |
|
5312 |
|
5313 |
|
5314 |
|
5315 |
|
5316 |
|
5317 | | "touchend"
|
5318 |
|
5319 |
|
5320 |
|
5321 |
|
5322 |
|
5323 |
|
5324 |
|
5325 |
|
5326 |
|
5327 |
|
5328 |
|
5329 |
|
5330 |
|
5331 |
|
5332 |
|
5333 |
|
5334 |
|
5335 | | "touchmove"
|
5336 |
|
5337 |
|
5338 |
|
5339 |
|
5340 |
|
5341 |
|
5342 |
|
5343 |
|
5344 |
|
5345 |
|
5346 |
|
5347 |
|
5348 |
|
5349 |
|
5350 |
|
5351 |
|
5352 | | "touchcancel"
|
5353 |
|
5354 |
|
5355 |
|
5356 |
|
5357 |
|
5358 |
|
5359 |
|
5360 |
|
5361 |
|
5362 |
|
5363 |
|
5364 |
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 |
|
5370 |
|
5371 | | "movestart"
|
5372 |
|
5373 |
|
5374 |
|
5375 |
|
5376 |
|
5377 |
|
5378 |
|
5379 |
|
5380 |
|
5381 |
|
5382 |
|
5383 |
|
5384 |
|
5385 |
|
5386 |
|
5387 |
|
5388 |
|
5389 |
|
5390 | | "move"
|
5391 |
|
5392 |
|
5393 |
|
5394 |
|
5395 |
|
5396 |
|
5397 |
|
5398 |
|
5399 |
|
5400 |
|
5401 |
|
5402 |
|
5403 |
|
5404 |
|
5405 |
|
5406 |
|
5407 |
|
5408 |
|
5409 | | "moveend"
|
5410 |
|
5411 |
|
5412 |
|
5413 |
|
5414 |
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 |
|
5420 |
|
5421 |
|
5422 |
|
5423 |
|
5424 |
|
5425 |
|
5426 | | "dragstart"
|
5427 |
|
5428 |
|
5429 |
|
5430 |
|
5431 |
|
5432 |
|
5433 |
|
5434 |
|
5435 |
|
5436 |
|
5437 |
|
5438 |
|
5439 |
|
5440 |
|
5441 |
|
5442 |
|
5443 | | "drag"
|
5444 |
|
5445 |
|
5446 |
|
5447 |
|
5448 |
|
5449 |
|
5450 |
|
5451 |
|
5452 |
|
5453 |
|
5454 |
|
5455 |
|
5456 |
|
5457 |
|
5458 |
|
5459 |
|
5460 |
|
5461 | | "dragend"
|
5462 |
|
5463 |
|
5464 |
|
5465 |
|
5466 |
|
5467 |
|
5468 |
|
5469 |
|
5470 |
|
5471 |
|
5472 |
|
5473 |
|
5474 |
|
5475 |
|
5476 |
|
5477 |
|
5478 |
|
5479 | | "zoomstart"
|
5480 |
|
5481 |
|
5482 |
|
5483 |
|
5484 |
|
5485 |
|
5486 |
|
5487 |
|
5488 |
|
5489 |
|
5490 |
|
5491 |
|
5492 |
|
5493 |
|
5494 |
|
5495 |
|
5496 |
|
5497 | | "zoom"
|
5498 |
|
5499 |
|
5500 |
|
5501 |
|
5502 |
|
5503 |
|
5504 |
|
5505 |
|
5506 |
|
5507 |
|
5508 |
|
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 |
|
5514 |
|
5515 | | "zoomend"
|
5516 |
|
5517 |
|
5518 |
|
5519 |
|
5520 |
|
5521 |
|
5522 |
|
5523 |
|
5524 |
|
5525 |
|
5526 |
|
5527 |
|
5528 |
|
5529 |
|
5530 |
|
5531 |
|
5532 | | "rotatestart"
|
5533 |
|
5534 |
|
5535 |
|
5536 |
|
5537 |
|
5538 |
|
5539 |
|
5540 |
|
5541 |
|
5542 |
|
5543 |
|
5544 |
|
5545 |
|
5546 |
|
5547 |
|
5548 |
|
5549 | | "rotate"
|
5550 |
|
5551 |
|
5552 |
|
5553 |
|
5554 |
|
5555 |
|
5556 |
|
5557 |
|
5558 |
|
5559 |
|
5560 |
|
5561 |
|
5562 |
|
5563 |
|
5564 |
|
5565 |
|
5566 | | "rotateend"
|
5567 |
|
5568 |
|
5569 |
|
5570 |
|
5571 |
|
5572 |
|
5573 |
|
5574 |
|
5575 |
|
5576 |
|
5577 |
|
5578 |
|
5579 |
|
5580 |
|
5581 |
|
5582 |
|
5583 |
|
5584 | | "pitchstart"
|
5585 |
|
5586 |
|
5587 |
|
5588 |
|
5589 |
|
5590 |
|
5591 |
|
5592 |
|
5593 |
|
5594 |
|
5595 |
|
5596 |
|
5597 |
|
5598 |
|
5599 |
|
5600 |
|
5601 |
|
5602 |
|
5603 | | "pitch"
|
5604 |
|
5605 |
|
5606 |
|
5607 |
|
5608 |
|
5609 |
|
5610 |
|
5611 |
|
5612 |
|
5613 |
|
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 |
|
5619 |
|
5620 |
|
5621 | | "pitchend"
|
5622 |
|
5623 |
|
5624 |
|
5625 |
|
5626 |
|
5627 |
|
5628 |
|
5629 |
|
5630 |
|
5631 |
|
5632 |
|
5633 |
|
5634 |
|
5635 |
|
5636 |
|
5637 |
|
5638 | | "boxzoomstart"
|
5639 |
|
5640 |
|
5641 |
|
5642 |
|
5643 |
|
5644 |
|
5645 |
|
5646 |
|
5647 |
|
5648 |
|
5649 |
|
5650 |
|
5651 |
|
5652 |
|
5653 |
|
5654 |
|
5655 |
|
5656 | | "boxzoomend"
|
5657 |
|
5658 |
|
5659 |
|
5660 |
|
5661 |
|
5662 |
|
5663 |
|
5664 |
|
5665 |
|
5666 |
|
5667 |
|
5668 |
|
5669 |
|
5670 |
|
5671 |
|
5672 |
|
5673 |
|
5674 | | "boxzoomcancel"
|
5675 |
|
5676 |
|
5677 |
|
5678 |
|
5679 |
|
5680 |
|
5681 |
|
5682 |
|
5683 |
|
5684 |
|
5685 |
|
5686 |
|
5687 |
|
5688 |
|
5689 |
|
5690 | | "resize"
|
5691 |
|
5692 |
|
5693 |
|
5694 |
|
5695 |
|
5696 |
|
5697 |
|
5698 |
|
5699 |
|
5700 |
|
5701 |
|
5702 |
|
5703 |
|
5704 |
|
5705 |
|
5706 | | "webglcontextlost"
|
5707 |
|
5708 |
|
5709 |
|
5710 |
|
5711 |
|
5712 |
|
5713 |
|
5714 |
|
5715 |
|
5716 |
|
5717 |
|
5718 |
|
5719 |
|
5720 |
|
5721 |
|
5722 | | "webglcontextrestored"
|
5723 |
|
5724 |
|
5725 |
|
5726 |
|
5727 |
|
5728 |
|
5729 |
|
5730 |
|
5731 |
|
5732 |
|
5733 |
|
5734 |
|
5735 |
|
5736 |
|
5737 |
|
5738 |
|
5739 |
|
5740 |
|
5741 |
|
5742 |
|
5743 | | "load"
|
5744 |
|
5745 |
|
5746 |
|
5747 |
|
5748 |
|
5749 |
|
5750 |
|
5751 |
|
5752 |
|
5753 |
|
5754 |
|
5755 |
|
5756 |
|
5757 |
|
5758 |
|
5759 |
|
5760 |
|
5761 |
|
5762 |
|
5763 |
|
5764 | | "render"
|
5765 |
|
5766 |
|
5767 |
|
5768 |
|
5769 |
|
5770 |
|
5771 |
|
5772 |
|
5773 |
|
5774 |
|
5775 |
|
5776 |
|
5777 |
|
5778 |
|
5779 |
|
5780 |
|
5781 |
|
5782 |
|
5783 |
|
5784 |
|
5785 | | "idle"
|
5786 |
|
5787 |
|
5788 |
|
5789 |
|
5790 |
|
5791 |
|
5792 |
|
5793 |
|
5794 |
|
5795 |
|
5796 |
|
5797 |
|
5798 |
|
5799 |
|
5800 |
|
5801 | | "remove"
|
5802 |
|
5803 |
|
5804 |
|
5805 |
|
5806 |
|
5807 |
|
5808 |
|
5809 |
|
5810 |
|
5811 |
|
5812 |
|
5813 |
|
5814 |
|
5815 |
|
5816 |
|
5817 |
|
5818 |
|
5819 |
|
5820 |
|
5821 | | "error"
|
5822 |
|
5823 |
|
5824 |
|
5825 |
|
5826 |
|
5827 |
|
5828 |
|
5829 |
|
5830 |
|
5831 |
|
5832 |
|
5833 |
|
5834 |
|
5835 |
|
5836 |
|
5837 |
|
5838 |
|
5839 |
|
5840 | | "data"
|
5841 |
|
5842 |
|
5843 |
|
5844 |
|
5845 |
|
5846 |
|
5847 |
|
5848 |
|
5849 |
|
5850 |
|
5851 |
|
5852 |
|
5853 |
|
5854 |
|
5855 |
|
5856 |
|
5857 |
|
5858 | | "styledata"
|
5859 |
|
5860 |
|
5861 |
|
5862 |
|
5863 |
|
5864 |
|
5865 |
|
5866 |
|
5867 |
|
5868 |
|
5869 |
|
5870 |
|
5871 |
|
5872 |
|
5873 |
|
5874 |
|
5875 |
|
5876 | | "sourcedata"
|
5877 |
|
5878 |
|
5879 |
|
5880 |
|
5881 |
|
5882 |
|
5883 |
|
5884 |
|
5885 |
|
5886 |
|
5887 |
|
5888 |
|
5889 |
|
5890 |
|
5891 |
|
5892 |
|
5893 |
|
5894 |
|
5895 |
|
5896 | | "dataloading"
|
5897 |
|
5898 |
|
5899 |
|
5900 |
|
5901 |
|
5902 |
|
5903 |
|
5904 |
|
5905 |
|
5906 |
|
5907 |
|
5908 |
|
5909 |
|
5910 |
|
5911 |
|
5912 |
|
5913 |
|
5914 |
|
5915 |
|
5916 | | "styledataloading"
|
5917 |
|
5918 |
|
5919 |
|
5920 |
|
5921 |
|
5922 |
|
5923 |
|
5924 |
|
5925 |
|
5926 |
|
5927 |
|
5928 |
|
5929 |
|
5930 |
|
5931 |
|
5932 |
|
5933 |
|
5934 |
|
5935 |
|
5936 | | "sourcedataloading"
|
5937 |
|
5938 |
|
5939 |
|
5940 |
|
5941 |
|
5942 |
|
5943 |
|
5944 |
|
5945 |
|
5946 |
|
5947 |
|
5948 |
|
5949 |
|
5950 |
|
5951 |
|
5952 |
|
5953 |
|
5954 |
|
5955 |
|
5956 | | "styleimagemissing"
|
5957 |
|
5958 |
|
5959 |
|
5960 |
|
5961 |
|
5962 |
|
5963 | | "style.load"
|
5964 |
|
5965 |
|
5966 |
|
5967 |
|
5968 |
|
5969 |
|
5970 |
|
5971 |
|
5972 |
|
5973 |
|
5974 |
|
5975 |
|
5976 |
|
5977 |
|
5978 |
|
5979 |
|
5980 |
|
5981 | | "dataabort"
|
5982 |
|
5983 |
|
5984 |
|
5985 |
|
5986 |
|
5987 |
|
5988 |
|
5989 |
|
5990 |
|
5991 |
|
5992 |
|
5993 |
|
5994 |
|
5995 |
|
5996 |
|
5997 |
|
5998 |
|
5999 | | "sourcedataabort";
|
6000 | export declare type GeoJSONSourceOptions = GeoJSONSourceSpecification & {
|
6001 | workerOptions?: any;
|
6002 | collectResourceTiming: boolean;
|
6003 | };
|
6004 | export declare class GeoJSONSource extends Evented implements Source {
|
6005 | type: "geojson";
|
6006 | id: string;
|
6007 | minzoom: number;
|
6008 | maxzoom: number;
|
6009 | tileSize: number;
|
6010 | attribution: string;
|
6011 | promoteId: PromoteIdSpecification;
|
6012 | isTileClipped: boolean;
|
6013 | reparseOverscaled: boolean;
|
6014 | _data: GeoJSON.GeoJSON | string;
|
6015 | _options: any;
|
6016 | workerOptions: any;
|
6017 | map: Map;
|
6018 | actor: Actor;
|
6019 | _pendingLoads: number;
|
6020 | _collectResourceTiming: boolean;
|
6021 | _removed: boolean;
|
6022 | |
6023 |
|
6024 |
|
6025 | constructor(id: string, options: GeoJSONSourceOptions, dispatcher: Dispatcher, eventedParent: Evented);
|
6026 | load(): void;
|
6027 | onAdd(map: Map): void;
|
6028 | /**
|
6029 | * Sets the GeoJSON data and re-renders the map.
|
6030 | *
|
6031 | * @param {Object|string} data A GeoJSON data object or a URL to one. The latter is preferable in the case of large GeoJSON files.
|
6032 | * @returns {GeoJSONSource} this
|
6033 | */
|
6034 | setData(data: GeoJSON.GeoJSON | string): this;
|
6035 | |
6036 |
|
6037 |
|
6038 |
|
6039 |
|
6040 |
|
6041 |
|
6042 | getClusterExpansionZoom(clusterId: number, callback: Callback<number>): this;
|
6043 | |
6044 |
|
6045 |
|
6046 |
|
6047 |
|
6048 |
|
6049 |
|
6050 | getClusterChildren(clusterId: number, callback: Callback<Array<GeoJSON.Feature>>): this;
|
6051 | |
6052 |
|
6053 |
|
6054 |
|
6055 |
|
6056 |
|
6057 |
|
6058 |
|
6059 |
|
6060 |
|
6061 |
|
6062 |
|
6063 |
|
6064 |
|
6065 |
|
6066 |
|
6067 |
|
6068 |
|
6069 |
|
6070 |
|
6071 |
|
6072 |
|
6073 |
|
6074 |
|
6075 |
|
6076 | getClusterLeaves(clusterId: number, limit: number, offset: number, callback: Callback<Array<GeoJSON.Feature>>): this;
|
6077 | _updateWorkerData(sourceDataType: MapSourceDataType): void;
|
6078 | loaded(): boolean;
|
6079 | loadTile(tile: Tile, callback: Callback<void>): void;
|
6080 | abortTile(tile: Tile): void;
|
6081 | unloadTile(tile: Tile): void;
|
6082 | onRemove(): void;
|
6083 | serialize(): any;
|
6084 | hasTransition(): boolean;
|
6085 | }
|
6086 | export declare type CanvasSourceSpecification = {
|
6087 | "type": "canvas";
|
6088 | "coordinates": [
|
6089 | [
|
6090 | number,
|
6091 | number
|
6092 | ],
|
6093 | [
|
6094 | number,
|
6095 | number
|
6096 | ],
|
6097 | [
|
6098 | number,
|
6099 | number
|
6100 | ],
|
6101 | [
|
6102 | number,
|
6103 | number
|
6104 | ]
|
6105 | ];
|
6106 | "animate"?: boolean;
|
6107 | "canvas": string | HTMLCanvasElement;
|
6108 | };
|
6109 | export declare class CanvasSource extends ImageSource {
|
6110 | options: CanvasSourceSpecification;
|
6111 | animate: boolean;
|
6112 | canvas: HTMLCanvasElement;
|
6113 | width: number;
|
6114 | height: number;
|
6115 | play: () => void;
|
6116 | pause: () => void;
|
6117 | _playing: boolean;
|
6118 | |
6119 |
|
6120 |
|
6121 | constructor(id: string, options: CanvasSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
6122 | /**
|
6123 | * Enables animation. The image will be copied from the canvas to the map on each frame.
|
6124 | * @method play
|
6125 | * @instance
|
6126 | * @memberof CanvasSource
|
6127 | */
|
6128 | /**
|
6129 | * Disables animation. The map will display a static copy of the canvas image.
|
6130 | * @method pause
|
6131 | * @instance
|
6132 | * @memberof CanvasSource
|
6133 | */
|
6134 | load(): void;
|
6135 | /**
|
6136 | * Returns the HTML `canvas` element.
|
6137 | *
|
6138 | * @returns {HTMLCanvasElement} The HTML `canvas` element.
|
6139 | */
|
6140 | getCanvas(): HTMLCanvasElement;
|
6141 | onAdd(map: Map): void;
|
6142 | onRemove(): void;
|
6143 | prepare(): void;
|
6144 | serialize(): any;
|
6145 | hasTransition(): boolean;
|
6146 | _hasInvalidDimensions(): boolean;
|
6147 | }
|
6148 | export declare type Coordinates = [
|
6149 | [
|
6150 | number,
|
6151 | number
|
6152 | ],
|
6153 | [
|
6154 | number,
|
6155 | number
|
6156 | ],
|
6157 | [
|
6158 | number,
|
6159 | number
|
6160 | ],
|
6161 | [
|
6162 | number,
|
6163 | number
|
6164 | ]
|
6165 | ];
|
6166 | export declare class ImageSource extends Evented implements Source {
|
6167 | type: string;
|
6168 | id: string;
|
6169 | minzoom: number;
|
6170 | maxzoom: number;
|
6171 | tileSize: number;
|
6172 | url: string;
|
6173 | coordinates: Coordinates;
|
6174 | tiles: {
|
6175 | [_: string]: Tile;
|
6176 | };
|
6177 | options: any;
|
6178 | dispatcher: Dispatcher;
|
6179 | map: Map;
|
6180 | texture: Texture | null;
|
6181 | image: HTMLImageElement | ImageBitmap;
|
6182 | tileID: CanonicalTileID;
|
6183 | _boundsArray: RasterBoundsArray;
|
6184 | boundsBuffer: VertexBuffer;
|
6185 | boundsSegments: SegmentVector;
|
6186 | _loaded: boolean;
|
6187 | |
6188 |
|
6189 |
|
6190 | constructor(id: string, options: ImageSourceSpecification | VideoSourceSpecification | CanvasSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
6191 | load(newCoordinates?: Coordinates, successCallback?: () => void): void;
|
6192 | loaded(): boolean;
|
6193 | /**
|
6194 | * Updates the image URL and, optionally, the coordinates. To avoid having the image flash after changing,
|
6195 | * set the `raster-fade-duration` paint property on the raster layer to 0.
|
6196 | *
|
6197 | * @param {Object} options Options object.
|
6198 | * @param {string} [options.url] Required image URL.
|
6199 | * @param {Array<Array<number>>} [options.coordinates] Four geographical coordinates,
|
6200 | * represented as arrays of longitude and latitude numbers, which define the corners of the image.
|
6201 | * The coordinates start at the top left corner of the image and proceed in clockwise order.
|
6202 | * They do not have to represent a rectangle.
|
6203 | * @returns {ImageSource} this
|
6204 | */
|
6205 | updateImage(options: {
|
6206 | url: string;
|
6207 | coordinates?: Coordinates;
|
6208 | }): this;
|
6209 | _finishLoading(): void;
|
6210 | onAdd(map: Map): void;
|
6211 | |
6212 |
|
6213 |
|
6214 |
|
6215 |
|
6216 |
|
6217 |
|
6218 |
|
6219 |
|
6220 | setCoordinates(coordinates: Coordinates): this;
|
6221 | prepare(): void;
|
6222 | loadTile(tile: Tile, callback: Callback<void>): void;
|
6223 | serialize(): any;
|
6224 | hasTransition(): boolean;
|
6225 | }
|
6226 |
|
6227 |
|
6228 |
|
6229 |
|
6230 |
|
6231 |
|
6232 |
|
6233 |
|
6234 |
|
6235 |
|
6236 |
|
6237 |
|
6238 |
|
6239 |
|
6240 |
|
6241 |
|
6242 |
|
6243 |
|
6244 |
|
6245 |
|
6246 |
|
6247 |
|
6248 |
|
6249 |
|
6250 | export interface Source {
|
6251 | readonly type: string;
|
6252 | id: string;
|
6253 | minzoom: number;
|
6254 | maxzoom: number;
|
6255 | tileSize: number;
|
6256 | attribution?: string;
|
6257 | roundZoom?: boolean;
|
6258 | isTileClipped?: boolean;
|
6259 | tileID?: CanonicalTileID;
|
6260 | reparseOverscaled?: boolean;
|
6261 | vectorLayerIds?: Array<string>;
|
6262 | hasTransition(): boolean;
|
6263 | loaded(): boolean;
|
6264 | fire(event: Event): unknown;
|
6265 | readonly onAdd?: (map: Map) => void;
|
6266 | readonly onRemove?: (map: Map) => void;
|
6267 | loadTile(tile: Tile, callback: Callback<void>): void;
|
6268 | readonly hasTile?: (tileID: OverscaledTileID) => boolean;
|
6269 | readonly abortTile?: (tile: Tile, callback: Callback<void>) => void;
|
6270 | readonly unloadTile?: (tile: Tile, callback: Callback<void>) => void;
|
6271 | |
6272 |
|
6273 |
|
6274 |
|
6275 |
|
6276 |
|
6277 | serialize(): any;
|
6278 | readonly prepare?: () => void;
|
6279 | }
|
6280 | export declare type SourceStatics = {
|
6281 | workerSourceURL?: URL;
|
6282 | };
|
6283 | export declare type SourceClass = {
|
6284 | new (...args: any): Source;
|
6285 | } & SourceStatics;
|
6286 | declare const getSourceType: (name: string) => any;
|
6287 | declare const setSourceType: (name: string, type: new (...args: any) => Source) => void;
|
6288 | export declare class TileCache {
|
6289 | max: number;
|
6290 | data: {
|
6291 | [key: string]: Array<{
|
6292 | value: Tile;
|
6293 | timeout: ReturnType<typeof setTimeout>;
|
6294 | }>;
|
6295 | };
|
6296 | order: Array<string>;
|
6297 | onRemove: (element: Tile) => void;
|
6298 | |
6299 |
|
6300 |
|
6301 |
|
6302 | constructor(max: number, onRemove: (element: Tile) => void);
|
6303 | /**
|
6304 | * Clear the cache
|
6305 | *
|
6306 | * @returns {TileCache} this cache
|
6307 | * @private
|
6308 | */
|
6309 | reset(): this;
|
6310 | |
6311 |
|
6312 |
|
6313 |
|
6314 |
|
6315 |
|
6316 |
|
6317 |
|
6318 |
|
6319 |
|
6320 | add(tileID: OverscaledTileID, data: Tile, expiryTimeout: number | void): this;
|
6321 | |
6322 |
|
6323 |
|
6324 |
|
6325 |
|
6326 |
|
6327 |
|
6328 | has(tileID: OverscaledTileID): boolean;
|
6329 | |
6330 |
|
6331 |
|
6332 |
|
6333 |
|
6334 |
|
6335 |
|
6336 |
|
6337 | getAndRemove(tileID: OverscaledTileID): Tile;
|
6338 | _getAndRemoveByKey(key: string): Tile;
|
6339 | getByKey(key: string): Tile;
|
6340 | |
6341 |
|
6342 |
|
6343 |
|
6344 |
|
6345 |
|
6346 |
|
6347 |
|
6348 | get(tileID: OverscaledTileID): Tile;
|
6349 | |
6350 |
|
6351 |
|
6352 |
|
6353 |
|
6354 |
|
6355 |
|
6356 |
|
6357 | remove(tileID: OverscaledTileID, value?: {
|
6358 | value: Tile;
|
6359 | timeout: ReturnType<typeof setTimeout>;
|
6360 | }): this;
|
6361 | |
6362 |
|
6363 |
|
6364 |
|
6365 |
|
6366 |
|
6367 |
|
6368 | setMaxSize(max: number): TileCache;
|
6369 | |
6370 |
|
6371 |
|
6372 |
|
6373 |
|
6374 |
|
6375 | filter(filterFn: (tile: Tile) => boolean): void;
|
6376 | }
|
6377 | export declare class SourceCache extends Evented {
|
6378 | id: string;
|
6379 | dispatcher: Dispatcher;
|
6380 | map: Map;
|
6381 | style: Style;
|
6382 | _source: Source;
|
6383 | _sourceLoaded: boolean;
|
6384 | _sourceErrored: boolean;
|
6385 | _tiles: {
|
6386 | [_: string]: Tile;
|
6387 | };
|
6388 | _prevLng: number;
|
6389 | _cache: TileCache;
|
6390 | _timers: {
|
6391 | [_ in any]: ReturnType<typeof setTimeout>;
|
6392 | };
|
6393 | _cacheTimers: {
|
6394 | [_ in any]: ReturnType<typeof setTimeout>;
|
6395 | };
|
6396 | _maxTileCacheSize: number;
|
6397 | _paused: boolean;
|
6398 | _shouldReloadOnResume: boolean;
|
6399 | _coveredTiles: {
|
6400 | [_: string]: boolean;
|
6401 | };
|
6402 | transform: Transform;
|
6403 | used: boolean;
|
6404 | _state: SourceFeatureState;
|
6405 | _loadedParentTiles: {
|
6406 | [_: string]: Tile;
|
6407 | };
|
6408 | static maxUnderzooming: number;
|
6409 | static maxOverzooming: number;
|
6410 | constructor(id: string, options: SourceSpecification, dispatcher: Dispatcher);
|
6411 | onAdd(map: Map): void;
|
6412 | onRemove(map: Map): void;
|
6413 | /**
|
6414 | * Return true if no tile data is pending, tiles will not change unless
|
6415 | * an additional API call is received.
|
6416 | * @private
|
6417 | */
|
6418 | loaded(): boolean;
|
6419 | getSource(): Source;
|
6420 | pause(): void;
|
6421 | resume(): void;
|
6422 | _loadTile(tile: Tile, callback: Callback<void>): void;
|
6423 | _unloadTile(tile: Tile): void;
|
6424 | _abortTile(tile: Tile): void;
|
6425 | serialize(): any;
|
6426 | prepare(context: Context): void;
|
6427 | /**
|
6428 | * Return all tile ids ordered with z-order, and cast to numbers
|
6429 | * @private
|
6430 | */
|
6431 | getIds(): Array<string>;
|
6432 | getRenderableIds(symbolLayer?: boolean): Array<string>;
|
6433 | hasRenderableParent(tileID: OverscaledTileID): boolean;
|
6434 | _isIdRenderable(id: string, symbolLayer?: boolean): boolean;
|
6435 | reload(): void;
|
6436 | _reloadTile(id: string, state: TileState): void;
|
6437 | _tileLoaded(tile: Tile, id: string, previousState: TileState, err?: Error | null): void;
|
6438 | /**
|
6439 | * For raster terrain source, backfill DEM to eliminate visible tile boundaries
|
6440 | * @private
|
6441 | */
|
6442 | _backfillDEM(tile: Tile): void;
|
6443 | /**
|
6444 | * Get a specific tile by TileID
|
6445 | * @private
|
6446 | */
|
6447 | getTile(tileID: OverscaledTileID): Tile;
|
6448 | /**
|
6449 | * Get a specific tile by id
|
6450 | * @private
|
6451 | */
|
6452 | getTileByID(id: string): Tile;
|
6453 | /**
|
6454 | * For a given set of tiles, retain children that are loaded and have a zoom
|
6455 | * between `zoom` (exclusive) and `maxCoveringZoom` (inclusive)
|
6456 | * @private
|
6457 | */
|
6458 | _retainLoadedChildren(idealTiles: {
|
6459 | [_ in any]: OverscaledTileID;
|
6460 | }, zoom: number, maxCoveringZoom: number, retain: {
|
6461 | [_ in any]: OverscaledTileID;
|
6462 | }): void;
|
6463 | /**
|
6464 | * Find a loaded parent of the given tile (up to minCoveringZoom)
|
6465 | * @private
|
6466 | */
|
6467 | findLoadedParent(tileID: OverscaledTileID, minCoveringZoom: number): Tile;
|
6468 | _getLoadedTile(tileID: OverscaledTileID): Tile;
|
6469 | /**
|
6470 | * Resizes the tile cache based on the current viewport's size
|
6471 | * or the maxTileCacheSize option passed during map creation
|
6472 | *
|
6473 | * Larger viewports use more tiles and need larger caches. Larger viewports
|
6474 | * are more likely to be found on devices with more memory and on pages where
|
6475 | * the map is more important.
|
6476 | * @private
|
6477 | */
|
6478 | updateCacheSize(transform: Transform): void;
|
6479 | handleWrapJump(lng: number): void;
|
6480 | /**
|
6481 | * Removes tiles that are outside the viewport and adds new tiles that
|
6482 | * are inside the viewport.
|
6483 | * @private
|
6484 | */
|
6485 | update(transform: Transform): void;
|
6486 | releaseSymbolFadeTiles(): void;
|
6487 | _updateRetainedTiles(idealTileIDs: Array<OverscaledTileID>, zoom: number): {
|
6488 | [_: string]: OverscaledTileID;
|
6489 | };
|
6490 | _updateLoadedParentTileCache(): void;
|
6491 | |
6492 |
|
6493 |
|
6494 |
|
6495 | _addTile(tileID: OverscaledTileID): Tile;
|
6496 | _setTileReloadTimer(id: string, tile: Tile): void;
|
6497 | |
6498 |
|
6499 |
|
6500 |
|
6501 | _removeTile(id: string): void;
|
6502 | |
6503 |
|
6504 |
|
6505 | clearTiles(): void;
|
6506 | |
6507 |
|
6508 |
|
6509 |
|
6510 |
|
6511 |
|
6512 |
|
6513 | tilesIn(pointQueryGeometry: Array<Point>, maxPitchScaleFactor: number, has3DLayer: boolean): any[];
|
6514 | getVisibleCoordinates(symbolLayer?: boolean): Array<OverscaledTileID>;
|
6515 | hasTransition(): boolean;
|
6516 | |
6517 |
|
6518 |
|
6519 |
|
6520 | setFeatureState(sourceLayer: string, featureId: number | string, state: any): void;
|
6521 | |
6522 |
|
6523 |
|
6524 |
|
6525 | removeFeatureState(sourceLayer?: string, featureId?: number | string, key?: string): void;
|
6526 | |
6527 |
|
6528 |
|
6529 |
|
6530 | getFeatureState(sourceLayer: string, featureId: number | string): any;
|
6531 | |
6532 |
|
6533 |
|
6534 |
|
6535 |
|
6536 | setDependencies(tileKey: string, namespace: string, dependencies: Array<string>): void;
|
6537 | |
6538 |
|
6539 |
|
6540 |
|
6541 | reloadTilesForDependencies(namespaces: Array<string>, keys: Array<string>): void;
|
6542 | }
|
6543 | declare const status: {
|
6544 | unavailable: string;
|
6545 | deferred: string;
|
6546 | loading: string;
|
6547 | loaded: string;
|
6548 | error: string;
|
6549 | };
|
6550 | export declare type PluginState = {
|
6551 | pluginStatus: typeof status[keyof typeof status];
|
6552 | pluginURL: string;
|
6553 | };
|
6554 | export declare type PluginStateSyncCallback = (state: PluginState) => void;
|
6555 | declare const registerForPluginStateChange: (callback: PluginStateSyncCallback) => PluginStateSyncCallback;
|
6556 | export declare type QueryResult<T> = {
|
6557 | key: T;
|
6558 | x1: number;
|
6559 | y1: number;
|
6560 | x2: number;
|
6561 | y2: number;
|
6562 | };
|
6563 | export declare type GridKey = {
|
6564 | overlapMode?: OverlapMode;
|
6565 | };
|
6566 | export declare class GridIndex<T extends GridKey> {
|
6567 | circleKeys: Array<T>;
|
6568 | boxKeys: Array<T>;
|
6569 | boxCells: Array<Array<number>>;
|
6570 | circleCells: Array<Array<number>>;
|
6571 | bboxes: Array<number>;
|
6572 | circles: Array<number>;
|
6573 | xCellCount: number;
|
6574 | yCellCount: number;
|
6575 | width: number;
|
6576 | height: number;
|
6577 | xScale: number;
|
6578 | yScale: number;
|
6579 | boxUid: number;
|
6580 | circleUid: number;
|
6581 | constructor(width: number, height: number, cellSize: number);
|
6582 | keysLength(): number;
|
6583 | insert(key: T, x1: number, y1: number, x2: number, y2: number): void;
|
6584 | insertCircle(key: T, x: number, y: number, radius: number): void;
|
6585 | private _insertBoxCell;
|
6586 | private _insertCircleCell;
|
6587 | private _query;
|
6588 | query(x1: number, y1: number, x2: number, y2: number): Array<QueryResult<T>>;
|
6589 | hitTest(x1: number, y1: number, x2: number, y2: number, overlapMode: OverlapMode, predicate?: (key: T) => boolean): boolean;
|
6590 | hitTestCircle(x: number, y: number, radius: number, overlapMode: OverlapMode, predicate?: (key: T) => boolean): boolean;
|
6591 | private _queryCell;
|
6592 | private _queryCellCircle;
|
6593 | private _forEachCell;
|
6594 | private _convertToXCellCoord;
|
6595 | private _convertToYCellCoord;
|
6596 | private _circlesCollide;
|
6597 | private _circleAndRectCollide;
|
6598 | }
|
6599 | export declare type FeatureKey = {
|
6600 | bucketInstanceId: number;
|
6601 | featureIndex: number;
|
6602 | collisionGroupID: number;
|
6603 | overlapMode: OverlapMode;
|
6604 | };
|
6605 | export declare class CollisionIndex {
|
6606 | grid: GridIndex<FeatureKey>;
|
6607 | ignoredGrid: GridIndex<FeatureKey>;
|
6608 | transform: Transform;
|
6609 | pitchfactor: number;
|
6610 | screenRightBoundary: number;
|
6611 | screenBottomBoundary: number;
|
6612 | gridRightBoundary: number;
|
6613 | gridBottomBoundary: number;
|
6614 | constructor(transform: Transform, grid?: GridIndex<FeatureKey>, ignoredGrid?: GridIndex<FeatureKey>);
|
6615 | placeCollisionBox(collisionBox: SingleCollisionBox, overlapMode: OverlapMode, textPixelRatio: number, posMatrix: mat4, collisionGroupPredicate?: (key: FeatureKey) => boolean): {
|
6616 | box: Array<number>;
|
6617 | offscreen: boolean;
|
6618 | };
|
6619 | placeCollisionCircles(overlapMode: OverlapMode, symbol: any, lineVertexArray: SymbolLineVertexArray, glyphOffsetArray: GlyphOffsetArray, fontSize: number, posMatrix: mat4, labelPlaneMatrix: mat4, labelToScreenMatrix: mat4, showCollisionCircles: boolean, pitchWithMap: boolean, collisionGroupPredicate: (key: FeatureKey) => boolean, circlePixelDiameter: number, textPixelPadding: number): {
|
6620 | circles: Array<number>;
|
6621 | offscreen: boolean;
|
6622 | collisionDetected: boolean;
|
6623 | };
|
6624 | |
6625 |
|
6626 |
|
6627 |
|
6628 |
|
6629 |
|
6630 |
|
6631 | queryRenderedSymbols(viewportQueryGeometry: Array<Point>): {};
|
6632 | insertCollisionBox(collisionBox: Array<number>, overlapMode: OverlapMode, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number): void;
|
6633 | insertCollisionCircles(collisionCircles: Array<number>, overlapMode: OverlapMode, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number): void;
|
6634 | projectAndGetPerspectiveRatio(posMatrix: mat4, x: number, y: number): {
|
6635 | point: Point;
|
6636 | perspectiveRatio: number;
|
6637 | };
|
6638 | isOffscreen(x1: number, y1: number, x2: number, y2: number): boolean;
|
6639 | isInsideGrid(x1: number, y1: number, x2: number, y2: number): boolean;
|
6640 | getViewportMatrix(): mat4;
|
6641 | }
|
6642 | export declare type TextAnchor = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
6643 | export declare class OpacityState {
|
6644 | opacity: number;
|
6645 | placed: boolean;
|
6646 | constructor(prevState: OpacityState, increment: number, placed: boolean, skipFade?: boolean | null);
|
6647 | isHidden(): boolean;
|
6648 | }
|
6649 | export declare class JointOpacityState {
|
6650 | text: OpacityState;
|
6651 | icon: OpacityState;
|
6652 | constructor(prevState: JointOpacityState, increment: number, placedText: boolean, placedIcon: boolean, skipFade?: boolean | null);
|
6653 | isHidden(): boolean;
|
6654 | }
|
6655 | export declare class JointPlacement {
|
6656 | text: boolean;
|
6657 | icon: boolean;
|
6658 | skipFade: boolean;
|
6659 | constructor(text: boolean, icon: boolean, skipFade: boolean);
|
6660 | }
|
6661 | export declare class CollisionCircleArray {
|
6662 | invProjMatrix: mat4;
|
6663 | viewportMatrix: mat4;
|
6664 | circles: Array<number>;
|
6665 | constructor();
|
6666 | }
|
6667 | export declare class RetainedQueryData {
|
6668 | bucketInstanceId: number;
|
6669 | featureIndex: FeatureIndex;
|
6670 | sourceLayerIndex: number;
|
6671 | bucketIndex: number;
|
6672 | tileID: OverscaledTileID;
|
6673 | featureSortOrder: Array<number>;
|
6674 | constructor(bucketInstanceId: number, featureIndex: FeatureIndex, sourceLayerIndex: number, bucketIndex: number, tileID: OverscaledTileID);
|
6675 | }
|
6676 | export declare type CollisionGroup = {
|
6677 | ID: number;
|
6678 | predicate?: (key: FeatureKey) => boolean;
|
6679 | };
|
6680 | export declare class CollisionGroups {
|
6681 | collisionGroups: {
|
6682 | [groupName: string]: CollisionGroup;
|
6683 | };
|
6684 | maxGroupID: number;
|
6685 | crossSourceCollisions: boolean;
|
6686 | constructor(crossSourceCollisions: boolean);
|
6687 | get(sourceID: string): CollisionGroup;
|
6688 | }
|
6689 | export declare type VariableOffset = {
|
6690 | textOffset: [
|
6691 | number,
|
6692 | number
|
6693 | ];
|
6694 | width: number;
|
6695 | height: number;
|
6696 | anchor: TextAnchor;
|
6697 | textBoxScale: number;
|
6698 | prevAnchor?: TextAnchor;
|
6699 | };
|
6700 | export declare type TileLayerParameters = {
|
6701 | bucket: SymbolBucket;
|
6702 | layout: PossiblyEvaluated<SymbolLayoutProps, SymbolLayoutPropsPossiblyEvaluated>;
|
6703 | posMatrix: mat4;
|
6704 | textLabelPlaneMatrix: mat4;
|
6705 | labelToScreenMatrix: mat4;
|
6706 | scale: number;
|
6707 | textPixelRatio: number;
|
6708 | holdingForFade: boolean;
|
6709 | collisionBoxArray: CollisionBoxArray;
|
6710 | partiallyEvaluatedTextSize: {
|
6711 | uSize: number;
|
6712 | uSizeT: number;
|
6713 | };
|
6714 | collisionGroup: CollisionGroup;
|
6715 | };
|
6716 | export declare type BucketPart = {
|
6717 | sortKey?: number | void;
|
6718 | symbolInstanceStart: number;
|
6719 | symbolInstanceEnd: number;
|
6720 | parameters: TileLayerParameters;
|
6721 | };
|
6722 | export declare type CrossTileID = string | number;
|
6723 | export declare class Placement {
|
6724 | transform: Transform;
|
6725 | collisionIndex: CollisionIndex;
|
6726 | placements: {
|
6727 | [_ in CrossTileID]: JointPlacement;
|
6728 | };
|
6729 | opacities: {
|
6730 | [_ in CrossTileID]: JointOpacityState;
|
6731 | };
|
6732 | variableOffsets: {
|
6733 | [_ in CrossTileID]: VariableOffset;
|
6734 | };
|
6735 | placedOrientations: {
|
6736 | [_ in CrossTileID]: number;
|
6737 | };
|
6738 | commitTime: number;
|
6739 | prevZoomAdjustment: number;
|
6740 | lastPlacementChangeTime: number;
|
6741 | stale: boolean;
|
6742 | fadeDuration: number;
|
6743 | retainedQueryData: {
|
6744 | [_: number]: RetainedQueryData;
|
6745 | };
|
6746 | collisionGroups: CollisionGroups;
|
6747 | prevPlacement: Placement;
|
6748 | zoomAtLastRecencyCheck: number;
|
6749 | collisionCircleArrays: {
|
6750 | [k in any]: CollisionCircleArray;
|
6751 | };
|
6752 | constructor(transform: Transform, fadeDuration: number, crossSourceCollisions: boolean, prevPlacement?: Placement);
|
6753 | getBucketParts(results: Array<BucketPart>, styleLayer: StyleLayer, tile: Tile, sortAcrossTiles: boolean): void;
|
6754 | attemptAnchorPlacement(anchor: TextAnchor, textBox: SingleCollisionBox, width: number, height: number, textBoxScale: number, rotateWithMap: boolean, pitchWithMap: boolean, textPixelRatio: number, posMatrix: mat4, collisionGroup: CollisionGroup, textOverlapMode: OverlapMode, symbolInstance: SymbolInstance, bucket: SymbolBucket, orientation: number, iconBox?: SingleCollisionBox | null): {
|
6755 | shift: Point;
|
6756 | placedGlyphBoxes: {
|
6757 | box: Array<number>;
|
6758 | offscreen: boolean;
|
6759 | };
|
6760 | };
|
6761 | placeLayerBucketPart(bucketPart: BucketPart, seenCrossTileIDs: {
|
6762 | [k in string | number]: boolean;
|
6763 | }, showCollisionBoxes: boolean): void;
|
6764 | markUsedJustification(bucket: SymbolBucket, placedAnchor: TextAnchor, symbolInstance: SymbolInstance, orientation: number): void;
|
6765 | markUsedOrientation(bucket: SymbolBucket, orientation: number, symbolInstance: SymbolInstance): void;
|
6766 | commit(now: number): void;
|
6767 | updateLayerOpacities(styleLayer: StyleLayer, tiles: Array<Tile>): void;
|
6768 | updateBucketOpacities(bucket: SymbolBucket, seenCrossTileIDs: {
|
6769 | [k in string | number]: boolean;
|
6770 | }, collisionBoxArray?: CollisionBoxArray | null): void;
|
6771 | symbolFadeChange(now: number): number;
|
6772 | zoomAdjustment(zoom: number): number;
|
6773 | hasTransitions(now: number): boolean;
|
6774 | stillRecent(now: number, zoom: number): boolean;
|
6775 | setStale(): void;
|
6776 | }
|
6777 | export declare class LayerPlacement {
|
6778 | _sortAcrossTiles: boolean;
|
6779 | _currentTileIndex: number;
|
6780 | _currentPartIndex: number;
|
6781 | _seenCrossTileIDs: {
|
6782 | [k in string | number]: boolean;
|
6783 | };
|
6784 | _bucketParts: Array<BucketPart>;
|
6785 | constructor(styleLayer: SymbolStyleLayer);
|
6786 | continuePlacement(tiles: Array<Tile>, placement: Placement, showCollisionBoxes: boolean, styleLayer: StyleLayer, shouldPausePlacement: () => boolean): boolean;
|
6787 | }
|
6788 | export declare class PauseablePlacement {
|
6789 | placement: Placement;
|
6790 | _done: boolean;
|
6791 | _currentPlacementIndex: number;
|
6792 | _forceFullPlacement: boolean;
|
6793 | _showCollisionBoxes: boolean;
|
6794 | _inProgressLayer: LayerPlacement;
|
6795 | constructor(transform: Transform, order: Array<string>, forceFullPlacement: boolean, showCollisionBoxes: boolean, fadeDuration: number, crossSourceCollisions: boolean, prevPlacement?: Placement);
|
6796 | isDone(): boolean;
|
6797 | continuePlacement(order: Array<string>, layers: {
|
6798 | [_: string]: StyleLayer;
|
6799 | }, layerTiles: {
|
6800 | [_: string]: Array<Tile>;
|
6801 | }): void;
|
6802 | commit(now: number): Placement;
|
6803 | }
|
6804 | export declare class TileLayerIndex {
|
6805 | tileID: OverscaledTileID;
|
6806 | indexedSymbolInstances: {
|
6807 | [_: number]: Array<{
|
6808 | crossTileID: number;
|
6809 | coord: {
|
6810 | x: number;
|
6811 | y: number;
|
6812 | };
|
6813 | }>;
|
6814 | };
|
6815 | bucketInstanceId: number;
|
6816 | constructor(tileID: OverscaledTileID, symbolInstances: SymbolInstanceArray, bucketInstanceId: number);
|
6817 | getScaledCoordinates(symbolInstance: SymbolInstance, childTileID: OverscaledTileID): {
|
6818 | x: number;
|
6819 | y: number;
|
6820 | };
|
6821 | findMatches(symbolInstances: SymbolInstanceArray, newTileID: OverscaledTileID, zoomCrossTileIDs: {
|
6822 | [crossTileID: number]: boolean;
|
6823 | }): void;
|
6824 | }
|
6825 | export declare class CrossTileIDs {
|
6826 | maxCrossTileID: number;
|
6827 | constructor();
|
6828 | generate(): number;
|
6829 | }
|
6830 | export declare class CrossTileSymbolLayerIndex {
|
6831 | indexes: {
|
6832 | [zoom in string | number]: {
|
6833 | [tileId in string | number]: TileLayerIndex;
|
6834 | };
|
6835 | };
|
6836 | usedCrossTileIDs: {
|
6837 | [zoom in string | number]: {
|
6838 | [crossTileID: number]: boolean;
|
6839 | };
|
6840 | };
|
6841 | lng: number;
|
6842 | constructor();
|
6843 | handleWrapJump(lng: number): void;
|
6844 | addBucket(tileID: OverscaledTileID, bucket: SymbolBucket, crossTileIDs: CrossTileIDs): boolean;
|
6845 | removeBucketCrossTileIDs(zoom: string | number, removedBucket: TileLayerIndex): void;
|
6846 | removeStaleBuckets(currentIDs: {
|
6847 | [k in string | number]: boolean;
|
6848 | }): boolean;
|
6849 | }
|
6850 | export declare class CrossTileSymbolIndex {
|
6851 | layerIndexes: {
|
6852 | [layerId: string]: CrossTileSymbolLayerIndex;
|
6853 | };
|
6854 | crossTileIDs: CrossTileIDs;
|
6855 | maxBucketInstanceId: number;
|
6856 | bucketsInCurrentPlacement: {
|
6857 | [_: number]: boolean;
|
6858 | };
|
6859 | constructor();
|
6860 | addLayer(styleLayer: StyleLayer, tiles: Array<Tile>, lng: number): boolean;
|
6861 | pruneUnusedLayers(usedLayers: Array<string>): void;
|
6862 | }
|
6863 | export declare type ValidationError = {
|
6864 | message: string;
|
6865 | line: number;
|
6866 | identifier?: string;
|
6867 | };
|
6868 | export declare type Validator = (a: any) => ReadonlyArray<ValidationError>;
|
6869 | export declare type FeatureIdentifier = {
|
6870 | id?: string | number | undefined;
|
6871 | source: string;
|
6872 | sourceLayer?: string | undefined;
|
6873 | };
|
6874 | export declare type StyleOptions = {
|
6875 | validate?: boolean;
|
6876 | localIdeographFontFamily?: string;
|
6877 | };
|
6878 | export declare type StyleSetterOptions = {
|
6879 | validate?: boolean;
|
6880 | };
|
6881 | export declare class Style extends Evented {
|
6882 | map: Map;
|
6883 | stylesheet: StyleSpecification;
|
6884 | dispatcher: Dispatcher;
|
6885 | imageManager: ImageManager;
|
6886 | glyphManager: GlyphManager;
|
6887 | lineAtlas: LineAtlas;
|
6888 | light: Light;
|
6889 | _request: Cancelable;
|
6890 | _spriteRequest: Cancelable;
|
6891 | _layers: {
|
6892 | [_: string]: StyleLayer;
|
6893 | };
|
6894 | _serializedLayers: {
|
6895 | [_: string]: any;
|
6896 | };
|
6897 | _order: Array<string>;
|
6898 | sourceCaches: {
|
6899 | [_: string]: SourceCache;
|
6900 | };
|
6901 | zoomHistory: ZoomHistory;
|
6902 | _loaded: boolean;
|
6903 | _rtlTextPluginCallback: (a: any) => any;
|
6904 | _changed: boolean;
|
6905 | _updatedSources: {
|
6906 | [_: string]: "clear" | "reload";
|
6907 | };
|
6908 | _updatedLayers: {
|
6909 | [_: string]: true;
|
6910 | };
|
6911 | _removedLayers: {
|
6912 | [_: string]: StyleLayer;
|
6913 | };
|
6914 | _changedImages: {
|
6915 | [_: string]: true;
|
6916 | };
|
6917 | _updatedPaintProps: {
|
6918 | [layer: string]: true;
|
6919 | };
|
6920 | _layerOrderChanged: boolean;
|
6921 | _availableImages: Array<string>;
|
6922 | crossTileSymbolIndex: CrossTileSymbolIndex;
|
6923 | pauseablePlacement: PauseablePlacement;
|
6924 | placement: Placement;
|
6925 | z: number;
|
6926 | static getSourceType: typeof getSourceType;
|
6927 | static setSourceType: typeof setSourceType;
|
6928 | static registerForPluginStateChange: typeof registerForPluginStateChange;
|
6929 | constructor(map: Map, options?: StyleOptions);
|
6930 | loadURL(url: string, options?: {
|
6931 | validate?: boolean;
|
6932 | }): void;
|
6933 | loadJSON(json: StyleSpecification, options?: StyleSetterOptions): void;
|
6934 | loadEmpty(): void;
|
6935 | _load(json: StyleSpecification, validate: boolean): void;
|
6936 | _loadSprite(url: string): void;
|
6937 | _validateLayer(layer: StyleLayer): void;
|
6938 | loaded(): boolean;
|
6939 | _serializeLayers(ids: Array<string>): Array<LayerSpecification>;
|
6940 | hasTransitions(): boolean;
|
6941 | _checkLoaded(): void;
|
6942 | /**
|
6943 | * Apply queued style updates in a batch and recalculate zoom-dependent paint properties.
|
6944 | * @private
|
6945 | */
|
6946 | update(parameters: EvaluationParameters): void;
|
6947 | _updateTilesForChangedImages(): void;
|
6948 | _updateWorkerLayers(updatedIds: Array<string>, removedIds: Array<string>): void;
|
6949 | _resetUpdates(): void;
|
6950 | /**
|
6951 | * Update this style's state to match the given style JSON, performing only
|
6952 | * the necessary mutations.
|
6953 | *
|
6954 | * May throw an Error ('Unimplemented: METHOD') if the mapbox-gl-style-spec
|
6955 | * diff algorithm produces an operation that is not supported.
|
6956 | *
|
6957 | * @returns {boolean} true if any changes were made; false otherwise
|
6958 | * @private
|
6959 | */
|
6960 | setState(nextState: StyleSpecification): boolean;
|
6961 | addImage(id: string, image: StyleImage): this;
|
6962 | updateImage(id: string, image: StyleImage): void;
|
6963 | getImage(id: string): StyleImage;
|
6964 | removeImage(id: string): this;
|
6965 | _afterImageUpdated(id: string): void;
|
6966 | listImages(): string[];
|
6967 | addSource(id: string, source: SourceSpecification, options?: StyleSetterOptions): void;
|
6968 | |
6969 |
|
6970 |
|
6971 |
|
6972 |
|
6973 |
|
6974 | removeSource(id: string): this;
|
6975 | |
6976 |
|
6977 |
|
6978 |
|
6979 |
|
6980 | setGeoJSONSourceData(id: string, data: GeoJSON.GeoJSON | string): void;
|
6981 | |
6982 |
|
6983 |
|
6984 |
|
6985 |
|
6986 | getSource(id: string): Source | undefined;
|
6987 | |
6988 |
|
6989 |
|
6990 |
|
6991 |
|
6992 |
|
6993 |
|
6994 |
|
6995 | addLayer(layerObject: LayerSpecification | CustomLayerInterface, before?: string, options?: StyleSetterOptions): void;
|
6996 | |
6997 |
|
6998 |
|
6999 |
|
7000 |
|
7001 |
|
7002 | moveLayer(id: string, before?: string): void;
|
7003 | |
7004 |
|
7005 |
|
7006 |
|
7007 |
|
7008 |
|
7009 |
|
7010 |
|
7011 | removeLayer(id: string): void;
|
7012 | |
7013 |
|
7014 |
|
7015 |
|
7016 |
|
7017 |
|
7018 | getLayer(id: string): StyleLayer;
|
7019 | |
7020 |
|
7021 |
|
7022 |
|
7023 |
|
7024 |
|
7025 | hasLayer(id: string): boolean;
|
7026 | setLayerZoomRange(layerId: string, minzoom?: number | null, maxzoom?: number | null): void;
|
7027 | setFilter(layerId: string, filter?: FilterSpecification | null, options?: StyleSetterOptions): void;
|
7028 | |
7029 |
|
7030 |
|
7031 |
|
7032 |
|
7033 | getFilter(layer: string): void | FilterSpecification;
|
7034 | setLayoutProperty(layerId: string, name: string, value: any, options?: StyleSetterOptions): void;
|
7035 | |
7036 |
|
7037 |
|
7038 |
|
7039 |
|
7040 |
|
7041 | getLayoutProperty(layerId: string, name: string): any;
|
7042 | setPaintProperty(layerId: string, name: string, value: any, options?: StyleSetterOptions): void;
|
7043 | getPaintProperty(layer: string, name: string): unknown;
|
7044 | setFeatureState(target: FeatureIdentifier, state: any): void;
|
7045 | removeFeatureState(target: FeatureIdentifier, key?: string): void;
|
7046 | getFeatureState(target: FeatureIdentifier): any;
|
7047 | getTransition(): any;
|
7048 | serialize(): StyleSpecification;
|
7049 | _updateLayer(layer: StyleLayer): void;
|
7050 | _flattenAndSortRenderedFeatures(sourceResults: Array<{
|
7051 | [key: string]: Array<{
|
7052 | featureIndex: number;
|
7053 | feature: MapGeoJSONFeature;
|
7054 | }>;
|
7055 | }>): any[];
|
7056 | queryRenderedFeatures(queryGeometry: any, params: any, transform: Transform): any[];
|
7057 | querySourceFeatures(sourceID: string, params?: {
|
7058 | sourceLayer: string;
|
7059 | filter: Array<any>;
|
7060 | validate?: boolean;
|
7061 | }): any[];
|
7062 | addSourceType(name: string, SourceType: SourceClass, callback: Callback<void>): void;
|
7063 | getLight(): any;
|
7064 | setLight(lightOptions: LightSpecification, options?: StyleSetterOptions): void;
|
7065 | _validate(validate: Validator, key: string, value: any, props: any, options?: {
|
7066 | validate?: boolean;
|
7067 | }): boolean;
|
7068 | _remove(): void;
|
7069 | _clearSource(id: string): void;
|
7070 | _reloadSource(id: string): void;
|
7071 | _updateSources(transform: Transform): void;
|
7072 | _generateCollisionBoxes(): void;
|
7073 | _updatePlacement(transform: Transform, showCollisionBoxes: boolean, fadeDuration: number, crossSourceCollisions: boolean, forceFullPlacement?: boolean): boolean;
|
7074 | _releaseSymbolFadeTiles(): void;
|
7075 | getImages(mapId: string, params: {
|
7076 | icons: Array<string>;
|
7077 | source: string;
|
7078 | tileID: OverscaledTileID;
|
7079 | type: string;
|
7080 | }, callback: Callback<{
|
7081 | [_: string]: StyleImage;
|
7082 | }>): void;
|
7083 | getGlyphs(mapId: string, params: {
|
7084 | stacks: {
|
7085 | [_: string]: Array<number>;
|
7086 | };
|
7087 | }, callback: Callback<{
|
7088 | [_: string]: {
|
7089 | [_: number]: StyleGlyph;
|
7090 | };
|
7091 | }>): void;
|
7092 | getResource(mapId: string, params: RequestParameters, callback: ResponseCallback<any>): Cancelable;
|
7093 | }
|
7094 | export declare type RenderPass = "offscreen" | "opaque" | "translucent";
|
7095 | export declare type PainterOptions = {
|
7096 | showOverdrawInspector: boolean;
|
7097 | showTileBoundaries: boolean;
|
7098 | showPadding: boolean;
|
7099 | rotating: boolean;
|
7100 | zooming: boolean;
|
7101 | moving: boolean;
|
7102 | gpuTiming: boolean;
|
7103 | fadeDuration: number;
|
7104 | };
|
7105 | export declare class Painter {
|
7106 | context: Context;
|
7107 | transform: Transform;
|
7108 | _tileTextures: {
|
7109 | [_: number]: Array<Texture>;
|
7110 | };
|
7111 | numSublayers: number;
|
7112 | depthEpsilon: number;
|
7113 | emptyProgramConfiguration: ProgramConfiguration;
|
7114 | width: number;
|
7115 | height: number;
|
7116 | pixelRatio: number;
|
7117 | tileExtentBuffer: VertexBuffer;
|
7118 | tileExtentSegments: SegmentVector;
|
7119 | debugBuffer: VertexBuffer;
|
7120 | debugSegments: SegmentVector;
|
7121 | rasterBoundsBuffer: VertexBuffer;
|
7122 | rasterBoundsSegments: SegmentVector;
|
7123 | viewportBuffer: VertexBuffer;
|
7124 | viewportSegments: SegmentVector;
|
7125 | quadTriangleIndexBuffer: IndexBuffer;
|
7126 | tileBorderIndexBuffer: IndexBuffer;
|
7127 | _tileClippingMaskIDs: {
|
7128 | [_: string]: number;
|
7129 | };
|
7130 | stencilClearMode: StencilMode;
|
7131 | style: Style;
|
7132 | options: PainterOptions;
|
7133 | lineAtlas: LineAtlas;
|
7134 | imageManager: ImageManager;
|
7135 | glyphManager: GlyphManager;
|
7136 | depthRangeFor3D: DepthRangeType;
|
7137 | opaquePassCutoff: number;
|
7138 | renderPass: RenderPass;
|
7139 | currentLayer: number;
|
7140 | currentStencilSource: string;
|
7141 | nextStencilID: number;
|
7142 | id: string;
|
7143 | _showOverdrawInspector: boolean;
|
7144 | cache: {
|
7145 | [_: string]: Program<any>;
|
7146 | };
|
7147 | crossTileSymbolIndex: CrossTileSymbolIndex;
|
7148 | symbolFadeChange: number;
|
7149 | gpuTimers: {
|
7150 | [_: string]: any;
|
7151 | };
|
7152 | emptyTexture: Texture;
|
7153 | debugOverlayTexture: Texture;
|
7154 | debugOverlayCanvas: HTMLCanvasElement;
|
7155 | constructor(gl: WebGLRenderingContext, transform: Transform);
|
7156 | resize(width: number, height: number, pixelRatio: number): void;
|
7157 | setup(): void;
|
7158 | clearStencil(): void;
|
7159 | _renderTileClippingMasks(layer: StyleLayer, tileIDs: Array<OverscaledTileID>): void;
|
7160 | stencilModeFor3D(): StencilMode;
|
7161 | stencilModeForClipping(tileID: OverscaledTileID): StencilMode;
|
7162 | stencilConfigForOverlap(tileIDs: Array<OverscaledTileID>): [
|
7163 | {
|
7164 | [_: number]: Readonly<StencilMode>;
|
7165 | },
|
7166 | Array<OverscaledTileID>
|
7167 | ];
|
7168 | colorModeForRenderPass(): Readonly<ColorMode>;
|
7169 | depthModeForSublayer(n: number, mask: DepthMaskType, func?: DepthFuncType | null): Readonly<DepthMode>;
|
7170 | opaquePassEnabledForLayer(): boolean;
|
7171 | render(style: Style, options: PainterOptions): void;
|
7172 | renderLayer(painter: Painter, sourceCache: SourceCache, layer: StyleLayer, coords: Array<OverscaledTileID>): void;
|
7173 | gpuTimingStart(layer: StyleLayer): void;
|
7174 | gpuTimingEnd(): void;
|
7175 | collectGpuTimers(): {
|
7176 | [_: string]: any;
|
7177 | };
|
7178 | queryGpuTimers(gpuTimers: {
|
7179 | [_: string]: any;
|
7180 | }): {};
|
7181 | |
7182 |
|
7183 |
|
7184 |
|
7185 |
|
7186 |
|
7187 | translatePosMatrix(matrix: mat4, tile: Tile, translate: [
|
7188 | number,
|
7189 | number
|
7190 | ], translateAnchor: "map" | "viewport", inViewportPixelUnitsUnits?: boolean): mat4;
|
7191 | saveTileTexture(texture: Texture): void;
|
7192 | getTileTexture(size: number): Texture;
|
7193 | |
7194 |
|
7195 |
|
7196 |
|
7197 |
|
7198 |
|
7199 | isPatternMissing(image?: CrossFaded<ResolvedImage> | null): boolean;
|
7200 | useProgram(name: string, programConfiguration?: ProgramConfiguration | null): Program<any>;
|
7201 | setCustomLayerDefaults(): void;
|
7202 | setBaseState(): void;
|
7203 | initDebugOverlayCanvas(): void;
|
7204 | destroy(): void;
|
7205 | }
|
7206 | export declare class Hash {
|
7207 | _map: Map;
|
7208 | _updateHash: () => ReturnType<typeof setTimeout>;
|
7209 | _hashName: string;
|
7210 | constructor(hashName?: string | null);
|
7211 | addTo(map: Map): this;
|
7212 | remove(): this;
|
7213 | getHashString(mapFeedback?: boolean): string;
|
7214 | _getCurrentHash(): any;
|
7215 | _onHashChange(): boolean;
|
7216 | _updateHashUnthrottled(): void;
|
7217 | }
|
7218 | export declare class MouseHandler {
|
7219 | _enabled: boolean;
|
7220 | _active: boolean;
|
7221 | _lastPoint: Point;
|
7222 | _eventButton: number;
|
7223 | _moved: boolean;
|
7224 | _clickTolerance: number;
|
7225 | constructor(options: {
|
7226 | clickTolerance: number;
|
7227 | });
|
7228 | reset(): void;
|
7229 | _correctButton(e: MouseEvent, button: number): boolean;
|
7230 | _move(lastPoint: Point, point: Point): {};
|
7231 | mousedown(e: MouseEvent, point: Point): void;
|
7232 | mousemoveWindow(e: MouseEvent, point: Point): {};
|
7233 | mouseupWindow(e: MouseEvent): void;
|
7234 | enable(): void;
|
7235 | disable(): void;
|
7236 | isEnabled(): boolean;
|
7237 | isActive(): boolean;
|
7238 | }
|
7239 | export declare class MousePanHandler extends MouseHandler {
|
7240 | mousedown(e: MouseEvent, point: Point): void;
|
7241 | _correctButton(e: MouseEvent, button: number): boolean;
|
7242 | _move(lastPoint: Point, point: Point): {
|
7243 | around: Point;
|
7244 | panDelta: Point;
|
7245 | };
|
7246 | }
|
7247 | export declare class MouseRotateHandler extends MouseHandler {
|
7248 | _correctButton(e: MouseEvent, button: number): boolean;
|
7249 | _move(lastPoint: Point, point: Point): {
|
7250 | bearingDelta: number;
|
7251 | };
|
7252 | contextmenu(e: MouseEvent): void;
|
7253 | }
|
7254 | export declare class MousePitchHandler extends MouseHandler {
|
7255 | _correctButton(e: MouseEvent, button: number): boolean;
|
7256 | _move(lastPoint: Point, point: Point): {
|
7257 | pitchDelta: number;
|
7258 | };
|
7259 | contextmenu(e: MouseEvent): void;
|
7260 | }
|
7261 | export declare class TouchPanHandler {
|
7262 | _enabled: boolean;
|
7263 | _active: boolean;
|
7264 | _touches: {
|
7265 | [k in string | number]: Point;
|
7266 | };
|
7267 | _minTouches: number;
|
7268 | _clickTolerance: number;
|
7269 | _sum: Point;
|
7270 | constructor(options: {
|
7271 | clickTolerance: number;
|
7272 | });
|
7273 | reset(): void;
|
7274 | touchstart(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): {
|
7275 | around: Point;
|
7276 | panDelta: Point;
|
7277 | };
|
7278 | touchmove(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): {
|
7279 | around: Point;
|
7280 | panDelta: Point;
|
7281 | };
|
7282 | touchend(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
7283 | touchcancel(): void;
|
7284 | _calculateTransform(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): {
|
7285 | around: Point;
|
7286 | panDelta: Point;
|
7287 | };
|
7288 | enable(): void;
|
7289 | disable(): void;
|
7290 | isEnabled(): boolean;
|
7291 | isActive(): boolean;
|
7292 | }
|
7293 | export declare type DragPanOptions = {
|
7294 | linearity?: number;
|
7295 | easing?: (t: number) => number;
|
7296 | deceleration?: number;
|
7297 | maxSpeed?: number;
|
7298 | };
|
7299 | export declare class DragPanHandler {
|
7300 | _el: HTMLElement;
|
7301 | _mousePan: MousePanHandler;
|
7302 | _touchPan: TouchPanHandler;
|
7303 | _inertiaOptions: DragPanOptions;
|
7304 | |
7305 |
|
7306 |
|
7307 | constructor(el: HTMLElement, mousePan: MousePanHandler, touchPan: TouchPanHandler);
|
7308 | /**
|
7309 | * Enables the "drag to pan" interaction.
|
7310 | *
|
7311 | * @param {Object} [options] Options object
|
7312 | * @param {number} [options.linearity=0] factor used to scale the drag velocity
|
7313 | * @param {Function} [options.easing=bezier(0, 0, 0.3, 1)] easing function applled to `map.panTo` when applying the drag.
|
7314 | * @param {number} [options.maxSpeed=1400] the maximum value of the drag velocity.
|
7315 | * @param {number} [options.deceleration=2500] the rate at which the speed reduces after the pan ends.
|
7316 | *
|
7317 | * @example
|
7318 | * map.dragPan.enable();
|
7319 | * @example
|
7320 | * map.dragPan.enable({
|
7321 | * linearity: 0.3,
|
7322 | * easing: bezier(0, 0, 0.3, 1),
|
7323 | * maxSpeed: 1400,
|
7324 | * deceleration: 2500,
|
7325 | * });
|
7326 | */
|
7327 | enable(options?: DragPanOptions): void;
|
7328 | |
7329 |
|
7330 |
|
7331 |
|
7332 |
|
7333 |
|
7334 | disable(): void;
|
7335 | |
7336 |
|
7337 |
|
7338 |
|
7339 |
|
7340 | isEnabled(): boolean;
|
7341 | |
7342 |
|
7343 |
|
7344 |
|
7345 |
|
7346 | isActive(): boolean;
|
7347 | }
|
7348 | export declare class HandlerInertia {
|
7349 | _map: Map;
|
7350 | _inertiaBuffer: Array<{
|
7351 | time: number;
|
7352 | settings: any;
|
7353 | }>;
|
7354 | constructor(map: Map);
|
7355 | clear(): void;
|
7356 | record(settings: any): void;
|
7357 | _drainInertiaBuffer(): void;
|
7358 | _onMoveEnd(panInertiaOptions?: DragPanOptions): any;
|
7359 | }
|
7360 | export declare type InputEvent = MouseEvent | TouchEvent | KeyboardEvent | WheelEvent;
|
7361 | export declare class RenderFrameEvent extends Event {
|
7362 | type: "renderFrame";
|
7363 | timeStamp: number;
|
7364 | }
|
7365 | export interface Handler {
|
7366 | enable(): void;
|
7367 | disable(): void;
|
7368 | isEnabled(): boolean;
|
7369 | isActive(): boolean;
|
7370 | reset(): void;
|
7371 | readonly touchstart?: (e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>) => HandlerResult | void;
|
7372 | readonly touchmove?: (e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>) => HandlerResult | void;
|
7373 | readonly touchend?: (e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>) => HandlerResult | void;
|
7374 | readonly touchcancel?: (e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>) => HandlerResult | void;
|
7375 | readonly mousedown?: (e: MouseEvent, point: Point) => HandlerResult | void;
|
7376 | readonly mousemove?: (e: MouseEvent, point: Point) => HandlerResult | void;
|
7377 | readonly mouseup?: (e: MouseEvent, point: Point) => HandlerResult | void;
|
7378 | readonly dblclick?: (e: MouseEvent, point: Point) => HandlerResult | void;
|
7379 | readonly wheel?: (e: WheelEvent, point: Point) => HandlerResult | void;
|
7380 | readonly keydown?: (e: KeyboardEvent) => HandlerResult | void;
|
7381 | readonly keyup?: (e: KeyboardEvent) => HandlerResult | void;
|
7382 | readonly renderFrame?: () => HandlerResult | void;
|
7383 | }
|
7384 | export declare type HandlerResult = {
|
7385 | panDelta?: Point;
|
7386 | zoomDelta?: number;
|
7387 | bearingDelta?: number;
|
7388 | pitchDelta?: number;
|
7389 | around?: Point | null;
|
7390 | pinchAround?: Point | null;
|
7391 | cameraAnimation?: (map: Map) => any;
|
7392 | originalEvent?: any;
|
7393 | needsRenderFrame?: boolean;
|
7394 | noInertia?: boolean;
|
7395 | };
|
7396 | export declare class HandlerManager {
|
7397 | _map: Map;
|
7398 | _el: HTMLElement;
|
7399 | _handlers: Array<{
|
7400 | handlerName: string;
|
7401 | handler: Handler;
|
7402 | allowed: any;
|
7403 | }>;
|
7404 | _eventsInProgress: any;
|
7405 | _frameId: number;
|
7406 | _inertia: HandlerInertia;
|
7407 | _bearingSnap: number;
|
7408 | _handlersById: {
|
7409 | [x: string]: Handler;
|
7410 | };
|
7411 | _updatingCamera: boolean;
|
7412 | _changes: Array<[
|
7413 | HandlerResult,
|
7414 | any,
|
7415 | any
|
7416 | ]>;
|
7417 | _previousActiveHandlers: {
|
7418 | [x: string]: Handler;
|
7419 | };
|
7420 | _listeners: Array<[
|
7421 | Window | Document | HTMLElement,
|
7422 | string,
|
7423 | {
|
7424 | passive?: boolean;
|
7425 | capture?: boolean;
|
7426 | } | undefined
|
7427 | ]>;
|
7428 | constructor(map: Map, options: CompleteMapOptions);
|
7429 | destroy(): void;
|
7430 | _addDefaultHandlers(options: CompleteMapOptions): void;
|
7431 | _add(handlerName: string, handler: Handler, allowed?: Array<string>): void;
|
7432 | stop(allowEndAnimation: boolean): void;
|
7433 | isActive(): boolean;
|
7434 | isZooming(): boolean;
|
7435 | isRotating(): boolean;
|
7436 | isMoving(): boolean;
|
7437 | _blockedByActive(activeHandlers: {
|
7438 | [x: string]: Handler;
|
7439 | }, allowed: Array<string>, myName: string): boolean;
|
7440 | handleWindowEvent(e: InputEvent): void;
|
7441 | _getMapTouches(touches: TouchList): TouchList;
|
7442 | handleEvent(e: InputEvent | RenderFrameEvent, eventName?: string): void;
|
7443 | mergeHandlerResult(mergedHandlerResult: HandlerResult, eventsInProgress: any, handlerResult: HandlerResult, name: string, e?: InputEvent): void;
|
7444 | _applyChanges(): void;
|
7445 | _updateMapTransform(combinedResult: any, combinedEventsInProgress: any, deactivatedHandlers: any): void;
|
7446 | _fireEvents(newEventsInProgress: {
|
7447 | [x: string]: any;
|
7448 | }, deactivatedHandlers: any, allowEndAnimation: boolean): void;
|
7449 | _fireEvent(type: string, e: any): void;
|
7450 | _requestFrame(): number;
|
7451 | _triggerRenderFrame(): void;
|
7452 | }
|
7453 | export declare type TaskID = number;
|
7454 | export declare type Task = {
|
7455 | callback: (timeStamp: number) => void;
|
7456 | id: TaskID;
|
7457 | cancelled: boolean;
|
7458 | };
|
7459 | export declare class TaskQueue {
|
7460 | _queue: Array<Task>;
|
7461 | _id: TaskID;
|
7462 | _cleared: boolean;
|
7463 | _currentlyRunning: Array<Task> | false;
|
7464 | constructor();
|
7465 | add(callback: (timeStamp: number) => void): TaskID;
|
7466 | remove(id: TaskID): void;
|
7467 | run(timeStamp?: number): void;
|
7468 | clear(): void;
|
7469 | }
|
7470 | /**
|
7471 | * A [Point](https:
|
7472 | *
|
7473 | * @typedef {(Point | [number, number])} PointLike
|
7474 | * @example
|
7475 | * var p1 = new Point(-77, 38);
|
7476 | * var p2 = [-77, 38];
|
7477 | */
|
7478 | export declare type PointLike = Point | [
|
7479 | number,
|
7480 | number
|
7481 | ];
|
7482 | export declare type RequireAtLeastOne<T> = {
|
7483 | [K in keyof T]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<keyof T, K>>>;
|
7484 | }[keyof T];
|
7485 |
|
7486 |
|
7487 |
|
7488 |
|
7489 |
|
7490 |
|
7491 |
|
7492 |
|
7493 |
|
7494 |
|
7495 |
|
7496 |
|
7497 |
|
7498 |
|
7499 |
|
7500 |
|
7501 |
|
7502 |
|
7503 |
|
7504 |
|
7505 |
|
7506 |
|
7507 |
|
7508 |
|
7509 |
|
7510 |
|
7511 |
|
7512 |
|
7513 |
|
7514 |
|
7515 |
|
7516 | export declare type CameraOptions = CenterZoomBearing & {
|
7517 | pitch?: number;
|
7518 | around?: LngLatLike;
|
7519 | };
|
7520 | export declare type CenterZoomBearing = {
|
7521 | center?: LngLatLike;
|
7522 | zoom?: number;
|
7523 | bearing?: number;
|
7524 | };
|
7525 | export declare type JumpToOptions = CameraOptions & {
|
7526 | padding?: PaddingOptions;
|
7527 | };
|
7528 | export declare type CameraForBoundsOptions = CameraOptions & {
|
7529 | padding?: number | RequireAtLeastOne<PaddingOptions>;
|
7530 | offset?: PointLike;
|
7531 | maxZoom?: number;
|
7532 | };
|
7533 | export declare type FlyToOptions = AnimationOptions & CameraOptions & {
|
7534 | curve?: number;
|
7535 | minZoom?: number;
|
7536 | speed?: number;
|
7537 | screenSpeed?: number;
|
7538 | maxDuration?: number;
|
7539 | padding?: number | RequireAtLeastOne<PaddingOptions>;
|
7540 | };
|
7541 | export declare type EaseToOptions = AnimationOptions & CameraOptions & {
|
7542 | delayEndEvents?: number;
|
7543 | padding?: number | RequireAtLeastOne<PaddingOptions>;
|
7544 | };
|
7545 | export declare type FitBoundsOptions = FlyToOptions & {
|
7546 | linear?: boolean;
|
7547 | offset?: PointLike;
|
7548 | maxZoom?: number;
|
7549 | maxDuration?: number;
|
7550 | padding?: number | RequireAtLeastOne<PaddingOptions>;
|
7551 | };
|
7552 |
|
7553 |
|
7554 |
|
7555 |
|
7556 |
|
7557 |
|
7558 |
|
7559 |
|
7560 |
|
7561 |
|
7562 |
|
7563 |
|
7564 |
|
7565 |
|
7566 | export declare type AnimationOptions = {
|
7567 | duration?: number;
|
7568 | easing?: (_: number) => number;
|
7569 | offset?: PointLike;
|
7570 | animate?: boolean;
|
7571 | essential?: boolean;
|
7572 | };
|
7573 | declare abstract class Camera extends Evented {
|
7574 | transform: Transform;
|
7575 | _moving: boolean;
|
7576 | _zooming: boolean;
|
7577 | _rotating: boolean;
|
7578 | _pitching: boolean;
|
7579 | _padding: boolean;
|
7580 | _bearingSnap: number;
|
7581 | _easeStart: number;
|
7582 | _easeOptions: {
|
7583 | duration?: number;
|
7584 | easing?: (_: number) => number;
|
7585 | };
|
7586 | _easeId: string | void;
|
7587 | _onEaseFrame: (_: number) => void;
|
7588 | _onEaseEnd: (easeId?: string) => void;
|
7589 | _easeFrameId: TaskID;
|
7590 | abstract _requestRenderFrame(a: () => void): TaskID;
|
7591 | abstract _cancelRenderFrame(_: TaskID): void;
|
7592 | constructor(transform: Transform, options: {
|
7593 | bearingSnap: number;
|
7594 | });
|
7595 | |
7596 |
|
7597 |
|
7598 |
|
7599 |
|
7600 |
|
7601 |
|
7602 |
|
7603 |
|
7604 |
|
7605 |
|
7606 | getCenter(): LngLat;
|
7607 | |
7608 |
|
7609 |
|
7610 |
|
7611 |
|
7612 |
|
7613 |
|
7614 |
|
7615 |
|
7616 |
|
7617 |
|
7618 |
|
7619 | setCenter(center: LngLatLike, eventData?: any): this;
|
7620 | |
7621 |
|
7622 |
|
7623 |
|
7624 |
|
7625 |
|
7626 |
|
7627 |
|
7628 |
|
7629 |
|
7630 |
|
7631 |
|
7632 | panBy(offset: PointLike, options?: AnimationOptions, eventData?: any): this;
|
7633 | |
7634 |
|
7635 |
|
7636 |
|
7637 |
|
7638 |
|
7639 |
|
7640 |
|
7641 |
|
7642 |
|
7643 |
|
7644 |
|
7645 |
|
7646 |
|
7647 |
|
7648 |
|
7649 |
|
7650 | panTo(lnglat: LngLatLike, options?: AnimationOptions, eventData?: any): this;
|
7651 | |
7652 |
|
7653 |
|
7654 |
|
7655 |
|
7656 |
|
7657 |
|
7658 |
|
7659 | getZoom(): number;
|
7660 | |
7661 |
|
7662 |
|
7663 |
|
7664 |
|
7665 |
|
7666 |
|
7667 |
|
7668 |
|
7669 |
|
7670 |
|
7671 |
|
7672 |
|
7673 |
|
7674 |
|
7675 |
|
7676 |
|
7677 | setZoom(zoom: number, eventData?: any): this;
|
7678 | |
7679 |
|
7680 |
|
7681 |
|
7682 |
|
7683 |
|
7684 |
|
7685 |
|
7686 |
|
7687 |
|
7688 |
|
7689 |
|
7690 |
|
7691 |
|
7692 |
|
7693 |
|
7694 |
|
7695 |
|
7696 |
|
7697 |
|
7698 |
|
7699 |
|
7700 |
|
7701 | zoomTo(zoom: number, options?: AnimationOptions | null, eventData?: any): this;
|
7702 | |
7703 |
|
7704 |
|
7705 |
|
7706 |
|
7707 |
|
7708 |
|
7709 |
|
7710 |
|
7711 |
|
7712 |
|
7713 |
|
7714 |
|
7715 |
|
7716 |
|
7717 |
|
7718 |
|
7719 | zoomIn(options?: AnimationOptions, eventData?: any): this;
|
7720 | |
7721 |
|
7722 |
|
7723 |
|
7724 |
|
7725 |
|
7726 |
|
7727 |
|
7728 |
|
7729 |
|
7730 |
|
7731 |
|
7732 |
|
7733 |
|
7734 |
|
7735 |
|
7736 |
|
7737 | zoomOut(options?: AnimationOptions, eventData?: any): this;
|
7738 | |
7739 |
|
7740 |
|
7741 |
|
7742 |
|
7743 |
|
7744 |
|
7745 |
|
7746 | getBearing(): number;
|
7747 | |
7748 |
|
7749 |
|
7750 |
|
7751 |
|
7752 |
|
7753 |
|
7754 |
|
7755 |
|
7756 |
|
7757 |
|
7758 |
|
7759 |
|
7760 |
|
7761 |
|
7762 |
|
7763 | setBearing(bearing: number, eventData?: any): this;
|
7764 | |
7765 |
|
7766 |
|
7767 |
|
7768 |
|
7769 |
|
7770 | getPadding(): PaddingOptions;
|
7771 | |
7772 |
|
7773 |
|
7774 |
|
7775 |
|
7776 |
|
7777 |
|
7778 |
|
7779 |
|
7780 |
|
7781 |
|
7782 |
|
7783 |
|
7784 |
|
7785 |
|
7786 | setPadding(padding: PaddingOptions, eventData?: any): this;
|
7787 | |
7788 |
|
7789 |
|
7790 |
|
7791 |
|
7792 |
|
7793 |
|
7794 |
|
7795 |
|
7796 |
|
7797 |
|
7798 |
|
7799 | rotateTo(bearing: number, options?: AnimationOptions, eventData?: any): this;
|
7800 | |
7801 |
|
7802 |
|
7803 |
|
7804 |
|
7805 |
|
7806 |
|
7807 |
|
7808 |
|
7809 |
|
7810 | resetNorth(options?: AnimationOptions, eventData?: any): this;
|
7811 | |
7812 |
|
7813 |
|
7814 |
|
7815 |
|
7816 |
|
7817 |
|
7818 |
|
7819 |
|
7820 |
|
7821 | resetNorthPitch(options?: AnimationOptions, eventData?: any): this;
|
7822 | |
7823 |
|
7824 |
|
7825 |
|
7826 |
|
7827 |
|
7828 |
|
7829 |
|
7830 |
|
7831 |
|
7832 |
|
7833 | snapToNorth(options?: AnimationOptions, eventData?: any): this;
|
7834 | |
7835 |
|
7836 |
|
7837 |
|
7838 |
|
7839 |
|
7840 | getPitch(): number;
|
7841 | |
7842 |
|
7843 |
|
7844 |
|
7845 |
|
7846 |
|
7847 |
|
7848 |
|
7849 |
|
7850 |
|
7851 |
|
7852 | setPitch(pitch: number, eventData?: any): this;
|
7853 | |
7854 |
|
7855 |
|
7856 |
|
7857 |
|
7858 |
|
7859 |
|
7860 |
|
7861 |
|
7862 |
|
7863 |
|
7864 |
|
7865 |
|
7866 |
|
7867 |
|
7868 |
|
7869 |
|
7870 |
|
7871 | cameraForBounds(bounds: LngLatBoundsLike, options?: CameraForBoundsOptions): CenterZoomBearing;
|
7872 | |
7873 |
|
7874 |
|
7875 |
|
7876 |
|
7877 |
|
7878 |
|
7879 |
|
7880 |
|
7881 |
|
7882 |
|
7883 |
|
7884 |
|
7885 |
|
7886 |
|
7887 |
|
7888 |
|
7889 |
|
7890 |
|
7891 |
|
7892 |
|
7893 |
|
7894 |
|
7895 | _cameraForBoxAndBearing(p0: LngLatLike, p1: LngLatLike, bearing: number, options?: CameraForBoundsOptions): CenterZoomBearing;
|
7896 | |
7897 |
|
7898 |
|
7899 |
|
7900 |
|
7901 |
|
7902 |
|
7903 |
|
7904 |
|
7905 |
|
7906 |
|
7907 |
|
7908 |
|
7909 |
|
7910 |
|
7911 |
|
7912 |
|
7913 |
|
7914 |
|
7915 |
|
7916 |
|
7917 |
|
7918 |
|
7919 |
|
7920 |
|
7921 |
|
7922 | fitBounds(bounds: LngLatBoundsLike, options?: FitBoundsOptions, eventData?: any): this;
|
7923 | |
7924 |
|
7925 |
|
7926 |
|
7927 |
|
7928 |
|
7929 |
|
7930 |
|
7931 |
|
7932 |
|
7933 |
|
7934 |
|
7935 |
|
7936 |
|
7937 |
|
7938 |
|
7939 |
|
7940 |
|
7941 |
|
7942 |
|
7943 |
|
7944 |
|
7945 |
|
7946 |
|
7947 |
|
7948 |
|
7949 |
|
7950 |
|
7951 |
|
7952 | fitScreenCoordinates(p0: PointLike, p1: PointLike, bearing: number, options?: FitBoundsOptions, eventData?: any): this;
|
7953 | _fitInternal(calculatedOptions?: CenterZoomBearing, options?: FitBoundsOptions, eventData?: any): this;
|
7954 | |
7955 |
|
7956 |
|
7957 |
|
7958 |
|
7959 |
|
7960 |
|
7961 |
|
7962 |
|
7963 |
|
7964 |
|
7965 |
|
7966 |
|
7967 |
|
7968 |
|
7969 |
|
7970 |
|
7971 |
|
7972 |
|
7973 |
|
7974 |
|
7975 |
|
7976 |
|
7977 |
|
7978 |
|
7979 |
|
7980 |
|
7981 |
|
7982 |
|
7983 |
|
7984 |
|
7985 |
|
7986 | jumpTo(options: JumpToOptions, eventData?: any): this;
|
7987 | |
7988 |
|
7989 |
|
7990 |
|
7991 |
|
7992 |
|
7993 |
|
7994 |
|
7995 |
|
7996 |
|
7997 |
|
7998 |
|
7999 |
|
8000 |
|
8001 |
|
8002 |
|
8003 |
|
8004 |
|
8005 |
|
8006 |
|
8007 |
|
8008 |
|
8009 |
|
8010 |
|
8011 |
|
8012 |
|
8013 | easeTo(options: EaseToOptions & {
|
8014 | easeId?: string;
|
8015 | noMoveStart?: boolean;
|
8016 | }, eventData?: any): this;
|
8017 | _prepareEase(eventData: any, noMoveStart: boolean, currently?: any): void;
|
8018 | _fireMoveEvents(eventData?: any): void;
|
8019 | _afterEase(eventData?: any, easeId?: string): void;
|
8020 | |
8021 |
|
8022 |
|
8023 |
|
8024 |
|
8025 |
|
8026 |
|
8027 |
|
8028 |
|
8029 |
|
8030 |
|
8031 |
|
8032 |
|
8033 |
|
8034 |
|
8035 |
|
8036 |
|
8037 |
|
8038 |
|
8039 |
|
8040 |
|
8041 |
|
8042 |
|
8043 |
|
8044 |
|
8045 |
|
8046 |
|
8047 |
|
8048 |
|
8049 |
|
8050 |
|
8051 |
|
8052 |
|
8053 |
|
8054 |
|
8055 |
|
8056 |
|
8057 |
|
8058 |
|
8059 |
|
8060 |
|
8061 |
|
8062 |
|
8063 |
|
8064 |
|
8065 |
|
8066 |
|
8067 |
|
8068 |
|
8069 |
|
8070 |
|
8071 |
|
8072 |
|
8073 |
|
8074 |
|
8075 |
|
8076 |
|
8077 |
|
8078 |
|
8079 | flyTo(options: FlyToOptions, eventData?: any): this;
|
8080 | isEasing(): boolean;
|
8081 | |
8082 |
|
8083 |
|
8084 |
|
8085 |
|
8086 |
|
8087 | stop(): this;
|
8088 | _stop(allowGestures?: boolean, easeId?: string): this;
|
8089 | _ease(frame: (_: number) => void, finish: () => void, options: {
|
8090 | animate?: boolean;
|
8091 | duration?: number;
|
8092 | easing?: (_: number) => number;
|
8093 | }): void;
|
8094 | _renderFrameCallback(): void;
|
8095 | _normalizeBearing(bearing: number, currentBearing: number): number;
|
8096 | _normalizeCenter(center: LngLat): void;
|
8097 | }
|
8098 | export declare class ScrollZoomHandler {
|
8099 | _map: Map;
|
8100 | _el: HTMLElement;
|
8101 | _enabled: boolean;
|
8102 | _active: boolean;
|
8103 | _zooming: boolean;
|
8104 | _aroundCenter: boolean;
|
8105 | _around: LngLat;
|
8106 | _aroundPoint: Point;
|
8107 | _type: "wheel" | "trackpad" | null;
|
8108 | _lastValue: number;
|
8109 | _timeout: ReturnType<typeof setTimeout>;
|
8110 | _finishTimeout: ReturnType<typeof setTimeout>;
|
8111 | _lastWheelEvent: any;
|
8112 | _lastWheelEventTime: number;
|
8113 | _startZoom: number;
|
8114 | _targetZoom: number;
|
8115 | _delta: number;
|
8116 | _easing: ((a: number) => number);
|
8117 | _prevEase: {
|
8118 | start: number;
|
8119 | duration: number;
|
8120 | easing: (_: number) => number;
|
8121 | };
|
8122 | _frameId: boolean;
|
8123 | _handler: HandlerManager;
|
8124 | _defaultZoomRate: number;
|
8125 | _wheelZoomRate: number;
|
8126 | |
8127 |
|
8128 |
|
8129 | constructor(map: Map, handler: HandlerManager);
|
8130 | |
8131 |
|
8132 |
|
8133 |
|
8134 |
|
8135 |
|
8136 |
|
8137 | setZoomRate(zoomRate: number): void;
|
8138 | |
8139 |
|
8140 |
|
8141 |
|
8142 |
|
8143 |
|
8144 |
|
8145 | setWheelZoomRate(wheelZoomRate: number): void;
|
8146 | |
8147 |
|
8148 |
|
8149 |
|
8150 |
|
8151 | isEnabled(): boolean;
|
8152 | isActive(): boolean;
|
8153 | isZooming(): boolean;
|
8154 | |
8155 |
|
8156 |
|
8157 |
|
8158 |
|
8159 |
|
8160 |
|
8161 |
|
8162 |
|
8163 |
|
8164 |
|
8165 | enable(options?: any): void;
|
8166 | |
8167 |
|
8168 |
|
8169 |
|
8170 |
|
8171 |
|
8172 | disable(): void;
|
8173 | wheel(e: WheelEvent): void;
|
8174 | _onTimeout(initialEvent: any): void;
|
8175 | _start(e: any): void;
|
8176 | renderFrame(): {
|
8177 | noInertia: boolean;
|
8178 | needsRenderFrame: boolean;
|
8179 | zoomDelta: number;
|
8180 | around: Point;
|
8181 | originalEvent: any;
|
8182 | };
|
8183 | _smoothOutEasing(duration: number): (t: number) => number;
|
8184 | reset(): void;
|
8185 | }
|
8186 | export declare class BoxZoomHandler {
|
8187 | _map: Map;
|
8188 | _el: HTMLElement;
|
8189 | _container: HTMLElement;
|
8190 | _enabled: boolean;
|
8191 | _active: boolean;
|
8192 | _startPos: Point;
|
8193 | _lastPos: Point;
|
8194 | _box: HTMLElement;
|
8195 | _clickTolerance: number;
|
8196 | |
8197 |
|
8198 |
|
8199 | constructor(map: Map, options: {
|
8200 | clickTolerance: number;
|
8201 | });
|
8202 | |
8203 |
|
8204 |
|
8205 |
|
8206 |
|
8207 | isEnabled(): boolean;
|
8208 | |
8209 |
|
8210 |
|
8211 |
|
8212 |
|
8213 | isActive(): boolean;
|
8214 | |
8215 |
|
8216 |
|
8217 |
|
8218 |
|
8219 |
|
8220 | enable(): void;
|
8221 | |
8222 |
|
8223 |
|
8224 |
|
8225 |
|
8226 |
|
8227 | disable(): void;
|
8228 | mousedown(e: MouseEvent, point: Point): void;
|
8229 | mousemoveWindow(e: MouseEvent, point: Point): void;
|
8230 | mouseupWindow(e: MouseEvent, point: Point): {
|
8231 | cameraAnimation: (map: any) => any;
|
8232 | };
|
8233 | keydown(e: KeyboardEvent): void;
|
8234 | reset(): void;
|
8235 | _fireEvent(type: string, e: any): Map;
|
8236 | }
|
8237 | export declare class TwoTouchHandler {
|
8238 | _enabled: boolean;
|
8239 | _active: boolean;
|
8240 | _firstTwoTouches: [
|
8241 | number,
|
8242 | number
|
8243 | ];
|
8244 | _vector: Point;
|
8245 | _startVector: Point;
|
8246 | _aroundCenter: boolean;
|
8247 | constructor();
|
8248 | reset(): void;
|
8249 | _start(points: [
|
8250 | Point,
|
8251 | Point
|
8252 | ]): void;
|
8253 | _move(points: [
|
8254 | Point,
|
8255 | Point
|
8256 | ], pinchAround: Point, e: TouchEvent): {};
|
8257 | touchstart(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8258 | touchmove(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): {};
|
8259 | touchend(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8260 | touchcancel(): void;
|
8261 | enable(options?: {
|
8262 | around?: "center";
|
8263 | } | null): void;
|
8264 | disable(): void;
|
8265 | isEnabled(): boolean;
|
8266 | isActive(): boolean;
|
8267 | }
|
8268 | export declare class TouchZoomHandler extends TwoTouchHandler {
|
8269 | _distance: number;
|
8270 | _startDistance: number;
|
8271 | reset(): void;
|
8272 | _start(points: [
|
8273 | Point,
|
8274 | Point
|
8275 | ]): void;
|
8276 | _move(points: [
|
8277 | Point,
|
8278 | Point
|
8279 | ], pinchAround: Point): {
|
8280 | zoomDelta: number;
|
8281 | pinchAround: Point;
|
8282 | };
|
8283 | }
|
8284 | export declare class TouchRotateHandler extends TwoTouchHandler {
|
8285 | _minDiameter: number;
|
8286 | reset(): void;
|
8287 | _start(points: [
|
8288 | Point,
|
8289 | Point
|
8290 | ]): void;
|
8291 | _move(points: [
|
8292 | Point,
|
8293 | Point
|
8294 | ], pinchAround: Point): {
|
8295 | bearingDelta: number;
|
8296 | pinchAround: Point;
|
8297 | };
|
8298 | _isBelowThreshold(vector: Point): boolean;
|
8299 | }
|
8300 | export declare class TouchPitchHandler extends TwoTouchHandler {
|
8301 | _valid: boolean | void;
|
8302 | _firstMove: number;
|
8303 | _lastPoints: [
|
8304 | Point,
|
8305 | Point
|
8306 | ];
|
8307 | reset(): void;
|
8308 | _start(points: [
|
8309 | Point,
|
8310 | Point
|
8311 | ]): void;
|
8312 | _move(points: [
|
8313 | Point,
|
8314 | Point
|
8315 | ], center: Point, e: TouchEvent): {
|
8316 | pitchDelta: number;
|
8317 | };
|
8318 | gestureBeginsVertically(vectorA: Point, vectorB: Point, timeStamp: number): boolean | void;
|
8319 | }
|
8320 | export declare class DragRotateHandler {
|
8321 | _mouseRotate: MouseRotateHandler;
|
8322 | _mousePitch: MousePitchHandler;
|
8323 | _pitchWithRotate: boolean;
|
8324 | |
8325 |
|
8326 |
|
8327 |
|
8328 |
|
8329 |
|
8330 |
|
8331 | constructor(options: {
|
8332 | pitchWithRotate: boolean;
|
8333 | }, mouseRotate: MouseRotateHandler, mousePitch: MousePitchHandler);
|
8334 | |
8335 |
|
8336 |
|
8337 |
|
8338 |
|
8339 |
|
8340 | enable(): void;
|
8341 | |
8342 |
|
8343 |
|
8344 |
|
8345 |
|
8346 |
|
8347 | disable(): void;
|
8348 | |
8349 |
|
8350 |
|
8351 |
|
8352 |
|
8353 | isEnabled(): boolean;
|
8354 | |
8355 |
|
8356 |
|
8357 |
|
8358 |
|
8359 | isActive(): boolean;
|
8360 | }
|
8361 | export declare class KeyboardHandler {
|
8362 | _enabled: boolean;
|
8363 | _active: boolean;
|
8364 | _panStep: number;
|
8365 | _bearingStep: number;
|
8366 | _pitchStep: number;
|
8367 | _rotationDisabled: boolean;
|
8368 | |
8369 |
|
8370 |
|
8371 | constructor();
|
8372 | reset(): void;
|
8373 | keydown(e: KeyboardEvent): {
|
8374 | cameraAnimation: (map: Map) => void;
|
8375 | };
|
8376 | |
8377 |
|
8378 |
|
8379 |
|
8380 |
|
8381 |
|
8382 | enable(): void;
|
8383 | |
8384 |
|
8385 |
|
8386 |
|
8387 |
|
8388 |
|
8389 | disable(): void;
|
8390 | |
8391 |
|
8392 |
|
8393 |
|
8394 |
|
8395 |
|
8396 |
|
8397 | isEnabled(): boolean;
|
8398 | |
8399 |
|
8400 |
|
8401 |
|
8402 |
|
8403 |
|
8404 |
|
8405 | isActive(): boolean;
|
8406 | |
8407 |
|
8408 |
|
8409 |
|
8410 |
|
8411 |
|
8412 |
|
8413 | disableRotation(): void;
|
8414 | |
8415 |
|
8416 |
|
8417 |
|
8418 |
|
8419 |
|
8420 |
|
8421 | enableRotation(): void;
|
8422 | }
|
8423 | export declare class ClickZoomHandler {
|
8424 | _enabled: boolean;
|
8425 | _active: boolean;
|
8426 | constructor();
|
8427 | reset(): void;
|
8428 | dblclick(e: MouseEvent, point: Point): {
|
8429 | cameraAnimation: (map: Map) => void;
|
8430 | };
|
8431 | enable(): void;
|
8432 | disable(): void;
|
8433 | isEnabled(): boolean;
|
8434 | isActive(): boolean;
|
8435 | }
|
8436 | export declare class SingleTapRecognizer {
|
8437 | numTouches: number;
|
8438 | centroid: Point;
|
8439 | startTime: number;
|
8440 | aborted: boolean;
|
8441 | touches: {
|
8442 | [k in number | string]: Point;
|
8443 | };
|
8444 | constructor(options: {
|
8445 | numTouches: number;
|
8446 | });
|
8447 | reset(): void;
|
8448 | touchstart(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8449 | touchmove(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8450 | touchend(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): Point;
|
8451 | }
|
8452 | export declare class TapRecognizer {
|
8453 | singleTap: SingleTapRecognizer;
|
8454 | numTaps: number;
|
8455 | lastTime: number;
|
8456 | lastTap: Point;
|
8457 | count: number;
|
8458 | constructor(options: {
|
8459 | numTaps: number;
|
8460 | numTouches: number;
|
8461 | });
|
8462 | reset(): void;
|
8463 | touchstart(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8464 | touchmove(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8465 | touchend(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): Point;
|
8466 | }
|
8467 | export declare class TapZoomHandler {
|
8468 | _enabled: boolean;
|
8469 | _active: boolean;
|
8470 | _zoomIn: TapRecognizer;
|
8471 | _zoomOut: TapRecognizer;
|
8472 | constructor();
|
8473 | reset(): void;
|
8474 | touchstart(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8475 | touchmove(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8476 | touchend(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): {
|
8477 | cameraAnimation: (map: Map) => Map;
|
8478 | };
|
8479 | touchcancel(): void;
|
8480 | enable(): void;
|
8481 | disable(): void;
|
8482 | isEnabled(): boolean;
|
8483 | isActive(): boolean;
|
8484 | }
|
8485 | export declare class DoubleClickZoomHandler {
|
8486 | _clickZoom: ClickZoomHandler;
|
8487 | _tapZoom: TapZoomHandler;
|
8488 | |
8489 |
|
8490 |
|
8491 | constructor(clickZoom: ClickZoomHandler, TapZoom: TapZoomHandler);
|
8492 | |
8493 |
|
8494 |
|
8495 |
|
8496 |
|
8497 |
|
8498 | enable(): void;
|
8499 | |
8500 |
|
8501 |
|
8502 |
|
8503 |
|
8504 |
|
8505 | disable(): void;
|
8506 | |
8507 |
|
8508 |
|
8509 |
|
8510 |
|
8511 | isEnabled(): boolean;
|
8512 | |
8513 |
|
8514 |
|
8515 |
|
8516 |
|
8517 | isActive(): boolean;
|
8518 | }
|
8519 | export declare class TapDragZoomHandler {
|
8520 | _enabled: boolean;
|
8521 | _active: boolean;
|
8522 | _swipePoint: Point;
|
8523 | _swipeTouch: number;
|
8524 | _tapTime: number;
|
8525 | _tap: TapRecognizer;
|
8526 | constructor();
|
8527 | reset(): void;
|
8528 | touchstart(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8529 | touchmove(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): {
|
8530 | zoomDelta: number;
|
8531 | };
|
8532 | touchend(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>): void;
|
8533 | touchcancel(): void;
|
8534 | enable(): void;
|
8535 | disable(): void;
|
8536 | isEnabled(): boolean;
|
8537 | isActive(): boolean;
|
8538 | }
|
8539 | export declare class TouchZoomRotateHandler {
|
8540 | _el: HTMLElement;
|
8541 | _touchZoom: TouchZoomHandler;
|
8542 | _touchRotate: TouchRotateHandler;
|
8543 | _tapDragZoom: TapDragZoomHandler;
|
8544 | _rotationDisabled: boolean;
|
8545 | _enabled: boolean;
|
8546 | |
8547 |
|
8548 |
|
8549 | constructor(el: HTMLElement, touchZoom: TouchZoomHandler, touchRotate: TouchRotateHandler, tapDragZoom: TapDragZoomHandler);
|
8550 | |
8551 |
|
8552 |
|
8553 |
|
8554 |
|
8555 |
|
8556 |
|
8557 |
|
8558 |
|
8559 |
|
8560 |
|
8561 | enable(options?: {
|
8562 | around?: "center";
|
8563 | } | null): void;
|
8564 | |
8565 |
|
8566 |
|
8567 |
|
8568 |
|
8569 |
|
8570 | disable(): void;
|
8571 | |
8572 |
|
8573 |
|
8574 |
|
8575 |
|
8576 | isEnabled(): boolean;
|
8577 | |
8578 |
|
8579 |
|
8580 |
|
8581 |
|
8582 | isActive(): boolean;
|
8583 | |
8584 |
|
8585 |
|
8586 |
|
8587 |
|
8588 |
|
8589 |
|
8590 | disableRotation(): void;
|
8591 | |
8592 |
|
8593 |
|
8594 |
|
8595 |
|
8596 |
|
8597 |
|
8598 | enableRotation(): void;
|
8599 | }
|
8600 | export declare type ControlPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
8601 |
|
8602 |
|
8603 |
|
8604 |
|
8605 |
|
8606 |
|
8607 |
|
8608 |
|
8609 |
|
8610 |
|
8611 |
|
8612 |
|
8613 |
|
8614 |
|
8615 |
|
8616 |
|
8617 |
|
8618 |
|
8619 |
|
8620 |
|
8621 |
|
8622 |
|
8623 |
|
8624 |
|
8625 |
|
8626 |
|
8627 |
|
8628 |
|
8629 |
|
8630 |
|
8631 |
|
8632 |
|
8633 |
|
8634 |
|
8635 |
|
8636 |
|
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 |
|
8644 |
|
8645 | export interface IControl {
|
8646 | |
8647 |
|
8648 |
|
8649 |
|
8650 |
|
8651 |
|
8652 |
|
8653 |
|
8654 |
|
8655 |
|
8656 |
|
8657 |
|
8658 |
|
8659 |
|
8660 |
|
8661 | onAdd(map: Map): HTMLElement;
|
8662 | |
8663 |
|
8664 |
|
8665 |
|
8666 |
|
8667 |
|
8668 |
|
8669 |
|
8670 |
|
8671 |
|
8672 |
|
8673 |
|
8674 | onRemove(map: Map): void;
|
8675 | |
8676 |
|
8677 |
|
8678 |
|
8679 |
|
8680 |
|
8681 |
|
8682 |
|
8683 |
|
8684 |
|
8685 |
|
8686 |
|
8687 | readonly getDefaultPosition?: () => ControlPosition;
|
8688 | }
|
8689 | export declare type MapOptions = {
|
8690 | hash?: boolean | string;
|
8691 | interactive?: boolean;
|
8692 | container: HTMLElement | string;
|
8693 | bearingSnap?: number;
|
8694 | attributionControl?: boolean;
|
8695 | customAttribution?: string | Array<string>;
|
8696 | maplibreLogo?: boolean;
|
8697 | logoPosition?: ControlPosition;
|
8698 | failIfMajorPerformanceCaveat?: boolean;
|
8699 | preserveDrawingBuffer?: boolean;
|
8700 | antialias?: boolean;
|
8701 | refreshExpiredTiles?: boolean;
|
8702 | maxBounds?: LngLatBoundsLike;
|
8703 | scrollZoom?: boolean;
|
8704 | minZoom?: number | null;
|
8705 | maxZoom?: number | null;
|
8706 | minPitch?: number | null;
|
8707 | maxPitch?: number | null;
|
8708 | boxZoom?: boolean;
|
8709 | dragRotate?: boolean;
|
8710 | dragPan?: DragPanOptions | boolean;
|
8711 | keyboard?: boolean;
|
8712 | doubleClickZoom?: boolean;
|
8713 | touchZoomRotate?: boolean;
|
8714 | touchPitch?: boolean;
|
8715 | trackResize?: boolean;
|
8716 | center?: LngLatLike;
|
8717 | zoom?: number;
|
8718 | bearing?: number;
|
8719 | pitch?: number;
|
8720 | renderWorldCopies?: boolean;
|
8721 | maxTileCacheSize?: number;
|
8722 | transformRequest?: RequestTransformFunction;
|
8723 | locale?: any;
|
8724 | fadeDuration?: number;
|
8725 | crossSourceCollisions?: boolean;
|
8726 | collectResourceTiming?: boolean;
|
8727 | clickTolerance?: number;
|
8728 | bounds?: LngLatBoundsLike;
|
8729 | fitBoundsOptions?: Object;
|
8730 | localIdeographFontFamily?: string;
|
8731 | style: StyleSpecification | string;
|
8732 | pitchWithRotate?: boolean;
|
8733 | pixelRatio?: number;
|
8734 | };
|
8735 | export declare type Complete<T> = {
|
8736 | [P in keyof Required<T>]: Pick<T, P> extends Required<Pick<T, P>> ? T[P] : (T[P] | undefined);
|
8737 | };
|
8738 | export declare type CompleteMapOptions = Complete<MapOptions>;
|
8739 | export declare class Map extends Camera {
|
8740 | style: Style;
|
8741 | painter: Painter;
|
8742 | handlers: HandlerManager;
|
8743 | _container: HTMLElement;
|
8744 | _canvasContainer: HTMLElement;
|
8745 | _controlContainer: HTMLElement;
|
8746 | _controlPositions: {
|
8747 | [_: string]: HTMLElement;
|
8748 | };
|
8749 | _interactive: boolean;
|
8750 | _showTileBoundaries: boolean;
|
8751 | _showCollisionBoxes: boolean;
|
8752 | _showPadding: boolean;
|
8753 | _showOverdrawInspector: boolean;
|
8754 | _repaint: boolean;
|
8755 | _vertices: boolean;
|
8756 | _canvas: HTMLCanvasElement;
|
8757 | _maxTileCacheSize: number;
|
8758 | _frame: Cancelable;
|
8759 | _styleDirty: boolean;
|
8760 | _sourcesDirty: boolean;
|
8761 | _placementDirty: boolean;
|
8762 | _loaded: boolean;
|
8763 | _fullyLoaded: boolean;
|
8764 | _trackResize: boolean;
|
8765 | _preserveDrawingBuffer: boolean;
|
8766 | _failIfMajorPerformanceCaveat: boolean;
|
8767 | _antialias: boolean;
|
8768 | _refreshExpiredTiles: boolean;
|
8769 | _hash: Hash;
|
8770 | _delegatedListeners: any;
|
8771 | _fadeDuration: number;
|
8772 | _crossSourceCollisions: boolean;
|
8773 | _crossFadingFactor: number;
|
8774 | _collectResourceTiming: boolean;
|
8775 | _renderTaskQueue: TaskQueue;
|
8776 | _controls: Array<IControl>;
|
8777 | _mapId: number;
|
8778 | _localIdeographFontFamily: string;
|
8779 | _requestManager: RequestManager;
|
8780 | _locale: any;
|
8781 | _removed: boolean;
|
8782 | _clickTolerance: number;
|
8783 | _pixelRatio: number;
|
8784 | |
8785 |
|
8786 |
|
8787 |
|
8788 | scrollZoom: ScrollZoomHandler;
|
8789 | |
8790 |
|
8791 |
|
8792 |
|
8793 | boxZoom: BoxZoomHandler;
|
8794 | |
8795 |
|
8796 |
|
8797 |
|
8798 |
|
8799 | dragRotate: DragRotateHandler;
|
8800 | |
8801 |
|
8802 |
|
8803 |
|
8804 | dragPan: DragPanHandler;
|
8805 | |
8806 |
|
8807 |
|
8808 |
|
8809 | keyboard: KeyboardHandler;
|
8810 | |
8811 |
|
8812 |
|
8813 |
|
8814 | doubleClickZoom: DoubleClickZoomHandler;
|
8815 | |
8816 |
|
8817 |
|
8818 |
|
8819 | touchZoomRotate: TouchZoomRotateHandler;
|
8820 | |
8821 |
|
8822 |
|
8823 |
|
8824 | touchPitch: TouchPitchHandler;
|
8825 | constructor(options: MapOptions);
|
8826 | _getMapId(): number;
|
8827 | |
8828 |
|
8829 |
|
8830 |
|
8831 |
|
8832 |
|
8833 |
|
8834 |
|
8835 |
|
8836 |
|
8837 |
|
8838 |
|
8839 | addControl(control: IControl, position?: ControlPosition): this;
|
8840 | |
8841 |
|
8842 |
|
8843 |
|
8844 |
|
8845 |
|
8846 |
|
8847 |
|
8848 |
|
8849 |
|
8850 |
|
8851 |
|
8852 |
|
8853 | removeControl(control: IControl): this;
|
8854 | |
8855 |
|
8856 |
|
8857 |
|
8858 |
|
8859 |
|
8860 |
|
8861 |
|
8862 |
|
8863 |
|
8864 |
|
8865 |
|
8866 |
|
8867 | hasControl(control: IControl): boolean;
|
8868 | |
8869 |
|
8870 |
|
8871 |
|
8872 |
|
8873 |
|
8874 |
|
8875 |
|
8876 |
|
8877 |
|
8878 |
|
8879 |
|
8880 |
|
8881 |
|
8882 |
|
8883 |
|
8884 |
|
8885 |
|
8886 | resize(eventData?: any): this;
|
8887 | |
8888 |
|
8889 |
|
8890 |
|
8891 | getPixelRatio(): number;
|
8892 | |
8893 |
|
8894 |
|
8895 |
|
8896 |
|
8897 |
|
8898 | setPixelRatio(pixelRatio: number): void;
|
8899 | |
8900 |
|
8901 |
|
8902 |
|
8903 |
|
8904 |
|
8905 |
|
8906 | getBounds(): LngLatBounds;
|
8907 | |
8908 |
|
8909 |
|
8910 |
|
8911 |
|
8912 |
|
8913 | getMaxBounds(): LngLatBounds | null;
|
8914 | |
8915 |
|
8916 |
|
8917 |
|
8918 |
|
8919 |
|
8920 |
|
8921 |
|
8922 |
|
8923 |
|
8924 |
|
8925 |
|
8926 |
|
8927 |
|
8928 |
|
8929 |
|
8930 |
|
8931 |
|
8932 |
|
8933 |
|
8934 |
|
8935 | setMaxBounds(bounds?: LngLatBoundsLike | null): this;
|
8936 | |
8937 |
|
8938 |
|
8939 |
|
8940 |
|
8941 |
|
8942 |
|
8943 |
|
8944 |
|
8945 |
|
8946 |
|
8947 |
|
8948 |
|
8949 |
|
8950 |
|
8951 |
|
8952 | setMinZoom(minZoom?: number | null): this;
|
8953 | |
8954 |
|
8955 |
|
8956 |
|
8957 |
|
8958 |
|
8959 |
|
8960 | getMinZoom(): number;
|
8961 | |
8962 |
|
8963 |
|
8964 |
|
8965 |
|
8966 |
|
8967 |
|
8968 |
|
8969 |
|
8970 |
|
8971 |
|
8972 | setMaxZoom(maxZoom?: number | null): this;
|
8973 | |
8974 |
|
8975 |
|
8976 |
|
8977 |
|
8978 |
|
8979 |
|
8980 | getMaxZoom(): number;
|
8981 | |
8982 |
|
8983 |
|
8984 |
|
8985 |
|
8986 |
|
8987 |
|
8988 |
|
8989 |
|
8990 | setMinPitch(minPitch?: number | null): this;
|
8991 | |
8992 |
|
8993 |
|
8994 |
|
8995 |
|
8996 | getMinPitch(): number;
|
8997 | |
8998 |
|
8999 |
|
9000 |
|
9001 |
|
9002 |
|
9003 |
|
9004 |
|
9005 |
|
9006 | setMaxPitch(maxPitch?: number | null): this;
|
9007 | |
9008 |
|
9009 |
|
9010 |
|
9011 |
|
9012 | getMaxPitch(): number;
|
9013 | |
9014 |
|
9015 |
|
9016 |
|
9017 |
|
9018 |
|
9019 |
|
9020 |
|
9021 |
|
9022 |
|
9023 |
|
9024 | getRenderWorldCopies(): boolean;
|
9025 | |
9026 |
|
9027 |
|
9028 |
|
9029 |
|
9030 |
|
9031 |
|
9032 |
|
9033 |
|
9034 |
|
9035 |
|
9036 |
|
9037 |
|
9038 |
|
9039 |
|
9040 | setRenderWorldCopies(renderWorldCopies?: boolean | null): this;
|
9041 | |
9042 |
|
9043 |
|
9044 |
|
9045 |
|
9046 |
|
9047 |
|
9048 |
|
9049 |
|
9050 |
|
9051 | project(lnglat: LngLatLike): Point;
|
9052 | |
9053 |
|
9054 |
|
9055 |
|
9056 |
|
9057 |
|
9058 |
|
9059 |
|
9060 |
|
9061 |
|
9062 |
|
9063 |
|
9064 | unproject(point: PointLike): LngLat;
|
9065 | |
9066 |
|
9067 |
|
9068 |
|
9069 |
|
9070 |
|
9071 | isMoving(): boolean;
|
9072 | |
9073 |
|
9074 |
|
9075 |
|
9076 |
|
9077 |
|
9078 | isZooming(): boolean;
|
9079 | |
9080 |
|
9081 |
|
9082 |
|
9083 |
|
9084 |
|
9085 | isRotating(): boolean;
|
9086 | _createDelegatedListener(type: MapEvent | string, layerId: string, listener: Listener): {
|
9087 | layer: string;
|
9088 | listener: Listener;
|
9089 | delegates: {
|
9090 | [type in keyof MapEventType]?: (e: any) => void;
|
9091 | };
|
9092 | };
|
9093 | |
9094 |
|
9095 |
|
9096 |
|
9097 |
|
9098 |
|
9099 |
|
9100 |
|
9101 |
|
9102 |
|
9103 |
|
9104 |
|
9105 |
|
9106 |
|
9107 |
|
9108 |
|
9109 |
|
9110 |
|
9111 |
|
9112 |
|
9113 |
|
9114 |
|
9115 |
|
9116 |
|
9117 |
|
9118 |
|
9119 |
|
9120 |
|
9121 |
|
9122 |
|
9123 |
|
9124 |
|
9125 |
|
9126 |
|
9127 |
|
9128 |
|
9129 |
|
9130 |
|
9131 |
|
9132 |
|
9133 |
|
9134 |
|
9135 |
|
9136 |
|
9137 |
|
9138 |
|
9139 |
|
9140 |
|
9141 |
|
9142 |
|
9143 |
|
9144 |
|
9145 |
|
9146 |
|
9147 |
|
9148 |
|
9149 |
|
9150 |
|
9151 |
|
9152 |
|
9153 |
|
9154 |
|
9155 |
|
9156 |
|
9157 |
|
9158 |
|
9159 |
|
9160 |
|
9161 |
|
9162 |
|
9163 |
|
9164 |
|
9165 |
|
9166 |
|
9167 |
|
9168 |
|
9169 |
|
9170 |
|
9171 |
|
9172 |
|
9173 |
|
9174 |
|
9175 |
|
9176 |
|
9177 |
|
9178 |
|
9179 |
|
9180 |
|
9181 |
|
9182 |
|
9183 |
|
9184 |
|
9185 |
|
9186 |
|
9187 |
|
9188 |
|
9189 |
|
9190 |
|
9191 |
|
9192 |
|
9193 |
|
9194 | on<T extends keyof MapLayerEventType>(type: T, layer: string, listener: (ev: MapLayerEventType[T] & Object) => void): this;
|
9195 | on<T extends keyof MapEventType>(type: T, listener: (ev: MapEventType[T] & Object) => void): this;
|
9196 | on(type: MapEvent | string, listener: Listener): this;
|
9197 | |
9198 |
|
9199 |
|
9200 |
|
9201 |
|
9202 |
|
9203 |
|
9204 |
|
9205 |
|
9206 |
|
9207 |
|
9208 |
|
9209 |
|
9210 | |
9211 |
|
9212 |
|
9213 |
|
9214 |
|
9215 |
|
9216 |
|
9217 |
|
9218 |
|
9219 |
|
9220 |
|
9221 |
|
9222 |
|
9223 |
|
9224 |
|
9225 | once<T extends keyof MapLayerEventType>(type: T, layer: string, listener: (ev: MapLayerEventType[T] & Object) => void): this;
|
9226 | once<T extends keyof MapEventType>(type: T, listener: (ev: MapEventType[T] & Object) => void): this;
|
9227 | once(type: MapEvent | string, listener: Listener): this;
|
9228 | |
9229 |
|
9230 |
|
9231 |
|
9232 |
|
9233 |
|
9234 |
|
9235 |
|
9236 |
|
9237 |
|
9238 |
|
9239 | |
9240 |
|
9241 |
|
9242 |
|
9243 |
|
9244 |
|
9245 |
|
9246 |
|
9247 | off<T extends keyof MapLayerEventType>(type: T, layer: string, listener: (ev: MapLayerEventType[T] & Object) => void): this;
|
9248 | off<T extends keyof MapEventType>(type: T, listener: (ev: MapEventType[T] & Object) => void): this;
|
9249 | off(type: MapEvent | string, listener: Listener): this;
|
9250 | |
9251 |
|
9252 |
|
9253 |
|
9254 |
|
9255 |
|
9256 |
|
9257 |
|
9258 |
|
9259 |
|
9260 |
|
9261 |
|
9262 |
|
9263 |
|
9264 |
|
9265 |
|
9266 |
|
9267 |
|
9268 |
|
9269 |
|
9270 |
|
9271 |
|
9272 |
|
9273 |
|
9274 |
|
9275 |
|
9276 |
|
9277 |
|
9278 |
|
9279 |
|
9280 |
|
9281 |
|
9282 |
|
9283 |
|
9284 |
|
9285 |
|
9286 |
|
9287 |
|
9288 |
|
9289 |
|
9290 |
|
9291 |
|
9292 |
|
9293 |
|
9294 |
|
9295 |
|
9296 |
|
9297 |
|
9298 |
|
9299 |
|
9300 |
|
9301 |
|
9302 |
|
9303 |
|
9304 |
|
9305 |
|
9306 |
|
9307 |
|
9308 |
|
9309 |
|
9310 |
|
9311 |
|
9312 |
|
9313 |
|
9314 |
|
9315 |
|
9316 |
|
9317 |
|
9318 |
|
9319 |
|
9320 |
|
9321 |
|
9322 |
|
9323 |
|
9324 |
|
9325 | queryRenderedFeatures(geometry?: PointLike | [
|
9326 | PointLike,
|
9327 | PointLike
|
9328 | ], options?: any): MapGeoJSONFeature[];
|
9329 | |
9330 |
|
9331 |
|
9332 |
|
9333 |
|
9334 |
|
9335 |
|
9336 |
|
9337 |
|
9338 |
|
9339 |
|
9340 |
|
9341 |
|
9342 |
|
9343 |
|
9344 |
|
9345 |
|
9346 |
|
9347 |
|
9348 |
|
9349 |
|
9350 |
|
9351 |
|
9352 |
|
9353 |
|
9354 |
|
9355 |
|
9356 |
|
9357 |
|
9358 |
|
9359 |
|
9360 |
|
9361 |
|
9362 |
|
9363 | querySourceFeatures(sourceId: string, parameters?: {
|
9364 | sourceLayer: string;
|
9365 | filter: Array<any>;
|
9366 | validate?: boolean;
|
9367 | } | null): MapGeoJSONFeature[];
|
9368 | |
9369 |
|
9370 |
|
9371 |
|
9372 |
|
9373 |
|
9374 |
|
9375 |
|
9376 |
|
9377 |
|
9378 |
|
9379 |
|
9380 |
|
9381 |
|
9382 |
|
9383 |
|
9384 |
|
9385 |
|
9386 |
|
9387 |
|
9388 |
|
9389 |
|
9390 |
|
9391 |
|
9392 |
|
9393 |
|
9394 | setStyle(style: StyleSpecification | string | null, options?: {
|
9395 | diff?: boolean;
|
9396 | } & StyleOptions): this;
|
9397 | |
9398 |
|
9399 |
|
9400 |
|
9401 |
|
9402 |
|
9403 |
|
9404 |
|
9405 |
|
9406 |
|
9407 |
|
9408 | setTransformRequest(transformRequest: RequestTransformFunction): this;
|
9409 | _getUIString(key: string): any;
|
9410 | _updateStyle(style: StyleSpecification | string | null, options?: {
|
9411 | diff?: boolean;
|
9412 | } & StyleOptions): this;
|
9413 | _lazyInitEmptyStyle(): void;
|
9414 | _diffStyle(style: StyleSpecification | string, options?: {
|
9415 | diff?: boolean;
|
9416 | } & StyleOptions): void;
|
9417 | _updateDiff(style: StyleSpecification, options?: {
|
9418 | diff?: boolean;
|
9419 | } & StyleOptions): void;
|
9420 | |
9421 |
|
9422 |
|
9423 |
|
9424 |
|
9425 |
|
9426 |
|
9427 |
|
9428 |
|
9429 | getStyle(): StyleSpecification;
|
9430 | |
9431 |
|
9432 |
|
9433 |
|
9434 |
|
9435 |
|
9436 |
|
9437 |
|
9438 | isStyleLoaded(): boolean | void;
|
9439 | |
9440 |
|
9441 |
|
9442 |
|
9443 |
|
9444 |
|
9445 |
|
9446 |
|
9447 |
|
9448 |
|
9449 |
|
9450 |
|
9451 |
|
9452 |
|
9453 |
|
9454 |
|
9455 |
|
9456 |
|
9457 |
|
9458 |
|
9459 |
|
9460 |
|
9461 |
|
9462 |
|
9463 |
|
9464 |
|
9465 |
|
9466 |
|
9467 |
|
9468 |
|
9469 |
|
9470 | addSource(id: string, source: SourceSpecification): this;
|
9471 | |
9472 |
|
9473 |
|
9474 |
|
9475 |
|
9476 |
|
9477 |
|
9478 |
|
9479 |
|
9480 | isSourceLoaded(id: string): boolean;
|
9481 | |
9482 |
|
9483 |
|
9484 |
|
9485 |
|
9486 |
|
9487 |
|
9488 |
|
9489 | areTilesLoaded(): boolean;
|
9490 | |
9491 |
|
9492 |
|
9493 |
|
9494 |
|
9495 |
|
9496 |
|
9497 |
|
9498 | addSourceType(name: string, SourceType: any, callback: Callback<void>): void;
|
9499 | |
9500 |
|
9501 |
|
9502 |
|
9503 |
|
9504 |
|
9505 |
|
9506 |
|
9507 | removeSource(id: string): this;
|
9508 | |
9509 |
|
9510 |
|
9511 |
|
9512 |
|
9513 |
|
9514 |
|
9515 |
|
9516 |
|
9517 |
|
9518 |
|
9519 |
|
9520 |
|
9521 |
|
9522 |
|
9523 |
|
9524 |
|
9525 |
|
9526 |
|
9527 |
|
9528 | getSource(id: string): Source | undefined;
|
9529 | |
9530 |
|
9531 |
|
9532 |
|
9533 |
|
9534 |
|
9535 |
|
9536 |
|
9537 |
|
9538 |
|
9539 |
|
9540 |
|
9541 |
|
9542 |
|
9543 |
|
9544 |
|
9545 |
|
9546 |
|
9547 |
|
9548 |
|
9549 |
|
9550 |
|
9551 |
|
9552 |
|
9553 |
|
9554 |
|
9555 |
|
9556 |
|
9557 |
|
9558 |
|
9559 |
|
9560 |
|
9561 |
|
9562 |
|
9563 |
|
9564 |
|
9565 |
|
9566 |
|
9567 |
|
9568 |
|
9569 |
|
9570 |
|
9571 |
|
9572 |
|
9573 |
|
9574 | addImage(id: string, image: HTMLImageElement | ImageBitmap | ImageData | {
|
9575 | width: number;
|
9576 | height: number;
|
9577 | data: Uint8Array | Uint8ClampedArray;
|
9578 | } | StyleImageInterface, { pixelRatio, sdf, stretchX, stretchY, content }?: Partial<StyleImageMetadata>): this;
|
9579 | |
9580 |
|
9581 |
|
9582 |
|
9583 |
|
9584 |
|
9585 |
|
9586 |
|
9587 |
|
9588 |
|
9589 |
|
9590 |
|
9591 |
|
9592 |
|
9593 |
|
9594 |
|
9595 |
|
9596 | updateImage(id: string, image: HTMLImageElement | ImageBitmap | ImageData | {
|
9597 | width: number;
|
9598 | height: number;
|
9599 | data: Uint8Array | Uint8ClampedArray;
|
9600 | } | StyleImageInterface): this;
|
9601 | |
9602 |
|
9603 |
|
9604 |
|
9605 |
|
9606 |
|
9607 |
|
9608 |
|
9609 |
|
9610 |
|
9611 |
|
9612 |
|
9613 |
|
9614 | hasImage(id: string): boolean;
|
9615 | |
9616 |
|
9617 |
|
9618 |
|
9619 |
|
9620 |
|
9621 |
|
9622 |
|
9623 |
|
9624 |
|
9625 |
|
9626 |
|
9627 | removeImage(id: string): void;
|
9628 | |
9629 |
|
9630 |
|
9631 |
|
9632 |
|
9633 |
|
9634 |
|
9635 |
|
9636 |
|
9637 |
|
9638 |
|
9639 |
|
9640 |
|
9641 |
|
9642 |
|
9643 |
|
9644 |
|
9645 | loadImage(url: string, callback: GetImageCallback): void;
|
9646 | |
9647 |
|
9648 |
|
9649 |
|
9650 |
|
9651 |
|
9652 |
|
9653 |
|
9654 |
|
9655 |
|
9656 |
|
9657 | listImages(): string[];
|
9658 | |
9659 |
|
9660 |
|
9661 |
|
9662 |
|
9663 |
|
9664 |
|
9665 |
|
9666 |
|
9667 |
|
9668 |
|
9669 |
|
9670 |
|
9671 |
|
9672 |
|
9673 |
|
9674 |
|
9675 |
|
9676 |
|
9677 |
|
9678 |
|
9679 |
|
9680 |
|
9681 |
|
9682 |
|
9683 |
|
9684 |
|
9685 |
|
9686 |
|
9687 |
|
9688 |
|
9689 |
|
9690 |
|
9691 |
|
9692 |
|
9693 |
|
9694 |
|
9695 |
|
9696 |
|
9697 |
|
9698 |
|
9699 |
|
9700 |
|
9701 |
|
9702 |
|
9703 |
|
9704 |
|
9705 |
|
9706 |
|
9707 |
|
9708 |
|
9709 |
|
9710 |
|
9711 |
|
9712 |
|
9713 |
|
9714 |
|
9715 |
|
9716 |
|
9717 |
|
9718 |
|
9719 |
|
9720 |
|
9721 |
|
9722 |
|
9723 |
|
9724 |
|
9725 |
|
9726 |
|
9727 |
|
9728 |
|
9729 |
|
9730 |
|
9731 |
|
9732 |
|
9733 |
|
9734 |
|
9735 |
|
9736 |
|
9737 |
|
9738 |
|
9739 |
|
9740 |
|
9741 |
|
9742 |
|
9743 |
|
9744 |
|
9745 |
|
9746 |
|
9747 |
|
9748 |
|
9749 |
|
9750 |
|
9751 |
|
9752 |
|
9753 |
|
9754 |
|
9755 |
|
9756 |
|
9757 |
|
9758 |
|
9759 |
|
9760 |
|
9761 |
|
9762 |
|
9763 |
|
9764 |
|
9765 |
|
9766 |
|
9767 | addLayer(layer: LayerSpecification | CustomLayerInterface, beforeId?: string): this;
|
9768 | |
9769 |
|
9770 |
|
9771 |
|
9772 |
|
9773 |
|
9774 |
|
9775 |
|
9776 |
|
9777 |
|
9778 |
|
9779 | moveLayer(id: string, beforeId?: string): this;
|
9780 | |
9781 |
|
9782 |
|
9783 |
|
9784 |
|
9785 |
|
9786 |
|
9787 |
|
9788 |
|
9789 |
|
9790 |
|
9791 |
|
9792 | removeLayer(id: string): this;
|
9793 | |
9794 |
|
9795 |
|
9796 |
|
9797 |
|
9798 |
|
9799 |
|
9800 |
|
9801 |
|
9802 |
|
9803 |
|
9804 |
|
9805 |
|
9806 | getLayer(id: string): StyleLayer;
|
9807 | |
9808 |
|
9809 |
|
9810 |
|
9811 |
|
9812 |
|
9813 |
|
9814 |
|
9815 |
|
9816 |
|
9817 |
|
9818 |
|
9819 |
|
9820 |
|
9821 |
|
9822 |
|
9823 |
|
9824 |
|
9825 |
|
9826 |
|
9827 | setLayerZoomRange(layerId: string, minzoom: number, maxzoom: number): this;
|
9828 | |
9829 |
|
9830 |
|
9831 |
|
9832 |
|
9833 |
|
9834 |
|
9835 |
|
9836 |
|
9837 |
|
9838 |
|
9839 |
|
9840 |
|
9841 |
|
9842 |
|
9843 |
|
9844 |
|
9845 |
|
9846 |
|
9847 |
|
9848 |
|
9849 |
|
9850 |
|
9851 |
|
9852 |
|
9853 |
|
9854 |
|
9855 |
|
9856 |
|
9857 |
|
9858 | setFilter(layerId: string, filter?: FilterSpecification | null, options?: StyleSetterOptions): this;
|
9859 | |
9860 |
|
9861 |
|
9862 |
|
9863 |
|
9864 |
|
9865 | getFilter(layerId: string): void | FilterSpecification;
|
9866 | |
9867 |
|
9868 |
|
9869 |
|
9870 |
|
9871 |
|
9872 |
|
9873 |
|
9874 |
|
9875 |
|
9876 |
|
9877 |
|
9878 |
|
9879 |
|
9880 |
|
9881 | setPaintProperty(layerId: string, name: string, value: any, options?: StyleSetterOptions): this;
|
9882 | |
9883 |
|
9884 |
|
9885 |
|
9886 |
|
9887 |
|
9888 |
|
9889 | getPaintProperty(layerId: string, name: string): unknown;
|
9890 | |
9891 |
|
9892 |
|
9893 |
|
9894 |
|
9895 |
|
9896 |
|
9897 |
|
9898 |
|
9899 |
|
9900 |
|
9901 |
|
9902 | setLayoutProperty(layerId: string, name: string, value: any, options?: StyleSetterOptions): this;
|
9903 | |
9904 |
|
9905 |
|
9906 |
|
9907 |
|
9908 |
|
9909 |
|
9910 | getLayoutProperty(layerId: string, name: string): any;
|
9911 | |
9912 |
|
9913 |
|
9914 |
|
9915 |
|
9916 |
|
9917 |
|
9918 |
|
9919 |
|
9920 |
|
9921 | setLight(light: LightSpecification, options?: StyleSetterOptions): this;
|
9922 | |
9923 |
|
9924 |
|
9925 |
|
9926 |
|
9927 | getLight(): any;
|
9928 | |
9929 |
|
9930 |
|
9931 |
|
9932 |
|
9933 |
|
9934 |
|
9935 |
|
9936 |
|
9937 |
|
9938 |
|
9939 |
|
9940 |
|
9941 |
|
9942 |
|
9943 |
|
9944 |
|
9945 |
|
9946 |
|
9947 |
|
9948 |
|
9949 |
|
9950 |
|
9951 |
|
9952 |
|
9953 |
|
9954 |
|
9955 |
|
9956 |
|
9957 |
|
9958 |
|
9959 |
|
9960 |
|
9961 |
|
9962 |
|
9963 |
|
9964 |
|
9965 | setFeatureState(feature: FeatureIdentifier, state: any): this;
|
9966 | |
9967 |
|
9968 |
|
9969 |
|
9970 |
|
9971 |
|
9972 |
|
9973 |
|
9974 |
|
9975 |
|
9976 |
|
9977 |
|
9978 |
|
9979 |
|
9980 |
|
9981 |
|
9982 |
|
9983 |
|
9984 |
|
9985 |
|
9986 |
|
9987 |
|
9988 |
|
9989 |
|
9990 |
|
9991 |
|
9992 |
|
9993 |
|
9994 |
|
9995 |
|
9996 |
|
9997 |
|
9998 |
|
9999 |
|
10000 |
|
10001 |
|
10002 |
|
10003 |
|
10004 |
|
10005 |
|
10006 |
|
10007 |
|
10008 |
|
10009 |
|
10010 |
|
10011 |
|
10012 | removeFeatureState(target: FeatureIdentifier, key?: string): this;
|
10013 | |
10014 |
|
10015 |
|
10016 |
|
10017 |
|
10018 |
|
10019 |
|
10020 |
|
10021 |
|
10022 |
|
10023 |
|
10024 |
|
10025 |
|
10026 |
|
10027 |
|
10028 |
|
10029 |
|
10030 |
|
10031 |
|
10032 |
|
10033 |
|
10034 |
|
10035 |
|
10036 |
|
10037 |
|
10038 |
|
10039 |
|
10040 |
|
10041 |
|
10042 | getFeatureState(feature: FeatureIdentifier): any;
|
10043 | |
10044 |
|
10045 |
|
10046 |
|
10047 |
|
10048 | getContainer(): HTMLElement;
|
10049 | |
10050 |
|
10051 |
|
10052 |
|
10053 |
|
10054 |
|
10055 |
|
10056 |
|
10057 |
|
10058 |
|
10059 |
|
10060 |
|
10061 | getCanvasContainer(): HTMLElement;
|
10062 | |
10063 |
|
10064 |
|
10065 |
|
10066 |
|
10067 |
|
10068 |
|
10069 |
|
10070 | getCanvas(): HTMLCanvasElement;
|
10071 | _containerDimensions(): number[];
|
10072 | _setupContainer(): void;
|
10073 | _resizeCanvas(width: number, height: number, pixelRatio: number): void;
|
10074 | _setupPainter(): void;
|
10075 | _contextLost(event: any): void;
|
10076 | _contextRestored(event: any): void;
|
10077 | _onMapScroll(event: any): boolean;
|
10078 | |
10079 |
|
10080 |
|
10081 |
|
10082 |
|
10083 |
|
10084 |
|
10085 |
|
10086 |
|
10087 | loaded(): boolean;
|
10088 | |
10089 |
|
10090 |
|
10091 |
|
10092 |
|
10093 |
|
10094 |
|
10095 |
|
10096 | _update(updateStyle?: boolean): this;
|
10097 | |
10098 |
|
10099 |
|
10100 |
|
10101 |
|
10102 |
|
10103 | _requestRenderFrame(callback: () => void): TaskID;
|
10104 | _cancelRenderFrame(id: TaskID): void;
|
10105 | |
10106 |
|
10107 |
|
10108 |
|
10109 |
|
10110 |
|
10111 |
|
10112 |
|
10113 |
|
10114 |
|
10115 |
|
10116 |
|
10117 | _render(paintStartTimeStamp: number): this;
|
10118 | |
10119 |
|
10120 |
|
10121 |
|
10122 |
|
10123 |
|
10124 | redraw(): Map;
|
10125 | |
10126 |
|
10127 |
|
10128 |
|
10129 |
|
10130 |
|
10131 |
|
10132 |
|
10133 |
|
10134 | remove(): void;
|
10135 | |
10136 |
|
10137 |
|
10138 |
|
10139 |
|
10140 |
|
10141 |
|
10142 |
|
10143 |
|
10144 | triggerRepaint(): void;
|
10145 | _onWindowOnline(): void;
|
10146 | _onWindowResize(event: Event): void;
|
10147 | |
10148 |
|
10149 |
|
10150 |
|
10151 |
|
10152 |
|
10153 |
|
10154 |
|
10155 |
|
10156 |
|
10157 |
|
10158 |
|
10159 |
|
10160 |
|
10161 |
|
10162 | get showTileBoundaries(): boolean;
|
10163 | set showTileBoundaries(value: boolean);
|
10164 | |
10165 |
|
10166 |
|
10167 |
|
10168 |
|
10169 |
|
10170 |
|
10171 |
|
10172 |
|
10173 | get showPadding(): boolean;
|
10174 | set showPadding(value: boolean);
|
10175 | |
10176 |
|
10177 |
|
10178 |
|
10179 |
|
10180 |
|
10181 |
|
10182 |
|
10183 |
|
10184 |
|
10185 |
|
10186 | get showCollisionBoxes(): boolean;
|
10187 | set showCollisionBoxes(value: boolean);
|
10188 | get showOverdrawInspector(): boolean;
|
10189 | set showOverdrawInspector(value: boolean);
|
10190 | |
10191 |
|
10192 |
|
10193 |
|
10194 |
|
10195 |
|
10196 |
|
10197 |
|
10198 |
|
10199 | get repaint(): boolean;
|
10200 | set repaint(value: boolean);
|
10201 | get vertices(): boolean;
|
10202 | set vertices(value: boolean);
|
10203 | _setCacheLimits(limit: number, checkThreshold: number): void;
|
10204 | }
|
10205 | export declare type NavigationOptions = {
|
10206 | showCompass?: boolean;
|
10207 | showZoom?: boolean;
|
10208 | visualizePitch?: boolean;
|
10209 | };
|
10210 | export declare class NavigationControl implements IControl {
|
10211 | _map: Map;
|
10212 | options: NavigationOptions;
|
10213 | _container: HTMLElement;
|
10214 | _zoomInButton: HTMLButtonElement;
|
10215 | _zoomOutButton: HTMLButtonElement;
|
10216 | _compass: HTMLButtonElement;
|
10217 | _compassIcon: HTMLElement;
|
10218 | _handler: MouseRotateWrapper;
|
10219 | constructor(options: NavigationOptions);
|
10220 | _updateZoomButtons(): void;
|
10221 | _rotateCompassArrow(): void;
|
10222 | onAdd(map: Map): HTMLElement;
|
10223 | onRemove(): void;
|
10224 | _createButton(className: string, fn: (e?: any) => unknown): HTMLButtonElement;
|
10225 | _setButtonTitle(button: HTMLButtonElement, title: string): void;
|
10226 | }
|
10227 | export declare class MouseRotateWrapper {
|
10228 | map: Map;
|
10229 | _clickTolerance: number;
|
10230 | element: HTMLElement;
|
10231 | mouseRotate: MouseRotateHandler;
|
10232 | mousePitch: MousePitchHandler;
|
10233 | _startPos: Point;
|
10234 | _lastPos: Point;
|
10235 | constructor(map: Map, element: HTMLElement, pitch?: boolean);
|
10236 | down(e: MouseEvent, point: Point): void;
|
10237 | move(e: MouseEvent, point: Point): void;
|
10238 | off(): void;
|
10239 | offTemp(): void;
|
10240 | mousedown(e: MouseEvent): void;
|
10241 | mousemove(e: MouseEvent): void;
|
10242 | mouseup(e: MouseEvent): void;
|
10243 | touchstart(e: TouchEvent): void;
|
10244 | touchmove(e: TouchEvent): void;
|
10245 | touchend(e: TouchEvent): void;
|
10246 | reset(): void;
|
10247 | }
|
10248 | export declare type PositionAnchor = "center" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
10249 | export declare type Offset = number | PointLike | {
|
10250 | [_ in PositionAnchor]: PointLike;
|
10251 | };
|
10252 | export declare type PopupOptions = {
|
10253 | closeButton?: boolean;
|
10254 | closeOnClick?: boolean;
|
10255 | closeOnMove?: boolean;
|
10256 | focusAfterOpen?: boolean;
|
10257 | anchor?: PositionAnchor;
|
10258 | offset?: Offset;
|
10259 | className?: string;
|
10260 | maxWidth?: string;
|
10261 | };
|
10262 | export declare class Popup extends Evented {
|
10263 | _map: Map;
|
10264 | options: PopupOptions;
|
10265 | _content: HTMLElement;
|
10266 | _container: HTMLElement;
|
10267 | _closeButton: HTMLButtonElement;
|
10268 | _tip: HTMLElement;
|
10269 | _lngLat: LngLat;
|
10270 | _trackPointer: boolean;
|
10271 | _pos: Point;
|
10272 | constructor(options?: PopupOptions);
|
10273 | |
10274 |
|
10275 |
|
10276 |
|
10277 |
|
10278 |
|
10279 |
|
10280 |
|
10281 |
|
10282 |
|
10283 |
|
10284 |
|
10285 |
|
10286 |
|
10287 |
|
10288 | addTo(map: Map): this;
|
10289 | |
10290 |
|
10291 |
|
10292 | isOpen(): boolean;
|
10293 | |
10294 |
|
10295 |
|
10296 |
|
10297 |
|
10298 |
|
10299 |
|
10300 |
|
10301 | remove(): this;
|
10302 | |
10303 |
|
10304 |
|
10305 |
|
10306 |
|
10307 |
|
10308 |
|
10309 |
|
10310 |
|
10311 | getLngLat(): LngLat;
|
10312 | |
10313 |
|
10314 |
|
10315 |
|
10316 |
|
10317 |
|
10318 | setLngLat(lnglat: LngLatLike): this;
|
10319 | |
10320 |
|
10321 |
|
10322 |
|
10323 |
|
10324 |
|
10325 |
|
10326 |
|
10327 |
|
10328 |
|
10329 | trackPointer(): this;
|
10330 | |
10331 |
|
10332 |
|
10333 |
|
10334 |
|
10335 |
|
10336 |
|
10337 |
|
10338 |
|
10339 |
|
10340 |
|
10341 |
|
10342 | getElement(): HTMLElement;
|
10343 | |
10344 |
|
10345 |
|
10346 |
|
10347 |
|
10348 |
|
10349 |
|
10350 |
|
10351 |
|
10352 |
|
10353 |
|
10354 |
|
10355 |
|
10356 |
|
10357 |
|
10358 | setText(text: string): this;
|
10359 | |
10360 |
|
10361 |
|
10362 |
|
10363 |
|
10364 |
|
10365 |
|
10366 |
|
10367 |
|
10368 |
|
10369 |
|
10370 |
|
10371 |
|
10372 |
|
10373 |
|
10374 |
|
10375 |
|
10376 |
|
10377 |
|
10378 | setHTML(html: string): this;
|
10379 | |
10380 |
|
10381 |
|
10382 |
|
10383 |
|
10384 | getMaxWidth(): string;
|
10385 | |
10386 |
|
10387 |
|
10388 |
|
10389 |
|
10390 |
|
10391 |
|
10392 | setMaxWidth(maxWidth: string): this;
|
10393 | |
10394 |
|
10395 |
|
10396 |
|
10397 |
|
10398 |
|
10399 |
|
10400 |
|
10401 |
|
10402 |
|
10403 |
|
10404 |
|
10405 |
|
10406 |
|
10407 | setDOMContent(htmlNode: Node): this;
|
10408 | |
10409 |
|
10410 |
|
10411 |
|
10412 |
|
10413 |
|
10414 |
|
10415 |
|
10416 |
|
10417 | addClassName(className: string): void;
|
10418 | |
10419 |
|
10420 |
|
10421 |
|
10422 |
|
10423 |
|
10424 |
|
10425 |
|
10426 |
|
10427 | removeClassName(className: string): void;
|
10428 | |
10429 |
|
10430 |
|
10431 |
|
10432 |
|
10433 |
|
10434 | setOffset(offset?: Offset): this;
|
10435 | |
10436 |
|
10437 |
|
10438 |
|
10439 |
|
10440 |
|
10441 |
|
10442 |
|
10443 |
|
10444 |
|
10445 |
|
10446 | toggleClassName(className: string): boolean;
|
10447 | _createCloseButton(): void;
|
10448 | _onMouseUp(event: MapMouseEvent): void;
|
10449 | _onMouseMove(event: MapMouseEvent): void;
|
10450 | _onDrag(event: MapMouseEvent): void;
|
10451 | _update(cursor?: Point): void;
|
10452 | _focusFirstElement(): void;
|
10453 | _onClose(): void;
|
10454 | }
|
10455 | export declare type MarkerOptions = {
|
10456 | element?: HTMLElement;
|
10457 | offset?: PointLike;
|
10458 | anchor?: PositionAnchor;
|
10459 | color?: string;
|
10460 | scale?: number;
|
10461 | draggable?: boolean;
|
10462 | clickTolerance?: number;
|
10463 | rotation?: number;
|
10464 | rotationAlignment?: string;
|
10465 | pitchAlignment?: string;
|
10466 | };
|
10467 | export declare class Marker extends Evented {
|
10468 | _map: Map;
|
10469 | _anchor: PositionAnchor;
|
10470 | _offset: Point;
|
10471 | _element: HTMLElement;
|
10472 | _popup: Popup;
|
10473 | _lngLat: LngLat;
|
10474 | _pos: Point;
|
10475 | _color: string;
|
10476 | _scale: number;
|
10477 | _defaultMarker: boolean;
|
10478 | _draggable: boolean;
|
10479 | _clickTolerance: number;
|
10480 | _isDragging: boolean;
|
10481 | _state: "inactive" | "pending" | "active";
|
10482 | _positionDelta: Point;
|
10483 | _pointerdownPos: Point;
|
10484 | _rotation: number;
|
10485 | _pitchAlignment: string;
|
10486 | _rotationAlignment: string;
|
10487 | _originalTabIndex: string;
|
10488 | constructor(options?: MarkerOptions, legacyOptions?: MarkerOptions);
|
10489 | |
10490 |
|
10491 |
|
10492 |
|
10493 |
|
10494 |
|
10495 |
|
10496 |
|
10497 |
|
10498 | addTo(map: Map): this;
|
10499 | |
10500 |
|
10501 |
|
10502 |
|
10503 |
|
10504 |
|
10505 |
|
10506 | remove(): this;
|
10507 | |
10508 |
|
10509 |
|
10510 |
|
10511 |
|
10512 |
|
10513 |
|
10514 |
|
10515 |
|
10516 |
|
10517 |
|
10518 |
|
10519 |
|
10520 |
|
10521 |
|
10522 | getLngLat(): LngLat;
|
10523 | |
10524 |
|
10525 |
|
10526 |
|
10527 |
|
10528 |
|
10529 |
|
10530 |
|
10531 |
|
10532 |
|
10533 |
|
10534 |
|
10535 | setLngLat(lnglat: LngLatLike): this;
|
10536 | |
10537 |
|
10538 |
|
10539 |
|
10540 | getElement(): HTMLElement;
|
10541 | |
10542 |
|
10543 |
|
10544 |
|
10545 |
|
10546 |
|
10547 |
|
10548 |
|
10549 |
|
10550 |
|
10551 |
|
10552 |
|
10553 | setPopup(popup?: Popup | null): this;
|
10554 | _onKeyPress(e: KeyboardEvent): void;
|
10555 | _onMapClick(e: MapMouseEvent): void;
|
10556 | |
10557 |
|
10558 |
|
10559 |
|
10560 |
|
10561 |
|
10562 |
|
10563 |
|
10564 |
|
10565 |
|
10566 |
|
10567 | getPopup(): Popup;
|
10568 | |
10569 |
|
10570 |
|
10571 |
|
10572 |
|
10573 |
|
10574 |
|
10575 |
|
10576 |
|
10577 |
|
10578 |
|
10579 | togglePopup(): this;
|
10580 | _update(e?: {
|
10581 | type: "move" | "moveend";
|
10582 | }): void;
|
10583 | |
10584 |
|
10585 |
|
10586 |
|
10587 | getOffset(): Point;
|
10588 | |
10589 |
|
10590 |
|
10591 |
|
10592 |
|
10593 | setOffset(offset: PointLike): this;
|
10594 | _onMove(e: MapMouseEvent | MapTouchEvent): void;
|
10595 | _onUp(): void;
|
10596 | _addDragHandler(e: MapMouseEvent | MapTouchEvent): void;
|
10597 | |
10598 |
|
10599 |
|
10600 |
|
10601 |
|
10602 | setDraggable(shouldBeDraggable: boolean): this;
|
10603 | |
10604 |
|
10605 |
|
10606 |
|
10607 | isDraggable(): boolean;
|
10608 | |
10609 |
|
10610 |
|
10611 |
|
10612 |
|
10613 | setRotation(rotation: number): this;
|
10614 | |
10615 |
|
10616 |
|
10617 |
|
10618 | getRotation(): number;
|
10619 | |
10620 |
|
10621 |
|
10622 |
|
10623 |
|
10624 | setRotationAlignment(alignment: string): this;
|
10625 | |
10626 |
|
10627 |
|
10628 |
|
10629 | getRotationAlignment(): string;
|
10630 | |
10631 |
|
10632 |
|
10633 |
|
10634 |
|
10635 | setPitchAlignment(alignment: string): this;
|
10636 | |
10637 |
|
10638 |
|
10639 |
|
10640 | getPitchAlignment(): string;
|
10641 | }
|
10642 | export declare type GeolocateOptions = {
|
10643 | positionOptions?: PositionOptions;
|
10644 | fitBoundsOptions?: FitBoundsOptions;
|
10645 | trackUserLocation?: boolean;
|
10646 | showAccuracyCircle?: boolean;
|
10647 | showUserLocation?: boolean;
|
10648 | };
|
10649 | export declare class GeolocateControl extends Evented implements IControl {
|
10650 | _map: Map;
|
10651 | options: GeolocateOptions;
|
10652 | _container: HTMLElement;
|
10653 | _dotElement: HTMLElement;
|
10654 | _circleElement: HTMLElement;
|
10655 | _geolocateButton: HTMLButtonElement;
|
10656 | _geolocationWatchID: number;
|
10657 | _timeoutId: ReturnType<typeof setTimeout>;
|
10658 | _watchState: "OFF" | "ACTIVE_LOCK" | "WAITING_ACTIVE" | "ACTIVE_ERROR" | "BACKGROUND" | "BACKGROUND_ERROR";
|
10659 | _lastKnownPosition: any;
|
10660 | _userLocationDotMarker: Marker;
|
10661 | _accuracyCircleMarker: Marker;
|
10662 | _accuracy: number;
|
10663 | _setup: boolean;
|
10664 | constructor(options: GeolocateOptions);
|
10665 | onAdd(map: Map): HTMLElement;
|
10666 | onRemove(): void;
|
10667 | |
10668 |
|
10669 |
|
10670 |
|
10671 |
|
10672 |
|
10673 |
|
10674 | _isOutOfMapMaxBounds(position: GeolocationPosition): boolean;
|
10675 | _setErrorState(): void;
|
10676 | |
10677 |
|
10678 |
|
10679 |
|
10680 |
|
10681 |
|
10682 | _onSuccess(position: GeolocationPosition): void;
|
10683 | |
10684 |
|
10685 |
|
10686 |
|
10687 |
|
10688 |
|
10689 | _updateCamera(position: GeolocationPosition): void;
|
10690 | |
10691 |
|
10692 |
|
10693 |
|
10694 |
|
10695 |
|
10696 | _updateMarker(position?: GeolocationPosition | null): void;
|
10697 | _updateCircleRadius(): void;
|
10698 | _onZoom(): void;
|
10699 | _onError(error: GeolocationPositionError): void;
|
10700 | _finish(): void;
|
10701 | _setupUI(supported: boolean): void;
|
10702 | |
10703 |
|
10704 |
|
10705 |
|
10706 |
|
10707 |
|
10708 |
|
10709 |
|
10710 |
|
10711 |
|
10712 |
|
10713 |
|
10714 |
|
10715 |
|
10716 |
|
10717 |
|
10718 |
|
10719 |
|
10720 | trigger(): boolean;
|
10721 | _clearWatch(): void;
|
10722 | }
|
10723 | export declare type AttributionOptions = {
|
10724 | compact?: boolean;
|
10725 | customAttribution?: string | Array<string>;
|
10726 | };
|
10727 | export declare class AttributionControl implements IControl {
|
10728 | options: AttributionOptions;
|
10729 | _map: Map;
|
10730 | _compact: boolean;
|
10731 | _container: HTMLElement;
|
10732 | _innerContainer: HTMLElement;
|
10733 | _compactButton: HTMLElement;
|
10734 | _editLink: HTMLAnchorElement;
|
10735 | _attribHTML: string;
|
10736 | styleId: string;
|
10737 | styleOwner: string;
|
10738 | constructor(options?: AttributionOptions);
|
10739 | getDefaultPosition(): ControlPosition;
|
10740 | onAdd(map: Map): HTMLElement;
|
10741 | onRemove(): void;
|
10742 | _setElementTitle(element: HTMLElement, title: string): void;
|
10743 | _toggleAttribution(): void;
|
10744 | _updateData(e: any): void;
|
10745 | _updateAttributions(): void;
|
10746 | _updateCompact(): void;
|
10747 | _updateCompactMinimize(): void;
|
10748 | }
|
10749 | export declare type LogoOptions = {
|
10750 | compact?: boolean;
|
10751 | };
|
10752 | export declare class LogoControl implements IControl {
|
10753 | options: LogoOptions;
|
10754 | _map: Map;
|
10755 | _compact: boolean;
|
10756 | _container: HTMLElement;
|
10757 | constructor(options?: LogoOptions);
|
10758 | getDefaultPosition(): ControlPosition;
|
10759 | onAdd(map: Map): HTMLElement;
|
10760 | onRemove(): void;
|
10761 | _updateCompact(): void;
|
10762 | }
|
10763 | export declare type Unit = "imperial" | "metric" | "nautical";
|
10764 | export declare type ScaleOptions = {
|
10765 | maxWidth?: number;
|
10766 | unit?: Unit;
|
10767 | };
|
10768 | export declare class ScaleControl implements IControl {
|
10769 | _map: Map;
|
10770 | _container: HTMLElement;
|
10771 | options: ScaleOptions;
|
10772 | constructor(options: ScaleOptions);
|
10773 | getDefaultPosition(): ControlPosition;
|
10774 | _onMove(): void;
|
10775 | onAdd(map: Map): HTMLElement;
|
10776 | onRemove(): void;
|
10777 | |
10778 |
|
10779 |
|
10780 |
|
10781 |
|
10782 | setUnit(unit: Unit): void;
|
10783 | }
|
10784 | export declare type FullscreenOptions = {
|
10785 | container?: HTMLElement;
|
10786 | };
|
10787 | export declare class FullscreenControl implements IControl {
|
10788 | _map: Map;
|
10789 | _controlContainer: HTMLElement;
|
10790 | _fullscreen: boolean;
|
10791 | _fullscreenchange: string;
|
10792 | _fullscreenButton: HTMLButtonElement;
|
10793 | _container: HTMLElement;
|
10794 | constructor(options: FullscreenOptions);
|
10795 | onAdd(map: Map): HTMLElement;
|
10796 | onRemove(): void;
|
10797 | _checkFullscreenSupport(): boolean;
|
10798 | _setupUI(): void;
|
10799 | _updateTitle(): void;
|
10800 | _getTitle(): any;
|
10801 | _isFullscreen(): boolean;
|
10802 | _changeIcon(): void;
|
10803 | _onClickFullscreen(): void;
|
10804 | }
|
10805 | declare function prewarm(): void;
|
10806 | declare function clearPrewarmedResources(): void;
|
10807 | export declare class RasterDEMTileSource extends RasterTileSource implements Source {
|
10808 | encoding: "mapbox" | "terrarium";
|
10809 | constructor(id: string, options: RasterDEMSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
10810 | serialize(): {
|
10811 | type: string;
|
10812 | url: string;
|
10813 | tileSize: number;
|
10814 | tiles: string[];
|
10815 | bounds: [
|
10816 | number,
|
10817 | number,
|
10818 | number,
|
10819 | number
|
10820 | ];
|
10821 | encoding: "mapbox" | "terrarium";
|
10822 | };
|
10823 | loadTile(tile: Tile, callback: Callback<void>): void;
|
10824 | _getNeighboringTiles(tileID: OverscaledTileID): {};
|
10825 | unloadTile(tile: Tile): void;
|
10826 | }
|
10827 | export declare class VideoSource extends ImageSource {
|
10828 | options: VideoSourceSpecification;
|
10829 | urls: Array<string>;
|
10830 | video: HTMLVideoElement;
|
10831 | roundZoom: boolean;
|
10832 | |
10833 |
|
10834 |
|
10835 | constructor(id: string, options: VideoSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
10836 | load(): void;
|
10837 | |
10838 |
|
10839 |
|
10840 | pause(): void;
|
10841 | |
10842 |
|
10843 |
|
10844 | play(): void;
|
10845 | |
10846 |
|
10847 |
|
10848 |
|
10849 | seek(seconds: number): void;
|
10850 | |
10851 |
|
10852 |
|
10853 |
|
10854 |
|
10855 | getVideo(): HTMLVideoElement;
|
10856 | onAdd(map: Map): void;
|
10857 | |
10858 |
|
10859 |
|
10860 |
|
10861 |
|
10862 |
|
10863 |
|
10864 |
|
10865 | prepare(): void;
|
10866 | serialize(): {
|
10867 | type: string;
|
10868 | urls: string[];
|
10869 | coordinates: Coordinates;
|
10870 | };
|
10871 | hasTransition(): boolean;
|
10872 | }
|
10873 | declare const exported: {
|
10874 | supported: import("@mapbox/mapbox-gl-supported").IsSupported;
|
10875 | setRTLTextPlugin: (url: string, callback: (error?: Error) => void, deferred?: boolean) => void;
|
10876 | getRTLTextPluginStatus: () => string;
|
10877 | Map: typeof Map;
|
10878 | NavigationControl: typeof NavigationControl;
|
10879 | GeolocateControl: typeof GeolocateControl;
|
10880 | AttributionControl: typeof AttributionControl;
|
10881 | LogoControl: typeof LogoControl;
|
10882 | ScaleControl: typeof ScaleControl;
|
10883 | FullscreenControl: typeof FullscreenControl;
|
10884 | Popup: typeof Popup;
|
10885 | Marker: typeof Marker;
|
10886 | Style: typeof Style;
|
10887 | LngLat: typeof LngLat;
|
10888 | LngLatBounds: typeof LngLatBounds;
|
10889 | Point: typeof Point;
|
10890 | MercatorCoordinate: typeof MercatorCoordinate;
|
10891 | Evented: typeof Evented;
|
10892 | AJAXError: typeof AJAXError;
|
10893 | config: {
|
10894 | MAX_PARALLEL_IMAGE_REQUESTS: number;
|
10895 | REGISTERED_PROTOCOLS: {
|
10896 | [x: string]: any;
|
10897 | };
|
10898 | };
|
10899 | CanvasSource: typeof CanvasSource;
|
10900 | GeoJSONSource: typeof GeoJSONSource;
|
10901 | ImageSource: typeof ImageSource;
|
10902 | RasterDEMTileSource: typeof RasterDEMTileSource;
|
10903 | RasterTileSource: typeof RasterTileSource;
|
10904 | VectorTileSource: typeof VectorTileSource;
|
10905 | VideoSource: typeof VideoSource;
|
10906 | |
10907 |
|
10908 |
|
10909 |
|
10910 |
|
10911 |
|
10912 |
|
10913 |
|
10914 |
|
10915 |
|
10916 |
|
10917 |
|
10918 |
|
10919 |
|
10920 |
|
10921 |
|
10922 |
|
10923 |
|
10924 |
|
10925 |
|
10926 |
|
10927 | prewarm: typeof prewarm;
|
10928 | |
10929 |
|
10930 |
|
10931 |
|
10932 |
|
10933 |
|
10934 |
|
10935 |
|
10936 |
|
10937 |
|
10938 | clearPrewarmedResources: typeof clearPrewarmedResources;
|
10939 | |
10940 |
|
10941 |
|
10942 |
|
10943 |
|
10944 |
|
10945 |
|
10946 |
|
10947 |
|
10948 |
|
10949 | workerCount: number;
|
10950 | |
10951 |
|
10952 |
|
10953 |
|
10954 |
|
10955 |
|
10956 |
|
10957 |
|
10958 |
|
10959 | maxParallelImageRequests: number;
|
10960 | |
10961 |
|
10962 |
|
10963 |
|
10964 |
|
10965 |
|
10966 |
|
10967 |
|
10968 |
|
10969 |
|
10970 |
|
10971 |
|
10972 |
|
10973 |
|
10974 |
|
10975 |
|
10976 |
|
10977 | clearStorage(callback?: (err?: Error | null) => void): void;
|
10978 | workerUrl: string;
|
10979 | |
10980 |
|
10981 |
|
10982 |
|
10983 |
|
10984 |
|
10985 |
|
10986 |
|
10987 |
|
10988 |
|
10989 |
|
10990 |
|
10991 |
|
10992 |
|
10993 |
|
10994 |
|
10995 |
|
10996 |
|
10997 |
|
10998 |
|
10999 |
|
11000 |
|
11001 |
|
11002 |
|
11003 |
|
11004 |
|
11005 |
|
11006 |
|
11007 |
|
11008 |
|
11009 |
|
11010 |
|
11011 |
|
11012 | addProtocol(customProtocol: string, loadFn: (requestParameters: RequestParameters, callback: ResponseCallback<any>) => Cancelable): void;
|
11013 | |
11014 |
|
11015 |
|
11016 |
|
11017 |
|
11018 |
|
11019 |
|
11020 |
|
11021 | removeProtocol(customProtocol: string): void;
|
11022 | };
|
11023 |
|
11024 |
|
11025 |
|
11026 |
|
11027 |
|
11028 |
|
11029 |
|
11030 |
|
11031 |
|
11032 |
|
11033 |
|
11034 |
|
11035 |
|
11036 |
|
11037 |
|
11038 |
|
11039 |
|
11040 |
|
11041 |
|
11042 |
|
11043 |
|
11044 |
|
11045 |
|
11046 |
|
11047 |
|
11048 |
|
11049 |
|
11050 |
|
11051 |
|
11052 |
|
11053 |
|
11054 |
|
11055 |
|
11056 |
|
11057 |
|
11058 |
|
11059 |
|
11060 |
|
11061 | export default exported;
|
11062 |
|
11063 | export as namespace maplibregl;
|
11064 |
|
11065 | export {};
|
11066 |
|
\ | No newline at end of file |