1 | import { ExtrusionFeature } from '@here/harp-materials';
|
2 | import { Frustum } from 'three';
|
3 | import { Matrix4 } from 'three';
|
4 | import { Plane } from 'three';
|
5 | import { Ray } from 'three';
|
6 | import * as THREE_2 from 'three';
|
7 | import { Vector3 } from 'three';
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare function addBuffersToTransferList(technique: Technique, transferList: ArrayBuffer[]): void;
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | declare interface AdditionParameters {
|
18 | |
19 |
|
20 |
|
21 | path?: THREE_2.Path | THREE_2.CurvePath<THREE_2.Vector2>;
|
22 | |
23 |
|
24 |
|
25 | pathOverflow?: boolean;
|
26 | |
27 |
|
28 |
|
29 | layer?: number;
|
30 | |
31 |
|
32 |
|
33 |
|
34 | updatePosition?: boolean;
|
35 | |
36 |
|
37 |
|
38 | pickingData?: any;
|
39 | |
40 |
|
41 |
|
42 |
|
43 | letterCaseArray?: boolean[];
|
44 | }
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 | export declare interface AmbientLight extends BaseLight {
|
65 | type: "ambient";
|
66 | |
67 |
|
68 |
|
69 | color: string;
|
70 | intensity?: number;
|
71 | }
|
72 |
|
73 |
|
74 |
|
75 |
|
76 | export declare class AnimatedExtrusionHandler {
|
77 | private m_mapView;
|
78 | |
79 |
|
80 |
|
81 | enabled: boolean;
|
82 | |
83 |
|
84 |
|
85 | duration: number;
|
86 | private m_minZoomLevel;
|
87 | private m_forceEnabled;
|
88 | private m_tileMap;
|
89 | private m_state;
|
90 | private m_startTime;
|
91 | |
92 |
|
93 |
|
94 |
|
95 |
|
96 | constructor(m_mapView: MapView);
|
97 | /**
|
98 | * Returns whether the extrusion animation is force enabled or not.
|
99 | */
|
100 | get forceEnabled(): boolean;
|
101 | /**
|
102 | * If `forceEnabled` is set to `true` then `animateExtrusion` and `animateExtrusionDuration`
|
103 | * values from [[extrudedPolygonTechnique]] will be ignored and
|
104 | * `AnimatedExtrusionHandler.enabled` with `AnimatedExtrusionHandler.duration` will be used
|
105 | */
|
106 | set forceEnabled(force: boolean);
|
107 | /**
|
108 | * Gets min zoom level at which extruded animation is enabled.
|
109 | */
|
110 | get minZoomLevel(): number;
|
111 | /**
|
112 | * Sets the extrusion animation properties obtained from a given technique.
|
113 | * @internal
|
114 | * @param technique - The technique where the extrusion animation properties are defined.
|
115 | * @param env - The environment used to evaluate technique properties.
|
116 | * @returns True if the technique has animation enabled (or animation is forced), false
|
117 | * otherwise.
|
118 | */
|
119 | setAnimationProperties(technique: Technique, env: MapEnv): boolean;
|
120 | /**
|
121 | * Updates the extrusion animation for every frame.
|
122 | * @internal
|
123 | */
|
124 | update(zoomLevel: number): void;
|
125 | /**
|
126 | * Adds a tile to be animated.
|
127 | * @internal
|
128 | * @param tile - The tile to be animated.
|
129 | * @param materials - Extruded materials belonging to the tile.
|
130 | */
|
131 | add(tile: Tile, materials: ExtrusionFeature[]): void;
|
132 | /**
|
133 | * Is `true` if there's any extrusion animation ongoing.
|
134 | */
|
135 | get isAnimating(): boolean;
|
136 | private skipAnimation;
|
137 | private wasAnyAncestorAnimated;
|
138 | private wasAnyDescendantAnimated;
|
139 | private removeTile;
|
140 | private animateExtrusion;
|
141 | private resetAnimation;
|
142 | private setExtrusionRatio;
|
143 | private setTileExtrusionRatio;
|
144 | }
|
145 |
|
146 | /**
|
147 | * Animation states for extrusion effect
|
148 | */
|
149 | export declare enum AnimatedExtrusionState {
|
150 | None = 0,
|
151 | Started = 1,
|
152 | Finished = 2
|
153 | }
|
154 |
|
155 | export declare enum APIFormat {
|
156 | |
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 | HereV1 = 0,
|
176 | |
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 | MapboxV4 = 1,
|
191 | |
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 | XYZMVT = 2,
|
206 | |
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 | XYZJson = 3,
|
221 | |
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 | XYZOMV = 4,
|
236 | |
237 |
|
238 |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 |
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 | TomtomV1 = 5,
|
251 | |
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 | XYZSpace = 6
|
266 | }
|
267 |
|
268 |
|
269 |
|
270 |
|
271 | declare interface ApiKeyAuthentication {
|
272 | |
273 |
|
274 |
|
275 |
|
276 | apikey: string;
|
277 | }
|
278 |
|
279 |
|
280 |
|
281 |
|
282 | declare interface AppIdAuthentication {
|
283 | |
284 |
|
285 |
|
286 |
|
287 | appId: string;
|
288 | |
289 |
|
290 |
|
291 |
|
292 | appCode: string;
|
293 | }
|
294 |
|
295 |
|
296 |
|
297 |
|
298 |
|
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 |
|
313 | export declare function applyBaseColorToMaterial(material: THREE_2.Material, materialColor: THREE_2.Color, technique: Technique, techniqueColor: Value, env?: Env): void;
|
314 |
|
315 |
|
316 |
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 |
|
323 |
|
324 |
|
325 |
|
326 |
|
327 |
|
328 |
|
329 |
|
330 | export declare function applySecondaryColorToMaterial(materialColor: THREE_2.Color, techniqueColor: Value | Expr, env?: Env): void;
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 | export declare interface AreaCopyrightInfo {
|
338 | |
339 |
|
340 |
|
341 | minLevel?: number;
|
342 | |
343 |
|
344 |
|
345 | maxLevel?: number;
|
346 | |
347 |
|
348 |
|
349 | label: string;
|
350 | |
351 |
|
352 |
|
353 | alt?: string;
|
354 | |
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 | boxes?: Array<[number, number, number, number]>;
|
361 | }
|
362 |
|
363 |
|
364 |
|
365 |
|
366 | export declare enum AtmosphereLightMode {
|
367 | LightOverhead = 0,
|
368 | LightDynamic = 1
|
369 | }
|
370 |
|
371 |
|
372 |
|
373 |
|
374 | declare enum AtmosphereShadingVariant {
|
375 | ScatteringShader = 0,
|
376 | SimpleColor = 1,
|
377 | Wireframe = 2
|
378 | }
|
379 |
|
380 |
|
381 |
|
382 |
|
383 | declare enum AtmosphereVariant {
|
384 | Ground = 1,
|
385 | Sky = 2,
|
386 | SkyAndGround = 3
|
387 | }
|
388 |
|
389 |
|
390 |
|
391 |
|
392 |
|
393 | export declare interface Attachment {
|
394 | |
395 |
|
396 |
|
397 | uuid?: string;
|
398 | |
399 |
|
400 |
|
401 | name?: string;
|
402 | |
403 |
|
404 |
|
405 |
|
406 | index?: BufferAttribute;
|
407 | |
408 |
|
409 |
|
410 | edgeIndex?: BufferAttribute;
|
411 | |
412 |
|
413 |
|
414 | groups: Group[];
|
415 | }
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 | declare type Attr_2<T> = {
|
444 | [P in keyof T]?: T[P] | JsonExpr;
|
445 | };
|
446 | export { Attr_2 as Attr }
|
447 |
|
448 | declare interface AttrEvaluationContext {
|
449 | |
450 |
|
451 |
|
452 | env: MapEnv;
|
453 | |
454 |
|
455 |
|
456 |
|
457 |
|
458 | cachedExprResults?: Map<Expr, Value>;
|
459 | }
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 | export declare type AttributeMap = {} | number;
|
466 |
|
467 | declare enum AttrScope {
|
468 | |
469 |
|
470 |
|
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 |
|
477 | FeatureGeometry = 0,
|
478 | |
479 |
|
480 |
|
481 |
|
482 |
|
483 |
|
484 |
|
485 |
|
486 |
|
487 | TechniqueGeometry = 1,
|
488 | |
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 | TechniqueRendering = 2
|
496 | }
|
497 |
|
498 |
|
499 |
|
500 |
|
501 |
|
502 | export declare type AuthenticationCodeProvider = () => Promise<string>;
|
503 |
|
504 | export declare enum AuthenticationMethod {
|
505 | QueryString = 0,
|
506 | AuthorizationHeader = 1
|
507 | }
|
508 |
|
509 | export declare interface AuthenticationMethodInfo {
|
510 | method: AuthenticationMethod;
|
511 | name?: string;
|
512 | }
|
513 |
|
514 |
|
515 |
|
516 |
|
517 | declare type AuthenticationProvider = () => Promise<string>;
|
518 |
|
519 | export declare const AuthenticationTypeAccessToken: AuthenticationMethodInfo;
|
520 |
|
521 |
|
522 |
|
523 |
|
524 |
|
525 |
|
526 | export declare const AuthenticationTypeBearer: AuthenticationMethodInfo;
|
527 |
|
528 |
|
529 |
|
530 |
|
531 |
|
532 |
|
533 | export declare const AuthenticationTypeTomTomV1: AuthenticationMethodInfo;
|
534 |
|
535 |
|
536 |
|
537 |
|
538 | export declare const BASE_TECHNIQUE_NON_MATERIAL_PROPS: string[];
|
539 |
|
540 | export declare interface BaseLight {
|
541 | type: string;
|
542 | name: string;
|
543 | }
|
544 |
|
545 |
|
546 |
|
547 |
|
548 |
|
549 |
|
550 | export declare type BaseStyle<Technique, Params> = Partial<Params> & {
|
551 | |
552 |
|
553 |
|
554 | description?: string;
|
555 | |
556 |
|
557 |
|
558 | styleSet?: string;
|
559 | |
560 |
|
561 |
|
562 | category?: string | JsonExpr;
|
563 | |
564 |
|
565 |
|
566 |
|
567 |
|
568 |
|
569 |
|
570 |
|
571 | technique: Technique;
|
572 | |
573 |
|
574 |
|
575 |
|
576 |
|
577 |
|
578 |
|
579 | renderOrder?: number | JsonExpr;
|
580 | |
581 |
|
582 |
|
583 | minZoomLevel?: number | JsonExpr;
|
584 | |
585 |
|
586 |
|
587 | maxZoomLevel?: number | JsonExpr;
|
588 | |
589 |
|
590 |
|
591 |
|
592 | transient?: boolean;
|
593 | |
594 |
|
595 |
|
596 |
|
597 | debug?: boolean;
|
598 | |
599 |
|
600 |
|
601 |
|
602 |
|
603 | metricUnit?: "Meter" | "Pixel";
|
604 | |
605 |
|
606 |
|
607 | labelProperty?: string;
|
608 | attr?: Partial<Params>;
|
609 | };
|
610 |
|
611 |
|
612 |
|
613 |
|
614 | export declare interface BaseTechniqueParams {
|
615 | |
616 |
|
617 |
|
618 | id?: string;
|
619 | |
620 |
|
621 |
|
622 |
|
623 |
|
624 |
|
625 | renderOrder?: DynamicProperty<number>;
|
626 | |
627 |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 | category?: DynamicProperty<string>;
|
633 | |
634 |
|
635 |
|
636 | transient?: boolean;
|
637 | |
638 |
|
639 |
|
640 |
|
641 | fadeNear?: DynamicProperty<number>;
|
642 | |
643 |
|
644 |
|
645 |
|
646 | fadeFar?: DynamicProperty<number>;
|
647 | |
648 |
|
649 |
|
650 |
|
651 |
|
652 |
|
653 | kind?: GeometryKind | GeometryKindSet;
|
654 | |
655 |
|
656 |
|
657 |
|
658 |
|
659 |
|
660 |
|
661 | enabled?: DynamicProperty<boolean>;
|
662 | }
|
663 |
|
664 |
|
665 | export declare const baseTechniqueParamsDescriptor: TechniqueDescriptor<BaseTechniqueParams>;
|
666 |
|
667 |
|
668 |
|
669 |
|
670 | export declare interface BaseValueDefinition {
|
671 | |
672 |
|
673 |
|
674 | type?: string;
|
675 | |
676 |
|
677 |
|
678 | description?: string;
|
679 | }
|
680 |
|
681 | export declare type BasicExtrudedLineStyle = BaseStyle<"extruded-line", BasicExtrudedLineTechniqueParams>;
|
682 |
|
683 |
|
684 |
|
685 |
|
686 |
|
687 | export declare interface BasicExtrudedLineTechnique extends MakeTechniqueAttrs<BasicExtrudedLineTechniqueParams> {
|
688 | name: "extruded-line";
|
689 | }
|
690 |
|
691 |
|
692 |
|
693 |
|
694 | export declare interface BasicExtrudedLineTechniqueParams extends BaseTechniqueParams, PolygonalTechniqueParams {
|
695 | |
696 |
|
697 |
|
698 |
|
699 |
|
700 |
|
701 |
|
702 |
|
703 |
|
704 | shading?: "basic";
|
705 | |
706 |
|
707 |
|
708 |
|
709 |
|
710 | color: DynamicProperty<StyleColor>;
|
711 | |
712 |
|
713 |
|
714 |
|
715 | transparent?: boolean;
|
716 | |
717 |
|
718 |
|
719 |
|
720 | opacity?: DynamicProperty<number>;
|
721 | |
722 |
|
723 |
|
724 | lineWidth: DynamicProperty<number>;
|
725 | |
726 |
|
727 |
|
728 | wireframe?: boolean;
|
729 | |
730 |
|
731 |
|
732 |
|
733 | caps?: DynamicProperty<"None" | "Circle">;
|
734 | }
|
735 |
|
736 |
|
737 |
|
738 |
|
739 | export declare type BinaryOp = RelationalOp | EqualityOp;
|
740 |
|
741 |
|
742 |
|
743 |
|
744 | export declare class BooleanLiteralExpr extends LiteralExpr {
|
745 | readonly value: boolean;
|
746 | constructor(value: boolean);
|
747 | /** @override */
|
748 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
749 | }
|
750 |
|
751 | /**
|
752 | * An interface representing bounding box in world coordinates.
|
753 | */
|
754 | export declare interface Box3Like {
|
755 | |
756 |
|
757 |
|
758 | readonly min: Vector3Like;
|
759 | |
760 |
|
761 |
|
762 | readonly max: Vector3Like;
|
763 | }
|
764 |
|
765 |
|
766 |
|
767 |
|
768 | export declare interface BoxedAnyDefinition extends BaseValueDefinition {
|
769 | |
770 |
|
771 |
|
772 | value: LiteralValue | JsonExpr;
|
773 | }
|
774 |
|
775 |
|
776 |
|
777 |
|
778 | export declare interface BoxedBooleanDefinition extends BaseValueDefinition {
|
779 | |
780 |
|
781 |
|
782 | type: "boolean";
|
783 | |
784 |
|
785 |
|
786 | value: DynamicProperty<boolean>;
|
787 | }
|
788 |
|
789 |
|
790 |
|
791 |
|
792 | export declare interface BoxedColorDefinition extends BaseValueDefinition {
|
793 | |
794 |
|
795 |
|
796 | type: "color";
|
797 | |
798 |
|
799 |
|
800 | value: DynamicProperty<string>;
|
801 | }
|
802 |
|
803 |
|
804 |
|
805 |
|
806 | export declare type BoxedDefinition = BoxedAnyDefinition | BoxedBooleanDefinition | BoxedNumericDefinition | BoxedStringDefinition | BoxedColorDefinition | BoxedSelectorDefinition;
|
807 |
|
808 |
|
809 |
|
810 |
|
811 | export declare interface BoxedNumericDefinition extends BaseValueDefinition {
|
812 | |
813 |
|
814 |
|
815 | type: "number";
|
816 | |
817 |
|
818 |
|
819 | value: DynamicProperty<number>;
|
820 | }
|
821 |
|
822 |
|
823 |
|
824 |
|
825 | export declare interface BoxedSelectorDefinition extends BaseValueDefinition {
|
826 | |
827 |
|
828 |
|
829 | type: "selector";
|
830 | |
831 |
|
832 |
|
833 |
|
834 |
|
835 | value: string | JsonExpr;
|
836 | }
|
837 |
|
838 |
|
839 |
|
840 |
|
841 | export declare interface BoxedStringDefinition extends BaseValueDefinition {
|
842 | |
843 |
|
844 |
|
845 | type: "string";
|
846 | |
847 |
|
848 |
|
849 | value: DynamicProperty<string>;
|
850 | }
|
851 |
|
852 |
|
853 |
|
854 |
|
855 | export declare interface BufferAttribute {
|
856 | name: string;
|
857 | buffer: ArrayBufferLike;
|
858 | type: BufferElementType;
|
859 | itemCount: number;
|
860 | normalized?: boolean;
|
861 | }
|
862 |
|
863 |
|
864 |
|
865 |
|
866 | export declare abstract class BufferedGeometryAccessor extends BufferedGeometryAccessorBase {
|
867 | readonly object: THREE_2.Mesh;
|
868 | readonly geometryType: GeometryType;
|
869 | protected readonly bufferGeometry: THREE_2.BufferGeometry;
|
870 | protected stride: number;
|
871 | |
872 |
|
873 |
|
874 |
|
875 |
|
876 |
|
877 |
|
878 |
|
879 | constructor(object: THREE_2.Mesh, geometryType: GeometryType, bufferGeometry: THREE_2.BufferGeometry, stride: number);
|
880 | clear(): void;
|
881 | getVertices(): Float32Array | undefined;
|
882 | protected checkSetUp(): boolean;
|
883 | }
|
884 |
|
885 | /**
|
886 | * Geometry accessor for both indexed and nonindexed `BufferedGeometry`.
|
887 | */
|
888 | export declare abstract class BufferedGeometryAccessorBase implements IGeometryAccessor {
|
889 | readonly object: THREE_2.Mesh;
|
890 | readonly geometryType: GeometryType;
|
891 | protected readonly bufferGeometry: THREE_2.BufferGeometry;
|
892 | protected start: number;
|
893 | protected end: number;
|
894 | protected startCapSize: number;
|
895 | protected endCapSize: number;
|
896 | protected position: THREE_2.BufferAttribute;
|
897 | protected itemSize: number;
|
898 | constructor(object: THREE_2.Mesh, geometryType: GeometryType, bufferGeometry: THREE_2.BufferGeometry);
|
899 | /**
|
900 | * Get the number of accessible geometries in this buffer.
|
901 | *
|
902 | * @returns Number of primitives in this geometry.
|
903 | */
|
904 | getCount(): number;
|
905 | /**
|
906 | * Get `renderOrder` of object.
|
907 | *
|
908 | * @returns `renderOrder` of the object.
|
909 | */
|
910 | get renderOrder(): number;
|
911 | setRange(start: number, end: number, startCapSize?: number, endCapSize?: number): void;
|
912 | /**
|
913 | * Get one or more colors from materials.
|
914 | */
|
915 | get color(): THREE_2.Color | undefined | Array<THREE_2.Color | undefined>;
|
916 | }
|
917 |
|
918 | /**
|
919 | * Accessor for nonindexed line geometry.
|
920 | */
|
921 | export declare class BufferedGeometryLineAccessor extends BufferedGeometryAccessor implements ILineAccessor {
|
922 | readonly object: THREE_2.Mesh;
|
923 | readonly geometryType: GeometryType;
|
924 | readonly bufferGeometry: THREE_2.BufferGeometry;
|
925 | constructor(object: THREE_2.Mesh, geometryType: GeometryType, bufferGeometry: THREE_2.BufferGeometry);
|
926 | isLineAccessor(): boolean;
|
927 | get width(): number | undefined;
|
928 | }
|
929 |
|
930 | /**
|
931 | * Accessor for nonindexed unspecified (`Object3D`) geometry.
|
932 | */
|
933 | export declare class BufferedGeometryObject3dAccessor extends BufferedGeometryAccessor implements IObject3dAccessor {
|
934 | readonly object: THREE_2.Mesh;
|
935 | readonly geometryType: GeometryType;
|
936 | readonly bufferGeometry: THREE_2.BufferGeometry;
|
937 | constructor(object: THREE_2.Mesh, geometryType: GeometryType, bufferGeometry: THREE_2.BufferGeometry);
|
938 | isObject3dAccessor(): boolean;
|
939 | /** @override */
|
940 | getVertices(): Float32Array | undefined;
|
941 | }
|
942 |
|
943 | /**
|
944 | * The data stored in Buffers' elements can be of the following elementary types: float, signed or
|
945 | * unsigned integers (8-bit, 16-bit or 32-bit long).
|
946 | */
|
947 | export declare type BufferElementType = "float" | "uint8" | "uint16" | "uint32" | "int8" | "int16" | "int32";
|
948 |
|
949 | /**
|
950 | * Convert metric style property to expression that accounts {@link MapView.pixelToWorld} if
|
951 | * `metricUnit === 'Pixel'`.
|
952 | */
|
953 | export declare function buildMetricValueEvaluator(value: Expr | Value | undefined, metricUnit: string | undefined): string | number | boolean | object | null | undefined;
|
954 |
|
955 |
|
956 |
|
957 |
|
958 |
|
959 |
|
960 |
|
961 |
|
962 |
|
963 |
|
964 | export declare function buildObject(technique: Technique, geometry: THREE_2.BufferGeometry, material: THREE_2.Material | THREE_2.Material[], tile: Tile, elevationEnabled: boolean): THREE_2.Object3D;
|
965 |
|
966 | declare interface CachedResource {
|
967 | memoryUsage: number;
|
968 | }
|
969 |
|
970 |
|
971 |
|
972 |
|
973 | export declare enum CalculationStatus {
|
974 | PendingApproximate = 0,
|
975 | FinalPrecise = 1
|
976 | }
|
977 |
|
978 |
|
979 |
|
980 |
|
981 | export declare class CallExpr extends Expr {
|
982 | readonly op: string;
|
983 | readonly args: Expr[];
|
984 | descriptor?: OperatorDescriptor;
|
985 | constructor(op: string, args: Expr[]);
|
986 | /**
|
987 | * Returns the child nodes of this {@link Expr}.
|
988 | *
|
989 | * @deprecated Use {@link CallExpr.args} instead.
|
990 | */
|
991 | get children(): Expr[];
|
992 |
|
993 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
994 |
|
995 | protected exprIsDynamic(): boolean;
|
996 | }
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 | export declare class CameraMovementDetector {
|
1005 | private m_throttlingTimeout;
|
1006 | private m_movementStartedFunc;
|
1007 | private m_movementFinishedFunc;
|
1008 | private m_lastAttitude?;
|
1009 | private m_lastCameraPos;
|
1010 | private m_newCameraPos;
|
1011 | private m_cameraMovedLastFrame;
|
1012 | private m_throttlingTimerId?;
|
1013 | private m_movementDetectorDeadline;
|
1014 | |
1015 |
|
1016 |
|
1017 |
|
1018 |
|
1019 |
|
1020 |
|
1021 |
|
1022 |
|
1023 | constructor(m_throttlingTimeout: number | undefined, m_movementStartedFunc: (() => void) | undefined, m_movementFinishedFunc: (() => void) | undefined);
|
1024 | /**
|
1025 | * Checks if the camera has moved since the last time it was checked. The
|
1026 | * `m_movementStartedFunc` is called when a movement starts. If no movement
|
1027 | * is detected, a timer for `m_movementFinishedFunc` starts.
|
1028 | *
|
1029 | * @param mapView - [[Mapview]]'s position and camera are checked for modifications.
|
1030 | */
|
1031 | checkCameraMoved(mapView: MapView, now: number): boolean;
|
1032 | /**
|
1033 | * Reset the saved camera position. Next time checkCameraMoved is called, it will return
|
1034 | * `false`.
|
1035 | */
|
1036 | clear(mapView: MapView): void;
|
1037 | /**
|
1038 | * Force change of camera position. Next time checkCameraMoved is called, it will return `true`.
|
1039 | */
|
1040 | forceMoved(): void;
|
1041 | /**
|
1042 | * Returns `true` if the camera of this {@link MapView} is currently moving. In this case the
|
1043 | * `m_movementFinishedFunc` is waiting to be called after the throttling timer runs out.
|
1044 | */
|
1045 | get cameraIsMoving(): boolean;
|
1046 | |
1047 |
|
1048 |
|
1049 | dispose(): void;
|
1050 | |
1051 |
|
1052 |
|
1053 | get cameraMovedLastFrame(): boolean;
|
1054 | private movementStarted;
|
1055 | private movementFinished;
|
1056 | private startMovementFinishedTimer;
|
1057 | private onDeadlineTimer;
|
1058 | private removeMovementFinishedTimer;
|
1059 | }
|
1060 |
|
1061 |
|
1062 |
|
1063 |
|
1064 | export declare class CaseExpr extends Expr {
|
1065 | readonly branches: Array<[Expr, Expr]>;
|
1066 | readonly fallback: Expr;
|
1067 | constructor(branches: Array<[Expr, Expr]>, fallback: Expr);
|
1068 | /** @override */
|
1069 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
1070 | /** @override */
|
1071 | protected exprIsDynamic(): boolean;
|
1072 | }
|
1073 |
|
1074 | /**
|
1075 | * Point object that implements the raycasting of circles in screen space.
|
1076 | */
|
1077 | export declare class Circles extends MapViewPoints {
|
1078 |
|
1079 | testPoint(point: THREE_2.Vector3, screenPosition: THREE_2.Vector2, pickCoordinates: THREE_2.Vector2, index: number, distance: number, intersects: THREE_2.Intersection[]): void;
|
1080 | }
|
1081 |
|
1082 |
|
1083 |
|
1084 |
|
1085 |
|
1086 |
|
1087 | export declare type CirclesStyle = BaseStyle<"circles", PointTechniqueParams>;
|
1088 |
|
1089 |
|
1090 |
|
1091 |
|
1092 |
|
1093 | export declare interface CirclesTechnique extends MakeTechniqueAttrs<PointTechniqueParams> {
|
1094 | name: "circles";
|
1095 | }
|
1096 |
|
1097 |
|
1098 | export declare const circlesTechniquePropTypes: TechniqueDescriptor<CirclesTechnique>;
|
1099 |
|
1100 | export declare interface ClipPlanesEvaluator {
|
1101 | |
1102 |
|
1103 |
|
1104 | minElevation: number;
|
1105 | |
1106 |
|
1107 |
|
1108 | maxElevation: number;
|
1109 | |
1110 |
|
1111 |
|
1112 |
|
1113 |
|
1114 |
|
1115 |
|
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 |
|
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 | evaluateClipPlanes(camera: THREE_2.Camera, projection: Projection, elevationProvider?: ElevationProvider): ViewRanges;
|
1126 | }
|
1127 |
|
1128 | declare class CollisionBox extends Math2D.Box implements IBox {
|
1129 | constructor(box?: Math2D.Box | THREE_2.Box2 | IBox);
|
1130 | copy(box: Math2D.Box | THREE_2.Box2 | IBox): CollisionBox;
|
1131 | get minX(): number;
|
1132 | set minX(minX: number);
|
1133 | get maxX(): number;
|
1134 | set maxX(maxX: number);
|
1135 | get minY(): number;
|
1136 | set minY(minY: number);
|
1137 | get maxY(): number;
|
1138 | set maxY(maxY: number);
|
1139 | }
|
1140 |
|
1141 | /**
|
1142 | * Use `ColorCache` to reuse a color specified by name and save allocation as well as
|
1143 | * setup time.
|
1144 | *
|
1145 | * Implemented as a singleton. Do not modify colors after getting them from the `ColorCache`.
|
1146 | */
|
1147 | export declare class ColorCache {
|
1148 | |
1149 |
|
1150 |
|
1151 | static get instance(): ColorCache;
|
1152 | private static m_instance;
|
1153 | private m_map;
|
1154 | |
1155 |
|
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 |
|
1161 | getColor(colorCode: string | number): THREE_2.Color;
|
1162 | |
1163 |
|
1164 |
|
1165 | get size(): number;
|
1166 | |
1167 |
|
1168 |
|
1169 |
|
1170 | clear(): void;
|
1171 | }
|
1172 |
|
1173 |
|
1174 |
|
1175 |
|
1176 |
|
1177 |
|
1178 |
|
1179 |
|
1180 |
|
1181 |
|
1182 |
|
1183 |
|
1184 |
|
1185 |
|
1186 |
|
1187 |
|
1188 | export declare namespace ColorUtils {
|
1189 | |
1190 |
|
1191 |
|
1192 |
|
1193 |
|
1194 |
|
1195 |
|
1196 |
|
1197 |
|
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 |
|
1203 |
|
1204 |
|
1205 |
|
1206 | export function getHexFromRgba(r: number, g: number, b: number, a: number): number;
|
1207 | |
1208 |
|
1209 |
|
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 |
|
1216 | export function getHexFromRgb(r: number, g: number, b: number): number;
|
1217 | |
1218 |
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 | export function getHexFromHsl(h: number, s: number, l: number): number;
|
1226 | |
1227 |
|
1228 |
|
1229 |
|
1230 |
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 | export function getRgbaFromHex(hex: number, target?: RGBA): RGBA;
|
1238 | |
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 | export function hasAlphaInHex(hex: number): boolean;
|
1245 | |
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 | export function getAlphaFromHex(hex: number): number;
|
1253 | |
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 |
|
1260 | export function removeAlphaFromHex(hex: number): number;
|
1261 | }
|
1262 |
|
1263 |
|
1264 |
|
1265 |
|
1266 |
|
1267 | export declare class ComposedDataFilter implements OmvFeatureFilter {
|
1268 | readonly filters: OmvFeatureFilter[];
|
1269 | constructor(filters: OmvFeatureFilter[]);
|
1270 | get hasKindFilter(): boolean;
|
1271 | wantsLayer(layer: string, level: number): boolean;
|
1272 | wantsPointFeature(layer: string, geometryType: OmvGeometryType, level: number): boolean;
|
1273 | wantsLineFeature(layer: string, geometryType: OmvGeometryType, level: number): boolean;
|
1274 | wantsPolygonFeature(layer: string, geometryType: OmvGeometryType, level: number): boolean;
|
1275 | wantsKind(kind: string | string[]): boolean;
|
1276 | }
|
1277 |
|
1278 | /**
|
1279 | * Compose full texture name for given image name with technique specified.
|
1280 | * Some techniques allows to add prefix/postfix to icons names specified, this
|
1281 | * function uses technique information to create fully qualified texture name.
|
1282 | * @param imageName - base name of the marker icon.
|
1283 | * @param technique - the technique describing POI or line marker.
|
1284 | * @returns fully qualified texture name for loading from atlas (without extension).
|
1285 | */
|
1286 | export declare function composeTechniqueTextureName(imageName: string, technique: PoiTechnique | LineMarkerTechnique): string;
|
1287 |
|
1288 | /**
|
1289 | * Only exported for testing
|
1290 | * @ignore
|
1291 | *
|
1292 | * Compute the averages for the passed in array of numbers.
|
1293 | *
|
1294 | * @param {number[]} samples Array containing sampled values.
|
1295 | * @returns {(Stats | undefined)}
|
1296 | */
|
1297 | export declare function computeArrayAverage(samples: number[]): number | undefined;
|
1298 |
|
1299 |
|
1300 |
|
1301 |
|
1302 |
|
1303 |
|
1304 |
|
1305 |
|
1306 |
|
1307 |
|
1308 |
|
1309 | export declare function computeArrayStats(samples: number[]): Stats | undefined;
|
1310 |
|
1311 |
|
1312 |
|
1313 |
|
1314 |
|
1315 |
|
1316 |
|
1317 | export declare class ConcurrentDecoderFacade {
|
1318 | |
1319 |
|
1320 |
|
1321 |
|
1322 | static defaultScriptUrl: string;
|
1323 | |
1324 |
|
1325 |
|
1326 | static defaultWorkerCount?: number;
|
1327 | |
1328 |
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 | static getTileDecoder(decoderServiceType: string, scriptUrl?: string, workerCount?: number): ITileDecoder;
|
1335 | |
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 |
|
1341 |
|
1342 | static getWorkerSet(scriptUrl?: string, workerCount?: number): ConcurrentWorkerSet;
|
1343 | |
1344 |
|
1345 |
|
1346 |
|
1347 |
|
1348 | static destroyWorkerSet(scriptUrl: string): void;
|
1349 | |
1350 |
|
1351 |
|
1352 | static destroy(): void;
|
1353 | |
1354 |
|
1355 |
|
1356 | private static workerSets;
|
1357 | }
|
1358 |
|
1359 |
|
1360 |
|
1361 |
|
1362 |
|
1363 |
|
1364 |
|
1365 | export declare class ConcurrentTilerFacade {
|
1366 | |
1367 |
|
1368 |
|
1369 |
|
1370 | static defaultScriptUrl: string;
|
1371 | |
1372 |
|
1373 |
|
1374 | static defaultWorkerCount: number;
|
1375 | |
1376 |
|
1377 |
|
1378 |
|
1379 |
|
1380 |
|
1381 |
|
1382 | static getTiler(tilerServiceType: string, scriptUrl?: string, workerCount?: number): ITiler;
|
1383 | |
1384 |
|
1385 |
|
1386 |
|
1387 |
|
1388 |
|
1389 |
|
1390 | static getWorkerSet(scriptUrl?: string, workerCount?: number): ConcurrentWorkerSet;
|
1391 | |
1392 |
|
1393 |
|
1394 |
|
1395 |
|
1396 | static destroyWorkerSet(scriptUrl: string): void;
|
1397 | |
1398 |
|
1399 |
|
1400 | static destroy(): void;
|
1401 | |
1402 |
|
1403 |
|
1404 | private static workerSets;
|
1405 | }
|
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 |
|
1416 |
|
1417 |
|
1418 |
|
1419 |
|
1420 |
|
1421 |
|
1422 |
|
1423 | declare class ConcurrentWorkerSet {
|
1424 | private m_options;
|
1425 | private m_workerChannelLogger;
|
1426 | private readonly m_eventListeners;
|
1427 | private m_workers;
|
1428 | private m_availableWorkers;
|
1429 | private m_workerPromises;
|
1430 | private m_workerCount;
|
1431 | private readonly m_readyPromises;
|
1432 | private readonly m_requests;
|
1433 | private m_workerRequestQueue;
|
1434 | private m_nextMessageId;
|
1435 | private m_stopped;
|
1436 | private m_referenceCount;
|
1437 | |
1438 |
|
1439 |
|
1440 |
|
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 |
|
1446 | constructor(m_options: ConcurrentWorkerSetOptions);
|
1447 | /**
|
1448 | * Adds an external reference and increments the internal reference counter by one.
|
1449 | *
|
1450 | * To implement a reference-count based automatic resource cleanup, use this function with
|
1451 | * [[removeReference]].
|
1452 | */
|
1453 | addReference(): void;
|
1454 | /**
|
1455 | * Decrements the internal reference counter by 1.
|
1456 | *
|
1457 | * When the internal reference counter reaches 0, this function calls [[dispose]] to clear the
|
1458 | * resources.
|
1459 | *
|
1460 | * Use with [[addReference]] to implement reference-count based automatic resource cleanup.
|
1461 | */
|
1462 | removeReference(): void;
|
1463 | /**
|
1464 | * Starts workers.
|
1465 | *
|
1466 | * Use to start workers already stopped by [[stop]] or [[destroy]] calls.
|
1467 | *
|
1468 | * Note: The worker set is implicitly started on construction - no need to call [[start]] on
|
1469 | * fresh instance.
|
1470 | *
|
1471 | * @param options - optional, new worker set options
|
1472 | */
|
1473 | start(options?: ConcurrentWorkerSetOptions): void;
|
1474 | /**
|
1475 | * The number of workers started for this worker set. The value is `undefined` until the workers
|
1476 | * have been created.
|
1477 | */
|
1478 | get workerCount(): number | undefined;
|
1479 | /**
|
1480 | * Stops workers.
|
1481 | *
|
1482 | * Waits for all pending requests to be finished and stops all workers.
|
1483 | *
|
1484 | * Use [[start]] to start this worker again.
|
1485 | *
|
1486 | * @returns `Promise` that resolves when all workers are destroyed.
|
1487 | */
|
1488 | stop(): Promise<void>;
|
1489 | /**
|
1490 | * Destroys all workers immediately.
|
1491 | *
|
1492 | * Resolves all pending request promises with a `worker destroyed` error.
|
1493 | *
|
1494 | * Use [[start]] to start this worker again.
|
1495 | */
|
1496 | destroy(): void;
|
1497 | /**
|
1498 | * Waits for `service` to be initialized in all workers.
|
1499 | *
|
1500 | * Each service that starts in a worker sends an [[isInitializedMessage]] to confirm that
|
1501 | * it has started successfully. This method resolves when all workers in a set have
|
1502 | * `service` initialized.
|
1503 | *
|
1504 | * Promise is rejected if any of worker fails to start.
|
1505 | *
|
1506 | * @param serviceId - The service identifier.
|
1507 | */
|
1508 | connect(serviceId: string): Promise<void>;
|
1509 | /**
|
1510 | * Registers an event listener for events that originated in a web worker, for a given
|
1511 | * `serviceId`. You can only set one event listener per `serviceId`.
|
1512 | *
|
1513 | * @param serviceId - The service to listen to.
|
1514 | * @param callback - The callback to invoke for matching events.
|
1515 | */
|
1516 | addEventListener(serviceId: string, callback: (message: any) => void): void;
|
1517 | /**
|
1518 | * Removes a previously set event listener for the given `serviceId`.
|
1519 | *
|
1520 | * @param serviceId - The service from which to remove the event listeners.
|
1521 | */
|
1522 | removeEventListener(serviceId: string): void;
|
1523 | /**
|
1524 | * Invokes a request that expects a response from a random worker.
|
1525 | *
|
1526 | * Sends [[RequestMessage]] and resolves when a matching [[ResponseMessage]] is received from
|
1527 | * workers. Use this function when interfacing with "RPC-like" calls to services.
|
1528 | *
|
1529 | * @param serviceId - The name of service, as registered with the [[WorkerClient]] instance.
|
1530 | * @param request - The request to process.
|
1531 | * @param transferList - An optional array of `ArrayBuffer`s to transfer to the worker context.
|
1532 | * @param requestController - An optional [[RequestController]] to store state of cancelling.
|
1533 | *
|
1534 | * @returns A `Promise` that resolves with a response from the service.
|
1535 | */
|
1536 | invokeRequest<Res>(serviceId: string, request: WorkerServiceProtocol.ServiceRequest, transferList?: ArrayBuffer[], requestController?: RequestController): Promise<Res>;
|
1537 | /**
|
1538 | * Invokes a request that expects responses from all workers.
|
1539 | *
|
1540 | * Send [[RequestMessage]] to all workers and resolves when all workers have sent a matching
|
1541 | * [[ResponseMessage]]. Use this function to wait on request that need to happen on all workers
|
1542 | * before proceeding (like synchronous worker service creation).
|
1543 | *
|
1544 | * @param serviceId - The name of service, as registered with the [[WorkerClient]] instance.
|
1545 | * @param request - The request to process.
|
1546 | * @param transferList - An optional array of `ArrayBuffer`s to transfer to the worker context.
|
1547 | *
|
1548 | * @returns Array of `Promise`s that resolves with a response from each worker (unspecified
|
1549 | * order).
|
1550 | */
|
1551 | broadcastRequest<Res>(serviceId: string, request: WorkerServiceProtocol.WorkerServiceManagerRequest | WorkerServiceProtocol.ServiceRequest, transferList?: ArrayBuffer[]): Promise<Res[]>;
|
1552 | /**
|
1553 | * Posts a message to all workers.
|
1554 | *
|
1555 | * @param message - The message to send.
|
1556 | * @param buffers - Optional buffers to transfer to the workers.
|
1557 | */
|
1558 | broadcastMessage(message: any, buffers?: ArrayBuffer[] | undefined): void;
|
1559 | /**
|
1560 | * The size of the request queue for debugging and profiling.
|
1561 | */
|
1562 | get requestQueueSize(): number;
|
1563 | /**
|
1564 | * The number of workers for debugging and profiling.
|
1565 | */
|
1566 | get numWorkers(): number;
|
1567 | /**
|
1568 | * The number of workers for debugging and profiling.
|
1569 | */
|
1570 | get numIdleWorkers(): number;
|
1571 | /**
|
1572 | * Subclasses must call this function when a worker emits an event.
|
1573 | *
|
1574 | * @param event - The event to dispatch.
|
1575 | */
|
1576 | protected eventHandler(event: any): void;
|
1577 | /**
|
1578 | * Handles messages received from workers. This method is protected so that the message
|
1579 | * reception can be simulated through an extended class, to avoid relying on real workers.
|
1580 | *
|
1581 | * @param workerId - The workerId of the web worker.
|
1582 | * @param event - The event to dispatch.
|
1583 | */
|
1584 | private onWorkerMessage;
|
1585 | /**
|
1586 | * Posts a [[WorkerServiceProtocol.RequestMessage]] to an available worker. If no worker is
|
1587 | * available, the request is put into a queue.
|
1588 | *
|
1589 | * @param message - The message to send.
|
1590 | * @param buffers - Optional buffers to transfer to the worker.
|
1591 | * @param requestController - An optional [[RequestController]] to store state of cancelling.
|
1592 | */
|
1593 | private postRequestMessage;
|
1594 | private ensureStarted;
|
1595 | private waitForAllResponses;
|
1596 | private dispatchEvent;
|
1597 | private terminateWorkers;
|
1598 | private getReadyPromise;
|
1599 | /**
|
1600 | * Check the worker request queue, if there are any queued up decoding jobs and idle workers,
|
1601 | * they will be executed with postRequestMessage. The requests in the queue are sorted before
|
1602 | * the request with the highest priority is selected for processing.
|
1603 | */
|
1604 | private checkWorkerRequestQueue;
|
1605 | }
|
1606 |
|
1607 | declare interface ConcurrentWorkerSetOptions {
|
1608 | |
1609 |
|
1610 |
|
1611 | scriptUrl: string;
|
1612 | |
1613 |
|
1614 |
|
1615 |
|
1616 |
|
1617 | workerCount?: number;
|
1618 | |
1619 |
|
1620 |
|
1621 |
|
1622 |
|
1623 | workerConnectionTimeout?: number;
|
1624 | }
|
1625 |
|
1626 |
|
1627 |
|
1628 |
|
1629 |
|
1630 | export declare abstract class CopyrightCoverageProvider implements CopyrightProvider {
|
1631 |
|
1632 | protected readonly logger: ILogger;
|
1633 | private m_cachedTreePromise;
|
1634 |
|
1635 | abstract getCopyrightCoverageData(): Promise<AreaCopyrightInfo[]>;
|
1636 |
|
1637 | getTree(): Promise<any>;
|
1638 |
|
1639 | getCopyrights(geoBox: GeoBox, level: number): Promise<CopyrightInfo[]>;
|
1640 | |
1641 |
|
1642 |
|
1643 |
|
1644 |
|
1645 |
|
1646 | initRBush(entries: AreaCopyrightInfo[]): any;
|
1647 | }
|
1648 |
|
1649 |
|
1650 |
|
1651 |
|
1652 |
|
1653 |
|
1654 | export declare interface CopyrightCoverageResponse {
|
1655 | [scheme: string]: AreaCopyrightInfo[];
|
1656 | }
|
1657 |
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 | export declare class CopyrightElementHandler {
|
1671 | |
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 |
|
1677 |
|
1678 | static install(element: string | HTMLElement, mapView?: MapView): CopyrightElementHandler;
|
1679 | |
1680 |
|
1681 |
|
1682 |
|
1683 |
|
1684 | staticInfo: CopyrightInfo[] | undefined;
|
1685 | private m_defaults;
|
1686 | private m_element;
|
1687 | private m_mapViews;
|
1688 | |
1689 |
|
1690 |
|
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
|
1697 |
|
1698 | constructor(element: string | HTMLElement, mapView?: MapView);
|
1699 | /**
|
1700 | * Destroys this object by removing all event listeners from the attached {@link MapView}s.
|
1701 | */
|
1702 | destroy(): void;
|
1703 | |
1704 |
|
1705 |
|
1706 | attach(mapView: MapView): this;
|
1707 | |
1708 |
|
1709 |
|
1710 | detach(mapView: MapView): this;
|
1711 | |
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 |
|
1718 |
|
1719 |
|
1720 | setDefaults(defaults: CopyrightInfo[] | undefined): this;
|
1721 | |
1722 |
|
1723 |
|
1724 |
|
1725 |
|
1726 |
|
1727 |
|
1728 |
|
1729 |
|
1730 |
|
1731 | setStaticCopyightInfo(staticInfo: CopyrightInfo[] | undefined): this;
|
1732 | |
1733 |
|
1734 |
|
1735 | update: () => void;
|
1736 | }
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 |
|
1747 | export declare interface CopyrightInfo {
|
1748 | |
1749 |
|
1750 |
|
1751 |
|
1752 |
|
1753 |
|
1754 |
|
1755 |
|
1756 |
|
1757 |
|
1758 |
|
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 | id: string;
|
1767 | |
1768 |
|
1769 |
|
1770 |
|
1771 |
|
1772 |
|
1773 | label?: string;
|
1774 | |
1775 |
|
1776 |
|
1777 | link?: string;
|
1778 | |
1779 |
|
1780 |
|
1781 | year?: number;
|
1782 | }
|
1783 |
|
1784 | export declare namespace CopyrightInfo {
|
1785 | |
1786 |
|
1787 |
|
1788 |
|
1789 |
|
1790 |
|
1791 |
|
1792 |
|
1793 | export function mergeArrays(a: CopyrightInfo[], b?: CopyrightInfo[]): CopyrightInfo[];
|
1794 | |
1795 |
|
1796 |
|
1797 |
|
1798 |
|
1799 |
|
1800 |
|
1801 |
|
1802 | export function formatAsHtml(copyrightInfo: CopyrightInfo[]): string;
|
1803 | }
|
1804 |
|
1805 |
|
1806 |
|
1807 |
|
1808 |
|
1809 | export declare interface CopyrightProvider {
|
1810 | |
1811 |
|
1812 |
|
1813 |
|
1814 |
|
1815 |
|
1816 |
|
1817 | getCopyrights(geoBox: GeoBox, level: number): Promise<CopyrightInfo[]>;
|
1818 | }
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 |
|
1824 |
|
1825 |
|
1826 |
|
1827 | export declare const createDefaultClipPlanesEvaluator: () => TiltViewClipPlanesEvaluator;
|
1828 |
|
1829 |
|
1830 |
|
1831 |
|
1832 |
|
1833 |
|
1834 |
|
1835 |
|
1836 |
|
1837 |
|
1838 |
|
1839 | export declare function createDepthPrePassMaterial(baseMaterial: THREE_2.Material): THREE_2.Material;
|
1840 |
|
1841 |
|
1842 |
|
1843 |
|
1844 |
|
1845 |
|
1846 |
|
1847 |
|
1848 |
|
1849 |
|
1850 |
|
1851 |
|
1852 |
|
1853 |
|
1854 | export declare function createDepthPrePassMesh(mesh: THREE_2.Mesh): THREE_2.Mesh;
|
1855 |
|
1856 |
|
1857 |
|
1858 |
|
1859 |
|
1860 |
|
1861 |
|
1862 |
|
1863 |
|
1864 |
|
1865 | export declare function createMaterial(options: MaterialOptions, textureReadyCallback?: (texture: THREE_2.Texture) => void): THREE_2.Material | undefined;
|
1866 |
|
1867 |
|
1868 |
|
1869 |
|
1870 | export declare interface CubemapSky {
|
1871 |
|
1872 | type: "cubemap";
|
1873 |
|
1874 | positiveX: string;
|
1875 |
|
1876 | negativeX: string;
|
1877 |
|
1878 | positiveY: string;
|
1879 |
|
1880 | negativeY: string;
|
1881 |
|
1882 | positiveZ: string;
|
1883 |
|
1884 | negativeZ: string;
|
1885 | }
|
1886 |
|
1887 |
|
1888 |
|
1889 |
|
1890 |
|
1891 |
|
1892 | export declare interface DataProvider {
|
1893 | |
1894 |
|
1895 |
|
1896 |
|
1897 |
|
1898 | connect(): Promise<void>;
|
1899 | |
1900 |
|
1901 |
|
1902 | ready(): boolean;
|
1903 | |
1904 |
|
1905 |
|
1906 |
|
1907 |
|
1908 |
|
1909 |
|
1910 | getTile(tileKey: TileKey, abortSignal?: AbortSignal): Promise<ArrayBufferLike | {}>;
|
1911 | }
|
1912 |
|
1913 |
|
1914 |
|
1915 |
|
1916 | export declare abstract class DataSource extends THREE_2.EventDispatcher {
|
1917 | |
1918 |
|
1919 |
|
1920 |
|
1921 | private static uniqueNameCounter;
|
1922 | |
1923 |
|
1924 |
|
1925 | enabled: boolean;
|
1926 | |
1927 |
|
1928 |
|
1929 | cacheable: boolean;
|
1930 | |
1931 |
|
1932 |
|
1933 | useGeometryLoader: boolean;
|
1934 | |
1935 |
|
1936 |
|
1937 | name: string;
|
1938 | |
1939 |
|
1940 |
|
1941 |
|
1942 |
|
1943 |
|
1944 | addGroundPlane: boolean;
|
1945 | |
1946 |
|
1947 |
|
1948 | minDataLevel: number;
|
1949 | |
1950 |
|
1951 |
|
1952 | maxDataLevel: number;
|
1953 | |
1954 |
|
1955 |
|
1956 | minDisplayLevel: number;
|
1957 | |
1958 |
|
1959 |
|
1960 | maxDisplayLevel: number;
|
1961 | allowOverlappingTiles: boolean;
|
1962 | |
1963 |
|
1964 |
|
1965 |
|
1966 | readonly exprPool: ExprPool;
|
1967 | |
1968 |
|
1969 |
|
1970 | private m_mapView?;
|
1971 | |
1972 |
|
1973 |
|
1974 | private m_styleSetName?;
|
1975 | |
1976 |
|
1977 |
|
1978 | private m_maxGeometryHeight;
|
1979 | |
1980 |
|
1981 |
|
1982 | private m_storageLevelOffset;
|
1983 | private readonly m_featureStateMap;
|
1984 | |
1985 |
|
1986 |
|
1987 |
|
1988 |
|
1989 | constructor(options?: DataSourceOptions);
|
1990 | /**
|
1991 | * Gets the state of the given feature id.
|
1992 | *
|
1993 | * @param featureId - The id of the feature.
|
1994 | */
|
1995 | getFeatureState(featureId: number): ValueMap | undefined;
|
1996 | /**
|
1997 | * Clears the state of all the features of this {@link DataSource}.
|
1998 | */
|
1999 | clearFeatureState(): void;
|
2000 | |
2001 |
|
2002 |
|
2003 |
|
2004 |
|
2005 |
|
2006 |
|
2007 |
|
2008 |
|
2009 |
|
2010 | setFeatureState(featureId: number, state: ValueMap): void;
|
2011 | |
2012 |
|
2013 |
|
2014 |
|
2015 |
|
2016 | removeFeatureState(featureId: number): void;
|
2017 | |
2018 |
|
2019 |
|
2020 | get styleSetName(): string | undefined;
|
2021 | |
2022 |
|
2023 |
|
2024 |
|
2025 |
|
2026 |
|
2027 |
|
2028 | set styleSetName(styleSetName: string | undefined);
|
2029 | |
2030 |
|
2031 |
|
2032 | dispose(): void;
|
2033 | |
2034 |
|
2035 |
|
2036 | clearCache(): void;
|
2037 | |
2038 |
|
2039 |
|
2040 |
|
2041 |
|
2042 |
|
2043 |
|
2044 |
|
2045 | isFullyCovering(): boolean;
|
2046 | |
2047 |
|
2048 |
|
2049 |
|
2050 |
|
2051 | ready(): boolean;
|
2052 | |
2053 |
|
2054 |
|
2055 | get mapView(): MapView;
|
2056 | |
2057 |
|
2058 |
|
2059 |
|
2060 |
|
2061 |
|
2062 |
|
2063 |
|
2064 | get projection(): Projection;
|
2065 | |
2066 |
|
2067 |
|
2068 |
|
2069 |
|
2070 | connect(): Promise<void>;
|
2071 | |
2072 |
|
2073 |
|
2074 | abstract getTilingScheme(): TilingScheme;
|
2075 | |
2076 |
|
2077 |
|
2078 |
|
2079 |
|
2080 |
|
2081 |
|
2082 | attach(mapView: MapView): void;
|
2083 | |
2084 |
|
2085 |
|
2086 |
|
2087 |
|
2088 |
|
2089 |
|
2090 | detach(mapView: MapView): void;
|
2091 | |
2092 |
|
2093 |
|
2094 |
|
2095 |
|
2096 |
|
2097 |
|
2098 |
|
2099 |
|
2100 |
|
2101 |
|
2102 |
|
2103 | setStyleSet(styleSet?: StyleSet, definitions?: Definitions, languages?: string[]): void;
|
2104 | |
2105 |
|
2106 |
|
2107 |
|
2108 |
|
2109 |
|
2110 |
|
2111 |
|
2112 | setTheme(theme: Theme, languages?: string[]): void;
|
2113 | |
2114 |
|
2115 |
|
2116 |
|
2117 |
|
2118 |
|
2119 | setLanguages(languages?: string[]): void;
|
2120 | |
2121 |
|
2122 |
|
2123 |
|
2124 |
|
2125 |
|
2126 |
|
2127 | setPoliticalView(pov?: string): void;
|
2128 | |
2129 |
|
2130 |
|
2131 |
|
2132 |
|
2133 |
|
2134 | abstract getTile(tileKey: TileKey): Tile | undefined;
|
2135 | |
2136 |
|
2137 |
|
2138 |
|
2139 |
|
2140 |
|
2141 |
|
2142 | updateTile(tile: Tile): void;
|
2143 | |
2144 |
|
2145 |
|
2146 |
|
2147 |
|
2148 |
|
2149 |
|
2150 | shouldPreloadTiles(): boolean;
|
2151 | |
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 | get minZoomLevel(): number;
|
2157 | set minZoomLevel(level: number);
|
2158 | |
2159 |
|
2160 |
|
2161 |
|
2162 |
|
2163 | get maxZoomLevel(): number;
|
2164 | set maxZoomLevel(level: number);
|
2165 | |
2166 |
|
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 | get maxGeometryHeight(): number;
|
2174 | set maxGeometryHeight(value: number);
|
2175 | |
2176 |
|
2177 |
|
2178 |
|
2179 |
|
2180 |
|
2181 |
|
2182 |
|
2183 | get storageLevelOffset(): number;
|
2184 | |
2185 |
|
2186 |
|
2187 |
|
2188 |
|
2189 | set storageLevelOffset(levelOffset: number);
|
2190 | |
2191 |
|
2192 |
|
2193 |
|
2194 |
|
2195 |
|
2196 | setEnableElevationOverlay(enable: boolean): void;
|
2197 | |
2198 |
|
2199 |
|
2200 |
|
2201 |
|
2202 |
|
2203 | getDataZoomLevel(zoomLevel: number): number;
|
2204 | |
2205 |
|
2206 |
|
2207 |
|
2208 | isVisible(zoomLevel: number): boolean;
|
2209 | |
2210 |
|
2211 |
|
2212 |
|
2213 |
|
2214 |
|
2215 |
|
2216 |
|
2217 | canGetTile(zoomLevel: number, tileKey: TileKey): boolean;
|
2218 | |
2219 |
|
2220 |
|
2221 |
|
2222 |
|
2223 |
|
2224 |
|
2225 |
|
2226 |
|
2227 |
|
2228 | shouldSubdivide(zoomLevel: number, tileKey: TileKey): boolean;
|
2229 | |
2230 |
|
2231 |
|
2232 |
|
2233 |
|
2234 |
|
2235 |
|
2236 |
|
2237 |
|
2238 |
|
2239 |
|
2240 |
|
2241 |
|
2242 |
|
2243 | shouldRenderText(zoomLevel: number, tileKey: TileKey): boolean;
|
2244 | |
2245 |
|
2246 |
|
2247 | requestUpdate(): void;
|
2248 | }
|
2249 |
|
2250 |
|
2251 |
|
2252 |
|
2253 | export declare interface DataSourceOptions {
|
2254 | |
2255 |
|
2256 |
|
2257 | name?: string;
|
2258 | |
2259 |
|
2260 |
|
2261 | styleSetName?: string;
|
2262 | |
2263 |
|
2264 |
|
2265 |
|
2266 |
|
2267 | minZoomLevel?: number;
|
2268 | |
2269 |
|
2270 |
|
2271 |
|
2272 |
|
2273 | maxZoomLevel?: number;
|
2274 | |
2275 |
|
2276 |
|
2277 | minDataLevel?: number;
|
2278 | |
2279 |
|
2280 |
|
2281 | maxDataLevel?: number;
|
2282 | |
2283 |
|
2284 |
|
2285 | minDisplayLevel?: number;
|
2286 | |
2287 |
|
2288 |
|
2289 | maxDisplayLevel?: number;
|
2290 | |
2291 |
|
2292 |
|
2293 | storageLevelOffset?: number;
|
2294 | |
2295 |
|
2296 |
|
2297 |
|
2298 |
|
2299 |
|
2300 |
|
2301 |
|
2302 |
|
2303 |
|
2304 | allowOverlappingTiles?: boolean;
|
2305 | }
|
2306 |
|
2307 |
|
2308 |
|
2309 |
|
2310 | export declare interface DataSourceTileList {
|
2311 | |
2312 |
|
2313 |
|
2314 | dataSource: DataSource;
|
2315 | |
2316 |
|
2317 |
|
2318 | zoomLevel: number;
|
2319 | |
2320 |
|
2321 |
|
2322 |
|
2323 | storageLevel: number;
|
2324 | |
2325 |
|
2326 |
|
2327 | allVisibleTileLoaded: boolean;
|
2328 | |
2329 |
|
2330 |
|
2331 | numTilesLoading: number;
|
2332 | |
2333 |
|
2334 |
|
2335 |
|
2336 |
|
2337 | visibleTiles: Tile[];
|
2338 | |
2339 |
|
2340 |
|
2341 |
|
2342 |
|
2343 | renderedTiles: Map<number, Tile>;
|
2344 | }
|
2345 |
|
2346 |
|
2347 |
|
2348 |
|
2349 | export declare interface DataTextureProperties {
|
2350 | width: number;
|
2351 | height: number;
|
2352 | format?: PixelFormat;
|
2353 | type?: TextureDataType;
|
2354 | }
|
2355 |
|
2356 | export declare class DebugTile extends Tile {
|
2357 | private readonly geometry;
|
2358 | private readonly m_labelPositions;
|
2359 | private m_textRenderStyle;
|
2360 | private readonly m_textLayoutStyle;
|
2361 | constructor(dataSource: DataSource, tileKey: TileKey);
|
2362 | }
|
2363 |
|
2364 | export declare class DebugTileDataSource extends DataSource {
|
2365 | private m_tilingScheme;
|
2366 | maxDbgZoomLevel: number;
|
2367 | constructor(m_tilingScheme: TilingScheme, name?: string, maxDbgZoomLevel?: number);
|
2368 | /** @override */
|
2369 | getTilingScheme(): TilingScheme;
|
2370 | /** @override */
|
2371 | getTile(tileKey: TileKey): DebugTile;
|
2372 | /** @override */
|
2373 | canGetTile(zoomLevel: number, tileKey: TileKey): boolean;
|
2374 | }
|
2375 |
|
2376 | /**
|
2377 | * This object has geometry data in the form of geometries buffers ready to be used by WebGL.
|
2378 | * These geometries are not `three.js` objects. They are pure data stored as `ArrayBuffer`s and
|
2379 | * metadata describing these buffers.
|
2380 | */
|
2381 | export declare interface DecodedTile {
|
2382 | techniques: IndexedTechnique[];
|
2383 | geometries: Geometry[];
|
2384 | pathGeometries?: PathGeometry[];
|
2385 | textPathGeometries?: TextPathGeometry[];
|
2386 | textGeometries?: TextGeometry[];
|
2387 | poiGeometries?: PoiGeometry[];
|
2388 | tileInfo?: TileInfo;
|
2389 | decodeTime?: number;
|
2390 | |
2391 |
|
2392 |
|
2393 |
|
2394 |
|
2395 | boundingBox?: OrientedBox3;
|
2396 | |
2397 |
|
2398 |
|
2399 |
|
2400 | maxGeometryHeight?: number;
|
2401 | |
2402 |
|
2403 |
|
2404 |
|
2405 |
|
2406 |
|
2407 |
|
2408 |
|
2409 | copyrightHolderIds?: string[];
|
2410 | }
|
2411 |
|
2412 | export declare const DEFAULT_MAX_THEME_INTHERITANCE_DEPTH = 4;
|
2413 |
|
2414 |
|
2415 |
|
2416 |
|
2417 |
|
2418 | export declare const DEFAULT_TEXT_DISTANCE_SCALE = 0.5;
|
2419 |
|
2420 |
|
2421 |
|
2422 |
|
2423 | export declare type Definition = LiteralValue | JsonExpr | BoxedDefinition | StyleDeclaration;
|
2424 |
|
2425 |
|
2426 |
|
2427 |
|
2428 | export declare interface Definitions {
|
2429 | [name: string]: Definition;
|
2430 | }
|
2431 |
|
2432 |
|
2433 |
|
2434 |
|
2435 |
|
2436 | export declare const DEPTH_PRE_PASS_STENCIL_MASK = 1;
|
2437 |
|
2438 |
|
2439 |
|
2440 |
|
2441 | export declare interface DepthPrePassProperties {
|
2442 | |
2443 |
|
2444 |
|
2445 | isDepthPrepassMaterial?: true;
|
2446 | }
|
2447 |
|
2448 |
|
2449 |
|
2450 |
|
2451 |
|
2452 | declare class DetailedCollisionBox extends CollisionBox {
|
2453 | readonly detailBoxes: CollisionBox[];
|
2454 | constructor(box: Math2D.Box | THREE_2.Box2 | IBox, detailBoxes: CollisionBox[]);
|
2455 | }
|
2456 |
|
2457 | /**
|
2458 | * Light type: directional.
|
2459 | *
|
2460 | * @remarks
|
2461 | *
|
2462 | * @defaultSnippets [
|
2463 | * {
|
2464 | * "label": "New Directional Light",
|
2465 | * "description": "Adds a new Directional Light",
|
2466 | * "body": {
|
2467 | * "type": "directional",
|
2468 | * "name": "${1:directional-light$:1}",
|
2469 | * "color": "#${2:fff}",
|
2470 | * "intensity": "^${3:1}",
|
2471 | * "direction": {
|
2472 | * "x": "^${4:1}",
|
2473 | * "y": "^${5:0}",
|
2474 | * "z": "^${6:0}"
|
2475 | * }
|
2476 | * }
|
2477 | * }
|
2478 | * ]
|
2479 | */
|
2480 | export declare interface DirectionalLight extends BaseLight {
|
2481 | type: "directional";
|
2482 | |
2483 |
|
2484 |
|
2485 | color: string;
|
2486 | intensity: number;
|
2487 | direction: Vector3Like;
|
2488 | castShadow?: boolean;
|
2489 | }
|
2490 |
|
2491 | export declare interface DisplacementMap {
|
2492 | xCountVertices: number;
|
2493 | yCountVertices: number;
|
2494 | buffer: Float32Array;
|
2495 | }
|
2496 |
|
2497 |
|
2498 |
|
2499 |
|
2500 | export declare type DynamicProperty<T> = T | JsonExpr | InterpolatedPropertyDefinition<T>;
|
2501 |
|
2502 | export declare class EarthConstants {
|
2503 |
|
2504 | static EQUATORIAL_CIRCUMFERENCE: number;
|
2505 |
|
2506 | static EQUATORIAL_RADIUS: number;
|
2507 |
|
2508 | static MIN_ELEVATION: number;
|
2509 |
|
2510 | static MAX_ELEVATION: number;
|
2511 |
|
2512 | static MAX_BUILDING_HEIGHT: number;
|
2513 | }
|
2514 |
|
2515 |
|
2516 |
|
2517 |
|
2518 |
|
2519 |
|
2520 |
|
2521 |
|
2522 | export declare abstract class ElevationBasedClipPlanesEvaluator implements ClipPlanesEvaluator {
|
2523 | private m_maxElevation;
|
2524 | private m_minElevation;
|
2525 | constructor(maxElevation: number, minElevation: number);
|
2526 | abstract evaluateClipPlanes(camera: THREE_2.Camera, projection: Projection, elevationProvider?: ElevationProvider): ViewRanges;
|
2527 | /**
|
2528 | * Set maximum elevation above sea level to be rendered.
|
2529 | *
|
2530 | * @param elevation - the elevation (altitude) value in world units (meters).
|
2531 | * @note If you set this exactly to the maximum rendered feature height (altitude above
|
2532 | * the sea, you may notice some flickering or even polygons disappearing related to rounding
|
2533 | * errors or depth buffer precision. In such cases increase [[nearFarMargin]] or add a little
|
2534 | * bit offset to your assumed maximum elevation.
|
2535 | * @note Reasonable values are in between (-DeadSeeDepression, MtEverestHeight>, both values
|
2536 | * are defined in [[EarthConstant]] as [[EarthConstant.MIN_ELEVATION]] and
|
2537 | * [[EarthConstant.MAX_ELEVATION]] respectively.
|
2538 | * @see minElevation for more information about precision and rounding errors.
|
2539 | */
|
2540 | set maxElevation(elevation: number);
|
2541 | /**
|
2542 | * Get maximum elevation to be covered by camera frustum.
|
2543 | */
|
2544 | get maxElevation(): number;
|
2545 | /**
|
2546 | * Set minimum elevation to be rendered, values beneath the sea level are negative.
|
2547 | *
|
2548 | * @param elevation - the minimum elevation (depression) in world units (meters).
|
2549 | * @note If you set this parameter to zero you may not see any features rendered if they are
|
2550 | * just below the sea level more than half of [[nearFarMargin]] assumed. Similarly if set to
|
2551 | * -100m and rendered features lays exactly in such depression, you may notice that problem.
|
2552 | * The errors usually come from projection precision loss and depth buffer nature (significant
|
2553 | * precision loss closer to far plane). Thus is such cases either increase the margin (if you
|
2554 | * are sure features are just at this elevation, or setup bigger offset for [[minElevation]].
|
2555 | * Reasonable values are between <-DeadSeaDepression, MtEverestHeight), where the first denotes
|
2556 | * lowest depression on the Earth defined as [[EarthConstants.MIN_ELEVATION]] and the second is
|
2557 | * the highest point our planet.
|
2558 | * @see https://developer.nvidia.com/content/depth-precision-visualized
|
2559 | */
|
2560 | set minElevation(elevation: number);
|
2561 | /**
|
2562 | * Get minimum elevation to be covered by camera frustum.
|
2563 | */
|
2564 | get minElevation(): number;
|
2565 | }
|
2566 |
|
2567 | export declare interface ElevationProvider {
|
2568 | /**
|
2569 | * Get elevation for a given geo point.
|
2570 | *
|
2571 | * @param geoPoint - geo position to query height for.
|
2572 | * @param level - Optional data level that should be used for getting the elevation.
|
2573 | * If undefined, the view's visible tile containing the point will be used.
|
2574 | * @returns The height at geoPoint or undefined if no tile was found that covers the geoPoint.
|
2575 | */
|
2576 | getHeight(geoPoint: GeoCoordinates, level?: number): number | undefined;
|
2577 | |
2578 |
|
2579 |
|
2580 |
|
2581 |
|
2582 |
|
2583 |
|
2584 | sampleHeight(geoPoint: GeoCoordinates, tileDisplacementMap: TileDisplacementMap): number;
|
2585 | |
2586 |
|
2587 |
|
2588 |
|
2589 |
|
2590 |
|
2591 |
|
2592 | rayCast(x: number, y: number): THREE.Vector3 | undefined;
|
2593 | |
2594 |
|
2595 |
|
2596 |
|
2597 |
|
2598 |
|
2599 |
|
2600 |
|
2601 | getDisplacementMap(tileKey: TileKey): TileDisplacementMap | undefined;
|
2602 | |
2603 |
|
2604 |
|
2605 |
|
2606 | getTilingScheme(): TilingScheme | undefined;
|
2607 | |
2608 |
|
2609 |
|
2610 | clearCache(): void;
|
2611 | }
|
2612 |
|
2613 |
|
2614 |
|
2615 |
|
2616 | export declare interface ElevationRange {
|
2617 | minElevation: number;
|
2618 | maxElevation: number;
|
2619 | calculationStatus?: CalculationStatus;
|
2620 | }
|
2621 |
|
2622 |
|
2623 |
|
2624 |
|
2625 |
|
2626 | export declare interface ElevationRangeSource {
|
2627 | |
2628 |
|
2629 |
|
2630 |
|
2631 | getElevationRange(tileKey: TileKey): ElevationRange;
|
2632 | |
2633 |
|
2634 |
|
2635 |
|
2636 |
|
2637 |
|
2638 |
|
2639 |
|
2640 | getTilingScheme(): TilingScheme;
|
2641 | |
2642 |
|
2643 |
|
2644 | connect(): Promise<void>;
|
2645 | |
2646 |
|
2647 |
|
2648 |
|
2649 | ready(): boolean;
|
2650 | }
|
2651 |
|
2652 |
|
2653 |
|
2654 |
|
2655 |
|
2656 |
|
2657 |
|
2658 |
|
2659 |
|
2660 |
|
2661 |
|
2662 |
|
2663 |
|
2664 |
|
2665 |
|
2666 |
|
2667 |
|
2668 |
|
2669 |
|
2670 |
|
2671 |
|
2672 | export declare class Env {
|
2673 | |
2674 |
|
2675 |
|
2676 |
|
2677 |
|
2678 | static isEnv(object: any): object is Env;
|
2679 | |
2680 |
|
2681 |
|
2682 |
|
2683 |
|
2684 | lookup(name: string): Value | undefined;
|
2685 | |
2686 |
|
2687 |
|
2688 | unmap(): ValueMap;
|
2689 | }
|
2690 |
|
2691 |
|
2692 |
|
2693 |
|
2694 | export declare type EqualityOp = "~=" | "^=" | "$=" | "==" | "!=";
|
2695 |
|
2696 |
|
2697 |
|
2698 |
|
2699 |
|
2700 | export declare const equirectangularProjection: Projection;
|
2701 |
|
2702 |
|
2703 |
|
2704 |
|
2705 |
|
2706 |
|
2707 |
|
2708 |
|
2709 |
|
2710 |
|
2711 |
|
2712 |
|
2713 |
|
2714 |
|
2715 | export declare function evaluateBaseColorProperty(technique: Technique, env: Env): number | undefined;
|
2716 |
|
2717 |
|
2718 |
|
2719 |
|
2720 |
|
2721 |
|
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 |
|
2727 |
|
2728 | export declare function evaluateColorProperty(value: Value, env?: Env): number | undefined;
|
2729 |
|
2730 |
|
2731 |
|
2732 |
|
2733 | export declare enum EventNames {
|
2734 | Update = "update",
|
2735 | BeginInteraction = "begin-interaction",
|
2736 | EndInteraction = "end-interaction"
|
2737 | }
|
2738 |
|
2739 |
|
2740 |
|
2741 |
|
2742 |
|
2743 |
|
2744 | export declare abstract class Expr {
|
2745 | |
2746 |
|
2747 |
|
2748 |
|
2749 |
|
2750 | static isExpr(value: any): value is Expr;
|
2751 | |
2752 |
|
2753 |
|
2754 |
|
2755 |
|
2756 |
|
2757 |
|
2758 | static parse(code: string): Expr | never;
|
2759 | |
2760 |
|
2761 |
|
2762 |
|
2763 |
|
2764 |
|
2765 |
|
2766 |
|
2767 |
|
2768 |
|
2769 |
|
2770 |
|
2771 |
|
2772 |
|
2773 |
|
2774 |
|
2775 |
|
2776 |
|
2777 |
|
2778 | static fromJSON(json: JsonValue, definitions?: Definitions, definitionExprCache?: Map<string, Expr>): Expr;
|
2779 | private m_dependencies?;
|
2780 | private m_isDynamic?;
|
2781 | |
2782 |
|
2783 |
|
2784 |
|
2785 |
|
2786 |
|
2787 |
|
2788 | evaluate(env: Env, scope?: ExprScope, cache?: Map<Expr, Value>): Value | never;
|
2789 | |
2790 |
|
2791 |
|
2792 |
|
2793 |
|
2794 |
|
2795 |
|
2796 |
|
2797 | instantiate(context: InstantiationContext): Expr;
|
2798 | |
2799 |
|
2800 |
|
2801 | dependencies(): ExprDependencies;
|
2802 | |
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 |
|
2808 | intern(pool: ExprPool): Expr;
|
2809 | toJSON(): JsonValue;
|
2810 | |
2811 |
|
2812 |
|
2813 | isDynamic(): boolean;
|
2814 | |
2815 |
|
2816 |
|
2817 |
|
2818 |
|
2819 |
|
2820 | abstract accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
2821 | |
2822 |
|
2823 |
|
2824 |
|
2825 |
|
2826 |
|
2827 | protected abstract exprIsDynamic(): boolean;
|
2828 | }
|
2829 |
|
2830 |
|
2831 |
|
2832 |
|
2833 | export declare class ExprDependencies {
|
2834 | |
2835 |
|
2836 |
|
2837 | readonly properties: Set<string>;
|
2838 | |
2839 |
|
2840 |
|
2841 | featureState?: boolean;
|
2842 | |
2843 |
|
2844 |
|
2845 | volatile?: boolean;
|
2846 | }
|
2847 |
|
2848 |
|
2849 |
|
2850 |
|
2851 |
|
2852 |
|
2853 | declare class ExprEvaluator implements ExprVisitor<Value, ExprEvaluatorContext> {
|
2854 | static defineOperator(op: string, builtin: OperatorDescriptor): void;
|
2855 | static defineOperators(builtins: OperatorDescriptorMap): void;
|
2856 | |
2857 |
|
2858 |
|
2859 |
|
2860 | static getOperator(op: string): OperatorDescriptor | undefined;
|
2861 | visitVarExpr(expr: VarExpr, context: ExprEvaluatorContext): Value;
|
2862 | visitNullLiteralExpr(expr: NullLiteralExpr, context: ExprEvaluatorContext): Value;
|
2863 | visitBooleanLiteralExpr(expr: BooleanLiteralExpr, context: ExprEvaluatorContext): Value;
|
2864 | visitNumberLiteralExpr(expr: NumberLiteralExpr, context: ExprEvaluatorContext): Value;
|
2865 | visitStringLiteralExpr(expr: StringLiteralExpr, context: ExprEvaluatorContext): Value;
|
2866 | visitObjectLiteralExpr(expr: ObjectLiteralExpr, context: ExprEvaluatorContext): Value;
|
2867 | visitHasAttributeExpr(expr: HasAttributeExpr, context: ExprEvaluatorContext): Value;
|
2868 | visitMatchExpr(match: MatchExpr, context: ExprEvaluatorContext): Value;
|
2869 | visitCaseExpr(match: CaseExpr, context: ExprEvaluatorContext): Value;
|
2870 | visitCallExpr(expr: CallExpr, context: ExprEvaluatorContext): Value;
|
2871 | visitStepExpr(expr: StepExpr, context: ExprEvaluatorContext): Value;
|
2872 | visitInterpolateExpr(expr: InterpolateExpr, context: ExprEvaluatorContext): Value;
|
2873 | }
|
2874 |
|
2875 | declare class ExprEvaluatorContext {
|
2876 | readonly evaluator: ExprEvaluator;
|
2877 | readonly env: Env;
|
2878 | readonly scope: ExprScope;
|
2879 | readonly cache?: Map<Expr, Value> | undefined;
|
2880 | constructor(evaluator: ExprEvaluator, env: Env, scope: ExprScope, cache?: Map<Expr, Value> | undefined);
|
2881 | /**
|
2882 | * Evaluate the given expression.
|
2883 | *
|
2884 | * @param expr - The {@link Expr} to evaluate.
|
2885 | */
|
2886 | evaluate(expr: Expr | undefined): Value;
|
2887 | |
2888 |
|
2889 |
|
2890 |
|
2891 |
|
2892 | wrapValue(value: Value | Expr): Expr;
|
2893 | }
|
2894 |
|
2895 |
|
2896 |
|
2897 |
|
2898 |
|
2899 |
|
2900 | declare class ExprPool implements ExprVisitor<Expr, void> {
|
2901 | private readonly m_booleanLiterals;
|
2902 | private readonly m_numberLiterals;
|
2903 | private readonly m_stringLiterals;
|
2904 | private readonly m_objectLiterals;
|
2905 | private readonly m_arrayLiterals;
|
2906 | private readonly m_varExprs;
|
2907 | private readonly m_hasAttributeExprs;
|
2908 | private readonly m_matchExprs;
|
2909 | private readonly m_caseExprs;
|
2910 | private readonly m_interpolateExprs;
|
2911 | private readonly m_stepExprs;
|
2912 | private readonly m_callExprs;
|
2913 | |
2914 |
|
2915 |
|
2916 |
|
2917 |
|
2918 |
|
2919 |
|
2920 | add(expr: Expr): Expr;
|
2921 | visitNullLiteralExpr(expr: NullLiteralExpr, context: void): Expr;
|
2922 | visitBooleanLiteralExpr(expr: BooleanLiteralExpr, context: void): Expr;
|
2923 | visitNumberLiteralExpr(expr: NumberLiteralExpr, context: void): Expr;
|
2924 | visitStringLiteralExpr(expr: StringLiteralExpr, context: void): Expr;
|
2925 | visitObjectLiteralExpr(expr: ObjectLiteralExpr, context: void): Expr;
|
2926 | visitVarExpr(expr: VarExpr, context: void): Expr;
|
2927 | visitHasAttributeExpr(expr: HasAttributeExpr, context: void): Expr;
|
2928 | visitMatchExpr(expr: MatchExpr, context: void): Expr;
|
2929 | visitCaseExpr(expr: CaseExpr, context: void): Expr;
|
2930 | visitCallExpr(expr: CallExpr, context: void): Expr;
|
2931 | visitStepExpr(expr: StepExpr, context: void): Expr;
|
2932 | visitInterpolateExpr(expr: InterpolateExpr, context: void): Expr;
|
2933 | }
|
2934 |
|
2935 |
|
2936 |
|
2937 |
|
2938 | export declare enum ExprScope {
|
2939 | |
2940 |
|
2941 |
|
2942 | Value = 0,
|
2943 | |
2944 |
|
2945 |
|
2946 | Condition = 1,
|
2947 | |
2948 |
|
2949 |
|
2950 | Dynamic = 2
|
2951 | }
|
2952 |
|
2953 |
|
2954 |
|
2955 |
|
2956 | export declare interface ExprVisitor<Result, Context> {
|
2957 | visitNullLiteralExpr(expr: NullLiteralExpr, context: Context): Result;
|
2958 | visitBooleanLiteralExpr(expr: BooleanLiteralExpr, context: Context): Result;
|
2959 | visitNumberLiteralExpr(expr: NumberLiteralExpr, context: Context): Result;
|
2960 | visitStringLiteralExpr(expr: StringLiteralExpr, context: Context): Result;
|
2961 | visitObjectLiteralExpr(expr: ObjectLiteralExpr, context: Context): Result;
|
2962 | visitVarExpr(expr: VarExpr, context: Context): Result;
|
2963 | visitHasAttributeExpr(expr: HasAttributeExpr, context: Context): Result;
|
2964 | visitCallExpr(expr: CallExpr, context: Context): Result;
|
2965 | visitMatchExpr(expr: MatchExpr, context: Context): Result;
|
2966 | visitCaseExpr(expr: CaseExpr, context: Context): Result;
|
2967 | visitStepExpr(expr: StepExpr, context: Context): Result;
|
2968 | visitInterpolateExpr(expr: InterpolateExpr, context: Context): Result;
|
2969 | }
|
2970 |
|
2971 | export declare type ExtendedMesh = THREE_2.Mesh & {
|
2972 | |
2973 |
|
2974 |
|
2975 | displacement?: THREE_2.Vector3;
|
2976 | };
|
2977 |
|
2978 |
|
2979 |
|
2980 |
|
2981 | export declare type ExtrudedPolygonStyle = BaseStyle<"extruded-polygon", ExtrudedPolygonTechniqueParams>;
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
2986 |
|
2987 | export declare interface ExtrudedPolygonTechnique extends MakeTechniqueAttrs<ExtrudedPolygonTechniqueParams> {
|
2988 | name: "extruded-polygon";
|
2989 | }
|
2990 |
|
2991 |
|
2992 |
|
2993 |
|
2994 | export declare interface ExtrudedPolygonTechniqueParams extends StandardTechniqueParams {
|
2995 | |
2996 |
|
2997 |
|
2998 | footprint?: boolean;
|
2999 | |
3000 |
|
3001 |
|
3002 |
|
3003 | maxSlope?: number;
|
3004 | |
3005 |
|
3006 |
|
3007 | lineWidth: DynamicProperty<number>;
|
3008 | |
3009 |
|
3010 |
|
3011 |
|
3012 |
|
3013 | lineColor?: DynamicProperty<StyleColor>;
|
3014 | |
3015 |
|
3016 |
|
3017 | lineColorMix?: number;
|
3018 | |
3019 |
|
3020 |
|
3021 |
|
3022 | lineFadeNear?: DynamicProperty<number>;
|
3023 | |
3024 |
|
3025 |
|
3026 |
|
3027 | lineFadeFar?: DynamicProperty<number>;
|
3028 | |
3029 |
|
3030 |
|
3031 |
|
3032 |
|
3033 | height?: DynamicProperty<number>;
|
3034 | |
3035 |
|
3036 |
|
3037 |
|
3038 |
|
3039 | floorHeight?: DynamicProperty<number>;
|
3040 | |
3041 |
|
3042 |
|
3043 |
|
3044 |
|
3045 |
|
3046 | defaultHeight?: number;
|
3047 | |
3048 |
|
3049 |
|
3050 |
|
3051 |
|
3052 | defaultColor?: DynamicProperty<StyleColor>;
|
3053 | |
3054 |
|
3055 |
|
3056 |
|
3057 |
|
3058 |
|
3059 | constantHeight?: boolean;
|
3060 | |
3061 |
|
3062 |
|
3063 |
|
3064 |
|
3065 | boundaryWalls?: boolean;
|
3066 | |
3067 |
|
3068 |
|
3069 | animateExtrusion?: DynamicProperty<boolean>;
|
3070 | |
3071 |
|
3072 |
|
3073 | animateExtrusionDuration?: number;
|
3074 | |
3075 |
|
3076 |
|
3077 |
|
3078 |
|
3079 |
|
3080 |
|
3081 |
|
3082 |
|
3083 |
|
3084 | enableDepthPrePass?: boolean;
|
3085 | }
|
3086 |
|
3087 | export declare const FALLBACK_RENDER_ORDER_OFFSET = 20000;
|
3088 |
|
3089 |
|
3090 |
|
3091 |
|
3092 | export declare interface Feature {
|
3093 | type: "Feature";
|
3094 | bbox?: number[];
|
3095 | id?: string;
|
3096 | geometry: FeatureGeometry | GeometryCollection;
|
3097 | properties?: any;
|
3098 | title?: string;
|
3099 | }
|
3100 |
|
3101 |
|
3102 |
|
3103 |
|
3104 | export declare interface FeatureCollection {
|
3105 | type: "FeatureCollection";
|
3106 | features: Feature[];
|
3107 | }
|
3108 |
|
3109 |
|
3110 |
|
3111 |
|
3112 | export declare interface FeatureDataSourceOptions extends OmvDataSourceParameters, GeoJsonDataProviderOptions {
|
3113 | |
3114 |
|
3115 |
|
3116 |
|
3117 |
|
3118 | features?: MapViewFeature[];
|
3119 | |
3120 |
|
3121 |
|
3122 |
|
3123 |
|
3124 | geojson?: FeatureCollection | GeometryCollection | Feature;
|
3125 | }
|
3126 |
|
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 | export declare interface FeatureDetails {
|
3132 | featureId?: string;
|
3133 | featureClass?: string;
|
3134 | }
|
3135 |
|
3136 |
|
3137 |
|
3138 |
|
3139 | export declare type FeatureGeometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon;
|
3140 |
|
3141 |
|
3142 |
|
3143 |
|
3144 | export declare enum FeatureModifierId {
|
3145 | |
3146 |
|
3147 |
|
3148 |
|
3149 |
|
3150 |
|
3151 | default = 0,
|
3152 | |
3153 |
|
3154 |
|
3155 | tomTom = 1
|
3156 | }
|
3157 |
|
3158 |
|
3159 |
|
3160 |
|
3161 | export declare class FeaturesDataSource extends OmvDataSource {
|
3162 | private m_isAttached;
|
3163 | private m_featureCollection;
|
3164 | |
3165 |
|
3166 |
|
3167 |
|
3168 |
|
3169 | constructor(options?: FeatureDataSourceOptions);
|
3170 | /**
|
3171 | * This method allows to directly add a GeoJSON without using [[MapViewFeature]] instances. It
|
3172 | * also overwrites existing features in this data source. To add a GeoJSON without overwriting
|
3173 | * the data source, one should loop through it to create [[MapViewFeature]] and add them with
|
3174 | * the `add` method.
|
3175 | *
|
3176 | * @param geojson - A javascript object matching the GeoJSON specification.
|
3177 | */
|
3178 | setFromGeojson(geojson: FeatureCollection | GeometryCollection | Feature): this;
|
3179 | /**
|
3180 | * Adds a custom feature in the datasource.
|
3181 | *
|
3182 | * @param features - The features to add in the datasource.
|
3183 | */
|
3184 | add(...features: MapViewFeature[]): this;
|
3185 | /**
|
3186 | * Removes a custom feature in the datasource.
|
3187 | *
|
3188 | * @param features - The features to add in the datasource.
|
3189 | */
|
3190 | remove(...features: MapViewFeature[]): this;
|
3191 | /**
|
3192 | * Removes all the custom features in this `FeaturesDataSource`.
|
3193 | */
|
3194 | clear(): void;
|
3195 | /** @override */
|
3196 | connect(): Promise<void>;
|
3197 | /**
|
3198 | * Override [[DataSource.attach]] to know if we're really connected to [[MapView]].
|
3199 | * @param mapView -
|
3200 | * @override
|
3201 | */
|
3202 | attach(mapView: MapView): void;
|
3203 | /**
|
3204 | * Override [[DataSource.detach]] to know if we're really connected to [[MapView]].
|
3205 | * @param mapView -
|
3206 | * @override
|
3207 | */
|
3208 | detach(mapView: MapView): void;
|
3209 | /**
|
3210 | * Get [[GeoBox]] containing all the points in datasource.
|
3211 | *
|
3212 | * Returns undefined if there were no features added to this DS.
|
3213 | */
|
3214 | getGeoBox(): GeoBox | undefined;
|
3215 | private addFeature;
|
3216 | private removeFeature;
|
3217 | private update;
|
3218 | private emptyGeojson;
|
3219 | }
|
3220 |
|
3221 | export declare type FillStyle = BaseStyle<"fill", FillTechniqueParams>;
|
3222 |
|
3223 | /**
|
3224 | * Runtime representation of [[FillStyle]] as parsed by [[StyleSetEvaluator]].
|
3225 | * For technique parameters see [[FillTechniqueParams]].
|
3226 | */
|
3227 | export declare interface FillTechnique extends MakeTechniqueAttrs<FillTechniqueParams> {
|
3228 | name: "fill";
|
3229 | }
|
3230 |
|
3231 |
|
3232 |
|
3233 |
|
3234 | export declare interface FillTechniqueParams extends BaseTechniqueParams, PolygonalTechniqueParams {
|
3235 | |
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 | color?: DynamicProperty<StyleColor>;
|
3241 | |
3242 |
|
3243 |
|
3244 |
|
3245 | transparent?: boolean;
|
3246 | |
3247 |
|
3248 |
|
3249 |
|
3250 | opacity?: DynamicProperty<number>;
|
3251 | |
3252 |
|
3253 |
|
3254 | wireframe?: boolean;
|
3255 | |
3256 |
|
3257 |
|
3258 | lineWidth?: DynamicProperty<number>;
|
3259 | }
|
3260 |
|
3261 |
|
3262 |
|
3263 |
|
3264 | export declare class FixedClipPlanesEvaluator implements ClipPlanesEvaluator {
|
3265 | readonly minNear: number;
|
3266 | readonly minFarOffset: number;
|
3267 | readonly minFar: number;
|
3268 | private m_nearPlane;
|
3269 | private m_farPlane;
|
3270 | constructor(minNear?: number, minFarOffset?: number);
|
3271 | get nearPlane(): number;
|
3272 | set nearPlane(fixedNear: number);
|
3273 | get farPlane(): number;
|
3274 | set farPlane(fixedFar: number);
|
3275 | set minElevation(elevation: number);
|
3276 | get minElevation(): number;
|
3277 | set maxElevation(elevation: number);
|
3278 | get maxElevation(): number;
|
3279 | /** @override */
|
3280 | evaluateClipPlanes(camera: THREE_2.Camera, projection: Projection, elevationProvider?: ElevationProvider): ViewRanges;
|
3281 | private invalidatePlanes;
|
3282 | }
|
3283 |
|
3284 | /**
|
3285 | * A type representing HARP themes with all the styleset declarations
|
3286 | * grouped in one [[Array]].
|
3287 | *
|
3288 | * @internal This type will merge with {@link Theme}.
|
3289 | */
|
3290 | export declare type FlatTheme = Omit<Theme, "styles"> & {
|
3291 | |
3292 |
|
3293 |
|
3294 | styles?: StyleSet;
|
3295 | };
|
3296 |
|
3297 |
|
3298 |
|
3299 |
|
3300 |
|
3301 | export declare class FlatTileBoundingBoxGenerator {
|
3302 | readonly tilingScheme: TilingScheme;
|
3303 | readonly minElevation: number;
|
3304 | readonly maxElevation: number;
|
3305 | private readonly m_tilingScheme;
|
3306 | private readonly m_worldDimensions;
|
3307 | private readonly m_worldBox;
|
3308 | |
3309 |
|
3310 |
|
3311 |
|
3312 |
|
3313 |
|
3314 |
|
3315 |
|
3316 | constructor(tilingScheme: TilingScheme, minElevation?: number, maxElevation?: number);
|
3317 | /**
|
3318 | * Returns the {@link Projection} of the {@link TilingScheme}.
|
3319 | */
|
3320 | get projection(): Projection;
|
3321 | |
3322 |
|
3323 |
|
3324 | get subdivisionScheme(): SubdivisionScheme;
|
3325 | |
3326 |
|
3327 |
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 |
|
3333 |
|
3334 |
|
3335 |
|
3336 |
|
3337 |
|
3338 |
|
3339 | getWorldBox(tileKey: TileKey, result?: Box3Like): Box3Like;
|
3340 | |
3341 |
|
3342 |
|
3343 |
|
3344 |
|
3345 |
|
3346 |
|
3347 |
|
3348 |
|
3349 |
|
3350 |
|
3351 | getGeoBox(tileKey: TileKey): GeoBox;
|
3352 | }
|
3353 |
|
3354 |
|
3355 |
|
3356 |
|
3357 | export declare interface Fog {
|
3358 |
|
3359 | color: string;
|
3360 |
|
3361 | startRatio: number;
|
3362 | }
|
3363 |
|
3364 |
|
3365 |
|
3366 |
|
3367 | declare interface Font {
|
3368 | name: string;
|
3369 | metrics: FontMetrics;
|
3370 | charset: string;
|
3371 | bold?: string;
|
3372 | italic?: string;
|
3373 | boldItalic?: string;
|
3374 | }
|
3375 |
|
3376 |
|
3377 |
|
3378 |
|
3379 |
|
3380 |
|
3381 |
|
3382 |
|
3383 |
|
3384 |
|
3385 |
|
3386 |
|
3387 |
|
3388 | declare class FontCatalog {
|
3389 | readonly url: string;
|
3390 | readonly name: string;
|
3391 | readonly type: string;
|
3392 | readonly size: number;
|
3393 | readonly maxWidth: number;
|
3394 | readonly maxHeight: number;
|
3395 | readonly distanceRange: number;
|
3396 | readonly fonts: Font[];
|
3397 | readonly unicodeBlocks: UnicodeBlock[];
|
3398 | readonly maxCodePointCount: number;
|
3399 | private m_replacementGlyph;
|
3400 | |
3401 |
|
3402 |
|
3403 |
|
3404 |
|
3405 |
|
3406 |
|
3407 |
|
3408 |
|
3409 | static load(path: string, maxCodePointCount: number): Promise<FontCatalog>;
|
3410 | static loadTexture(url: string): Promise<THREE_2.Texture>;
|
3411 | static loadJSON(url: string): Promise<any>;
|
3412 | private m_glyphTextureCache;
|
3413 | private m_loadingJson;
|
3414 | private m_loadingPages;
|
3415 | private m_loadingGlyphs;
|
3416 | private m_loadedJson;
|
3417 | private m_loadedPages;
|
3418 | private m_loadedGlyphs;
|
3419 | |
3420 |
|
3421 |
|
3422 |
|
3423 |
|
3424 |
|
3425 |
|
3426 |
|
3427 |
|
3428 |
|
3429 |
|
3430 |
|
3431 |
|
3432 |
|
3433 |
|
3434 |
|
3435 |
|
3436 |
|
3437 |
|
3438 |
|
3439 | private constructor();
|
3440 | /**
|
3441 | * Release all allocated resources.
|
3442 | */
|
3443 | dispose(): void;
|
3444 | /**
|
3445 | * Removes all loaded (and loading) assets.
|
3446 | */
|
3447 | clear(): void;
|
3448 | /**
|
3449 | * Updates the internal WebGLRenderTarget.
|
3450 | * The update will copy the newly introduced glyphs since the previous update.
|
3451 | *
|
3452 | * @param renderer - WebGLRenderer.
|
3453 | */
|
3454 | update(renderer: THREE_2.WebGLRenderer): void;
|
3455 | /**
|
3456 | * Internal WebGL Texture.
|
3457 | */
|
3458 | get texture(): THREE_2.Texture;
|
3459 | /**
|
3460 | * Internal WebGL Texture size.
|
3461 | */
|
3462 | get textureSize(): THREE_2.Vector2;
|
3463 | /**
|
3464 | * Current internal loading state.
|
3465 | */
|
3466 | get isLoading(): boolean;
|
3467 | /**
|
3468 | * Loads the description file for a specific [[UnicodeBlock]]. This speeds up consequent calls
|
3469 | * to `FontCatalog`.loadCharset() that require glyphs from this block to be loaded.
|
3470 | *
|
3471 | * @param block - Requested [[UnicodeBlock]].
|
3472 | * @param font - [[Font]] to retrieve this Unicode block from.
|
3473 | * @param fontStyle - [[FontStyle]] assets to load.
|
3474 | * @param loadPages - If `true`, all pages in this Unicode block will also be loaded.
|
3475 | *
|
3476 | * @returns Loaded Unicode Block json.
|
3477 | */
|
3478 | loadBlock(block: UnicodeBlock, font: Font, fontStyle: FontStyle, loadPages?: boolean): Promise<any>;
|
3479 | /**
|
3480 | * Releases the description file for a specific [[UnicodeBlock]] (and all downloaded pages).
|
3481 | * Safe to call when no assets for this block have been loaded.
|
3482 | *
|
3483 | * @param block - Requested [[UnicodeBlock]].
|
3484 | * @param font - [[Font]] to remove this Unicode block from.
|
3485 | * @param fontStyle - [[FontStyle]] assets to remove.
|
3486 | */
|
3487 | removeBlock(block: UnicodeBlock, font: Font, fontStyle: FontStyle): void;
|
3488 | /**
|
3489 | * Loads all the required glyphs needed to render the input text. Character repetition will not
|
3490 | * be considered, and only styled assets (with applied font selection, style and variants) will
|
3491 | * be loaded.
|
3492 | *
|
3493 | * @param input - Input text.
|
3494 | * @param style - Specific [[TextRenderStyle]] for which glyphs will be loaded.
|
3495 | *
|
3496 | * @returns Promise containing an array of all loaded [[GlyphData]] for the input text.
|
3497 | */
|
3498 | loadCharset(input: string, style: TextRenderStyle): Promise<GlyphData[]>;
|
3499 | /**
|
3500 | * Retrieves the loaded [[GlyphData]] for a specific character.
|
3501 | * Returns `undefined` if the assets for this glyph haven't been loaded yet.
|
3502 | *
|
3503 | * @param codePoint - Character's Unicode code point.
|
3504 | * @param font - [[Font]] to get this glyph from.
|
3505 | * @param fontStyle - Specific [[FontStyle]] to get glyphs for.
|
3506 | *
|
3507 | * @returns [[GlyphData]] for this code point.
|
3508 | */
|
3509 | getGlyph(codePoint: number, font: Font, fontStyle: FontStyle): GlyphData | undefined;
|
3510 | /**
|
3511 | * Retrieves the loaded [[GlyphData]] for the specified text.
|
3512 | * Returns `undefined` if the assets for these glyphs haven't been loaded yet.
|
3513 | *
|
3514 | * @param input - Input text.
|
3515 | * @param style - Specific [[TextRenderStyle]] to get glyphs for.
|
3516 | * @param letterCaseArray - Array containing the original letter case for the requested glyphs.
|
3517 | *
|
3518 | * @returns Array containing [[GlyphData]] for each character of the input text.
|
3519 | */
|
3520 | getGlyphs(input: string, style: TextRenderStyle, letterCaseArray?: boolean[]): GlyphData[] | undefined;
|
3521 | /**
|
3522 | * Gets the best matched font for a specific character.
|
3523 | *
|
3524 | * @param codePoint - Character's Unicode code point.
|
3525 | * @param fontName - Font name suggestion.
|
3526 | *
|
3527 | * @returns Best matched font.
|
3528 | */
|
3529 | getFont(codePoint: number, fontName?: string): Font;
|
3530 | /**
|
3531 | * Update the info with the memory footprint caused by objects owned by the `FontCatalog`.
|
3532 | *
|
3533 | * @param info - The info object to increment with the values from this `FontCatalog`.
|
3534 | */
|
3535 | updateMemoryUsage(info: MemoryUsage): void;
|
3536 | private createReplacementGlyph;
|
3537 | private loadAssets;
|
3538 | private loadPage;
|
3539 | private getAssetsPath;
|
3540 | }
|
3541 |
|
3542 | declare type FontCatalogCallback = (name: string, catalog: FontCatalog) => void;
|
3543 |
|
3544 | /**
|
3545 | * Fonts used for all text related rendering.
|
3546 | */
|
3547 | export declare interface FontCatalogConfig {
|
3548 | url: string;
|
3549 | name: string;
|
3550 | }
|
3551 |
|
3552 | declare class FontCatalogLoader {
|
3553 | private readonly m_theme;
|
3554 | private m_catalogsLoading;
|
3555 | constructor(m_theme: Theme);
|
3556 | /**
|
3557 | * Initializes font catalog loader.
|
3558 | * @param defaultFontCatalogUrl - Url of the font catalog that will be used by default if the
|
3559 | * theme doesn't define any font catalog.
|
3560 | * @returns Name of the default font catalog.
|
3561 | */
|
3562 | initialize(defaultFontCatalogUrl: string): string;
|
3563 | loadCatalogs(catalogCallback: FontCatalogCallback): Promise<void[]>;
|
3564 | get loading(): boolean;
|
3565 | }
|
3566 |
|
3567 | /**
|
3568 | * Metrics defining the placement and rendering of all glyphs in a given [[Font]].
|
3569 | */
|
3570 | declare interface FontMetrics {
|
3571 | size: number;
|
3572 | distanceRange: number;
|
3573 | base: number;
|
3574 | lineHeight: number;
|
3575 | lineGap: number;
|
3576 | capHeight: number;
|
3577 | xHeight: number;
|
3578 | }
|
3579 |
|
3580 |
|
3581 |
|
3582 |
|
3583 | declare interface FontSize {
|
3584 | unit: FontUnit;
|
3585 | size: number;
|
3586 | backgroundSize: number;
|
3587 | }
|
3588 |
|
3589 |
|
3590 |
|
3591 |
|
3592 | declare enum FontStyle {
|
3593 | Regular = 0,
|
3594 | Bold = 1,
|
3595 | Italic = 2,
|
3596 | BoldItalic = 3
|
3597 | }
|
3598 |
|
3599 |
|
3600 |
|
3601 |
|
3602 | declare enum FontUnit {
|
3603 | Em = 0,
|
3604 | Pixel = 1,
|
3605 | Point = 2,
|
3606 | Percent = 3
|
3607 | }
|
3608 |
|
3609 |
|
3610 |
|
3611 |
|
3612 | declare enum FontVariant {
|
3613 | Regular = 0,
|
3614 | AllCaps = 1,
|
3615 | SmallCaps = 2
|
3616 | }
|
3617 |
|
3618 |
|
3619 |
|
3620 |
|
3621 | export declare interface FovCalculation {
|
3622 | |
3623 |
|
3624 |
|
3625 |
|
3626 |
|
3627 |
|
3628 |
|
3629 |
|
3630 |
|
3631 |
|
3632 |
|
3633 |
|
3634 |
|
3635 |
|
3636 |
|
3637 |
|
3638 | type: "fixed" | "dynamic";
|
3639 | |
3640 |
|
3641 |
|
3642 |
|
3643 |
|
3644 |
|
3645 |
|
3646 |
|
3647 |
|
3648 | fov: number;
|
3649 | }
|
3650 |
|
3651 |
|
3652 |
|
3653 |
|
3654 | export declare class FrameStats {
|
3655 | readonly entries: Map<string, number>;
|
3656 | messages?: string[];
|
3657 | |
3658 |
|
3659 |
|
3660 |
|
3661 |
|
3662 |
|
3663 |
|
3664 | getValue(name: string): number | undefined;
|
3665 | |
3666 |
|
3667 |
|
3668 |
|
3669 |
|
3670 |
|
3671 | setValue(name: string, value: number): void;
|
3672 | |
3673 |
|
3674 |
|
3675 |
|
3676 |
|
3677 |
|
3678 |
|
3679 | addValue(name: string, value: number): void;
|
3680 | |
3681 |
|
3682 |
|
3683 |
|
3684 |
|
3685 | addMessage(message: string): void;
|
3686 | |
3687 |
|
3688 |
|
3689 | reset(): void;
|
3690 | }
|
3691 |
|
3692 |
|
3693 |
|
3694 |
|
3695 |
|
3696 |
|
3697 |
|
3698 |
|
3699 | export declare class FrameStatsArray {
|
3700 | readonly capacity: number;
|
3701 | readonly frameEntries: Map<string, RingBuffer<number>>;
|
3702 | readonly messages: RingBuffer<string[] | undefined>;
|
3703 | constructor(capacity?: number);
|
3704 | get length(): number;
|
3705 | reset(): void;
|
3706 | addFrame(frameStats: FrameStats): void;
|
3707 | /**
|
3708 | * Prints all values to the console.
|
3709 | */
|
3710 | log(): void;
|
3711 | }
|
3712 |
|
3713 | /**
|
3714 | * Computes the tiles intersected by the frustum defined by the current camera setup.
|
3715 | */
|
3716 | declare class FrustumIntersection {
|
3717 | private readonly m_camera;
|
3718 | readonly mapView: MapView;
|
3719 | private readonly m_extendedFrustumCulling;
|
3720 | private readonly m_tileWrappingEnabled;
|
3721 | private readonly m_enableMixedLod;
|
3722 | private readonly m_frustum;
|
3723 | private readonly m_viewProjectionMatrix;
|
3724 | private readonly m_mapTileCuller;
|
3725 | private m_rootTileKeys;
|
3726 | private readonly m_tileKeyEntries;
|
3727 | constructor(m_camera: THREE_2.PerspectiveCamera, mapView: MapView, m_extendedFrustumCulling: boolean, m_tileWrappingEnabled: boolean, m_enableMixedLod: boolean);
|
3728 | /**
|
3729 | * Return camera used for generating frustum.
|
3730 | */
|
3731 | get camera(): THREE_2.PerspectiveCamera;
|
3732 | /**
|
3733 | * Return projection used to convert geo coordinates to world coordinates.
|
3734 | */
|
3735 | get projection(): Projection;
|
3736 | /**
|
3737 | * Updates the frustum to match the current camera setup.
|
3738 | */
|
3739 | updateFrustum(projectionMatrixOverride?: THREE_2.Matrix4): void;
|
3740 | /**
|
3741 | * Computes the tiles intersected by the updated frustum, see [[updateFrustum]].
|
3742 | *
|
3743 | * @param tilingScheme - The tiling scheme used to generate the tiles.
|
3744 | * @param elevationRangeSource - Source of elevation range data if any.
|
3745 | * @param zoomLevels - A list of zoom levels to render.
|
3746 | * @param dataSources - A list of data sources to render.
|
3747 | * @returns The computation result, see [[FrustumIntersection.Result]].
|
3748 | */
|
3749 | compute(tilingScheme: TilingScheme, elevationRangeSource: ElevationRangeSource | undefined, zoomLevels: number[], dataSources: DataSource[]): IntersectionResult;
|
3750 | private getTileKeyEntry;
|
3751 | /**
|
3752 | * Estimate screen space area of tile and distance to center of tile
|
3753 | * @param tileBounds - The bounding volume of a tile
|
3754 | * @return Area estimate and distance to tile center in clip space
|
3755 | */
|
3756 | private computeTileAreaAndDistance;
|
3757 | /**
|
3758 | * Create a list of root nodes to test against the frustum. The root nodes each start at level 0
|
3759 | * and have an offset (see {@link Tile}) based on:
|
3760 | * - the current position [[worldCenter]].
|
3761 | * - the height of the camera above the world.
|
3762 | * - the field of view of the camera (the maximum value between the horizontal / vertical
|
3763 | * values)
|
3764 | * - the tilt of the camera (because we see more tiles when tilted).
|
3765 | *
|
3766 | * @param worldCenter - The center of the camera in world space.
|
3767 | */
|
3768 | private computeRequiredInitialRootTileKeys;
|
3769 | }
|
3770 |
|
3771 | /**
|
3772 | * `GeoBox` is used to represent a bounding box in geo coordinates.
|
3773 | */
|
3774 | export declare class GeoBox implements GeoBoxExtentLike {
|
3775 | readonly southWest: GeoCoordinates;
|
3776 | readonly northEast: GeoCoordinates;
|
3777 | |
3778 |
|
3779 |
|
3780 |
|
3781 |
|
3782 |
|
3783 | static fromCoordinates(southWest: GeoCoordinates, northEast: GeoCoordinates): GeoBox;
|
3784 | |
3785 |
|
3786 |
|
3787 |
|
3788 |
|
3789 |
|
3790 | static fromCenterAndExtents(center: GeoCoordinates, extent: GeoBoxExtentLike): GeoBox;
|
3791 | |
3792 |
|
3793 |
|
3794 |
|
3795 |
|
3796 |
|
3797 | constructor(southWest: GeoCoordinates, northEast: GeoCoordinates);
|
3798 | /**
|
3799 | * Returns the minimum altitude or `undefined`.
|
3800 | */
|
3801 | get minAltitude(): number | undefined;
|
3802 | /**
|
3803 | * Returns the maximum altitude or `undefined`.
|
3804 | */
|
3805 | get maxAltitude(): number | undefined;
|
3806 | /**
|
3807 | * Returns the south latitude in degrees of this `GeoBox`.
|
3808 | */
|
3809 | get south(): number;
|
3810 | /**
|
3811 | * Returns the north altitude in degrees of this `GeoBox`.
|
3812 | */
|
3813 | get north(): number;
|
3814 | /**
|
3815 | * Returns the west longitude in degrees of this `GeoBox`.
|
3816 | */
|
3817 | get west(): number;
|
3818 | /**
|
3819 | * Returns the east longitude in degrees of this `GeoBox`.
|
3820 | */
|
3821 | get east(): number;
|
3822 | /**
|
3823 | * Returns the center of this `GeoBox`.
|
3824 | */
|
3825 | get center(): GeoCoordinates;
|
3826 | /**
|
3827 | * Returns the latitude span in radians.
|
3828 | */
|
3829 | get latitudeSpanInRadians(): number;
|
3830 | /**
|
3831 | * Returns the longitude span in radians.
|
3832 | */
|
3833 | get longitudeSpanInRadians(): number;
|
3834 | /**
|
3835 | * Returns the latitude span in degrees.
|
3836 | */
|
3837 | get latitudeSpan(): number;
|
3838 | get altitudeSpan(): number | undefined;
|
3839 | /**
|
3840 | * Returns the longitude span in degrees.
|
3841 | */
|
3842 | get longitudeSpan(): number;
|
3843 | /**
|
3844 | * Returns the latitude span in degrees.
|
3845 | * @deprecated Use [[latitudeSpan]] instead.
|
3846 | */
|
3847 | get latitudeSpanInDegrees(): number;
|
3848 | /**
|
3849 | * Returns the longitude span in degrees.
|
3850 | * @deprecated Use [[longitudeSpan]] instead.
|
3851 | */
|
3852 | get longitudeSpanInDegrees(): number;
|
3853 | /**
|
3854 | * Returns `true` if the given geo coordinates are contained in this `GeoBox`.
|
3855 | *
|
3856 | * @param point - The geo coordinates.
|
3857 | */
|
3858 | contains(point: GeoCoordinates): boolean;
|
3859 | /**
|
3860 | * Clones this `GeoBox` instance.
|
3861 | */
|
3862 | clone(): GeoBox;
|
3863 | /**
|
3864 | * Update the bounding box by considering a given point.
|
3865 | *
|
3866 | * @param point - The point that may expand the bounding box.
|
3867 | */
|
3868 | growToContain(point: GeoCoordinates): void;
|
3869 | private containsHelper;
|
3870 | }
|
3871 |
|
3872 | /**
|
3873 | * Represents an object that carry {@link GeoBox} extents like interface.
|
3874 | */
|
3875 | export declare interface GeoBoxExtentLike {
|
3876 | |
3877 |
|
3878 |
|
3879 | readonly latitudeSpan: number;
|
3880 | |
3881 |
|
3882 |
|
3883 | readonly longitudeSpan: number;
|
3884 | }
|
3885 |
|
3886 |
|
3887 |
|
3888 |
|
3889 | export declare class GeoCoordinates implements GeoCoordinatesLike {
|
3890 | latitude: number;
|
3891 | longitude: number;
|
3892 | altitude?: number | undefined;
|
3893 | |
3894 |
|
3895 |
|
3896 |
|
3897 |
|
3898 |
|
3899 |
|
3900 | static fromDegrees(latitude: number, longitude: number, altitude?: number): GeoCoordinates;
|
3901 | |
3902 |
|
3903 |
|
3904 |
|
3905 |
|
3906 |
|
3907 |
|
3908 | static fromRadians(latitude: number, longitude: number, altitude?: number): GeoCoordinates;
|
3909 | |
3910 |
|
3911 |
|
3912 |
|
3913 |
|
3914 |
|
3915 |
|
3916 |
|
3917 | static fromLatLng(latLng: LatLngLike): GeoCoordinates;
|
3918 | |
3919 |
|
3920 |
|
3921 |
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 |
|
3927 |
|
3928 |
|
3929 |
|
3930 |
|
3931 |
|
3932 |
|
3933 |
|
3934 | static fromGeoPoint(geoPoint: GeoPointLike): GeoCoordinates;
|
3935 | |
3936 |
|
3937 |
|
3938 |
|
3939 |
|
3940 |
|
3941 |
|
3942 |
|
3943 |
|
3944 |
|
3945 |
|
3946 |
|
3947 |
|
3948 |
|
3949 | static fromObject(geoPoint: GeoCoordLike): GeoCoordinates;
|
3950 | |
3951 |
|
3952 |
|
3953 |
|
3954 |
|
3955 |
|
3956 |
|
3957 | constructor(latitude: number, longitude: number, altitude?: number | undefined);
|
3958 | /**
|
3959 | * Returns the latitude in radians.
|
3960 | */
|
3961 | get latitudeInRadians(): number;
|
3962 | /**
|
3963 | * Returns the longitude in radians.
|
3964 | */
|
3965 | get longitudeInRadians(): number;
|
3966 | /**
|
3967 | * Returns the latitude in degrees.
|
3968 | * @deprecated Use the [[latitude]] property instead.
|
3969 | */
|
3970 | get latitudeInDegrees(): number;
|
3971 | /**
|
3972 | * Returns the longitude in degrees.
|
3973 | * @deprecated Use the [[longitude]] property instead.
|
3974 | */
|
3975 | get longitudeInDegrees(): number;
|
3976 | /**
|
3977 | * The latitude in the degrees.
|
3978 | */
|
3979 | get lat(): number;
|
3980 | /**
|
3981 | * The longitude in the degrees.
|
3982 | */
|
3983 | get lng(): number;
|
3984 | /**
|
3985 | * Returns `true` if this `GeoCoordinates` is valid; returns `false` otherwise.
|
3986 | */
|
3987 | isValid(): boolean;
|
3988 | /**
|
3989 | * Returns the normalized `GeoCoordinates`.
|
3990 | */
|
3991 | normalized(): GeoCoordinates;
|
3992 | /**
|
3993 | * Returns `true` if this `GeoCoordinates` is equal to the other.
|
3994 | *
|
3995 | * @param other - GeoCoordinatesLike to compare to.
|
3996 | */
|
3997 | equals(other: GeoCoordinatesLike): boolean;
|
3998 | /**
|
3999 | * Copy values from the other.
|
4000 | *
|
4001 | * @param other - GeoCoordinatesLike to copy all values from.
|
4002 | */
|
4003 | copy(other: GeoCoordinatesLike): GeoCoordinates;
|
4004 | /**
|
4005 | * Clones this `GeoCoordinates`.
|
4006 | */
|
4007 | clone(): GeoCoordinates;
|
4008 | /**
|
4009 | * Returns this {@link GeoCoordinates} as {@link LatLngLike} literal.
|
4010 | */
|
4011 | toLatLng(): LatLngLike;
|
4012 | |
4013 |
|
4014 |
|
4015 | toGeoPoint(): GeoPointLike;
|
4016 | }
|
4017 |
|
4018 |
|
4019 |
|
4020 |
|
4021 | export declare interface GeoCoordinatesLike {
|
4022 |
|
4023 | latitude: number;
|
4024 |
|
4025 | longitude: number;
|
4026 |
|
4027 | altitude?: number;
|
4028 | }
|
4029 |
|
4030 |
|
4031 |
|
4032 |
|
4033 | export declare type GeoCoordLike = GeoPointLike | GeoCoordinatesLike | LatLngLike;
|
4034 |
|
4035 |
|
4036 |
|
4037 |
|
4038 | export declare type GeoJson = FeatureGeometry | GeometryCollection | Feature | FeatureCollection;
|
4039 |
|
4040 |
|
4041 |
|
4042 |
|
4043 | export declare class GeoJsonDataProvider implements DataProvider {
|
4044 | readonly name: string;
|
4045 | input: URL | GeoJson;
|
4046 | private m_tiler;
|
4047 | private m_registered;
|
4048 | |
4049 |
|
4050 |
|
4051 |
|
4052 |
|
4053 |
|
4054 |
|
4055 |
|
4056 | constructor(name: string, input: URL | GeoJson, options?: GeoJsonDataProviderOptions);
|
4057 | connect(): Promise<void>;
|
4058 | updateInput(input: URL | GeoJson): void;
|
4059 | ready(): boolean;
|
4060 | getTile(tileKey: TileKey): Promise<{}>;
|
4061 | }
|
4062 |
|
4063 | export declare interface GeoJsonDataProviderOptions {
|
4064 | |
4065 |
|
4066 |
|
4067 |
|
4068 | workerTilerUrl?: string;
|
4069 | |
4070 |
|
4071 |
|
4072 |
|
4073 |
|
4074 | tiler?: ITiler;
|
4075 | }
|
4076 |
|
4077 |
|
4078 |
|
4079 |
|
4080 |
|
4081 |
|
4082 |
|
4083 |
|
4084 |
|
4085 |
|
4086 |
|
4087 |
|
4088 |
|
4089 |
|
4090 |
|
4091 |
|
4092 |
|
4093 |
|
4094 | export declare class GeoJsonDataSource extends OmvDataSource {
|
4095 | |
4096 |
|
4097 |
|
4098 |
|
4099 |
|
4100 | constructor(params: OmvWithRestClientParams | OmvWithCustomDataProvider);
|
4101 | }
|
4102 |
|
4103 | /**
|
4104 | * Structured clone compliant version of a `three.js` geometry object, consisting of buffers with
|
4105 | * metadata for map features and objects for example roads, trees or parks.
|
4106 | */
|
4107 | export declare interface Geometry {
|
4108 | type: GeometryType;
|
4109 | vertexAttributes?: BufferAttribute[];
|
4110 | interleavedVertexAttributes?: InterleavedBufferAttribute[];
|
4111 | index?: BufferAttribute;
|
4112 | edgeIndex?: BufferAttribute;
|
4113 | groups: Group[];
|
4114 | uuid?: string;
|
4115 | |
4116 |
|
4117 |
|
4118 |
|
4119 |
|
4120 | featureStarts?: number[];
|
4121 | |
4122 |
|
4123 |
|
4124 | objInfos?: AttributeMap[];
|
4125 | |
4126 |
|
4127 |
|
4128 | attachments?: Attachment[];
|
4129 | }
|
4130 |
|
4131 |
|
4132 |
|
4133 |
|
4134 | export declare interface GeometryCollection {
|
4135 | type: "GeometryCollection";
|
4136 | geometries: FeatureGeometry[];
|
4137 | }
|
4138 |
|
4139 |
|
4140 |
|
4141 |
|
4142 |
|
4143 |
|
4144 |
|
4145 |
|
4146 |
|
4147 |
|
4148 |
|
4149 |
|
4150 |
|
4151 |
|
4152 |
|
4153 |
|
4154 |
|
4155 |
|
4156 |
|
4157 |
|
4158 |
|
4159 | export declare type GeometryKind = string | StandardGeometryKind;
|
4160 |
|
4161 | export declare const GeometryKind: typeof StandardGeometryKind;
|
4162 |
|
4163 |
|
4164 |
|
4165 |
|
4166 | export declare class GeometryKindSet extends Set {
|
4167 | |
4168 |
|
4169 |
|
4170 | isSuperset(subset: Set<any>): boolean;
|
4171 | |
4172 |
|
4173 |
|
4174 | hasIntersection(set: any): boolean;
|
4175 | |
4176 |
|
4177 |
|
4178 |
|
4179 | hasOrIntersects(set: any): boolean;
|
4180 | |
4181 |
|
4182 |
|
4183 | hasOrIntersectsArray(subset: any[]): boolean;
|
4184 | }
|
4185 |
|
4186 |
|
4187 |
|
4188 |
|
4189 | export declare enum GeometryType {
|
4190 | Unspecified = 0,
|
4191 | Point = 1,
|
4192 | Line = 2,
|
4193 | SolidLine = 3,
|
4194 | Text = 4,
|
4195 | TextPath = 5,
|
4196 | ExtrudedLine = 6,
|
4197 | Polygon = 7,
|
4198 | ExtrudedPolygon = 8,
|
4199 | Object3D = 9,
|
4200 | Other = 1000
|
4201 | }
|
4202 |
|
4203 |
|
4204 |
|
4205 |
|
4206 | export declare type GeoPointLike = [number, number, number?];
|
4207 |
|
4208 |
|
4209 |
|
4210 |
|
4211 |
|
4212 |
|
4213 | export declare function getArrayConstructor(attr: BufferElementType): Float32ArrayConstructor | Uint8ArrayConstructor | Uint16ArrayConstructor | Uint32ArrayConstructor | Int8ArrayConstructor | Int16ArrayConstructor | Int32ArrayConstructor;
|
4214 |
|
4215 |
|
4216 |
|
4217 |
|
4218 |
|
4219 |
|
4220 |
|
4221 | export declare function getBufferAttribute(attribute: BufferAttribute): THREE_2.BufferAttribute;
|
4222 |
|
4223 |
|
4224 |
|
4225 |
|
4226 | export declare function getFeatureDataSize(featureData: TileFeatureData): number;
|
4227 |
|
4228 |
|
4229 |
|
4230 |
|
4231 | export declare function getFeatureId(attributeMap: AttributeMap | undefined): number;
|
4232 |
|
4233 |
|
4234 |
|
4235 |
|
4236 |
|
4237 |
|
4238 |
|
4239 |
|
4240 |
|
4241 |
|
4242 |
|
4243 | export declare function getFeatureName(env: Env, basePropName: string | undefined, useAbbreviation?: boolean, useIsoCode?: boolean, languages?: string[]): string | undefined;
|
4244 |
|
4245 |
|
4246 |
|
4247 |
|
4248 |
|
4249 |
|
4250 |
|
4251 |
|
4252 |
|
4253 |
|
4254 | export declare function getFeatureText(context: Env | AttrEvaluationContext, technique: Technique, languages?: string[]): string | undefined;
|
4255 |
|
4256 |
|
4257 |
|
4258 |
|
4259 |
|
4260 |
|
4261 |
|
4262 |
|
4263 | export declare function getMaterialConstructor(technique: Technique, shadowsEnabled: boolean): MaterialConstructor | undefined;
|
4264 |
|
4265 |
|
4266 |
|
4267 |
|
4268 |
|
4269 |
|
4270 | export declare function getProjection(projectionName: string): Projection | never;
|
4271 |
|
4272 |
|
4273 |
|
4274 |
|
4275 |
|
4276 |
|
4277 | export declare function getProjectionName(projection: Projection): string | never;
|
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 |
|
4285 |
|
4286 | export declare function getPropertyValue(property: Value | undefined, env: Env, cache?: Map<Expr, Value>): any;
|
4287 |
|
4288 |
|
4289 |
|
4290 |
|
4291 |
|
4292 | declare class GlyphData {
|
4293 | readonly codePoint: number;
|
4294 | readonly block: string;
|
4295 | readonly width: number;
|
4296 | readonly height: number;
|
4297 | readonly advanceX: number;
|
4298 | readonly offsetX: number;
|
4299 | readonly offsetY: number;
|
4300 | readonly texture: THREE_2.Texture;
|
4301 | readonly font: Font;
|
4302 | |
4303 |
|
4304 |
|
4305 | readonly character: string;
|
4306 | |
4307 |
|
4308 |
|
4309 | readonly direction: UnicodeUtils.Direction;
|
4310 | |
4311 |
|
4312 |
|
4313 | positions: THREE_2.Vector3[];
|
4314 | |
4315 |
|
4316 |
|
4317 |
|
4318 | sourceTextureCoordinates: THREE_2.Vector2[];
|
4319 | |
4320 |
|
4321 |
|
4322 |
|
4323 | dynamicTextureCoordinates: THREE_2.Vector2[];
|
4324 | |
4325 |
|
4326 |
|
4327 | copyIndex: number;
|
4328 | |
4329 |
|
4330 |
|
4331 | isInCache: boolean;
|
4332 | |
4333 |
|
4334 |
|
4335 |
|
4336 |
|
4337 |
|
4338 |
|
4339 |
|
4340 |
|
4341 |
|
4342 |
|
4343 |
|
4344 |
|
4345 |
|
4346 |
|
4347 |
|
4348 |
|
4349 |
|
4350 |
|
4351 | constructor(codePoint: number, block: string, width: number, height: number, advanceX: number, offsetX: number, offsetY: number, u0: number, v0: number, u1: number, v1: number, texture: THREE_2.Texture, font: Font);
|
4352 | /**
|
4353 | * Clone this `GlyphData`.
|
4354 | *
|
4355 | * @returns Cloned `GlyphData`.
|
4356 | */
|
4357 | clone(): GlyphData;
|
4358 | }
|
4359 |
|
4360 | /**
|
4361 | * Interface that defines a procedural gradient sky.
|
4362 | */
|
4363 | export declare interface GradientSky {
|
4364 |
|
4365 | type: "gradient";
|
4366 | |
4367 |
|
4368 |
|
4369 |
|
4370 | topColor: string;
|
4371 | |
4372 |
|
4373 |
|
4374 |
|
4375 | bottomColor: string;
|
4376 | |
4377 |
|
4378 |
|
4379 |
|
4380 | groundColor: string;
|
4381 |
|
4382 | monomialPower?: number;
|
4383 | }
|
4384 |
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 | export declare interface Group {
|
4390 | start: number;
|
4391 | count: number;
|
4392 | technique: number;
|
4393 | |
4394 |
|
4395 |
|
4396 | createdOffsets?: number[];
|
4397 | }
|
4398 |
|
4399 |
|
4400 |
|
4401 |
|
4402 |
|
4403 | declare class GroupedPriorityList<T extends PriorityListElement> {
|
4404 | readonly groups: PriorityListGroupMap<T>;
|
4405 | |
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 | add(element: T): void;
|
4411 | |
4412 |
|
4413 |
|
4414 |
|
4415 |
|
4416 |
|
4417 |
|
4418 |
|
4419 |
|
4420 | remove(element: T): boolean;
|
4421 | |
4422 |
|
4423 |
|
4424 | clear(): void;
|
4425 | |
4426 |
|
4427 |
|
4428 |
|
4429 |
|
4430 | merge(other: GroupedPriorityList<T>): GroupedPriorityList<T>;
|
4431 | clone(): GroupedPriorityList<T>;
|
4432 | |
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 | forEach(fun: (element: T) => void): void;
|
4438 | |
4439 |
|
4440 |
|
4441 | count(): number;
|
4442 | |
4443 |
|
4444 |
|
4445 |
|
4446 |
|
4447 | private findGroup;
|
4448 | |
4449 |
|
4450 |
|
4451 |
|
4452 |
|
4453 | private getGroup;
|
4454 | }
|
4455 |
|
4456 |
|
4457 |
|
4458 |
|
4459 |
|
4460 |
|
4461 | export declare const halfQuadTreeSubdivisionScheme: SubdivisionScheme;
|
4462 |
|
4463 |
|
4464 |
|
4465 |
|
4466 | export declare class HasAttributeExpr extends Expr {
|
4467 | readonly name: string;
|
4468 | constructor(name: string);
|
4469 | /** @override */
|
4470 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
4471 | /** @override */
|
4472 | protected exprIsDynamic(): boolean;
|
4473 | }
|
4474 |
|
4475 | /**
|
4476 | * Interface containing the definition of different colors to be used at different heights with the
|
4477 | * [[TerrainTechnique]].
|
4478 | */
|
4479 | export declare interface HeightBasedColors {
|
4480 | heightArray: number[];
|
4481 | colorArray: string[];
|
4482 | }
|
4483 |
|
4484 |
|
4485 |
|
4486 |
|
4487 |
|
4488 |
|
4489 |
|
4490 | export declare const hereTilingScheme: TilingScheme;
|
4491 |
|
4492 |
|
4493 |
|
4494 |
|
4495 | declare enum HorizontalAlignment {
|
4496 | Left = 0,
|
4497 | Center = -0.5,
|
4498 | Right = -1
|
4499 | }
|
4500 |
|
4501 |
|
4502 |
|
4503 |
|
4504 |
|
4505 |
|
4506 |
|
4507 | declare enum HorizontalPlacement {
|
4508 | Left = -1,
|
4509 | Center = -0.5,
|
4510 | Right = 0
|
4511 | }
|
4512 |
|
4513 | export declare interface IBloomEffect {
|
4514 | strength: number;
|
4515 | |
4516 |
|
4517 |
|
4518 | threshold: number;
|
4519 | radius: number;
|
4520 | enabled: boolean;
|
4521 | }
|
4522 |
|
4523 | declare interface IBox {
|
4524 | minX: number;
|
4525 | minY: number;
|
4526 | maxX: number;
|
4527 | maxY: number;
|
4528 | }
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 | declare interface IChannel {
|
4534 | trace(message?: any, ...optionalParams: any[]): void;
|
4535 | debug(message?: any, ...optionalParams: any[]): void;
|
4536 | log(message?: any, ...optionalParams: any[]): void;
|
4537 | info(message?: any, ...optionalParams: any[]): void;
|
4538 | warn(message?: any, ...optionalParams: any[]): void;
|
4539 | error(message?: any, ...optionalParams: any[]): void;
|
4540 | }
|
4541 |
|
4542 |
|
4543 |
|
4544 |
|
4545 | export declare const identityProjection: Projection;
|
4546 |
|
4547 |
|
4548 |
|
4549 |
|
4550 | export declare interface IGeometryAccessor {
|
4551 | |
4552 |
|
4553 |
|
4554 |
|
4555 |
|
4556 | getCount(): number;
|
4557 | |
4558 |
|
4559 |
|
4560 |
|
4561 |
|
4562 |
|
4563 | setRange(start: number, end: number): void;
|
4564 | }
|
4565 |
|
4566 |
|
4567 |
|
4568 |
|
4569 | export declare interface ILineAccessor {
|
4570 | |
4571 |
|
4572 |
|
4573 | geometryType: GeometryType;
|
4574 | |
4575 |
|
4576 |
|
4577 | color: THREE_2.Color | undefined | Array<THREE_2.Color | undefined>;
|
4578 | |
4579 |
|
4580 |
|
4581 | width: number | undefined;
|
4582 | |
4583 |
|
4584 |
|
4585 | renderOrder: number;
|
4586 | |
4587 |
|
4588 |
|
4589 |
|
4590 |
|
4591 | isLineAccessor(): boolean;
|
4592 | |
4593 |
|
4594 |
|
4595 | clear(): void;
|
4596 | |
4597 |
|
4598 |
|
4599 | getVertices(): Float32Array | undefined;
|
4600 | }
|
4601 |
|
4602 |
|
4603 |
|
4604 |
|
4605 | declare interface ILogger extends IChannel {
|
4606 | readonly name: string;
|
4607 | enabled: boolean;
|
4608 | level: LogLevel;
|
4609 | |
4610 |
|
4611 |
|
4612 |
|
4613 |
|
4614 | update(options: LoggerOptions): void;
|
4615 | }
|
4616 |
|
4617 |
|
4618 |
|
4619 |
|
4620 |
|
4621 |
|
4622 |
|
4623 |
|
4624 |
|
4625 |
|
4626 |
|
4627 |
|
4628 | export declare class ImageCache {
|
4629 | |
4630 |
|
4631 |
|
4632 | static get instance(): ImageCache;
|
4633 | |
4634 |
|
4635 |
|
4636 |
|
4637 | static dispose(): void;
|
4638 | private static m_instance;
|
4639 | private m_images;
|
4640 | |
4641 |
|
4642 |
|
4643 |
|
4644 |
|
4645 |
|
4646 |
|
4647 | registerImage(mapView: MapView, url: string, imageData: ImageData | ImageBitmap | undefined): ImageItem;
|
4648 | |
4649 |
|
4650 |
|
4651 |
|
4652 |
|
4653 |
|
4654 |
|
4655 | addImage(mapView: MapView, url: string, startLoading?: boolean): ImageItem | Promise<ImageItem | undefined> | undefined;
|
4656 | |
4657 |
|
4658 |
|
4659 |
|
4660 |
|
4661 |
|
4662 | findImage(url: string): ImageItem | undefined;
|
4663 | |
4664 |
|
4665 |
|
4666 |
|
4667 |
|
4668 |
|
4669 | clear(mapView: MapView): void;
|
4670 | |
4671 |
|
4672 |
|
4673 | clearAll(): void;
|
4674 | |
4675 |
|
4676 |
|
4677 | get size(): number;
|
4678 | |
4679 |
|
4680 |
|
4681 |
|
4682 |
|
4683 |
|
4684 |
|
4685 | loadImage(imageItem: ImageItem): ImageItem | Promise<ImageItem | undefined>;
|
4686 | |
4687 |
|
4688 |
|
4689 |
|
4690 |
|
4691 | private findImageCacheItem;
|
4692 | |
4693 |
|
4694 |
|
4695 |
|
4696 |
|
4697 |
|
4698 |
|
4699 | private renderImage;
|
4700 | }
|
4701 |
|
4702 |
|
4703 |
|
4704 |
|
4705 | export declare interface ImageDefinition {
|
4706 |
|
4707 | url: string;
|
4708 |
|
4709 | preload: boolean;
|
4710 |
|
4711 | atlas?: string;
|
4712 | }
|
4713 |
|
4714 | export declare interface ImageDefinitions {
|
4715 |
|
4716 | [name: string]: ImageDefinition;
|
4717 | }
|
4718 |
|
4719 |
|
4720 |
|
4721 |
|
4722 | export declare interface ImageItem {
|
4723 |
|
4724 | url: string;
|
4725 |
|
4726 | imageData?: ImageData | ImageBitmap;
|
4727 |
|
4728 | mipMaps?: ImageData[];
|
4729 |
|
4730 | loaded: boolean;
|
4731 |
|
4732 | loadingPromise?: Promise<ImageItem | undefined>;
|
4733 | }
|
4734 |
|
4735 | export declare namespace ImageItem {
|
4736 | |
4737 |
|
4738 |
|
4739 | export function isLoading(imageItem: ImageItem): boolean;
|
4740 | }
|
4741 |
|
4742 |
|
4743 |
|
4744 |
|
4745 | export declare interface ImageOptions {
|
4746 | |
4747 |
|
4748 |
|
4749 | origin?: ImageOrigin;
|
4750 | |
4751 |
|
4752 |
|
4753 | width: number;
|
4754 | |
4755 |
|
4756 |
|
4757 | height: number;
|
4758 | |
4759 |
|
4760 |
|
4761 | xOffset?: number;
|
4762 | |
4763 |
|
4764 |
|
4765 | yOffset?: number;
|
4766 | |
4767 |
|
4768 |
|
4769 | flipH?: boolean;
|
4770 | |
4771 |
|
4772 |
|
4773 | flipV?: boolean;
|
4774 | |
4775 |
|
4776 |
|
4777 | opacity?: number;
|
4778 | }
|
4779 |
|
4780 |
|
4781 |
|
4782 |
|
4783 | export declare enum ImageOrigin {
|
4784 | TopLeft = 0,
|
4785 | BottomLeft = 1
|
4786 | }
|
4787 |
|
4788 |
|
4789 |
|
4790 |
|
4791 | export declare interface ImageTexture {
|
4792 |
|
4793 | name: string;
|
4794 |
|
4795 | image: string;
|
4796 |
|
4797 | origin?: string;
|
4798 |
|
4799 | xOffset?: number;
|
4800 |
|
4801 | yOffset?: number;
|
4802 |
|
4803 | width?: number;
|
4804 |
|
4805 | height?: number;
|
4806 |
|
4807 | flipH?: boolean;
|
4808 |
|
4809 | flipV?: boolean;
|
4810 |
|
4811 | opacity?: number;
|
4812 | }
|
4813 |
|
4814 |
|
4815 |
|
4816 |
|
4817 |
|
4818 |
|
4819 |
|
4820 |
|
4821 |
|
4822 |
|
4823 | export declare interface IMapAntialiasSettings {
|
4824 | |
4825 |
|
4826 |
|
4827 |
|
4828 |
|
4829 | msaaEnabled: boolean;
|
4830 | |
4831 |
|
4832 |
|
4833 |
|
4834 |
|
4835 | dynamicMsaaSamplingLevel?: MSAASampling;
|
4836 | |
4837 |
|
4838 |
|
4839 |
|
4840 |
|
4841 | staticMsaaSamplingLevel?: MSAASampling;
|
4842 | }
|
4843 |
|
4844 |
|
4845 |
|
4846 |
|
4847 |
|
4848 |
|
4849 |
|
4850 |
|
4851 | export declare interface IMapRenderingManager extends IPassManager {
|
4852 | |
4853 |
|
4854 |
|
4855 | bloom: IBloomEffect;
|
4856 | |
4857 |
|
4858 |
|
4859 | outline: IOutlineEffect;
|
4860 | |
4861 |
|
4862 |
|
4863 | vignette: IVignetteEffect;
|
4864 | |
4865 |
|
4866 |
|
4867 | sepia: ISepiaEffect;
|
4868 | |
4869 |
|
4870 |
|
4871 |
|
4872 |
|
4873 | lowResPixelRatio?: number;
|
4874 | |
4875 |
|
4876 |
|
4877 |
|
4878 | dynamicMsaaSamplingLevel: MSAASampling;
|
4879 | |
4880 |
|
4881 |
|
4882 |
|
4883 | msaaEnabled: boolean;
|
4884 | |
4885 |
|
4886 |
|
4887 |
|
4888 |
|
4889 |
|
4890 |
|
4891 |
|
4892 |
|
4893 | staticMsaaSamplingLevel: MSAASampling;
|
4894 | |
4895 |
|
4896 |
|
4897 |
|
4898 |
|
4899 |
|
4900 |
|
4901 |
|
4902 |
|
4903 |
|
4904 | render(renderer: THREE_2.WebGLRenderer, scene: THREE_2.Scene, camera: THREE_2.PerspectiveCamera | THREE_2.OrthographicCamera, isStaticFrame: boolean, time?: number): void;
|
4905 | |
4906 |
|
4907 |
|
4908 |
|
4909 |
|
4910 | updateOutline(options: {
|
4911 | thickness: number;
|
4912 | color: string;
|
4913 | ghostExtrudedPolygons: boolean;
|
4914 | }): void;
|
4915 | }
|
4916 |
|
4917 |
|
4918 |
|
4919 |
|
4920 | export declare abstract class IndexedBufferedGeometryAccessor extends BufferedGeometryAccessorBase {
|
4921 | readonly object: THREE_2.Mesh;
|
4922 | readonly geometryType: GeometryType;
|
4923 | protected readonly bufferGeometry: THREE_2.BufferGeometry;
|
4924 | indices: number[];
|
4925 | |
4926 |
|
4927 |
|
4928 |
|
4929 |
|
4930 |
|
4931 |
|
4932 |
|
4933 |
|
4934 | constructor(object: THREE_2.Mesh, geometryType: GeometryType, bufferGeometry: THREE_2.BufferGeometry, start?: number, end?: number);
|
4935 | /**
|
4936 | * Returns number of primitives, which is not known in this base class, so we return the number
|
4937 | * of indices.
|
4938 | *
|
4939 | * @returns The number of indices in the geometry.
|
4940 | * @override
|
4941 | */
|
4942 | getCount(): number;
|
4943 | protected checkSetUp(): boolean;
|
4944 | }
|
4945 |
|
4946 | /**
|
4947 | * Accessor for lines in an indexed geometry.
|
4948 | */
|
4949 | export declare class IndexedBufferedGeometryLineAccessor extends IndexedBufferedGeometryAccessor implements ILineAccessor {
|
4950 | readonly object: THREE_2.Mesh;
|
4951 | readonly geometryType: GeometryType;
|
4952 | readonly bufferGeometry: THREE_2.BufferGeometry;
|
4953 | constructor(object: THREE_2.Mesh, geometryType: GeometryType, bufferGeometry: THREE_2.BufferGeometry);
|
4954 | isLineAccessor(): boolean;
|
4955 | /**
|
4956 | * Reconstructs line width from triangulated geometry.
|
4957 | *
|
4958 | * @returns Line width.
|
4959 | */
|
4960 | get width(): number | undefined;
|
4961 | clear(): void;
|
4962 | getVertices(): Float32Array | undefined;
|
4963 | }
|
4964 |
|
4965 | /**
|
4966 | * For efficiency, [[StyleSetEvaluator]] returns [[Techniques]] additional params as defined in
|
4967 | * [[IndexedTechniqueParams]].
|
4968 | */
|
4969 | export declare type IndexedTechnique = Technique & IndexedTechniqueParams;
|
4970 |
|
4971 | /**
|
4972 | * Additional params used for optimized usage of `Techniques`.
|
4973 | */
|
4974 | export declare interface IndexedTechniqueParams {
|
4975 | |
4976 |
|
4977 |
|
4978 |
|
4979 | _index: number;
|
4980 | |
4981 |
|
4982 |
|
4983 |
|
4984 | _styleSetIndex: number;
|
4985 | |
4986 |
|
4987 |
|
4988 |
|
4989 | _styleSet?: string;
|
4990 | |
4991 |
|
4992 |
|
4993 |
|
4994 | _category?: string;
|
4995 | |
4996 |
|
4997 |
|
4998 |
|
4999 |
|
5000 | _secondaryCategory?: string;
|
5001 | |
5002 |
|
5003 |
|
5004 |
|
5005 |
|
5006 |
|
5007 | _usesFeatureState?: boolean;
|
5008 | |
5009 |
|
5010 |
|
5011 | _kindState?: boolean;
|
5012 | }
|
5013 |
|
5014 | declare interface InstantiationContext {
|
5015 | |
5016 |
|
5017 |
|
5018 | env: Env;
|
5019 | |
5020 |
|
5021 |
|
5022 | preserve?: Set<string>;
|
5023 | }
|
5024 |
|
5025 |
|
5026 |
|
5027 |
|
5028 | export declare interface InterleavedBufferAttribute {
|
5029 | buffer: ArrayBufferLike;
|
5030 | stride: number;
|
5031 | type: BufferElementType;
|
5032 | attributes: Array<{
|
5033 | name: string;
|
5034 | itemSize: number;
|
5035 | offset: number;
|
5036 | }>;
|
5037 | }
|
5038 |
|
5039 |
|
5040 |
|
5041 |
|
5042 |
|
5043 |
|
5044 |
|
5045 |
|
5046 |
|
5047 |
|
5048 |
|
5049 |
|
5050 |
|
5051 |
|
5052 |
|
5053 | export declare class InterpolatedClipPlanesEvaluator implements ClipPlanesEvaluator {
|
5054 | readonly nearMin: number;
|
5055 | readonly nearMultiplier: number;
|
5056 | readonly nearFarMultiplier: number;
|
5057 | readonly farOffset: number;
|
5058 | readonly farMin: number;
|
5059 | protected m_tmpVectors: THREE_2.Vector3[];
|
5060 | protected m_tmpQuaternion: THREE_2.Quaternion;
|
5061 | constructor(nearMin?: number, nearMultiplier?: number, nearFarMultiplier?: number, farOffset?: number);
|
5062 | set minElevation(elevation: number);
|
5063 | get minElevation(): number;
|
5064 | set maxElevation(elevation: number);
|
5065 | get maxElevation(): number;
|
5066 | evaluateClipPlanes(camera: THREE_2.Camera, projection: Projection, elevationProvider?: ElevationProvider): ViewRanges;
|
5067 | }
|
5068 |
|
5069 | /**
|
5070 | * Interpolated property could have its value (some initial value should be provided) changed
|
5071 | * according to an interpolation type.
|
5072 | *
|
5073 | * Here is an example of an interpolated property from a map style:
|
5074 | * "lineWidth": {
|
5075 | * "interpolation": "Linear",
|
5076 | * "zoomLevels": [13, 14, 15],
|
5077 | * "values": [ 1.5, 1.2, 0.9]
|
5078 | * }
|
5079 | * @internal
|
5080 | */
|
5081 | export declare interface InterpolatedPropertyDefinition<T> {
|
5082 | interpolation?: "Discrete" | "Linear" | "Cubic" | "Exponential";
|
5083 | zoomLevels: number[];
|
5084 | values: T[];
|
5085 | exponent?: number;
|
5086 | }
|
5087 |
|
5088 |
|
5089 |
|
5090 |
|
5091 |
|
5092 |
|
5093 | export declare function interpolatedPropertyDefinitionToJsonExpr(property: InterpolatedPropertyDefinition<any>): JsonExpr;
|
5094 |
|
5095 |
|
5096 |
|
5097 |
|
5098 | export declare class InterpolateExpr extends Expr {
|
5099 | readonly mode: InterpolateMode;
|
5100 | readonly input: Expr;
|
5101 | readonly stops: Array<[number, Expr]>;
|
5102 | constructor(mode: InterpolateMode, input: Expr, stops: Array<[number, Expr]>);
|
5103 | /** @override */
|
5104 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
5105 | /** @override */
|
5106 | protected exprIsDynamic(): boolean;
|
5107 | }
|
5108 |
|
5109 | /**
|
5110 | * The type of the interpolation mode.
|
5111 | */
|
5112 | export declare type InterpolateMode = ["discrete"] | ["linear"] | ["cubic"] | ["exponential", number];
|
5113 |
|
5114 | /**
|
5115 | * Interpolation mode used when computing a [[InterpolatedProperty]] value for a given zoom level.
|
5116 | * @internal
|
5117 | */
|
5118 | export declare enum InterpolationMode {
|
5119 | Discrete = 0,
|
5120 | Linear = 1,
|
5121 | Cubic = 2,
|
5122 | Exponential = 3
|
5123 | }
|
5124 |
|
5125 |
|
5126 |
|
5127 |
|
5128 | declare interface IntersectionResult {
|
5129 | |
5130 |
|
5131 |
|
5132 | readonly tileKeyEntries: ZoomLevelTileKeyMap;
|
5133 | |
5134 |
|
5135 |
|
5136 |
|
5137 | calculationFinal: boolean;
|
5138 | }
|
5139 |
|
5140 |
|
5141 |
|
5142 |
|
5143 | export declare interface IObject3dAccessor {
|
5144 | |
5145 |
|
5146 |
|
5147 | geometryType: GeometryType;
|
5148 | |
5149 |
|
5150 |
|
5151 | color: THREE_2.Color | undefined | Array<THREE_2.Color | undefined>;
|
5152 | |
5153 |
|
5154 |
|
5155 | renderOrder: number;
|
5156 | |
5157 |
|
5158 |
|
5159 |
|
5160 |
|
5161 | isObject3dAccessor(): boolean;
|
5162 | |
5163 |
|
5164 |
|
5165 | clear(): void;
|
5166 | getVertices(): Float32Array | undefined;
|
5167 | }
|
5168 |
|
5169 | export declare interface IOutlineEffect {
|
5170 | enabled: boolean;
|
5171 | |
5172 |
|
5173 |
|
5174 | ghostExtrudedPolygons: boolean;
|
5175 | thickness: number;
|
5176 | color: string;
|
5177 | }
|
5178 |
|
5179 |
|
5180 |
|
5181 |
|
5182 | export declare interface IPass {
|
5183 | |
5184 |
|
5185 |
|
5186 |
|
5187 | enabled: boolean;
|
5188 | |
5189 |
|
5190 |
|
5191 |
|
5192 | renderToScreen: boolean;
|
5193 | |
5194 |
|
5195 |
|
5196 |
|
5197 |
|
5198 |
|
5199 |
|
5200 |
|
5201 |
|
5202 | setSize(width: number, height: number): void;
|
5203 | |
5204 |
|
5205 |
|
5206 |
|
5207 |
|
5208 |
|
5209 |
|
5210 |
|
5211 |
|
5212 |
|
5213 |
|
5214 |
|
5215 |
|
5216 |
|
5217 | render(renderer: THREE_2.WebGLRenderer, scene: THREE_2.Scene, camera: THREE_2.Camera, writeBuffer: THREE_2.WebGLRenderTarget | null, readBuffer: THREE_2.WebGLRenderTarget | null, delta?: number): void;
|
5218 | }
|
5219 |
|
5220 |
|
5221 |
|
5222 |
|
5223 |
|
5224 | export declare interface IPassManager {
|
5225 | |
5226 |
|
5227 |
|
5228 |
|
5229 | render(renderer: THREE_2.WebGLRenderer, ...args: any[]): void;
|
5230 | |
5231 |
|
5232 |
|
5233 |
|
5234 |
|
5235 |
|
5236 |
|
5237 |
|
5238 | setSize(width: number, height: number): void;
|
5239 | }
|
5240 |
|
5241 | export declare function isActualSelectorDefinition(def: Definition): def is Style & StyleSelector;
|
5242 |
|
5243 |
|
5244 |
|
5245 |
|
5246 | export declare function isBasicExtrudedLineTechnique(technique: Technique): technique is BasicExtrudedLineTechnique;
|
5247 |
|
5248 |
|
5249 |
|
5250 |
|
5251 |
|
5252 |
|
5253 | export declare function isBox3Like(object: {}): object is Box3Like;
|
5254 |
|
5255 |
|
5256 |
|
5257 |
|
5258 | export declare function isBoxedDefinition(def: Definition): def is BoxedDefinition;
|
5259 |
|
5260 |
|
5261 |
|
5262 |
|
5263 | export declare function isCirclesTechnique(technique: Technique): technique is CirclesTechnique;
|
5264 |
|
5265 | export declare interface ISepiaEffect {
|
5266 | enabled: boolean;
|
5267 | amount: number;
|
5268 | }
|
5269 |
|
5270 |
|
5271 |
|
5272 |
|
5273 |
|
5274 | export declare function isExtrudedLineTechnique(technique: Technique): technique is BasicExtrudedLineTechnique | StandardExtrudedLineTechnique;
|
5275 |
|
5276 |
|
5277 |
|
5278 |
|
5279 | export declare function isExtrudedPolygonTechnique(technique: Technique): technique is ExtrudedPolygonTechnique;
|
5280 |
|
5281 |
|
5282 |
|
5283 |
|
5284 | export declare function isFillTechnique(technique: Technique): technique is FillTechnique;
|
5285 |
|
5286 |
|
5287 |
|
5288 |
|
5289 | export declare function isGeoBoxExtentLike(obj: any): obj is GeoBoxExtentLike;
|
5290 |
|
5291 |
|
5292 |
|
5293 |
|
5294 | export declare function isGeoCoordinatesLike(object: any): object is GeoCoordinatesLike;
|
5295 |
|
5296 |
|
5297 |
|
5298 |
|
5299 | export declare function isGeoPointLike(geoPoint: any): geoPoint is GeoPointLike;
|
5300 |
|
5301 |
|
5302 |
|
5303 |
|
5304 | declare interface ISimpleChannel {
|
5305 | info(message?: any, ...optionalParams: any[]): void;
|
5306 | warn(message?: any, ...optionalParams: any[]): void;
|
5307 | error(message?: any, ...optionalParams: any[]): void;
|
5308 | }
|
5309 |
|
5310 |
|
5311 |
|
5312 |
|
5313 |
|
5314 |
|
5315 | export declare function isInterpolatedPropertyDefinition<T>(p: any): p is InterpolatedPropertyDefinition<T>;
|
5316 |
|
5317 | export declare function isJsonExpr(v: any): v is JsonExpr;
|
5318 |
|
5319 |
|
5320 |
|
5321 |
|
5322 |
|
5323 |
|
5324 | export declare function isJsonExprReference(value: any): value is JsonExprReference;
|
5325 |
|
5326 | export declare function isLabelRejectionLineTechnique(technique: Technique): technique is LabelRejectionLineTechnique;
|
5327 |
|
5328 |
|
5329 |
|
5330 |
|
5331 | export declare function isLatLngLike(object: any): object is LatLngLike;
|
5332 |
|
5333 |
|
5334 |
|
5335 |
|
5336 |
|
5337 |
|
5338 | export declare function isLineAccessor(arg: any): arg is ILineAccessor;
|
5339 |
|
5340 |
|
5341 |
|
5342 |
|
5343 | export declare function isLineMarkerTechnique(technique: Technique): technique is LineMarkerTechnique;
|
5344 |
|
5345 |
|
5346 |
|
5347 |
|
5348 | export declare function isLineTechnique(technique: Technique): technique is LineTechnique;
|
5349 |
|
5350 | export declare function isLiteralDefinition(def: Definition): def is LiteralValue;
|
5351 |
|
5352 |
|
5353 |
|
5354 |
|
5355 |
|
5356 |
|
5357 | export declare function isObject3dAccessor(arg: any): arg is IObject3dAccessor;
|
5358 |
|
5359 |
|
5360 |
|
5361 |
|
5362 |
|
5363 |
|
5364 | export declare function isOrientedBox3Like(object: {}): object is OrientedBox3Like;
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 | export declare function isPoiTechnique(technique: Technique): technique is PoiTechnique;
|
5370 |
|
5371 |
|
5372 |
|
5373 |
|
5374 |
|
5375 |
|
5376 |
|
5377 |
|
5378 |
|
5379 |
|
5380 |
|
5381 |
|
5382 | export declare function isRenderDepthPrePassEnabled(technique: ExtrudedPolygonTechnique, env: Env): boolean;
|
5383 |
|
5384 |
|
5385 |
|
5386 |
|
5387 | export declare function isSegmentsTechnique(technique: Technique): technique is SegmentsTechnique;
|
5388 |
|
5389 |
|
5390 |
|
5391 |
|
5392 | export declare function isShaderTechnique(technique: Technique): technique is ShaderTechnique;
|
5393 |
|
5394 |
|
5395 |
|
5396 |
|
5397 | export declare function isSolidLineTechnique(technique: Technique): technique is SolidLineTechnique;
|
5398 |
|
5399 |
|
5400 |
|
5401 |
|
5402 |
|
5403 |
|
5404 | export declare function isSpecialDashesLineTechnique(technique: Technique): technique is SolidLineTechnique;
|
5405 |
|
5406 |
|
5407 |
|
5408 |
|
5409 | export declare function isSquaresTechnique(technique: Technique): technique is SquaresTechnique;
|
5410 |
|
5411 |
|
5412 |
|
5413 |
|
5414 | export declare function isStandardExtrudedLineTechnique(technique: Technique): technique is StandardExtrudedLineTechnique;
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 | export declare function isStandardTechnique(technique: Technique): technique is StandardTechnique;
|
5420 |
|
5421 |
|
5422 |
|
5423 |
|
5424 | export declare function isTerrainTechnique(technique: Technique): technique is TerrainTechnique;
|
5425 |
|
5426 |
|
5427 |
|
5428 |
|
5429 | export declare function isTextTechnique(technique: Technique): technique is TextTechnique;
|
5430 |
|
5431 |
|
5432 |
|
5433 |
|
5434 | export declare function isTextureBuffer(object: any): object is TextureBuffer;
|
5435 |
|
5436 |
|
5437 |
|
5438 |
|
5439 |
|
5440 |
|
5441 | export declare function isTransformLike(object: {}): object is TransformLike;
|
5442 |
|
5443 | export declare function isVector3Like(v: any): v is Vector3Like;
|
5444 |
|
5445 |
|
5446 |
|
5447 |
|
5448 | export declare interface ITileDataVisitor {
|
5449 | tile: Tile;
|
5450 | |
5451 |
|
5452 |
|
5453 |
|
5454 | wantsFeature(featureId: number | undefined): boolean;
|
5455 | |
5456 |
|
5457 |
|
5458 |
|
5459 | wantsPoint(featureId: number | undefined): boolean;
|
5460 | |
5461 |
|
5462 |
|
5463 |
|
5464 | wantsLine(featureId: number | undefined): boolean;
|
5465 | |
5466 |
|
5467 |
|
5468 |
|
5469 | wantsArea(featureId: number | undefined): boolean;
|
5470 | |
5471 |
|
5472 |
|
5473 |
|
5474 | wantsObject3D(featureId: number | undefined): boolean;
|
5475 | |
5476 |
|
5477 |
|
5478 |
|
5479 | visitPoint(featureId: number | undefined): void;
|
5480 | |
5481 |
|
5482 |
|
5483 |
|
5484 | visitLine(featureId: number | undefined, lineAccessor: ILineAccessor): void;
|
5485 | |
5486 |
|
5487 |
|
5488 |
|
5489 | visitArea(featureId: number | undefined): void;
|
5490 | |
5491 |
|
5492 |
|
5493 |
|
5494 | visitObject3D(featureId: number | undefined, object3dAccessor: IObject3dAccessor): void;
|
5495 | }
|
5496 |
|
5497 |
|
5498 |
|
5499 |
|
5500 | export declare interface ITileDecoder {
|
5501 | |
5502 |
|
5503 |
|
5504 |
|
5505 |
|
5506 |
|
5507 | connect(): Promise<void>;
|
5508 | |
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 |
|
5514 |
|
5515 |
|
5516 | decodeTile(data: ArrayBufferLike | {}, tileKey: TileKey, projection: Projection, requestController?: RequestController): Promise<DecodedTile>;
|
5517 | |
5518 |
|
5519 |
|
5520 |
|
5521 |
|
5522 | getTileInfo(data: ArrayBufferLike | {}, tileKey: TileKey, projection: Projection, requestController?: RequestController): Promise<TileInfo | undefined>;
|
5523 | |
5524 |
|
5525 |
|
5526 |
|
5527 |
|
5528 |
|
5529 |
|
5530 |
|
5531 |
|
5532 |
|
5533 |
|
5534 |
|
5535 |
|
5536 | configure(styleSet?: StyleSet, definitions?: Definitions, languages?: string[], options?: OptionsMap): void;
|
5537 | |
5538 |
|
5539 |
|
5540 |
|
5541 |
|
5542 | dispose(): void;
|
5543 | }
|
5544 |
|
5545 | export declare interface ITileLoader {
|
5546 | state: TileLoaderState;
|
5547 | payload?: ArrayBufferLike | {};
|
5548 | decodedTile?: DecodedTile;
|
5549 | isFinished: boolean;
|
5550 | loadAndDecode(): Promise<TileLoaderState>;
|
5551 | waitSettled(): Promise<TileLoaderState>;
|
5552 | updatePriority(area: number): void;
|
5553 | cancel(): void;
|
5554 | }
|
5555 |
|
5556 |
|
5557 |
|
5558 |
|
5559 | export declare interface ITiler {
|
5560 | |
5561 |
|
5562 |
|
5563 |
|
5564 |
|
5565 |
|
5566 | connect(): Promise<void>;
|
5567 | |
5568 |
|
5569 |
|
5570 |
|
5571 |
|
5572 |
|
5573 |
|
5574 | registerIndex(indexId: string, indexUrl: URL | GeoJson): Promise<void>;
|
5575 | |
5576 |
|
5577 |
|
5578 |
|
5579 |
|
5580 |
|
5581 |
|
5582 | updateIndex(indexId: string, indexUrl: URL | GeoJson): Promise<void>;
|
5583 | |
5584 |
|
5585 |
|
5586 |
|
5587 |
|
5588 |
|
5589 | getTile(indexId: string, tileKey: TileKey): Promise<{}>;
|
5590 | |
5591 |
|
5592 |
|
5593 |
|
5594 |
|
5595 | dispose(): void;
|
5596 | }
|
5597 |
|
5598 |
|
5599 |
|
5600 |
|
5601 |
|
5602 |
|
5603 |
|
5604 |
|
5605 |
|
5606 | declare interface ITransferManager {
|
5607 | |
5608 |
|
5609 |
|
5610 |
|
5611 |
|
5612 | downloadJson<T>(url: RequestInfo, init?: RequestInit): Promise<T>;
|
5613 | |
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 | downloadArrayBuffer(url: RequestInfo, init?: RequestInit): Promise<ArrayBuffer>;
|
5619 | |
5620 |
|
5621 |
|
5622 |
|
5623 |
|
5624 | download(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
5625 | }
|
5626 |
|
5627 | export declare interface IVignetteEffect {
|
5628 | enabled: boolean;
|
5629 | offset: number;
|
5630 | darkness: number;
|
5631 | }
|
5632 |
|
5633 |
|
5634 |
|
5635 |
|
5636 | export declare interface JsonArray extends Array<JsonValue> {
|
5637 | }
|
5638 |
|
5639 |
|
5640 |
|
5641 |
|
5642 | export declare type JsonExpr = JsonArray;
|
5643 |
|
5644 | export declare type JsonExprReference = ["ref", string];
|
5645 |
|
5646 |
|
5647 |
|
5648 |
|
5649 | export declare interface JsonObject {
|
5650 | [name: string]: JsonValue;
|
5651 | }
|
5652 |
|
5653 |
|
5654 |
|
5655 |
|
5656 | export declare type JsonValue = null | boolean | number | string | JsonObject | JsonArray;
|
5657 |
|
5658 | export declare type LabelRejectionLineStyle = BaseStyle<"label-rejection-line", BaseTechniqueParams>;
|
5659 |
|
5660 |
|
5661 |
|
5662 |
|
5663 |
|
5664 | export declare interface LabelRejectionLineTechnique extends MakeTechniqueAttrs<BaseTechniqueParams> {
|
5665 | name: "label-rejection-line";
|
5666 | }
|
5667 |
|
5668 |
|
5669 |
|
5670 |
|
5671 | export declare interface LatLngLike {
|
5672 |
|
5673 | lat: number;
|
5674 |
|
5675 | lng: number;
|
5676 | }
|
5677 |
|
5678 |
|
5679 |
|
5680 |
|
5681 | export declare type Light = AmbientLight | DirectionalLight;
|
5682 |
|
5683 |
|
5684 |
|
5685 |
|
5686 |
|
5687 | export declare type LineCaps = "Square" | "Round" | "None" | "TriangleOut" | "TriangleIn";
|
5688 |
|
5689 |
|
5690 |
|
5691 |
|
5692 |
|
5693 | export declare type LineDashes = "Square" | "Round" | "Diamond";
|
5694 |
|
5695 |
|
5696 |
|
5697 |
|
5698 | declare class LineGroup {
|
5699 | readonly hasNormalsAndUvs: boolean;
|
5700 | readonly highPrecision: boolean;
|
5701 | readonly isSimple: boolean;
|
5702 | |
5703 |
|
5704 |
|
5705 |
|
5706 |
|
5707 |
|
5708 |
|
5709 |
|
5710 |
|
5711 |
|
5712 |
|
5713 | static createGeometry(vertices: ArrayLike<number>, colors: ArrayLike<number>, indices: ArrayLike<number>, geometry: THREE_2.BufferGeometry, hasNormalsAndUvs?: boolean, highPrecision?: boolean, isSimple?: boolean): THREE_2.BufferGeometry;
|
5714 | private readonly m_geometry;
|
5715 | constructor(hasNormalsAndUvs?: boolean, highPrecision?: boolean, isSimple?: boolean);
|
5716 | /**
|
5717 | * Clears the list of line strips.
|
5718 | */
|
5719 | clear(): void;
|
5720 | /**
|
5721 | * Add the given points to this line group.
|
5722 | *
|
5723 | * @param center - World center of the provided points.
|
5724 | * @param points - Sequence of (x,y,z) coordinates.
|
5725 | * @param offsets - Sequence of line segment offsets.
|
5726 | * @param uvs - Sequence of (u,v) texture coordinates.
|
5727 | * @param colors - Sequence of (r,g,b) color components.
|
5728 | */
|
5729 | add(center: THREE_2.Vector3, points: ArrayLike<number>, projection: Projection, offsets?: ArrayLike<number>, uvs?: ArrayLike<number>, colors?: ArrayLike<number>): this;
|
5730 | /**
|
5731 | * Returns the list of vertices.
|
5732 | */
|
5733 | get vertices(): number[];
|
5734 | /**
|
5735 | * Returns the list of vertex colors.
|
5736 | */
|
5737 | get vertexColors(): number[];
|
5738 | /**
|
5739 | * Returns the list of indices.
|
5740 | */
|
5741 | get indices(): number[];
|
5742 | /**
|
5743 | * Returns the list of [[VertexAttributeDescriptor]]s.
|
5744 | */
|
5745 | get vertexAttributes(): VertexAttributeDescriptor[];
|
5746 | /**
|
5747 | * Returns the vertex attribute stride.
|
5748 | */
|
5749 | get stride(): number;
|
5750 | /**
|
5751 | * Creates a three.js geometry.
|
5752 | */
|
5753 | createGeometry(geometry?: THREE_2.BufferGeometry): THREE_2.BufferGeometry;
|
5754 | }
|
5755 |
|
5756 | /**
|
5757 | * Render feature as line markers, which is a recurring marker along a line (usually road).
|
5758 | *
|
5759 | * @see [[MarkerTechniqueParams]].
|
5760 | */
|
5761 | export declare type LineMarkerStyle = BaseStyle<"line-marker", MarkerTechniqueParams>;
|
5762 |
|
5763 | /**
|
5764 | * Runtime representation of [[LineMarkerStyle]] as parsed by [[StyleSetEvaluator]].
|
5765 | * For technique parameters see [[MarkerTechniqueParams]].
|
5766 | */
|
5767 | export declare interface LineMarkerTechnique extends MakeTechniqueAttrs<MarkerTechniqueParams> {
|
5768 | name: "line-marker";
|
5769 | }
|
5770 |
|
5771 | export declare interface LinesGeometry {
|
5772 | type: GeometryType;
|
5773 | lines: LineGroup;
|
5774 | technique: number;
|
5775 | |
5776 |
|
5777 |
|
5778 | objInfos?: AttributeMap[];
|
5779 | |
5780 |
|
5781 |
|
5782 | featureStarts?: number[];
|
5783 | }
|
5784 |
|
5785 |
|
5786 |
|
5787 |
|
5788 | export declare interface LineString {
|
5789 | type: "LineString";
|
5790 | coordinates: number[][];
|
5791 | }
|
5792 |
|
5793 |
|
5794 |
|
5795 |
|
5796 | export declare type LineStyle = BaseStyle<"line", LineTechniqueParams>;
|
5797 |
|
5798 |
|
5799 |
|
5800 |
|
5801 |
|
5802 | export declare interface LineTechnique extends MakeTechniqueAttrs<LineTechniqueParams> {
|
5803 | name: "line";
|
5804 | }
|
5805 |
|
5806 |
|
5807 | export declare const lineTechniqueDescriptor: TechniqueDescriptor<LineTechnique>;
|
5808 |
|
5809 | export declare interface LineTechniqueParams extends BaseTechniqueParams {
|
5810 | |
5811 |
|
5812 |
|
5813 |
|
5814 |
|
5815 | color: DynamicProperty<StyleColor>;
|
5816 | |
5817 |
|
5818 |
|
5819 |
|
5820 | transparent?: boolean;
|
5821 | |
5822 |
|
5823 |
|
5824 |
|
5825 | opacity?: DynamicProperty<number>;
|
5826 | |
5827 |
|
5828 |
|
5829 |
|
5830 | lineWidth: DynamicProperty<number>;
|
5831 | }
|
5832 |
|
5833 |
|
5834 |
|
5835 |
|
5836 | export declare abstract class LiteralExpr extends Expr {
|
5837 | |
5838 |
|
5839 |
|
5840 |
|
5841 |
|
5842 | static fromValue(value: Value): Expr;
|
5843 | abstract get value(): Value;
|
5844 |
|
5845 | protected exprIsDynamic(): boolean;
|
5846 | }
|
5847 |
|
5848 |
|
5849 |
|
5850 |
|
5851 | export declare type LiteralValue = string | number | boolean;
|
5852 |
|
5853 |
|
5854 |
|
5855 |
|
5856 | export declare enum LoadingState {
|
5857 | Requested = 0,
|
5858 | Loaded = 1,
|
5859 | Initialized = 2
|
5860 | }
|
5861 |
|
5862 |
|
5863 |
|
5864 |
|
5865 | declare class LoggerOptions {
|
5866 | enabled?: boolean;
|
5867 | level?: LogLevel;
|
5868 | }
|
5869 |
|
5870 |
|
5871 |
|
5872 |
|
5873 | declare enum LogLevel {
|
5874 | Trace = 0,
|
5875 | Debug = 1,
|
5876 | Log = 2,
|
5877 | Info = 3,
|
5878 | Warn = 4,
|
5879 | Error = 5
|
5880 | }
|
5881 |
|
5882 |
|
5883 |
|
5884 |
|
5885 | export declare interface LookAtParams {
|
5886 | |
5887 |
|
5888 |
|
5889 |
|
5890 |
|
5891 |
|
5892 |
|
5893 |
|
5894 |
|
5895 |
|
5896 |
|
5897 |
|
5898 | target: GeoCoordLike;
|
5899 | |
5900 |
|
5901 |
|
5902 |
|
5903 |
|
5904 |
|
5905 |
|
5906 |
|
5907 |
|
5908 |
|
5909 |
|
5910 |
|
5911 |
|
5912 |
|
5913 |
|
5914 |
|
5915 |
|
5916 |
|
5917 |
|
5918 |
|
5919 |
|
5920 |
|
5921 |
|
5922 |
|
5923 | bounds: GeoBox | GeoBoxExtentLike | GeoCoordLike[];
|
5924 | |
5925 |
|
5926 |
|
5927 |
|
5928 | distance: number;
|
5929 | |
5930 |
|
5931 |
|
5932 |
|
5933 |
|
5934 |
|
5935 | zoomLevel: number;
|
5936 | |
5937 |
|
5938 |
|
5939 |
|
5940 |
|
5941 |
|
5942 | tilt: number;
|
5943 | |
5944 |
|
5945 |
|
5946 |
|
5947 |
|
5948 | heading: number;
|
5949 | }
|
5950 |
|
5951 |
|
5952 |
|
5953 |
|
5954 | export declare type MagFilter = "nearest" | "linear";
|
5955 |
|
5956 |
|
5957 |
|
5958 |
|
5959 |
|
5960 |
|
5961 |
|
5962 |
|
5963 | export declare type MakeTechniqueAttrs<T> = {
|
5964 | [P in keyof T]: T[P] | JsonExpr extends T[P] ? RemoveInterpolatedPropDef<RemoveJsonExpr<T[P]>> | Expr : T[P];
|
5965 | };
|
5966 |
|
5967 |
|
5968 |
|
5969 |
|
5970 |
|
5971 |
|
5972 |
|
5973 |
|
5974 |
|
5975 |
|
5976 |
|
5977 |
|
5978 |
|
5979 |
|
5980 | export declare type MapAnchor<T extends THREE_2.Object3D = THREE_2.Object3D> = T & {
|
5981 | |
5982 |
|
5983 |
|
5984 |
|
5985 | geoPosition?: GeoCoordinates;
|
5986 | |
5987 |
|
5988 |
|
5989 |
|
5990 | anchor?: GeoCoordLike | Vector3Like;
|
5991 | |
5992 |
|
5993 |
|
5994 |
|
5995 |
|
5996 | pickable?: boolean;
|
5997 | |
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 |
|
6003 |
|
6004 | styleSet?: string;
|
6005 | |
6006 |
|
6007 |
|
6008 |
|
6009 |
|
6010 |
|
6011 |
|
6012 | category?: string;
|
6013 | |
6014 |
|
6015 |
|
6016 |
|
6017 | overlay?: boolean;
|
6018 | };
|
6019 |
|
6020 |
|
6021 |
|
6022 |
|
6023 | export declare class MapAnchors {
|
6024 | private m_anchors;
|
6025 | |
6026 |
|
6027 |
|
6028 | get children(): MapAnchor<THREE_2.Object3D>[];
|
6029 | |
6030 |
|
6031 |
|
6032 |
|
6033 | add(mapAnchor: MapAnchor): void;
|
6034 | |
6035 |
|
6036 |
|
6037 |
|
6038 |
|
6039 |
|
6040 |
|
6041 | remove(mapAnchor: MapAnchor): void;
|
6042 | |
6043 |
|
6044 |
|
6045 | clear(): void;
|
6046 | |
6047 |
|
6048 |
|
6049 |
|
6050 |
|
6051 |
|
6052 |
|
6053 |
|
6054 |
|
6055 |
|
6056 |
|
6057 | update(projection: Projection, cameraPosition: THREE_2.Vector3, rootNode: THREE_2.Object3D, overlayRootNode: THREE_2.Object3D, priorities?: StylePriority[]): void;
|
6058 | }
|
6059 |
|
6060 |
|
6061 |
|
6062 |
|
6063 |
|
6064 |
|
6065 |
|
6066 |
|
6067 |
|
6068 |
|
6069 |
|
6070 |
|
6071 |
|
6072 |
|
6073 |
|
6074 |
|
6075 |
|
6076 |
|
6077 |
|
6078 | export declare class MapControls extends THREE_2.EventDispatcher {
|
6079 | readonly mapView: MapView;
|
6080 | |
6081 |
|
6082 |
|
6083 |
|
6084 |
|
6085 | static create(mapView: MapView): MapControls;
|
6086 | |
6087 |
|
6088 |
|
6089 |
|
6090 |
|
6091 | rotationMouseDeltaFactor: number;
|
6092 | |
6093 |
|
6094 |
|
6095 |
|
6096 |
|
6097 | orbitingMouseDeltaFactor: number;
|
6098 | |
6099 |
|
6100 |
|
6101 |
|
6102 |
|
6103 | orbitingTouchDeltaFactor: number;
|
6104 | |
6105 |
|
6106 |
|
6107 |
|
6108 |
|
6109 | enabled: boolean;
|
6110 | |
6111 |
|
6112 |
|
6113 | zoomEnabled: boolean;
|
6114 | |
6115 |
|
6116 |
|
6117 | panEnabled: boolean;
|
6118 | |
6119 |
|
6120 |
|
6121 | tiltEnabled: boolean;
|
6122 | |
6123 |
|
6124 |
|
6125 | rotateEnabled: boolean;
|
6126 | |
6127 |
|
6128 |
|
6129 | inertiaEnabled: boolean;
|
6130 | |
6131 |
|
6132 |
|
6133 | zoomInertiaDampingDuration: number;
|
6134 | |
6135 |
|
6136 |
|
6137 | panInertiaDampingDuration: number;
|
6138 | |
6139 |
|
6140 |
|
6141 |
|
6142 | tiltToggleDuration: number;
|
6143 | |
6144 |
|
6145 |
|
6146 | tiltAngle: number;
|
6147 | |
6148 |
|
6149 |
|
6150 |
|
6151 | northResetAnimationDuration: number;
|
6152 | |
6153 |
|
6154 |
|
6155 |
|
6156 |
|
6157 |
|
6158 |
|
6159 | zoomLevelDeltaOnMouseWheel: number;
|
6160 | |
6161 |
|
6162 |
|
6163 | zoomLevelDeltaOnControl: number;
|
6164 | |
6165 |
|
6166 |
|
6167 | minZoomLevel: number;
|
6168 | |
6169 |
|
6170 |
|
6171 | maxZoomLevel: number;
|
6172 | |
6173 |
|
6174 |
|
6175 | minCameraHeight: number;
|
6176 | |
6177 |
|
6178 |
|
6179 | zoomLevelDeltaOnDoubleClick: number;
|
6180 | |
6181 |
|
6182 |
|
6183 |
|
6184 |
|
6185 | doubleTapTime: number;
|
6186 | |
6187 |
|
6188 |
|
6189 | readonly camera: THREE_2.Camera;
|
6190 | |
6191 |
|
6192 |
|
6193 | readonly domElement: HTMLCanvasElement;
|
6194 | private readonly m_currentViewDirection;
|
6195 | private readonly m_lastMousePosition;
|
6196 | private readonly m_mouseDelta;
|
6197 | private m_needsRenderLastFrame;
|
6198 | private m_panIsAnimated;
|
6199 | private m_panDistanceFrameDelta;
|
6200 | private m_panAnimationTime;
|
6201 | private m_panAnimationStartTime;
|
6202 | private m_lastAveragedPanDistanceOrAngle;
|
6203 | private m_currentInertialPanningSpeed;
|
6204 | private m_lastPanVector;
|
6205 | private m_rotateGlobeQuaternion;
|
6206 | private m_lastRotateGlobeAxis;
|
6207 | private m_lastRotateGlobeAngle;
|
6208 | private m_lastRotateGlobeFromVector;
|
6209 | private m_recentPanDistancesOrAngles;
|
6210 | private m_currentPanDistanceOrAngleIndex;
|
6211 | private m_zoomIsAnimated;
|
6212 | private m_zoomDeltaRequested;
|
6213 | private m_zoomTargetNormalizedCoordinates;
|
6214 | private m_zoomAnimationTime;
|
6215 | private m_zoomAnimationStartTime;
|
6216 | private m_startZoom;
|
6217 | private m_targetedZoom?;
|
6218 | private m_currentZoom?;
|
6219 | private m_tiltIsAnimated;
|
6220 | private m_tiltRequested?;
|
6221 | private m_tiltAnimationTime;
|
6222 | private m_tiltAnimationStartTime;
|
6223 | private m_startTilt;
|
6224 | private m_targetedTilt?;
|
6225 | private m_currentTilt?;
|
6226 | private m_tiltState?;
|
6227 | private m_state;
|
6228 | private m_tmpVector2;
|
6229 | private m_tmpVector3;
|
6230 | private m_tapStartTime;
|
6231 | private m_lastSingleTapTime;
|
6232 | private m_fingerMoved;
|
6233 | private m_isDoubleTap;
|
6234 | private m_resetNorthStartTime;
|
6235 | private m_resetNorthIsAnimated;
|
6236 | private m_resetNorthAnimationDuration;
|
6237 | private m_currentAzimuth;
|
6238 | private m_lastAzimuth;
|
6239 | private m_startAzimuth;
|
6240 | |
6241 |
|
6242 |
|
6243 | private m_maxTiltAngle;
|
6244 | private m_cleanupMouseEventListeners?;
|
6245 | private m_touchState;
|
6246 | |
6247 |
|
6248 |
|
6249 |
|
6250 |
|
6251 | constructor(mapView: MapView);
|
6252 | /**
|
6253 | * Destroy this `MapControls` instance.
|
6254 | *
|
6255 | * Unregisters all global event handlers used. This is method should be called when you stop
|
6256 | * using `MapControls`.
|
6257 | */
|
6258 | dispose: () => void;
|
6259 | /**
|
6260 | * Current viewing angles yaw/pitch/roll in degrees.
|
6261 | */
|
6262 | get attitude(): MapViewUtils.Attitude;
|
6263 | /**
|
6264 | * Moves the camera along the view direction in meters.
|
6265 | * A positive value will move the camera further away from the point where the camera looks at.
|
6266 | * A negative value will move the camera near to the point where the camera looks at.
|
6267 | *
|
6268 | * @param amount - Amount to move along the view direction in meters.
|
6269 | */
|
6270 | moveAlongTheViewDirection(amount: number): void;
|
6271 | /**
|
6272 | * Reset the camera to looking north, in an orbiting movement around the target point instead
|
6273 | * of changing the yaw (which would be the camera rotating on itself).
|
6274 | */
|
6275 | pointToNorth(): void;
|
6276 | /**
|
6277 | * Zooms and moves the map in such a way that the given target position remains at the same
|
6278 | * position after the zoom.
|
6279 | *
|
6280 | * @param targetPositionOnScreenXinNDC - Target x position in NDC space.
|
6281 | * @param targetPositionOnScreenYinNDC - Target y position in NDC space.
|
6282 | */
|
6283 | zoomOnTargetPosition(targetPositionOnScreenXinNDC: number, targetPositionOnScreenYinNDC: number, zoomLevel: number): void;
|
6284 | /**
|
6285 | * Zooms to the desired location by the provided value.
|
6286 | *
|
6287 | * @param zoomLevel - Zoom level.
|
6288 | * @param screenTarget - Zoom target on screen.
|
6289 | */
|
6290 | setZoomLevel(zoomLevel: number, screenTarget?: {
|
6291 | x: number;
|
6292 | y: number;
|
6293 | } | THREE_2.Vector2): void;
|
6294 | /**
|
6295 | * Toggles the camera tilt between 0 (looking down) and the value at `this.tiltAngle`.
|
6296 | */
|
6297 | toggleTilt(): void;
|
6298 | /**
|
6299 | * Set the camera height.
|
6300 | */
|
6301 | set cameraHeight(height: number);
|
6302 | /**
|
6303 | * Get the current camera height.
|
6304 | */
|
6305 | get cameraHeight(): number;
|
6306 | /**
|
6307 | * Set camera max tilt angle. The value is clamped between 0 and 90 degrees. In sphere
|
6308 | * projection, at runtime, the value is also clamped so that the camera does not look above the
|
6309 | * horizon.
|
6310 | *
|
6311 | * @param angle - Angle in degrees.
|
6312 | */
|
6313 | set maxTiltAngle(angle: number);
|
6314 | /**
|
6315 | * Get the camera max tilt angle in degrees.
|
6316 | */
|
6317 | get maxTiltAngle(): number;
|
6318 | /**
|
6319 | * Get the zoom level targeted by `MapControls`. Useful when inertia is on, to add incremented
|
6320 | * values to the target instead of getting the random zoomLevel value during the interpolation.
|
6321 | */
|
6322 | get zoomLevelTargeted(): number;
|
6323 | /**
|
6324 | * Handy getter to know if the view is in the process of looking down or not.
|
6325 | */
|
6326 | get tiltState(): TiltState;
|
6327 | private set currentZoom(value);
|
6328 | private get currentZoom();
|
6329 | private set currentTilt(value);
|
6330 | private get currentTilt();
|
6331 | private get targetedTilt();
|
6332 | private assignZoomAfterTouchZoomRender;
|
6333 | private stopExistingAnimations;
|
6334 | private resetNorth;
|
6335 | private stopResetNorth;
|
6336 | private tilt;
|
6337 | private stopTilt;
|
6338 | private easeOutCubic;
|
6339 | private handleZoom;
|
6340 | private stopZoom;
|
6341 | /**
|
6342 | * Method to flip crêpes.
|
6343 | */
|
6344 | private handlePan;
|
6345 | private stopPan;
|
6346 | private bindInputEvents;
|
6347 | private updateMapView;
|
6348 | private mouseDoubleClick;
|
6349 | private mouseDown;
|
6350 | private mouseMove;
|
6351 | private mouseUp;
|
6352 | private mouseWheel;
|
6353 | /**
|
6354 | * Calculates the angle of the vector, which is formed by two touch points in world space
|
6355 | * against the X axis in world space on the map. The resulting angle is in radians and between
|
6356 | * `-PI` and `PI`.
|
6357 | */
|
6358 | private updateCurrentRotation;
|
6359 | /**
|
6360 | * Calculates the difference of the current distance of two touch points against their initial
|
6361 | * distance in world space.
|
6362 | */
|
6363 | private calculatePinchDistanceInWorldSpace;
|
6364 | private convertTouchPoint;
|
6365 | private setTouchState;
|
6366 | private updateTouches;
|
6367 | private zoomOnDoubleClickOrTap;
|
6368 | private touchStart;
|
6369 | private touchMove;
|
6370 | private touchEnd;
|
6371 | private handleDoubleTap;
|
6372 | private contextMenu;
|
6373 | private getWorldPositionWithElevation;
|
6374 | private panFromTo;
|
6375 | /**
|
6376 | * Acquire mouse or touch pointer position relative to canvas for `MouseEvent` or `Touch` event.
|
6377 | *
|
6378 | * Function takes into account canvas position in client space (including scrolling) as also
|
6379 | * canvas scaling factor.
|
6380 | *
|
6381 | * @param event - The mouse event.
|
6382 | * @returns [[THREE.Vector2]] containing _x_, _y_ mouse pointer position.
|
6383 | */
|
6384 | private getPointerPosition;
|
6385 | }
|
6386 |
|
6387 | /**
|
6388 | * Base class to handle UI overlay elements.
|
6389 | */
|
6390 | export declare class MapControlsUI {
|
6391 | readonly controls: MapControls;
|
6392 | |
6393 |
|
6394 |
|
6395 | readonly domElement: HTMLDivElement;
|
6396 | private m_buttonsElement;
|
6397 | |
6398 |
|
6399 |
|
6400 | private m_zoomLevelElement;
|
6401 | |
6402 |
|
6403 |
|
6404 | private m_projectionSwitchElement;
|
6405 | |
6406 |
|
6407 |
|
6408 | private m_onWindowClick;
|
6409 | |
6410 |
|
6411 |
|
6412 | private m_onMapViewRenderEvent;
|
6413 | |
6414 |
|
6415 |
|
6416 |
|
6417 |
|
6418 | constructor(controls: MapControls, options?: MapControlsUIOptions);
|
6419 | /**
|
6420 | * Destroy this [[MapControlsUI]] instance. Unregisters all event handlers used. This method
|
6421 | * should be called when you stop using [[MapControlsUI]].
|
6422 | */
|
6423 | dispose(): void;
|
6424 | private initStyle;
|
6425 | }
|
6426 |
|
6427 | /**
|
6428 | * Option for MapControlsUI.
|
6429 | */
|
6430 | declare interface MapControlsUIOptions {
|
6431 | |
6432 |
|
6433 |
|
6434 | zoomLevel?: "show" | "input";
|
6435 | |
6436 |
|
6437 |
|
6438 | projectionSwitch?: boolean;
|
6439 | |
6440 |
|
6441 |
|
6442 | disableDefaultStyle?: boolean;
|
6443 | }
|
6444 |
|
6445 |
|
6446 |
|
6447 |
|
6448 |
|
6449 |
|
6450 |
|
6451 |
|
6452 |
|
6453 |
|
6454 |
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 |
|
6460 |
|
6461 |
|
6462 |
|
6463 |
|
6464 |
|
6465 | export declare class MapEnv extends Env {
|
6466 | readonly entries: ValueMap;
|
6467 | private readonly parent?;
|
6468 | constructor(entries: ValueMap, parent?: Env | undefined);
|
6469 | /**
|
6470 | * Returns property in {@link Env} by name.
|
6471 | *
|
6472 | * @param name - Name of property.
|
6473 | * @override
|
6474 | */
|
6475 | lookup(name: string): Value | undefined;
|
6476 | |
6477 |
|
6478 |
|
6479 |
|
6480 |
|
6481 | unmap(): ValueMap;
|
6482 | }
|
6483 |
|
6484 |
|
6485 |
|
6486 |
|
6487 |
|
6488 |
|
6489 | export declare class MapRenderingManager implements IMapRenderingManager {
|
6490 | bloom: {
|
6491 | enabled: boolean;
|
6492 | strength: number;
|
6493 | radius: number;
|
6494 | threshold: number;
|
6495 | };
|
6496 | outline: {
|
6497 | enabled: boolean;
|
6498 | thickness: number;
|
6499 | color: string;
|
6500 | ghostExtrudedPolygons: boolean;
|
6501 | needsUpdate: boolean;
|
6502 | };
|
6503 | vignette: {
|
6504 | enabled: boolean;
|
6505 | offset: number;
|
6506 | darkness: number;
|
6507 | };
|
6508 | sepia: {
|
6509 | enabled: boolean;
|
6510 | amount: number;
|
6511 | };
|
6512 | private m_width;
|
6513 | private m_height;
|
6514 | private m_outlineEffect?;
|
6515 | private m_msaaPass;
|
6516 | private m_renderPass;
|
6517 | private m_target1;
|
6518 | private m_target2;
|
6519 | private m_bloomPass?;
|
6520 | private m_sepiaPass;
|
6521 | private m_vignettePass;
|
6522 | private m_readBuffer;
|
6523 | private m_dynamicMsaaSamplingLevel;
|
6524 | private m_staticMsaaSamplingLevel;
|
6525 | private m_lowResPass;
|
6526 | |
6527 |
|
6528 |
|
6529 |
|
6530 |
|
6531 |
|
6532 |
|
6533 |
|
6534 |
|
6535 |
|
6536 |
|
6537 | constructor(width: number, height: number, lowResPixelRatio: number | undefined, antialiasSettings?: IMapAntialiasSettings | undefined);
|
6538 | updateOutline(options: {
|
6539 | thickness: number;
|
6540 | color: string;
|
6541 | ghostExtrudedPolygons: boolean;
|
6542 | }): void;
|
6543 | /**
|
6544 | * The method to call to render the map with the `MapRenderingManager` instance. It contains the
|
6545 | * chain of sub-passes that can transfer the write and read buffers, and other sheer rendering
|
6546 | * conditions as disabling AA when a high DPI device is in use.
|
6547 | *
|
6548 | * @param renderer - The ThreeJS WebGLRenderer instance to render the map with.
|
6549 | * @param scene - The ThreeJS Scene instance containing the map objects to render.
|
6550 | * @param camera - The ThreeJS Camera instance to render the scene through.
|
6551 | * @param isStaticFrame - Whether the frame to render is static or dynamic. Selects level of
|
6552 | * antialiasing.
|
6553 | */
|
6554 | render(renderer: THREE_2.WebGLRenderer, scene: THREE_2.Scene, camera: THREE_2.PerspectiveCamera | THREE_2.OrthographicCamera, isStaticFrame: boolean): void;
|
6555 | /**
|
6556 | * The resize function to call on resize events to resize the render targets. It shall include
|
6557 | * the resize methods of all the sub-passes used in `MapRenderingManager`.
|
6558 | *
|
6559 | * @param width - New width to use.
|
6560 | * @param height - New height to use.
|
6561 | */
|
6562 | setSize(width: number, height: number): void;
|
6563 | /**
|
6564 | * The `lowResPixelRatio` determines the resolution of the internal `WebGLRenderTarget`. Values
|
6565 | * between 0.5 and `window.devicePixelRatio` can be tried to give good results. A value of
|
6566 | * `undefined` disables the low res render pass. The value should not be larger than
|
6567 | * `window.devicePixelRatio`.
|
6568 | */
|
6569 | get lowResPixelRatio(): number | undefined;
|
6570 | set lowResPixelRatio(pixelRatio: number | undefined);
|
6571 | /**
|
6572 | * Set the level of sampling while the user interacts.
|
6573 | *
|
6574 | * @param samplingLevel - The sampling level.
|
6575 | */
|
6576 | set dynamicMsaaSamplingLevel(samplingLevel: MSAASampling);
|
6577 | /**
|
6578 | * Return the sampling level defined during continuous rendering.
|
6579 | */
|
6580 | get dynamicMsaaSamplingLevel(): MSAASampling;
|
6581 | /**
|
6582 | * Enable or disable the MSAA. If disabled, `MapRenderingManager` will use the renderer provided
|
6583 | * in the {@link MapRenderingManager.render} method to render the scene.
|
6584 | *
|
6585 | * @param value - If `true`, MSAA is enabled, disabled otherwise.
|
6586 | */
|
6587 | set msaaEnabled(value: boolean);
|
6588 | |
6589 |
|
6590 |
|
6591 | get msaaEnabled(): boolean;
|
6592 | |
6593 |
|
6594 |
|
6595 |
|
6596 |
|
6597 | set staticMsaaSamplingLevel(samplingLevel: MSAASampling);
|
6598 | |
6599 |
|
6600 |
|
6601 | get staticMsaaSamplingLevel(): MSAASampling;
|
6602 | }
|
6603 |
|
6604 |
|
6605 |
|
6606 |
|
6607 |
|
6608 | export declare class MapView extends THREE_2.EventDispatcher {
|
6609 | |
6610 |
|
6611 |
|
6612 |
|
6613 |
|
6614 |
|
6615 |
|
6616 |
|
6617 |
|
6618 | maxFps: number;
|
6619 | |
6620 |
|
6621 |
|
6622 |
|
6623 |
|
6624 | readonly mapRenderingManager: IMapRenderingManager;
|
6625 | private m_renderLabels;
|
6626 | private m_movementFinishedUpdateTimerId?;
|
6627 | private m_postEffects?;
|
6628 | private m_skyBackground?;
|
6629 | private m_createdLights?;
|
6630 | private m_overlayCreatedLights?;
|
6631 | private readonly m_screenProjector;
|
6632 | private readonly m_screenCollisions;
|
6633 | private m_visibleTiles;
|
6634 | private m_elevationSource?;
|
6635 | private m_elevationRangeSource?;
|
6636 | private m_elevationProvider?;
|
6637 | private m_visibleTileSetLock;
|
6638 | private m_tileGeometryManager;
|
6639 | private m_tileWrappingEnabled;
|
6640 | private m_zoomLevel;
|
6641 | private m_minZoomLevel;
|
6642 | private m_maxZoomLevel;
|
6643 | private m_minCameraHeight;
|
6644 | private readonly m_screenCamera;
|
6645 | private readonly m_camera;
|
6646 | |
6647 |
|
6648 |
|
6649 |
|
6650 |
|
6651 |
|
6652 | private readonly m_rteCamera;
|
6653 | private m_yaw;
|
6654 | private m_pitch;
|
6655 | private m_roll;
|
6656 | private m_focalLength;
|
6657 | private m_targetDistance;
|
6658 | private m_targetGeoPos;
|
6659 | private m_targetWorldPos;
|
6660 | private readonly m_viewRanges;
|
6661 | private m_pointOfView?;
|
6662 | private m_pixelToWorld?;
|
6663 | private m_pixelRatio?;
|
6664 |
|
6665 | private readonly m_scene;
|
6666 |
|
6667 | private readonly m_overlayScene;
|
6668 | private readonly m_fog;
|
6669 |
|
6670 | private readonly m_sceneRoot;
|
6671 |
|
6672 | private readonly m_overlaySceneRoot;
|
6673 | private readonly m_mapAnchors;
|
6674 | private m_animationCount;
|
6675 | private m_animationFrameHandle;
|
6676 | private m_drawing;
|
6677 | private m_updatePending;
|
6678 | private m_renderer;
|
6679 | private m_frameNumber;
|
6680 | private m_textElementsRenderer;
|
6681 | private m_forceCameraAspect;
|
6682 | private readonly m_tileDataSources;
|
6683 | private readonly m_connectedDataSources;
|
6684 | private readonly m_failedDataSources;
|
6685 | private m_backgroundDataSource?;
|
6686 | private m_polarDataSource?;
|
6687 | private m_enablePolarDataSource;
|
6688 | private readonly m_raycaster;
|
6689 | private readonly m_plane;
|
6690 | private readonly m_sphere;
|
6691 | private readonly m_options;
|
6692 | private readonly m_visibleTileSetOptions;
|
6693 | private m_theme;
|
6694 | private m_uriResolver?;
|
6695 | private m_themeIsLoading;
|
6696 | private m_previousFrameTimeStamp?;
|
6697 | private m_firstFrameRendered;
|
6698 | private m_firstFrameComplete;
|
6699 | private m_initialTextPlacementDone;
|
6700 | private handleRequestAnimationFrame;
|
6701 | private m_pickHandler;
|
6702 | private m_imageCache;
|
6703 | private m_poiManager;
|
6704 | private m_poiTableManager;
|
6705 | private m_collisionDebugCanvas;
|
6706 | private m_movementDetector;
|
6707 | private m_thisFrameTilesChanged;
|
6708 | private m_lastTileIds;
|
6709 | private m_languages;
|
6710 | private m_politicalView;
|
6711 | private m_copyrightInfo;
|
6712 | private m_animatedExtrusionHandler;
|
6713 | private m_env;
|
6714 | private m_enableMixedLod;
|
6715 | |
6716 |
|
6717 |
|
6718 |
|
6719 |
|
6720 | constructor(options: MapViewOptions);
|
6721 | /**
|
6722 | * @returns The lights configured by the theme, this is just a convenience method, because the
|
6723 | * lights can still be accessed by traversing the children of the [[scene]].
|
6724 | */
|
6725 | get lights(): THREE_2.Light[];
|
6726 | /**
|
6727 | * @returns Whether label rendering is enabled.
|
6728 | */
|
6729 | get renderLabels(): boolean;
|
6730 | /**
|
6731 | * Enables or disables rendering of labels.
|
6732 | * @param value - `true` to enable labels `false` to disable them.
|
6733 | */
|
6734 | set renderLabels(value: boolean);
|
6735 | /**
|
6736 | * @returns Whether adding of new labels during interaction is enabled.
|
6737 | */
|
6738 | get delayLabelsUntilMovementFinished(): boolean;
|
6739 | /**
|
6740 | * Enables or disables adding of new labels during interaction. Has no influence on already
|
6741 | * placed labels
|
6742 | * @param value - `true` to enable adding `false` to disable them.
|
6743 | */
|
6744 | set delayLabelsUntilMovementFinished(value: boolean);
|
6745 | /**
|
6746 | * @hidden
|
6747 | * The {@link TextElementsRenderer} select the visible {@link TextElement}s and renders them.
|
6748 | */
|
6749 | get textElementsRenderer(): TextElementsRenderer;
|
6750 | |
6751 |
|
6752 |
|
6753 |
|
6754 |
|
6755 | get cameraMovementDetector(): CameraMovementDetector;
|
6756 | |
6757 |
|
6758 |
|
6759 |
|
6760 | get animatedExtrusionHandler(): AnimatedExtrusionHandler;
|
6761 | |
6762 |
|
6763 |
|
6764 |
|
6765 | get tileGeometryManager(): TileGeometryManager | undefined;
|
6766 | get enableMixedLod(): boolean | undefined;
|
6767 | set enableMixedLod(enableMixedLod: boolean | undefined);
|
6768 | |
6769 |
|
6770 |
|
6771 |
|
6772 |
|
6773 |
|
6774 |
|
6775 |
|
6776 |
|
6777 |
|
6778 | dispose(): void;
|
6779 | |
6780 |
|
6781 |
|
6782 |
|
6783 | get resourceComputationType(): ResourceComputationType;
|
6784 | set resourceComputationType(value: ResourceComputationType);
|
6785 | |
6786 |
|
6787 |
|
6788 | getCacheSize(): number;
|
6789 | |
6790 |
|
6791 |
|
6792 |
|
6793 |
|
6794 |
|
6795 | setCacheSize(size: number, numVisibleTiles?: number): void;
|
6796 | |
6797 |
|
6798 |
|
6799 | get extendedFrustumCulling(): boolean;
|
6800 | |
6801 |
|
6802 |
|
6803 | set extendedFrustumCulling(value: boolean);
|
6804 | |
6805 |
|
6806 |
|
6807 | get lockVisibleTileSet(): boolean;
|
6808 | |
6809 |
|
6810 |
|
6811 | set lockVisibleTileSet(value: boolean);
|
6812 | |
6813 |
|
6814 |
|
6815 | get pointOfView(): THREE_2.PerspectiveCamera | undefined;
|
6816 | |
6817 |
|
6818 |
|
6819 | set pointOfView(pointOfView: THREE_2.PerspectiveCamera | undefined);
|
6820 | |
6821 |
|
6822 |
|
6823 |
|
6824 |
|
6825 | loadPostEffects(postEffectsFile: string): void;
|
6826 | |
6827 |
|
6828 |
|
6829 | get postEffects(): PostEffects | undefined;
|
6830 | set postEffects(postEffects: PostEffects | undefined);
|
6831 | |
6832 |
|
6833 |
|
6834 | get theme(): Theme;
|
6835 | |
6836 |
|
6837 |
|
6838 | set theme(theme: Theme);
|
6839 | |
6840 |
|
6841 |
|
6842 |
|
6843 | get uriResolver(): UriResolver | undefined;
|
6844 | |
6845 |
|
6846 |
|
6847 |
|
6848 |
|
6849 |
|
6850 | get forceCameraAspect(): number | undefined;
|
6851 | |
6852 |
|
6853 |
|
6854 | set forceCameraAspect(aspect: number | undefined);
|
6855 | |
6856 |
|
6857 |
|
6858 | get languages(): string[] | undefined;
|
6859 | |
6860 |
|
6861 |
|
6862 | set languages(languages: string[] | undefined);
|
6863 | |
6864 |
|
6865 |
|
6866 |
|
6867 |
|
6868 |
|
6869 |
|
6870 | get politicalView(): string | undefined;
|
6871 | |
6872 |
|
6873 |
|
6874 |
|
6875 |
|
6876 |
|
6877 |
|
6878 |
|
6879 | set politicalView(pov: string | undefined);
|
6880 | get copyrightInfo(): CopyrightInfo[];
|
6881 | |
6882 |
|
6883 |
|
6884 |
|
6885 |
|
6886 | set disableFading(disable: boolean);
|
6887 | get disableFading(): boolean;
|
6888 | |
6889 |
|
6890 |
|
6891 |
|
6892 | get frameNumber(): number;
|
6893 | |
6894 |
|
6895 |
|
6896 |
|
6897 | resetFrameNumber(): void;
|
6898 | |
6899 |
|
6900 |
|
6901 |
|
6902 |
|
6903 |
|
6904 |
|
6905 |
|
6906 |
|
6907 |
|
6908 |
|
6909 |
|
6910 |
|
6911 |
|
6912 |
|
6913 |
|
6914 |
|
6915 | addEventListener(type: MapViewEventNames, listener: (event: RenderEvent) => void): void;
|
6916 | |
6917 |
|
6918 |
|
6919 |
|
6920 |
|
6921 |
|
6922 |
|
6923 |
|
6924 |
|
6925 |
|
6926 |
|
6927 |
|
6928 |
|
6929 |
|
6930 | removeEventListener(type: MapViewEventNames, listener: (event: RenderEvent) => void): void;
|
6931 | |
6932 |
|
6933 |
|
6934 | get canvas(): HTMLCanvasElement;
|
6935 | |
6936 |
|
6937 |
|
6938 | get collisionDebugCanvas(): HTMLCanvasElement | undefined;
|
6939 | |
6940 |
|
6941 |
|
6942 | get scene(): THREE_2.Scene;
|
6943 | |
6944 |
|
6945 |
|
6946 |
|
6947 |
|
6948 |
|
6949 |
|
6950 |
|
6951 |
|
6952 |
|
6953 |
|
6954 |
|
6955 | get camera(): THREE_2.PerspectiveCamera;
|
6956 | |
6957 |
|
6958 |
|
6959 | get renderer(): THREE_2.WebGLRenderer;
|
6960 | |
6961 |
|
6962 |
|
6963 | get clearColor(): number;
|
6964 | |
6965 |
|
6966 |
|
6967 | set clearColor(color: number);
|
6968 | |
6969 |
|
6970 |
|
6971 | get clearAlpha(): number;
|
6972 | |
6973 |
|
6974 |
|
6975 | set clearAlpha(alpha: number);
|
6976 | |
6977 |
|
6978 |
|
6979 | get projection(): Projection;
|
6980 | |
6981 |
|
6982 |
|
6983 |
|
6984 |
|
6985 | set projection(projection: Projection);
|
6986 | |
6987 |
|
6988 |
|
6989 | get clipPlanesEvaluator(): ClipPlanesEvaluator;
|
6990 | |
6991 |
|
6992 |
|
6993 | set clipPlanesEvaluator(clipPlanesEvaluator: ClipPlanesEvaluator);
|
6994 | |
6995 |
|
6996 |
|
6997 | get focalLength(): number;
|
6998 | |
6999 |
|
7000 |
|
7001 |
|
7002 |
|
7003 |
|
7004 |
|
7005 |
|
7006 |
|
7007 | get target(): GeoCoordinates;
|
7008 | |
7009 |
|
7010 |
|
7011 |
|
7012 |
|
7013 |
|
7014 |
|
7015 |
|
7016 |
|
7017 | get worldTarget(): THREE_2.Vector3;
|
7018 | |
7019 |
|
7020 |
|
7021 |
|
7022 |
|
7023 |
|
7024 |
|
7025 |
|
7026 | get targetDistance(): number;
|
7027 | |
7028 |
|
7029 |
|
7030 |
|
7031 |
|
7032 |
|
7033 |
|
7034 |
|
7035 |
|
7036 |
|
7037 |
|
7038 |
|
7039 | get viewRanges(): ViewRanges;
|
7040 | |
7041 |
|
7042 |
|
7043 |
|
7044 | get geoCenter(): GeoCoordinates;
|
7045 | |
7046 |
|
7047 |
|
7048 |
|
7049 | set geoCenter(geoCenter: GeoCoordinates);
|
7050 | |
7051 |
|
7052 |
|
7053 |
|
7054 |
|
7055 |
|
7056 | get mapAnchors(): MapAnchors;
|
7057 | |
7058 |
|
7059 |
|
7060 | get worldCenter(): THREE_2.Vector3;
|
7061 | |
7062 |
|
7063 |
|
7064 | get pickHandler(): PickHandler;
|
7065 | |
7066 |
|
7067 |
|
7068 | get imageCache(): MapViewImageCache;
|
7069 | |
7070 |
|
7071 |
|
7072 |
|
7073 | get poiManager(): PoiManager;
|
7074 | |
7075 |
|
7076 |
|
7077 |
|
7078 | get poiTableManager(): PoiTableManager;
|
7079 | |
7080 |
|
7081 |
|
7082 | get minCameraHeight(): number;
|
7083 | |
7084 |
|
7085 |
|
7086 | get minZoomLevel(): number;
|
7087 | |
7088 |
|
7089 |
|
7090 | set minZoomLevel(zoomLevel: number);
|
7091 | |
7092 |
|
7093 |
|
7094 | get maxZoomLevel(): number;
|
7095 | |
7096 |
|
7097 |
|
7098 | set maxZoomLevel(zoomLevel: number);
|
7099 | |
7100 |
|
7101 |
|
7102 | get zoomLevel(): number;
|
7103 | set zoomLevel(zoomLevel: number);
|
7104 | |
7105 |
|
7106 |
|
7107 | get tilt(): number;
|
7108 | |
7109 |
|
7110 |
|
7111 |
|
7112 | set tilt(tilt: number);
|
7113 | |
7114 |
|
7115 |
|
7116 | get heading(): number;
|
7117 | |
7118 |
|
7119 |
|
7120 |
|
7121 | set heading(heading: number);
|
7122 | |
7123 |
|
7124 |
|
7125 | get env(): Env;
|
7126 | |
7127 |
|
7128 |
|
7129 |
|
7130 |
|
7131 | get storageLevel(): number;
|
7132 | |
7133 |
|
7134 |
|
7135 | get viewportHeight(): number;
|
7136 | |
7137 |
|
7138 |
|
7139 |
|
7140 |
|
7141 | get nativeWebglAntialiasEnabled(): boolean;
|
7142 | |
7143 |
|
7144 |
|
7145 | get dataSources(): DataSource[];
|
7146 | |
7147 |
|
7148 |
|
7149 |
|
7150 |
|
7151 |
|
7152 | setFovCalculation(fovCalculation: FovCalculation): void;
|
7153 | |
7154 |
|
7155 |
|
7156 | getDataSourceByName(dataSourceName: string): DataSource | undefined;
|
7157 | |
7158 |
|
7159 |
|
7160 | getDataSourcesByStyleSetName(styleSetName: string): DataSource[];
|
7161 | |
7162 |
|
7163 |
|
7164 | isDataSourceEnabled(dataSource: DataSource): boolean;
|
7165 | |
7166 |
|
7167 |
|
7168 |
|
7169 |
|
7170 |
|
7171 |
|
7172 | addDataSource(dataSource: DataSource): Promise<void>;
|
7173 | |
7174 |
|
7175 |
|
7176 |
|
7177 |
|
7178 | removeDataSource(dataSource: DataSource): void;
|
7179 | |
7180 |
|
7181 |
|
7182 | get visibleTileSet(): VisibleTileSet;
|
7183 | |
7184 |
|
7185 |
|
7186 |
|
7187 |
|
7188 | addOverlayText(textElements: TextElement[]): void;
|
7189 | |
7190 |
|
7191 |
|
7192 |
|
7193 |
|
7194 | clearOverlayText(): void;
|
7195 | |
7196 |
|
7197 |
|
7198 |
|
7199 |
|
7200 |
|
7201 |
|
7202 |
|
7203 |
|
7204 |
|
7205 |
|
7206 |
|
7207 |
|
7208 |
|
7209 |
|
7210 |
|
7211 |
|
7212 |
|
7213 |
|
7214 |
|
7215 |
|
7216 |
|
7217 |
|
7218 |
|
7219 |
|
7220 |
|
7221 |
|
7222 |
|
7223 |
|
7224 |
|
7225 |
|
7226 |
|
7227 |
|
7228 |
|
7229 |
|
7230 |
|
7231 |
|
7232 |
|
7233 |
|
7234 |
|
7235 |
|
7236 |
|
7237 |
|
7238 |
|
7239 |
|
7240 |
|
7241 |
|
7242 | lookAt(params: Partial<LookAtParams>): void;
|
7243 | |
7244 |
|
7245 |
|
7246 |
|
7247 |
|
7248 |
|
7249 |
|
7250 |
|
7251 |
|
7252 |
|
7253 |
|
7254 |
|
7255 |
|
7256 | lookAt(target: GeoCoordLike, distance: number, tiltDeg?: number, headingDeg?: number): void;
|
7257 | |
7258 |
|
7259 |
|
7260 |
|
7261 |
|
7262 |
|
7263 |
|
7264 |
|
7265 |
|
7266 |
|
7267 |
|
7268 |
|
7269 |
|
7270 |
|
7271 |
|
7272 |
|
7273 | setCameraGeolocationAndZoom(geoPos: GeoCoordinates, zoomLevel: number, yawDeg?: number, pitchDeg?: number): void;
|
7274 | |
7275 |
|
7276 |
|
7277 |
|
7278 |
|
7279 |
|
7280 |
|
7281 |
|
7282 |
|
7283 |
|
7284 |
|
7285 |
|
7286 |
|
7287 |
|
7288 | setDynamicProperty(name: string, value: Value): void;
|
7289 | |
7290 |
|
7291 |
|
7292 |
|
7293 |
|
7294 |
|
7295 |
|
7296 |
|
7297 | removeDynamicProperty(name: string): void;
|
7298 | |
7299 |
|
7300 |
|
7301 | get animating(): boolean;
|
7302 | |
7303 |
|
7304 |
|
7305 | beginAnimation(): void;
|
7306 | |
7307 |
|
7308 |
|
7309 | endAnimation(): void;
|
7310 | |
7311 |
|
7312 |
|
7313 | get cameraIsMoving(): boolean;
|
7314 | |
7315 |
|
7316 |
|
7317 | get isDynamicFrame(): boolean;
|
7318 | |
7319 |
|
7320 |
|
7321 |
|
7322 | get pixelToWorld(): number;
|
7323 | |
7324 |
|
7325 |
|
7326 |
|
7327 | get worldToPixel(): number;
|
7328 | get pixelRatio(): number;
|
7329 | |
7330 |
|
7331 |
|
7332 |
|
7333 |
|
7334 |
|
7335 |
|
7336 |
|
7337 |
|
7338 |
|
7339 |
|
7340 |
|
7341 |
|
7342 | set pixelRatio(pixelRatio: number);
|
7343 | |
7344 |
|
7345 |
|
7346 |
|
7347 |
|
7348 |
|
7349 |
|
7350 |
|
7351 |
|
7352 |
|
7353 |
|
7354 |
|
7355 |
|
7356 |
|
7357 |
|
7358 |
|
7359 |
|
7360 |
|
7361 |
|
7362 | set dynamicPixelRatio(ratio: number | undefined);
|
7363 | get dynamicPixelRatio(): number | undefined;
|
7364 | |
7365 |
|
7366 |
|
7367 |
|
7368 |
|
7369 |
|
7370 |
|
7371 | getScreenPosition(geoPos: GeoCoordinates): THREE_2.Vector2 | undefined;
|
7372 | |
7373 |
|
7374 |
|
7375 |
|
7376 |
|
7377 |
|
7378 |
|
7379 |
|
7380 |
|
7381 |
|
7382 |
|
7383 | raycasterFromScreenPoint(x: number, y: number): THREE_2.Raycaster;
|
7384 | |
7385 |
|
7386 |
|
7387 |
|
7388 |
|
7389 |
|
7390 |
|
7391 |
|
7392 | getWorldPositionAt(x: number, y: number): THREE_2.Vector3 | null;
|
7393 | |
7394 |
|
7395 |
|
7396 |
|
7397 |
|
7398 |
|
7399 |
|
7400 |
|
7401 |
|
7402 |
|
7403 | getGeoCoordinatesAt(x: number, y: number): GeoCoordinates | null;
|
7404 | |
7405 |
|
7406 |
|
7407 |
|
7408 |
|
7409 |
|
7410 | getNormalizedScreenCoordinates(x: number, y: number): THREE_2.Vector3;
|
7411 | |
7412 |
|
7413 |
|
7414 |
|
7415 |
|
7416 |
|
7417 |
|
7418 |
|
7419 |
|
7420 |
|
7421 |
|
7422 |
|
7423 |
|
7424 |
|
7425 |
|
7426 |
|
7427 |
|
7428 | intersectMapObjects(x: number, y: number): PickResult[];
|
7429 | |
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 |
|
7435 | resize(width: number, height: number): void;
|
7436 | |
7437 |
|
7438 |
|
7439 |
|
7440 |
|
7441 |
|
7442 |
|
7443 |
|
7444 |
|
7445 | renderSync(frameStartTime?: number): void;
|
7446 | |
7447 |
|
7448 |
|
7449 | update(): void;
|
7450 | |
7451 |
|
7452 |
|
7453 |
|
7454 | get updatePending(): boolean;
|
7455 | |
7456 |
|
7457 |
|
7458 |
|
7459 | requestUpdateIfNeeded(): void;
|
7460 | |
7461 |
|
7462 |
|
7463 |
|
7464 |
|
7465 |
|
7466 |
|
7467 |
|
7468 |
|
7469 | clearTileCache(dataSourceName?: string): void;
|
7470 | |
7471 |
|
7472 |
|
7473 |
|
7474 |
|
7475 | forEachVisibleTile(fun: (tile: Tile) => void): void;
|
7476 | |
7477 |
|
7478 |
|
7479 |
|
7480 |
|
7481 | forEachCachedTile(visitor: (tile: Tile) => void): void;
|
7482 | |
7483 |
|
7484 |
|
7485 |
|
7486 |
|
7487 |
|
7488 |
|
7489 |
|
7490 |
|
7491 | markTilesDirty(dataSource?: DataSource): void;
|
7492 | |
7493 |
|
7494 |
|
7495 |
|
7496 |
|
7497 |
|
7498 |
|
7499 |
|
7500 |
|
7501 |
|
7502 |
|
7503 |
|
7504 |
|
7505 |
|
7506 | setElevationSource(elevationSource: DataSource, elevationRangeSource: ElevationRangeSource, elevationProvider: ElevationProvider): Promise<void>;
|
7507 | |
7508 |
|
7509 |
|
7510 |
|
7511 | clearElevationSource(elevationSource: DataSource): void;
|
7512 | |
7513 |
|
7514 |
|
7515 | get fog(): MapViewFog;
|
7516 | private setPostEffects;
|
7517 | |
7518 |
|
7519 |
|
7520 | get elevationProvider(): ElevationProvider | undefined;
|
7521 | get shadowsEnabled(): boolean;
|
7522 | set shadowsEnabled(enabled: boolean);
|
7523 | private extractAttitude;
|
7524 | private lookAtImpl;
|
7525 | |
7526 |
|
7527 |
|
7528 | private updatePolarDataSource;
|
7529 | |
7530 |
|
7531 |
|
7532 |
|
7533 |
|
7534 |
|
7535 |
|
7536 | private updateCameras;
|
7537 | |
7538 |
|
7539 |
|
7540 | private updateLookAtSettings;
|
7541 | |
7542 |
|
7543 |
|
7544 | private updateEnv;
|
7545 | |
7546 |
|
7547 |
|
7548 |
|
7549 |
|
7550 | private ndcToView;
|
7551 | |
7552 |
|
7553 |
|
7554 |
|
7555 | private viewToLightSpace;
|
7556 | |
7557 |
|
7558 |
|
7559 | private updateLights;
|
7560 | |
7561 |
|
7562 |
|
7563 |
|
7564 |
|
7565 | private renderLoop;
|
7566 | |
7567 |
|
7568 |
|
7569 | private startRenderLoop;
|
7570 | |
7571 |
|
7572 |
|
7573 | private getEnabledTileDataSources;
|
7574 | |
7575 |
|
7576 |
|
7577 | private render;
|
7578 | private renderTileObjects;
|
7579 | |
7580 |
|
7581 |
|
7582 |
|
7583 |
|
7584 | private processTileObject;
|
7585 | |
7586 |
|
7587 |
|
7588 |
|
7589 |
|
7590 |
|
7591 |
|
7592 | private processTileObjectFeatures;
|
7593 | private prepareRenderTextElements;
|
7594 | private finishRenderTextElements;
|
7595 | private initTheme;
|
7596 | private setupCamera;
|
7597 | private createVisibleTileSet;
|
7598 | private updateSkyBackground;
|
7599 | private addNewSkyBackground;
|
7600 | private removeSkyBackGround;
|
7601 | private updateSkyBackgroundColors;
|
7602 | private updateLighting;
|
7603 | private movementStarted;
|
7604 | private movementFinished;
|
7605 | |
7606 |
|
7607 |
|
7608 |
|
7609 |
|
7610 |
|
7611 |
|
7612 | private checkIfTilesChanged;
|
7613 | private checkCopyrightUpdates;
|
7614 | private getRenderedTilesCopyrightInfo;
|
7615 | private updateImages;
|
7616 | private loadPoiTables;
|
7617 | private setupStats;
|
7618 | private setupRenderer;
|
7619 | private createTextRenderer;
|
7620 | private resetTextRenderer;
|
7621 | |
7622 |
|
7623 |
|
7624 |
|
7625 |
|
7626 | private onWebGLContextLost;
|
7627 | |
7628 |
|
7629 |
|
7630 |
|
7631 |
|
7632 | private onWebGLContextRestored;
|
7633 | private limitFov;
|
7634 | |
7635 |
|
7636 |
|
7637 |
|
7638 |
|
7639 | private setFovOnCamera;
|
7640 | |
7641 |
|
7642 |
|
7643 |
|
7644 |
|
7645 |
|
7646 |
|
7647 |
|
7648 | private calculateFocalLength;
|
7649 | |
7650 |
|
7651 |
|
7652 |
|
7653 |
|
7654 |
|
7655 | private getCanvasClientSize;
|
7656 | }
|
7657 |
|
7658 |
|
7659 |
|
7660 |
|
7661 | export declare class MapViewAtmosphere {
|
7662 | private m_mapAnchors;
|
7663 | private m_sceneCamera;
|
7664 | private m_projection;
|
7665 | private m_updateCallback?;
|
7666 | private m_atmosphereVariant;
|
7667 | private m_materialVariant;
|
7668 | |
7669 |
|
7670 |
|
7671 | static SkyAtmosphereUserName: string;
|
7672 | |
7673 |
|
7674 |
|
7675 | static GroundAtmosphereUserName: string;
|
7676 | |
7677 |
|
7678 |
|
7679 |
|
7680 |
|
7681 | static isPresent(mapAnchors: MapAnchors): boolean;
|
7682 | private m_enabled;
|
7683 | private m_skyGeometry?;
|
7684 | private m_skyMaterial?;
|
7685 | private m_skyMesh?;
|
7686 | private m_groundGeometry?;
|
7687 | private m_groundMaterial?;
|
7688 | private m_groundMesh?;
|
7689 | private m_clipPlanesEvaluator;
|
7690 | private readonly m_lightDirection;
|
7691 | |
7692 |
|
7693 |
|
7694 |
|
7695 |
|
7696 |
|
7697 |
|
7698 |
|
7699 |
|
7700 |
|
7701 |
|
7702 |
|
7703 |
|
7704 |
|
7705 |
|
7706 |
|
7707 |
|
7708 |
|
7709 | constructor(m_mapAnchors: MapAnchors, m_sceneCamera: THREE_2.Camera, m_projection: Projection, m_updateCallback?: (() => void) | undefined, m_atmosphereVariant?: AtmosphereVariant, m_materialVariant?: AtmosphereShadingVariant);
|
7710 | get skyMesh(): THREE_2.Mesh | undefined;
|
7711 | get groundMesh(): THREE_2.Mesh | undefined;
|
7712 | /**
|
7713 | * Allows to enable/disable the atmosphere effect, regardless of the theme settings.
|
7714 | *
|
7715 | * Use this method to change the setup in runtime without defining corresponding theme setup.
|
7716 | *
|
7717 | * @param enable - A boolean that specifies whether the atmosphere should be enabled or
|
7718 | * disabled.
|
7719 | */
|
7720 | set enabled(enable: boolean);
|
7721 | /**
|
7722 | * Returns the current atmosphere status, enabled or disabled.
|
7723 | */
|
7724 | get enabled(): boolean;
|
7725 | set lightMode(lightMode: AtmosphereLightMode);
|
7726 | /**
|
7727 | * Disposes allocated resources.
|
7728 | */
|
7729 | dispose(): void;
|
7730 | /**
|
7731 | * Sets the atmosphere depending on the
|
7732 | * {@link @here/harp-datasource-protocol#Theme} instance provided.
|
7733 | *
|
7734 | * This function is called when a theme is loaded. Atmosphere is added only if the theme
|
7735 | * contains a atmosphere definition with a:
|
7736 | * - `color` property, used to set the atmosphere color.
|
7737 | *
|
7738 | * @param theme - A {@link @here/harp-datasource-protocol#Theme} instance.
|
7739 | */
|
7740 | reset(theme: Theme): void;
|
7741 | private get disposed();
|
7742 | |
7743 |
|
7744 |
|
7745 | private addToMapAnchors;
|
7746 | |
7747 |
|
7748 |
|
7749 | private removeFromMapAnchors;
|
7750 | private createSkyGeometry;
|
7751 | private createGroundGeometry;
|
7752 | private setupSkyForRendering;
|
7753 | private setupGroundForRendering;
|
7754 | private overrideClipPlanes;
|
7755 | private revertClipPlanes;
|
7756 | }
|
7757 |
|
7758 | export declare enum MapViewEventNames {
|
7759 |
|
7760 | Update = "update",
|
7761 |
|
7762 | Resize = "resize",
|
7763 |
|
7764 | Render = "render",
|
7765 |
|
7766 | AfterRender = "didrender",
|
7767 |
|
7768 | FirstFrame = "first-render",
|
7769 |
|
7770 | FrameComplete = "frame-complete",
|
7771 |
|
7772 | ThemeLoaded = "theme-loaded",
|
7773 |
|
7774 | AnimationStarted = "animation-started",
|
7775 |
|
7776 | AnimationFinished = "animation-finished",
|
7777 |
|
7778 | MovementStarted = "movement-started",
|
7779 |
|
7780 | MovementFinished = "movement-finished",
|
7781 |
|
7782 | DataSourceConnect = "datasource-connect",
|
7783 |
|
7784 | CopyrightChanged = "copyright-changed",
|
7785 |
|
7786 | ContextLost = "webglcontext-lost",
|
7787 |
|
7788 | ContextRestored = "webglcontext-restored",
|
7789 |
|
7790 | CameraPositionChanged = "camera-changed"
|
7791 | }
|
7792 |
|
7793 |
|
7794 |
|
7795 |
|
7796 | export declare abstract class MapViewFeature {
|
7797 | coordinates: FeatureGeometry["coordinates"];
|
7798 | properties?: {} | undefined;
|
7799 | |
7800 |
|
7801 |
|
7802 |
|
7803 | type: FeatureGeometry["type"];
|
7804 | |
7805 |
|
7806 |
|
7807 | uuid: string;
|
7808 | |
7809 |
|
7810 |
|
7811 |
|
7812 |
|
7813 |
|
7814 | constructor(coordinates: FeatureGeometry["coordinates"], properties?: {} | undefined);
|
7815 | }
|
7816 |
|
7817 | /**
|
7818 | * Manages the fog display in {@link MapView}.
|
7819 | */
|
7820 | export declare class MapViewFog {
|
7821 | private m_scene;
|
7822 | private m_enabled;
|
7823 | private m_fog;
|
7824 | private m_fogIsDefined;
|
7825 | private m_cachedTheme;
|
7826 | |
7827 |
|
7828 |
|
7829 |
|
7830 |
|
7831 | constructor(m_scene: THREE_2.Scene);
|
7832 | /**
|
7833 | * Allows for disabling the fog, even if it is defined in the theme. Use this property for
|
7834 | * custom views like the demo app's debug camera. However, if the theme does not define a
|
7835 | * fog, enabling this property here has no effect.
|
7836 | *
|
7837 | * @param value - A boolean that specifies whether the fog should be enabled or disabled.
|
7838 | */
|
7839 | set enabled(enableFog: boolean);
|
7840 | /**
|
7841 | * Returns the current fog status, enabled or disabled.
|
7842 | */
|
7843 | get enabled(): boolean;
|
7844 | /**
|
7845 | * Sets the fog depending on the {@link @here/harp-datasource-protocol#Theme}
|
7846 | * instance provided. This function is called when a
|
7847 | * theme is loaded. Fog is added only if the theme contains a fog definition with a:
|
7848 | * - `color` property, used to set the fog color.
|
7849 | * - `startRatio` property, used to set the start distance of the fog as a ratio of the far
|
7850 | * clipping plane distance.
|
7851 | *
|
7852 | * @param theme - A {@link @here/harp-datasource-protocol#Theme} instance.
|
7853 | */
|
7854 | reset(theme: Theme): void;
|
7855 | |
7856 |
|
7857 |
|
7858 |
|
7859 |
|
7860 | update(mapView: MapView, viewDistance?: number): void;
|
7861 | |
7862 |
|
7863 |
|
7864 | private add;
|
7865 | |
7866 |
|
7867 |
|
7868 | private remove;
|
7869 | |
7870 |
|
7871 |
|
7872 |
|
7873 |
|
7874 |
|
7875 | private setFogInRawShaderMaterials;
|
7876 | }
|
7877 |
|
7878 |
|
7879 |
|
7880 |
|
7881 |
|
7882 |
|
7883 |
|
7884 |
|
7885 |
|
7886 |
|
7887 |
|
7888 |
|
7889 |
|
7890 | export declare class MapViewImageCache {
|
7891 | mapView: MapView;
|
7892 | private m_name2Url;
|
7893 | private m_url2Name;
|
7894 | |
7895 |
|
7896 |
|
7897 |
|
7898 |
|
7899 | constructor(mapView: MapView);
|
7900 | /**
|
7901 | * Register an existing image by name.
|
7902 | *
|
7903 | * @param name - Name of the image from {@link @here/harp-datasource-protocol#Theme}.
|
7904 | * @param url - URL of image.
|
7905 | * @param image - Optional [[ImageData]] of image.
|
7906 | */
|
7907 | registerImage(name: string | undefined, url: string, image: ImageData | ImageBitmap | undefined): ImageItem;
|
7908 | |
7909 |
|
7910 |
|
7911 |
|
7912 |
|
7913 |
|
7914 |
|
7915 |
|
7916 | addImage(name: string, url: string, startLoading?: boolean): ImageItem | Promise<ImageItem | undefined>;
|
7917 | |
7918 |
|
7919 |
|
7920 |
|
7921 |
|
7922 | findImageByName(name: string): ImageItem | undefined;
|
7923 | |
7924 |
|
7925 |
|
7926 |
|
7927 |
|
7928 | findImageByUrl(url: string): ImageItem | undefined;
|
7929 | |
7930 |
|
7931 |
|
7932 |
|
7933 |
|
7934 | loadImage(imageItem: ImageItem): ImageItem | Promise<ImageItem | undefined>;
|
7935 | |
7936 |
|
7937 |
|
7938 |
|
7939 |
|
7940 |
|
7941 |
|
7942 | clear(): void;
|
7943 | |
7944 |
|
7945 |
|
7946 | get numberOfNames(): number;
|
7947 | |
7948 |
|
7949 |
|
7950 | get numberOfUrls(): number;
|
7951 | |
7952 |
|
7953 |
|
7954 |
|
7955 |
|
7956 | hasName(name: string): boolean;
|
7957 | |
7958 |
|
7959 |
|
7960 |
|
7961 | hasUrl(url: string): boolean;
|
7962 | |
7963 |
|
7964 |
|
7965 | findNames(url: string): string[] | undefined;
|
7966 | }
|
7967 |
|
7968 | export declare class MapViewLineFeature extends MapViewFeature {
|
7969 | coordinates: LineString["coordinates"];
|
7970 | properties?: {} | undefined;
|
7971 |
|
7972 | type: LineString["type"];
|
7973 | constructor(coordinates: LineString["coordinates"], properties?: {} | undefined);
|
7974 | }
|
7975 |
|
7976 | export declare class MapViewMultiLineFeature extends MapViewFeature {
|
7977 | coordinates: MultiLineString["coordinates"];
|
7978 | properties?: {} | undefined;
|
7979 |
|
7980 | type: MultiLineString["type"];
|
7981 | constructor(coordinates: MultiLineString["coordinates"], properties?: {} | undefined);
|
7982 | }
|
7983 |
|
7984 | export declare class MapViewMultiPointFeature extends MapViewFeature {
|
7985 | coordinates: MultiPoint["coordinates"];
|
7986 | properties?: {} | undefined;
|
7987 |
|
7988 | type: MultiPoint["type"];
|
7989 | constructor(coordinates: MultiPoint["coordinates"], properties?: {} | undefined);
|
7990 | }
|
7991 |
|
7992 | export declare class MapViewMultiPolygonFeature extends MapViewFeature {
|
7993 | coordinates: MultiPolygon["coordinates"];
|
7994 | properties?: {} | undefined;
|
7995 |
|
7996 | type: MultiPolygon["type"];
|
7997 | constructor(coordinates: MultiPolygon["coordinates"], properties?: {} | undefined);
|
7998 | }
|
7999 |
|
8000 | /**
|
8001 | * User configuration for the {@link MapView}.
|
8002 | */
|
8003 | export declare interface MapViewOptions extends TextElementsRendererOptions, Partial<LookAtParams> {
|
8004 | |
8005 |
|
8006 |
|
8007 | canvas: HTMLCanvasElement;
|
8008 | |
8009 |
|
8010 |
|
8011 |
|
8012 | context?: WebGLRenderingContext;
|
8013 | |
8014 |
|
8015 |
|
8016 | alpha?: boolean;
|
8017 | |
8018 |
|
8019 |
|
8020 |
|
8021 |
|
8022 | addBackgroundDatasource?: boolean;
|
8023 | |
8024 |
|
8025 |
|
8026 |
|
8027 |
|
8028 |
|
8029 | enableNativeWebglAntialias?: boolean;
|
8030 | |
8031 |
|
8032 |
|
8033 |
|
8034 | customAntialiasSettings?: IMapAntialiasSettings;
|
8035 | |
8036 |
|
8037 |
|
8038 |
|
8039 |
|
8040 | projection?: Projection;
|
8041 | |
8042 |
|
8043 |
|
8044 |
|
8045 |
|
8046 |
|
8047 |
|
8048 | decoderUrl?: string;
|
8049 | |
8050 |
|
8051 |
|
8052 |
|
8053 | decoderCount?: number;
|
8054 | |
8055 |
|
8056 |
|
8057 |
|
8058 |
|
8059 |
|
8060 |
|
8061 |
|
8062 |
|
8063 |
|
8064 |
|
8065 |
|
8066 |
|
8067 |
|
8068 |
|
8069 |
|
8070 |
|
8071 |
|
8072 |
|
8073 |
|
8074 | theme?: string | Theme | Promise<Theme>;
|
8075 | |
8076 |
|
8077 |
|
8078 |
|
8079 |
|
8080 |
|
8081 |
|
8082 |
|
8083 |
|
8084 |
|
8085 |
|
8086 |
|
8087 |
|
8088 |
|
8089 |
|
8090 |
|
8091 |
|
8092 |
|
8093 |
|
8094 |
|
8095 |
|
8096 | uriResolver?: UriResolver;
|
8097 | |
8098 |
|
8099 |
|
8100 | minZoomLevel?: number;
|
8101 | |
8102 |
|
8103 |
|
8104 | minCameraHeight?: number;
|
8105 | |
8106 |
|
8107 |
|
8108 | maxZoomLevel?: number;
|
8109 | |
8110 |
|
8111 |
|
8112 |
|
8113 |
|
8114 |
|
8115 | clipPlanesEvaluator?: ClipPlanesEvaluator;
|
8116 | |
8117 |
|
8118 |
|
8119 |
|
8120 |
|
8121 |
|
8122 | extendedFrustumCulling?: boolean;
|
8123 | |
8124 |
|
8125 |
|
8126 |
|
8127 |
|
8128 | maxVisibleDataSourceTiles?: number;
|
8129 | |
8130 |
|
8131 |
|
8132 |
|
8133 |
|
8134 | tileCacheSize?: number;
|
8135 | |
8136 |
|
8137 |
|
8138 |
|
8139 |
|
8140 | resourceComputationType?: ResourceComputationType;
|
8141 | |
8142 |
|
8143 |
|
8144 |
|
8145 |
|
8146 |
|
8147 |
|
8148 |
|
8149 |
|
8150 |
|
8151 |
|
8152 |
|
8153 |
|
8154 |
|
8155 | quadTreeSearchDistanceUp?: number;
|
8156 | |
8157 |
|
8158 |
|
8159 |
|
8160 |
|
8161 |
|
8162 |
|
8163 |
|
8164 |
|
8165 |
|
8166 |
|
8167 |
|
8168 |
|
8169 |
|
8170 | quadTreeSearchDistanceDown?: number;
|
8171 | |
8172 |
|
8173 |
|
8174 | enableStatistics?: boolean;
|
8175 | |
8176 |
|
8177 |
|
8178 |
|
8179 |
|
8180 |
|
8181 |
|
8182 |
|
8183 |
|
8184 | preserveDrawingBuffer?: boolean;
|
8185 | |
8186 |
|
8187 |
|
8188 | enableRoadPicking?: boolean;
|
8189 | |
8190 |
|
8191 |
|
8192 | enablePickTechnique?: boolean;
|
8193 | |
8194 |
|
8195 |
|
8196 | collisionDebugCanvas?: HTMLCanvasElement;
|
8197 | |
8198 |
|
8199 |
|
8200 |
|
8201 | movementThrottleTimeout?: number;
|
8202 | |
8203 |
|
8204 |
|
8205 |
|
8206 | fovCalculation?: FovCalculation;
|
8207 | languages?: string[];
|
8208 | |
8209 |
|
8210 |
|
8211 |
|
8212 |
|
8213 |
|
8214 |
|
8215 |
|
8216 |
|
8217 |
|
8218 | politicalView?: string;
|
8219 | |
8220 |
|
8221 |
|
8222 |
|
8223 |
|
8224 | pixelRatio?: number;
|
8225 | |
8226 |
|
8227 |
|
8228 |
|
8229 |
|
8230 |
|
8231 |
|
8232 |
|
8233 |
|
8234 |
|
8235 |
|
8236 |
|
8237 |
|
8238 |
|
8239 |
|
8240 |
|
8241 |
|
8242 |
|
8243 |
|
8244 | dynamicPixelRatio?: number;
|
8245 | |
8246 |
|
8247 |
|
8248 |
|
8249 |
|
8250 |
|
8251 |
|
8252 |
|
8253 |
|
8254 | maxFps?: number;
|
8255 | |
8256 |
|
8257 |
|
8258 |
|
8259 |
|
8260 |
|
8261 |
|
8262 | tileWrappingEnabled?: boolean;
|
8263 | |
8264 |
|
8265 |
|
8266 | backgroundTilingScheme?: TilingScheme;
|
8267 | |
8268 |
|
8269 |
|
8270 |
|
8271 | enablePolarDataSource?: boolean;
|
8272 | |
8273 |
|
8274 |
|
8275 |
|
8276 |
|
8277 | polarStyleSetName?: string;
|
8278 | |
8279 |
|
8280 |
|
8281 |
|
8282 |
|
8283 | polarGeometryLevelOffset?: number;
|
8284 | |
8285 |
|
8286 |
|
8287 | powerPreference?: MapViewPowerPreference;
|
8288 | |
8289 |
|
8290 |
|
8291 |
|
8292 |
|
8293 |
|
8294 |
|
8295 |
|
8296 |
|
8297 |
|
8298 |
|
8299 |
|
8300 |
|
8301 |
|
8302 |
|
8303 | synchronousRendering?: boolean;
|
8304 | |
8305 |
|
8306 |
|
8307 |
|
8308 |
|
8309 |
|
8310 |
|
8311 | enableMixedLod?: boolean;
|
8312 | |
8313 |
|
8314 |
|
8315 |
|
8316 |
|
8317 | enableShadows?: boolean;
|
8318 | }
|
8319 |
|
8320 | export declare class MapViewPointFeature extends MapViewFeature {
|
8321 | coordinates: Point["coordinates"];
|
8322 | properties?: {} | undefined;
|
8323 |
|
8324 | type: Point["type"];
|
8325 | constructor(coordinates: Point["coordinates"], properties?: {} | undefined);
|
8326 | }
|
8327 |
|
8328 | /**
|
8329 | * `MapViewPoints` is a class to extend for the `"circles"` and `"squares"` [[Technique]]s to
|
8330 | * implement raycasting of [[THREE.Points]] as expected in
|
8331 | * {@link MapView}, that are in screen space.
|
8332 | * It copies the behaviour of the `raycast` method in [[THREE.Points]] and dispatches it to its
|
8333 | * children classes, {@link Circles} and {@link Squares}, who hold the intersection testing in the
|
8334 | * `testPoint` method. This class also has the ability to dismiss the testing via the
|
8335 | * `enableRayTesting` flag.
|
8336 | *
|
8337 | * Its main motivation is to handle the point styles of XYZ projects.
|
8338 | *
|
8339 | * @see https:
|
8340 | */
|
8341 | export declare abstract class MapViewPoints extends THREE_2.Points {
|
8342 | |
8343 |
|
8344 |
|
8345 | enableRayTesting: boolean;
|
8346 | |
8347 |
|
8348 |
|
8349 |
|
8350 |
|
8351 |
|
8352 |
|
8353 |
|
8354 |
|
8355 |
|
8356 |
|
8357 |
|
8358 |
|
8359 | abstract testPoint(point: THREE_2.Vector3, screenPosition: THREE_2.Vector2, pickCoordinates: THREE_2.Vector2, index: number, distance: number, intersects: THREE_2.Intersection[]): void;
|
8360 | |
8361 |
|
8362 |
|
8363 |
|
8364 |
|
8365 |
|
8366 |
|
8367 |
|
8368 | raycast(raycaster: PickingRaycaster, intersects: THREE_2.Intersection[]): void;
|
8369 | }
|
8370 |
|
8371 | export declare class MapViewPolygonFeature extends MapViewFeature {
|
8372 | coordinates: Polygon["coordinates"];
|
8373 | properties?: {} | undefined;
|
8374 |
|
8375 | type: Polygon["type"];
|
8376 | constructor(coordinates: Polygon["coordinates"], properties?: {} | undefined);
|
8377 | }
|
8378 |
|
8379 | /**
|
8380 | * Hint for the WebGL implementation on which power mode to prefer.
|
8381 | *
|
8382 | * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.12
|
8383 | */
|
8384 | export declare enum MapViewPowerPreference {
|
8385 |
|
8386 | Default = "default",
|
8387 |
|
8388 | LowPower = "low-power",
|
8389 |
|
8390 | HighPerformance = "high-performance"
|
8391 | }
|
8392 |
|
8393 | export declare namespace MapViewUtils {
|
8394 | const MAX_TILT_DEG = 89;
|
8395 | const MAX_TILT_RAD: number;
|
8396 | |
8397 |
|
8398 |
|
8399 |
|
8400 | export interface Attitude {
|
8401 | |
8402 |
|
8403 |
|
8404 | yaw: number;
|
8405 | |
8406 |
|
8407 |
|
8408 | pitch: number;
|
8409 | |
8410 |
|
8411 |
|
8412 | roll: number;
|
8413 | }
|
8414 | |
8415 |
|
8416 |
|
8417 | export interface MemoryUsage {
|
8418 | heapSize: number;
|
8419 | gpuSize: number;
|
8420 | }
|
8421 | |
8422 |
|
8423 |
|
8424 |
|
8425 |
|
8426 |
|
8427 |
|
8428 |
|
8429 |
|
8430 |
|
8431 | export function zoomOnTargetPosition(mapView: MapView, targetNDCx: number, targetNDCy: number, zoomLevel: number, maxTiltAngle?: number): void;
|
8432 | |
8433 |
|
8434 |
|
8435 |
|
8436 |
|
8437 |
|
8438 |
|
8439 |
|
8440 | export function orbitFocusPoint(mapView: MapView, deltaAzimuthDeg: number, deltaTiltDeg: number, maxTiltAngleRad?: number): void;
|
8441 | |
8442 |
|
8443 |
|
8444 |
|
8445 |
|
8446 |
|
8447 |
|
8448 |
|
8449 |
|
8450 |
|
8451 |
|
8452 | export function getGeoTargetFromCamera(camera: THREE_2.Camera, projection: Projection, elevation?: number): GeoCoordinates | null;
|
8453 | |
8454 |
|
8455 |
|
8456 |
|
8457 |
|
8458 |
|
8459 |
|
8460 |
|
8461 | export function getWorldTargetFromCamera(camera: THREE_2.Camera, projection: Projection, elevation?: number): THREE_2.Vector3 | null;
|
8462 | |
8463 |
|
8464 |
|
8465 |
|
8466 | export function getTargetAndDistance(projection: Projection, camera: THREE_2.Camera, elevationProvider?: ElevationProvider): {
|
8467 | target: THREE_2.Vector3;
|
8468 | distance: number;
|
8469 | };
|
8470 | |
8471 |
|
8472 |
|
8473 |
|
8474 |
|
8475 |
|
8476 |
|
8477 |
|
8478 |
|
8479 |
|
8480 |
|
8481 |
|
8482 |
|
8483 | export function getCameraPositionFromTargetCoordinates(targetCoordinates: GeoCoordinates, distance: number, yawDeg: number, pitchDeg: number, projection: Projection, result?: THREE_2.Vector3): THREE_2.Vector3;
|
8484 | |
8485 |
|
8486 |
|
8487 |
|
8488 |
|
8489 |
|
8490 |
|
8491 |
|
8492 |
|
8493 |
|
8494 |
|
8495 | export function wrapGeoPointsToScreen(points: GeoCoordLike[], startPosition?: GeoCoordinates): GeoCoordinates[];
|
8496 | |
8497 |
|
8498 |
|
8499 |
|
8500 |
|
8501 |
|
8502 |
|
8503 |
|
8504 |
|
8505 | export function wrapWorldPointsToView(points: THREE_2.Vector3[], cameraPos: THREE_2.Vector3): void;
|
8506 | |
8507 |
|
8508 |
|
8509 |
|
8510 |
|
8511 |
|
8512 |
|
8513 |
|
8514 |
|
8515 | export function geoBoxToGeoPoints(box: GeoBox): GeoCoordinates[];
|
8516 | |
8517 |
|
8518 |
|
8519 |
|
8520 |
|
8521 |
|
8522 |
|
8523 |
|
8524 |
|
8525 |
|
8526 |
|
8527 |
|
8528 |
|
8529 |
|
8530 | export function getFitBoundsDistance(points: THREE_2.Vector3[], worldTarget: THREE_2.Vector3, camera: THREE_2.PerspectiveCamera): number;
|
8531 | |
8532 |
|
8533 |
|
8534 |
|
8535 |
|
8536 |
|
8537 | export interface FitPointParams {
|
8538 | tilt: number;
|
8539 | heading: number;
|
8540 | projection: Projection;
|
8541 | minDistance: number;
|
8542 | camera: THREE_2.PerspectiveCamera;
|
8543 | }
|
8544 | |
8545 |
|
8546 |
|
8547 |
|
8548 |
|
8549 |
|
8550 |
|
8551 |
|
8552 |
|
8553 |
|
8554 |
|
8555 |
|
8556 |
|
8557 | export function getFitBoundsLookAtParams(geoTarget: GeoCoordinates, worldTarget: THREE_2.Vector3, worldPoints: THREE_2.Vector3[], params: FitPointParams): {
|
8558 | target: GeoCoordinates;
|
8559 | distance: number;
|
8560 | heading: number;
|
8561 | tilt: number;
|
8562 | };
|
8563 | |
8564 |
|
8565 |
|
8566 | export function getCameraCoordinatesFromTargetCoordinates(targetCoordinates: GeoCoordinates, distance: number, yawDeg: number, pitchDeg: number, mapView: MapView): GeoCoordinates;
|
8567 | |
8568 |
|
8569 |
|
8570 |
|
8571 |
|
8572 |
|
8573 |
|
8574 |
|
8575 |
|
8576 |
|
8577 |
|
8578 |
|
8579 | export function rayCastWorldCoordinates(mapView: MapView, pointOnScreenXinNDC: number, pointOnScreenYinNDC: number, elevation?: number): THREE_2.Vector3 | null;
|
8580 | |
8581 |
|
8582 |
|
8583 |
|
8584 |
|
8585 |
|
8586 |
|
8587 |
|
8588 |
|
8589 | export function panCameraAboveFlatMap(mapView: MapView, offsetX: number, offsetY: number): void;
|
8590 | |
8591 |
|
8592 |
|
8593 |
|
8594 |
|
8595 |
|
8596 |
|
8597 |
|
8598 |
|
8599 | export function panCameraAroundGlobe(mapView: MapView, fromWorld: THREE_2.Vector3, toWorld: THREE_2.Vector3): void;
|
8600 | |
8601 |
|
8602 |
|
8603 |
|
8604 |
|
8605 |
|
8606 |
|
8607 |
|
8608 |
|
8609 | export function rotate(mapView: MapView, deltaYawDeg: number, deltaPitchDeg?: number, maxTiltAngleRad?: number): void;
|
8610 | |
8611 |
|
8612 |
|
8613 |
|
8614 |
|
8615 |
|
8616 |
|
8617 |
|
8618 |
|
8619 |
|
8620 |
|
8621 |
|
8622 |
|
8623 | export function getCameraRotationAtTarget(projection: Projection, target: GeoCoordinates, yawDeg: number, pitchDeg: number, result?: THREE_2.Quaternion): THREE_2.Quaternion;
|
8624 | |
8625 |
|
8626 |
|
8627 |
|
8628 |
|
8629 |
|
8630 |
|
8631 |
|
8632 |
|
8633 |
|
8634 |
|
8635 |
|
8636 | export function setRotation(mapView: MapView, yawDeg: number, pitchDeg: number): void;
|
8637 | |
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 |
|
8644 |
|
8645 |
|
8646 | export function extractCameraTilt(camera: THREE_2.Camera, projection: Projection): number;
|
8647 | |
8648 |
|
8649 |
|
8650 |
|
8651 |
|
8652 |
|
8653 |
|
8654 |
|
8655 |
|
8656 |
|
8657 |
|
8658 |
|
8659 | export function extractAttitude(options: {
|
8660 | projection: Projection;
|
8661 | }, object: THREE_2.Object3D): Attitude;
|
8662 | |
8663 |
|
8664 |
|
8665 |
|
8666 |
|
8667 |
|
8668 |
|
8669 |
|
8670 |
|
8671 |
|
8672 |
|
8673 | export function extractSphericalCoordinatesFromLocation(mapView: MapView, object: THREE_2.Object3D, location: GeoCoordinates): {
|
8674 | azimuth: number;
|
8675 | tilt: number;
|
8676 | };
|
8677 | |
8678 |
|
8679 |
|
8680 |
|
8681 |
|
8682 |
|
8683 |
|
8684 |
|
8685 |
|
8686 |
|
8687 |
|
8688 |
|
8689 | export function extractTiltAngleFromLocation(projection: Projection, object: THREE_2.Object3D, location: GeoCoordinates): number;
|
8690 | |
8691 |
|
8692 |
|
8693 |
|
8694 | export function getCameraFrustumPlanes(camera: THREE_2.PerspectiveCamera): {
|
8695 | left: number;
|
8696 | right: number;
|
8697 | top: number;
|
8698 | bottom: number;
|
8699 | near: number;
|
8700 | far: number;
|
8701 | };
|
8702 | |
8703 |
|
8704 |
|
8705 |
|
8706 |
|
8707 |
|
8708 |
|
8709 |
|
8710 |
|
8711 |
|
8712 | export function rayCastGeoCoordinates(mapView: MapView, pointOnScreenXinNDC: number, pointOnScreenYinNDC: number): GeoCoordinates | null;
|
8713 | |
8714 |
|
8715 |
|
8716 |
|
8717 |
|
8718 |
|
8719 |
|
8720 |
|
8721 | export function calculateDistanceToGroundFromZoomLevel(options: {
|
8722 | projection: Projection;
|
8723 | focalLength: number;
|
8724 | camera: THREE_2.Object3D;
|
8725 | }, zoomLevel: number): number;
|
8726 | |
8727 |
|
8728 |
|
8729 |
|
8730 |
|
8731 |
|
8732 | export function calculateDistanceFromZoomLevel(options: {
|
8733 | focalLength: number;
|
8734 | }, zoomLevel: number): number;
|
8735 | |
8736 |
|
8737 |
|
8738 |
|
8739 |
|
8740 |
|
8741 |
|
8742 |
|
8743 |
|
8744 |
|
8745 |
|
8746 |
|
8747 |
|
8748 |
|
8749 |
|
8750 | export function calculateZoomLevelFromDistance(options: {
|
8751 | focalLength: number;
|
8752 | minZoomLevel: number;
|
8753 | maxZoomLevel: number;
|
8754 | }, distance: number): number;
|
8755 | |
8756 |
|
8757 |
|
8758 |
|
8759 |
|
8760 |
|
8761 |
|
8762 |
|
8763 | export function calculateDepthFromClipDistance(clipDistance: number, camera: THREE_2.Camera): number;
|
8764 | |
8765 |
|
8766 |
|
8767 |
|
8768 |
|
8769 |
|
8770 |
|
8771 | export function cameraToWorldDistance(distance: number, camera: THREE_2.Camera): number;
|
8772 | |
8773 |
|
8774 |
|
8775 |
|
8776 |
|
8777 |
|
8778 | export function calculateVerticalFovByHorizontalFov(hFov: number, aspect: number): number;
|
8779 | |
8780 |
|
8781 |
|
8782 |
|
8783 |
|
8784 |
|
8785 | export function calculateHorizontalFovByVerticalFov(vFov: number, aspect: number): number;
|
8786 | |
8787 |
|
8788 |
|
8789 |
|
8790 |
|
8791 |
|
8792 | export function calculateFocalLengthByVerticalFov(vFov: number, height: number): number;
|
8793 | |
8794 |
|
8795 |
|
8796 |
|
8797 |
|
8798 |
|
8799 | export function calculateFovByFocalLength(focalLength: number, height: number): number;
|
8800 | |
8801 |
|
8802 |
|
8803 |
|
8804 |
|
8805 |
|
8806 |
|
8807 |
|
8808 | export function calculateScreenSizeByFocalLength(focalLength: number, distance: number, worldSize: number): number;
|
8809 | |
8810 |
|
8811 |
|
8812 |
|
8813 |
|
8814 |
|
8815 |
|
8816 |
|
8817 | export function calculateWorldSizeByFocalLength(focalLength: number, distance: number, screenSize: number): number;
|
8818 | |
8819 |
|
8820 |
|
8821 |
|
8822 |
|
8823 |
|
8824 |
|
8825 |
|
8826 |
|
8827 |
|
8828 | export function estimateObject3dSize(object: THREE_2.Object3D, parentSize?: MemoryUsage, visitedObjects?: Map<string, boolean>): MemoryUsage;
|
8829 | |
8830 |
|
8831 |
|
8832 |
|
8833 |
|
8834 |
|
8835 |
|
8836 | export function mapViewIsLoading(mapView: MapView): boolean;
|
8837 | |
8838 |
|
8839 |
|
8840 |
|
8841 |
|
8842 | export function getBrowserLanguages(): string[] | undefined;
|
8843 | }
|
8844 |
|
8845 |
|
8846 |
|
8847 |
|
8848 |
|
8849 | export declare interface MarkerTechniqueParams extends BaseTechniqueParams {
|
8850 | |
8851 |
|
8852 |
|
8853 |
|
8854 |
|
8855 |
|
8856 |
|
8857 |
|
8858 |
|
8859 |
|
8860 |
|
8861 |
|
8862 | text?: DynamicProperty<string>;
|
8863 | |
8864 |
|
8865 |
|
8866 |
|
8867 |
|
8868 | label?: string;
|
8869 | |
8870 |
|
8871 |
|
8872 |
|
8873 |
|
8874 | useAbbreviation?: boolean;
|
8875 | |
8876 |
|
8877 |
|
8878 |
|
8879 |
|
8880 |
|
8881 | useIsoCode?: boolean;
|
8882 | |
8883 |
|
8884 |
|
8885 | priority?: DynamicProperty<number>;
|
8886 | |
8887 |
|
8888 |
|
8889 | textMinZoomLevel?: number;
|
8890 | |
8891 |
|
8892 |
|
8893 | textMaxZoomLevel?: number;
|
8894 | |
8895 |
|
8896 |
|
8897 | iconMinZoomLevel?: number;
|
8898 | |
8899 |
|
8900 |
|
8901 | iconMaxZoomLevel?: number;
|
8902 | |
8903 |
|
8904 |
|
8905 |
|
8906 |
|
8907 |
|
8908 |
|
8909 | iconColor?: StyleColor;
|
8910 | |
8911 |
|
8912 |
|
8913 |
|
8914 |
|
8915 |
|
8916 |
|
8917 |
|
8918 | iconBrightness?: number;
|
8919 | |
8920 |
|
8921 |
|
8922 | distanceScale?: number;
|
8923 | |
8924 |
|
8925 |
|
8926 |
|
8927 | textMayOverlap?: boolean;
|
8928 | |
8929 |
|
8930 |
|
8931 |
|
8932 |
|
8933 | iconMayOverlap?: boolean;
|
8934 | |
8935 |
|
8936 |
|
8937 |
|
8938 | textReserveSpace?: boolean;
|
8939 | |
8940 |
|
8941 |
|
8942 |
|
8943 |
|
8944 | iconReserveSpace?: boolean;
|
8945 | |
8946 |
|
8947 |
|
8948 | renderTextDuringMovements?: boolean;
|
8949 | |
8950 |
|
8951 |
|
8952 |
|
8953 |
|
8954 | alwaysOnTop?: boolean;
|
8955 | |
8956 |
|
8957 |
|
8958 |
|
8959 | textIsOptional?: boolean;
|
8960 | |
8961 |
|
8962 |
|
8963 | showOnMap?: boolean;
|
8964 | |
8965 |
|
8966 |
|
8967 | stackMode?: PoiStackMode;
|
8968 | |
8969 |
|
8970 |
|
8971 | minDistance?: number;
|
8972 | |
8973 |
|
8974 |
|
8975 |
|
8976 | iconIsOptional?: boolean;
|
8977 | |
8978 |
|
8979 |
|
8980 | textFadeTime?: number;
|
8981 | |
8982 |
|
8983 |
|
8984 | iconFadeTime?: number;
|
8985 | |
8986 |
|
8987 |
|
8988 | xOffset?: DynamicProperty<number>;
|
8989 | |
8990 |
|
8991 |
|
8992 | yOffset?: DynamicProperty<number>;
|
8993 | |
8994 |
|
8995 |
|
8996 | iconXOffset?: DynamicProperty<number>;
|
8997 | |
8998 |
|
8999 |
|
9000 | iconYOffset?: DynamicProperty<number>;
|
9001 | |
9002 |
|
9003 |
|
9004 | iconScale?: number;
|
9005 | |
9006 |
|
9007 |
|
9008 | screenHeight?: DynamicProperty<number>;
|
9009 | |
9010 |
|
9011 |
|
9012 | screenWidth?: DynamicProperty<number>;
|
9013 | |
9014 |
|
9015 |
|
9016 | poiTable?: string;
|
9017 | |
9018 |
|
9019 |
|
9020 |
|
9021 | poiName?: string;
|
9022 | |
9023 |
|
9024 |
|
9025 | poiNameField?: string;
|
9026 | |
9027 |
|
9028 |
|
9029 | imageTexture?: DynamicProperty<string>;
|
9030 | |
9031 |
|
9032 |
|
9033 | imageTextureField?: string;
|
9034 | |
9035 |
|
9036 |
|
9037 | imageTexturePrefix?: string;
|
9038 | |
9039 |
|
9040 |
|
9041 | imageTexturePostfix?: string;
|
9042 | |
9043 |
|
9044 |
|
9045 | style?: string;
|
9046 | |
9047 |
|
9048 |
|
9049 | fontName?: string;
|
9050 | |
9051 |
|
9052 |
|
9053 | size?: DynamicProperty<number>;
|
9054 | |
9055 |
|
9056 |
|
9057 | backgroundSize?: DynamicProperty<number>;
|
9058 | |
9059 |
|
9060 |
|
9061 | fontStyle?: "Regular" | "Bold" | "Italic" | "BoldItalic";
|
9062 | |
9063 |
|
9064 |
|
9065 | fontVariant?: "Regular" | "AllCaps" | "SmallCaps";
|
9066 | |
9067 |
|
9068 |
|
9069 | rotation?: number;
|
9070 | |
9071 |
|
9072 |
|
9073 |
|
9074 |
|
9075 | color?: DynamicProperty<StyleColor>;
|
9076 | |
9077 |
|
9078 |
|
9079 |
|
9080 |
|
9081 | backgroundColor?: DynamicProperty<StyleColor>;
|
9082 | |
9083 |
|
9084 |
|
9085 |
|
9086 | opacity?: DynamicProperty<number>;
|
9087 | |
9088 |
|
9089 |
|
9090 | backgroundOpacity?: DynamicProperty<number>;
|
9091 | |
9092 |
|
9093 |
|
9094 | tracking?: DynamicProperty<number>;
|
9095 | |
9096 |
|
9097 |
|
9098 | leading?: DynamicProperty<number>;
|
9099 | |
9100 |
|
9101 |
|
9102 | maxLines?: DynamicProperty<number>;
|
9103 | |
9104 |
|
9105 |
|
9106 | lineWidth?: DynamicProperty<number>;
|
9107 | |
9108 |
|
9109 |
|
9110 | canvasRotation?: DynamicProperty<number>;
|
9111 | |
9112 |
|
9113 |
|
9114 | lineRotation?: DynamicProperty<number>;
|
9115 | |
9116 |
|
9117 |
|
9118 | wrappingMode?: DynamicProperty<"None" | "Character" | "Word">;
|
9119 | |
9120 |
|
9121 |
|
9122 |
|
9123 |
|
9124 | hAlignment?: DynamicProperty<"Left" | "Center" | "Right">;
|
9125 | |
9126 |
|
9127 |
|
9128 |
|
9129 |
|
9130 | vAlignment?: DynamicProperty<"Above" | "Center" | "Below">;
|
9131 | |
9132 |
|
9133 |
|
9134 |
|
9135 |
|
9136 |
|
9137 |
|
9138 |
|
9139 |
|
9140 |
|
9141 |
|
9142 |
|
9143 | placements?: string;
|
9144 | |
9145 |
|
9146 |
|
9147 |
|
9148 | worldOffset?: DynamicProperty<number>;
|
9149 | }
|
9150 |
|
9151 |
|
9152 |
|
9153 |
|
9154 | export declare class MatchExpr extends Expr {
|
9155 | readonly value: Expr;
|
9156 | readonly branches: Array<[MatchLabel, Expr]>;
|
9157 | readonly fallback: Expr;
|
9158 | |
9159 |
|
9160 |
|
9161 |
|
9162 |
|
9163 | static isValidMatchLabel(node: JsonValue): node is MatchLabel;
|
9164 | constructor(value: Expr, branches: Array<[MatchLabel, Expr]>, fallback: Expr);
|
9165 | /** @override */
|
9166 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
9167 | /** @override */
|
9168 | protected exprIsDynamic(): boolean;
|
9169 | }
|
9170 |
|
9171 | /**
|
9172 | * The labels of a {@link MatchExpr} expression.
|
9173 | */
|
9174 | export declare type MatchLabel = number | string | number[] | string[];
|
9175 |
|
9176 |
|
9177 |
|
9178 |
|
9179 | export declare type MaterialConstructor = new (params?: {}) => THREE_2.Material;
|
9180 |
|
9181 |
|
9182 |
|
9183 |
|
9184 | export declare interface MaterialOptions {
|
9185 | |
9186 |
|
9187 |
|
9188 | technique: Technique;
|
9189 | |
9190 |
|
9191 |
|
9192 |
|
9193 |
|
9194 | env: Env;
|
9195 | |
9196 |
|
9197 |
|
9198 |
|
9199 |
|
9200 | skipExtraProps?: string[];
|
9201 | |
9202 |
|
9203 |
|
9204 |
|
9205 | fog?: boolean;
|
9206 | |
9207 |
|
9208 |
|
9209 | shadowsEnabled?: boolean;
|
9210 | }
|
9211 |
|
9212 | declare namespace Math2D {
|
9213 | |
9214 |
|
9215 |
|
9216 |
|
9217 | class Box {
|
9218 | x: number;
|
9219 | y: number;
|
9220 | w: number;
|
9221 | h: number;
|
9222 | |
9223 |
|
9224 |
|
9225 |
|
9226 |
|
9227 |
|
9228 |
|
9229 |
|
9230 |
|
9231 | constructor(x?: number, y?: number, w?: number, h?: number);
|
9232 | /**
|
9233 | * Set new values to all properties of the box.
|
9234 | *
|
9235 | * @param x - New X value.
|
9236 | * @param y - New y value.
|
9237 | * @param w - New w value.
|
9238 | * @param h - New h value.
|
9239 | */
|
9240 | set(x: number, y: number, w: number, h: number): void;
|
9241 | /**
|
9242 | * Test box for inclusion of point.
|
9243 | *
|
9244 | * @param x - X coordinate of point.
|
9245 | * @param y - Y coordinate of point.
|
9246 | */
|
9247 | contains(x: number, y: number): boolean;
|
9248 | /**
|
9249 | * Test box for inclusion of another box.
|
9250 | *
|
9251 | * @param other - Box 2 to test for inclusion.
|
9252 | */
|
9253 | containsBox(other: Box): boolean;
|
9254 | /**
|
9255 | * Test two boxes for intersection.
|
9256 | *
|
9257 | * @param other - Box 2 to test for intersection.
|
9258 | */
|
9259 | intersects(other: Box): boolean;
|
9260 | }
|
9261 | /**
|
9262 | * Box to store UV coordinates.
|
9263 | */
|
9264 | interface UvBox {
|
9265 | s0: number;
|
9266 | t0: number;
|
9267 | s1: number;
|
9268 | t1: number;
|
9269 | }
|
9270 | |
9271 |
|
9272 |
|
9273 |
|
9274 |
|
9275 |
|
9276 |
|
9277 |
|
9278 |
|
9279 | function distSquared(ax: number, ay: number, bx: number, by: number): number;
|
9280 | |
9281 |
|
9282 |
|
9283 |
|
9284 |
|
9285 | function computeSquaredLineLength(line: number[]): number;
|
9286 | |
9287 |
|
9288 |
|
9289 |
|
9290 |
|
9291 |
|
9292 |
|
9293 |
|
9294 |
|
9295 |
|
9296 |
|
9297 | function distToSegmentSquared(px: number, py: number, l0x: number, l0y: number, l1x: number, l1y: number): number;
|
9298 | }
|
9299 |
|
9300 | export declare namespace MathUtils {
|
9301 | |
9302 |
|
9303 |
|
9304 |
|
9305 |
|
9306 | export function newEmptyBox3(): Box3Like;
|
9307 | |
9308 |
|
9309 |
|
9310 |
|
9311 |
|
9312 |
|
9313 |
|
9314 | export function newVector3(x: number, y: number, z: number): Vector3Like;
|
9315 | |
9316 |
|
9317 |
|
9318 |
|
9319 |
|
9320 |
|
9321 |
|
9322 |
|
9323 | export function newVector3<Vector extends Vector3Like>(x: number, y: number, z: number, v: Vector): Vector;
|
9324 | |
9325 |
|
9326 |
|
9327 |
|
9328 |
|
9329 |
|
9330 | export function copyVector3<Vector extends Vector3Like>(from: Vector3Like, to: Vector): Vector;
|
9331 | |
9332 |
|
9333 |
|
9334 |
|
9335 |
|
9336 |
|
9337 |
|
9338 | const degToRad: typeof THREE_2.MathUtils.degToRad;
|
9339 | |
9340 |
|
9341 |
|
9342 |
|
9343 |
|
9344 |
|
9345 |
|
9346 |
|
9347 | const radToDeg: typeof THREE_2.MathUtils.radToDeg;
|
9348 | |
9349 |
|
9350 |
|
9351 |
|
9352 |
|
9353 |
|
9354 |
|
9355 |
|
9356 |
|
9357 |
|
9358 | const clamp: typeof THREE_2.MathUtils.clamp;
|
9359 | |
9360 |
|
9361 |
|
9362 |
|
9363 |
|
9364 |
|
9365 | export function normalizeAngleDeg(a: number): number;
|
9366 | |
9367 |
|
9368 |
|
9369 |
|
9370 |
|
9371 |
|
9372 | export function normalizeLongitudeDeg(a: number): number;
|
9373 | |
9374 |
|
9375 |
|
9376 |
|
9377 |
|
9378 |
|
9379 |
|
9380 |
|
9381 |
|
9382 |
|
9383 |
|
9384 |
|
9385 | export function angleDistanceDeg(a: number, b: number): number;
|
9386 | |
9387 |
|
9388 |
|
9389 |
|
9390 |
|
9391 |
|
9392 |
|
9393 | export function interpolateAnglesDeg(p0: number, p1: number, t: number): number;
|
9394 | }
|
9395 |
|
9396 |
|
9397 |
|
9398 |
|
9399 | declare interface MeasurementParameters {
|
9400 | |
9401 |
|
9402 |
|
9403 | path?: THREE_2.Path | THREE_2.CurvePath<THREE_2.Vector2>;
|
9404 | |
9405 |
|
9406 |
|
9407 | pathOverflow?: boolean;
|
9408 | |
9409 |
|
9410 |
|
9411 | outputCharacterBounds?: THREE_2.Box2[];
|
9412 | |
9413 |
|
9414 |
|
9415 |
|
9416 | letterCaseArray?: boolean[];
|
9417 | }
|
9418 |
|
9419 |
|
9420 |
|
9421 |
|
9422 | declare interface MemoryUsage {
|
9423 | heapSize: number;
|
9424 | gpuSize: number;
|
9425 | }
|
9426 |
|
9427 | export declare class MercatorConstants {
|
9428 | static readonly MAXIMUM_LATITUDE: number;
|
9429 | }
|
9430 |
|
9431 |
|
9432 |
|
9433 |
|
9434 | export declare const mercatorProjection: Projection;
|
9435 |
|
9436 |
|
9437 |
|
9438 |
|
9439 |
|
9440 |
|
9441 | export declare const mercatorTilingScheme: TilingScheme;
|
9442 |
|
9443 |
|
9444 |
|
9445 |
|
9446 | export declare type MinFilter = "nearest" | "nearestMipMapNearest" | "nearestMipMapLinear" | "linear" | "linearMipMapNearest" | "linearMipMapLinear";
|
9447 |
|
9448 |
|
9449 |
|
9450 |
|
9451 |
|
9452 |
|
9453 |
|
9454 |
|
9455 |
|
9456 |
|
9457 |
|
9458 |
|
9459 |
|
9460 |
|
9461 |
|
9462 |
|
9463 | export declare class MSAARenderPass extends Pass {
|
9464 | |
9465 |
|
9466 |
|
9467 |
|
9468 |
|
9469 |
|
9470 |
|
9471 | samplingLevel: MSAASampling;
|
9472 | private m_renderTarget;
|
9473 | private readonly m_localCamera;
|
9474 | private readonly m_quadScene;
|
9475 | private readonly m_quadUniforms;
|
9476 | private readonly m_quadMaterial;
|
9477 | private readonly m_quad;
|
9478 | |
9479 |
|
9480 |
|
9481 |
|
9482 |
|
9483 |
|
9484 |
|
9485 | constructor();
|
9486 | /**
|
9487 | * Releases all used resources.
|
9488 | */
|
9489 | dispose(): void;
|
9490 | /**
|
9491 | * The render function of `MSAARenderPass`.
|
9492 | *
|
9493 | * @remarks
|
9494 | * At each call of this method, and for each sample the {@link MapView}
|
9495 | * camera provided in the `render method is offset within the dimension of a
|
9496 | * pixel on screen. It then renders the whole scene with this offset to a local
|
9497 | * `WebGLRenderTarget` instance, via a `WebGLRenderer` instance. Finally the local camera
|
9498 | * created in the constructor shoots the quad and renders to the write buffer or to the frame
|
9499 | * buffer. The quad material's opacity is modified so the renders can accumulate in the
|
9500 | * targetted buffer.
|
9501 | *
|
9502 | * The number of samples can be modified at runtime through the enum [[SamplingLevel]].
|
9503 | *
|
9504 | * If there is no further pass, the {@link Pass.renderToScreen} flag can be set to `true` to
|
9505 | * output directly to the framebuffer.
|
9506 | *
|
9507 | * @param renderer - The ThreeJS WebGLRenderer instance to render the scene with.
|
9508 | * @param scene - The ThreeJS Scene instance to render the scene with.
|
9509 | * @param camera - The ThreeJS Camera instance to render the scene with.
|
9510 | * @param writeBuffer - A ThreeJS WebGLRenderTarget instance to render the scene to.
|
9511 | * @param readBuffer - A ThreeJS WebGLRenderTarget instance to render the scene.
|
9512 | * @override
|
9513 | */
|
9514 | render(renderer: THREE_2.WebGLRenderer, scene: THREE_2.Scene, camera: THREE_2.PerspectiveCamera | THREE_2.OrthographicCamera, writeBuffer: THREE_2.WebGLRenderTarget | null, readBuffer: THREE_2.WebGLRenderTarget): void;
|
9515 | /**
|
9516 | * Resize the internal render target to match the new size specified.
|
9517 | *
|
9518 | * @param width - New width to apply to the render target.
|
9519 | * @param height - New height to apply to the render target.
|
9520 | * @override
|
9521 | */
|
9522 | setSize(width: number, height: number): void;
|
9523 | /**
|
9524 | * The list of offsets to apply to the camera, per sampling level, adapted from :
|
9525 | *
|
9526 | * @see https://msdn.microsoft.com/en-us/library/windows/desktop/ff476218%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
|
9527 | */
|
9528 | static readonly OffsetVectors: number[][][];
|
9529 | }
|
9530 |
|
9531 | /**
|
9532 | * This enum represents the sampling level to apply to
|
9533 | * a {@link MSAARenderPass} instance. At level 0,
|
9534 | * only one sample is performed, which is like
|
9535 | * disabling the MSAA pass.
|
9536 | */
|
9537 | export declare enum MSAASampling {
|
9538 | "Level_0" = 0,
|
9539 | "Level_1" = 1,
|
9540 | "Level_2" = 2,
|
9541 | "Level_3" = 3,
|
9542 | "Level_4" = 4,
|
9543 | "Level_5" = 5
|
9544 | }
|
9545 |
|
9546 | /**
|
9547 | * Represents "MultiLineString" GeoJSON geometry object.
|
9548 | */
|
9549 | export declare interface MultiLineString {
|
9550 | type: "MultiLineString";
|
9551 | coordinates: number[][][];
|
9552 | }
|
9553 |
|
9554 | /**
|
9555 | * Represents "MultiPoint" GeoJSON geometry object.
|
9556 | */
|
9557 | export declare interface MultiPoint {
|
9558 | type: "MultiPoint";
|
9559 | coordinates: number[][];
|
9560 | }
|
9561 |
|
9562 | /**
|
9563 | * Represents "MultiPolygon" GeoJSON geometry object.
|
9564 | */
|
9565 | export declare interface MultiPolygon {
|
9566 | type: "MultiPolygon";
|
9567 | coordinates: number[][][][];
|
9568 | }
|
9569 |
|
9570 | /**
|
9571 | * Measures a sequence of connected events, such as multiple processing stages in a function.
|
9572 | * Each stage is identified with a timer name, that must be a valid timer in the statistics
|
9573 | * object. Additionally, all timers within a `MultiStageTimer` must be unique.
|
9574 | *
|
9575 | * Internally, the `MultiStageTimer` manages a list of timers where at the end of each stage,
|
9576 | * one timer stops and the next timer starts.
|
9577 | */
|
9578 | export declare class MultiStageTimer {
|
9579 | private statistics;
|
9580 | readonly name: string;
|
9581 | stages: string[];
|
9582 | private currentStage;
|
9583 | /**
|
9584 | * Defines the `MultiStageTimer` with a list of timer names that represent its stages.
|
9585 | *
|
9586 | * @param statistics - The statistics object that manages the timers.
|
9587 | * @param name - Name of this `MultiStageTimer`.
|
9588 | * @param stages - List of timer names.
|
9589 | */
|
9590 | constructor(statistics: Statistics, name: string, stages: string[]);
|
9591 | /**
|
9592 | * Gets the timer value for the last stage. If the `MultiStageTimer` did not finish its
|
9593 | * last stage, the value is `undefined`.
|
9594 | */
|
9595 | get value(): number | undefined;
|
9596 | /**
|
9597 | * Resets the timers across all stages.
|
9598 | */
|
9599 | reset(): void;
|
9600 | /**
|
9601 | * Starts the `MultiStageTimer` at its first stage.
|
9602 | */
|
9603 | start(): number;
|
9604 | /**
|
9605 | * Stops the `MultiStageTimer`. Returns the measurement of the last stage, which may be
|
9606 | * `undefined` if not all stages started.
|
9607 | */
|
9608 | stop(): number;
|
9609 | /**
|
9610 | * Gets the current stage.
|
9611 | */
|
9612 | get stage(): string | undefined;
|
9613 | /**
|
9614 | * Sets the current stage. If a new stage is provided, the current timer (if available) is
|
9615 | * stopped, and the next timer is started. If the timer in the next stage is `undefined`,
|
9616 | * this is equivalent to calling `stop` on the `MultiStageTimer`.
|
9617 | *
|
9618 | * @param stage - The next stage to start.
|
9619 | */
|
9620 | set stage(stage: string | undefined);
|
9621 | }
|
9622 |
|
9623 | /**
|
9624 | * Check if vertex normals should be generated for this technique (if no normals are in the data).
|
9625 | * @param technique - Technique to check.
|
9626 | */
|
9627 | export declare function needsVertexNormals(technique: Technique): boolean;
|
9628 |
|
9629 | export declare interface NoneStyle extends BaseStyle<"none", {
|
9630 | [name: string]: any;
|
9631 | }> {
|
9632 | [name: string]: any;
|
9633 | }
|
9634 |
|
9635 | /**
|
9636 | * Equirectangular {@link Projection} used to convert geo coordinates to unit coordinates and vice
|
9637 | * versa.
|
9638 | */
|
9639 | export declare const normalizedEquirectangularProjection: Projection;
|
9640 |
|
9641 | /**
|
9642 | * Null literal expression.
|
9643 | */
|
9644 | export declare class NullLiteralExpr extends LiteralExpr {
|
9645 | static instance: NullLiteralExpr;
|
9646 | /** @override */
|
9647 | readonly value: Value;
|
9648 | protected constructor();
|
9649 | /** @override */
|
9650 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
9651 | /** @override */
|
9652 | protected exprIsDynamic(): boolean;
|
9653 | }
|
9654 |
|
9655 | /**
|
9656 | * Number literal expression.
|
9657 | */
|
9658 | export declare class NumberLiteralExpr extends LiteralExpr {
|
9659 | readonly value: number;
|
9660 | constructor(value: number);
|
9661 | /** @override */
|
9662 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
9663 | }
|
9664 |
|
9665 | /**
|
9666 | * Object literal expression.
|
9667 | */
|
9668 | export declare class ObjectLiteralExpr extends LiteralExpr {
|
9669 | readonly value: object;
|
9670 | constructor(value: object);
|
9671 | get isArrayLiteral(): boolean;
|
9672 | /** @override */
|
9673 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
9674 | }
|
9675 |
|
9676 | /**
|
9677 | * Default OMV tile decoder service type.
|
9678 | *
|
9679 | * Used for requesting decoder services using [[WorkerServiceManager]].
|
9680 | */
|
9681 | export declare const OMV_TILE_DECODER_SERVICE_TYPE = "omv-tile-decoder";
|
9682 |
|
9683 | /**
|
9684 | * Default OMV tiler service type.
|
9685 | *
|
9686 | * Used for requesting tiler services using [[WorkerServiceManager]].
|
9687 | */
|
9688 | export declare const OMV_TILER_SERVICE_TYPE = "omv-tiler";
|
9689 |
|
9690 | export declare class OmvDataSource extends TileDataSource<OmvTile> {
|
9691 | private m_params;
|
9692 | private readonly m_decoderOptions;
|
9693 | constructor(m_params: OmvWithRestClientParams | OmvWithCustomDataProvider);
|
9694 | /** @override */
|
9695 | connect(): Promise<void>;
|
9696 | /**
|
9697 | * Remove the current data filter.
|
9698 | * Will be applied to the decoder, which might be shared with other omv datasources.
|
9699 | */
|
9700 | removeDataFilter(): void;
|
9701 | /**
|
9702 | * Set a new data filter. Can also be done during the creation of an [[OmvDataSource]].
|
9703 | * Will be applied to the decoder, which might be shared with other omv datasources.
|
9704 | *
|
9705 | * @param filterDescription - Data filter description created with
|
9706 | * [[OmvFeatureFilterDescriptionBuilder]].
|
9707 | */
|
9708 | setDataFilter(filterDescription: OmvFeatureFilterDescription): void;
|
9709 | /** @override */
|
9710 | shouldPreloadTiles(): boolean;
|
9711 | /** @override */
|
9712 | setLanguages(languages?: string[]): void;
|
9713 | /** @override */
|
9714 | setPoliticalView(politicalView?: string): void;
|
9715 | /** @override */
|
9716 | get storageLevelOffset(): number;
|
9717 | /** @override */
|
9718 | set storageLevelOffset(levelOffset: number);
|
9719 | /** @override */
|
9720 | setEnableElevationOverlay(enable: boolean): void;
|
9721 | private configureDecoder;
|
9722 | }
|
9723 |
|
9724 | export declare interface OmvDataSourceParameters extends DataSourceOptions {
|
9725 | /**
|
9726 | * If set to `true`, features that have no technique in the theme will be printed to the console
|
9727 | * (can be excessive!).
|
9728 | */
|
9729 | showMissingTechniques?: boolean;
|
9730 | /**
|
9731 | * @deprecated Tile info is not decoded anymore. The same information can be generated
|
9732 | * implementing a [[IGeometryProcessor]] and using [[OmvProtobufDataAdapter]] to decode OMV
|
9733 | * data.
|
9734 | */
|
9735 | createTileInfo?: boolean;
|
9736 | /**
|
9737 | * Specify the decoder that should be used. If not supplied, the default will be used.
|
9738 | */
|
9739 | decoder?: ITileDecoder;
|
9740 | /**
|
9741 | * Optionally specify the DataProvider that should be used.
|
9742 | */
|
9743 | dataProvider?: DataProvider;
|
9744 | /**
|
9745 | * Specify the URL to the decoder bundle. If not supplied, the default will be used.
|
9746 | */
|
9747 | concurrentDecoderScriptUrl?: string;
|
9748 | /**
|
9749 | * Gather feature IDs from `OmvData`. Defaults to `false`.
|
9750 | * @deprecated FeatureIds are always gathered, use [[gatherFeatureAttributes]] to gather
|
9751 | * all feature attributes.
|
9752 | */
|
9753 | gatherFeatureIds?: boolean;
|
9754 | /**
|
9755 | * Gather feature attributes from `OmvData`. Defaults to `false`.
|
9756 | */
|
9757 | gatherFeatureAttributes?: boolean;
|
9758 | /**
|
9759 | * @deprecated Tile info is not decoded anymore. The same information can be generated
|
9760 | * implementing a [[IGeometryProcessor]] and using [[OmvProtobufDataAdapter]] to decode OMV
|
9761 | * data.
|
9762 | */
|
9763 | gatherRoadSegments?: boolean;
|
9764 | /**
|
9765 | * If not set to `false`, very short text labels will be skipped during decoding based on a
|
9766 | * heuristic.
|
9767 | */
|
9768 | skipShortLabels?: boolean;
|
9769 | /**
|
9770 | * A description for the feature filter that can be safely passed down to the web workers. It
|
9771 | * has to be generated with the help of the [[OmvFeatureFilterDescriptionBuilder]] (to guarantee
|
9772 | * correctness). This parameter gets applied to the decoder used in the [[OmvDataSource]]
|
9773 | * which might be shared between various [[OmvDataSource]]s.
|
9774 | */
|
9775 | filterDescr?: OmvFeatureFilterDescription;
|
9776 | /**
|
9777 | * Optional, custom factory for [[Tile]] instances created by this [[OmvDataSource]].
|
9778 | */
|
9779 | tileFactory?: TileFactory<OmvTile>;
|
9780 | /**
|
9781 | * Identifier used to choose [[OmvFeatureModifier]]s to be applied.
|
9782 | *
|
9783 | * If left `undefined` at least [[OmvGenericFeatureModifier]] will be applied.
|
9784 | * The list of feature modifiers may be extended internally by some data source options
|
9785 | * such as [[politicalView]] which adds [[OmvPoliticalViewFeatureModifier]].
|
9786 | *
|
9787 | * @note This parameter gets applied to the decoder used in the [[OmvDataSource]] which might
|
9788 | * be shared between various [[OmvDataSource]]s.
|
9789 | */
|
9790 | featureModifierId?: FeatureModifierId;
|
9791 | /**
|
9792 | * Expresses specific country point of view that is used when rendering disputed features,
|
9793 | * like borders, names, etc. If undefined "defacto" or most widely accepted political view
|
9794 | * will be presented.
|
9795 | *
|
9796 | * @see featureModifiers
|
9797 | */
|
9798 | politicalView?: string;
|
9799 | /**
|
9800 | * Optional, default copyright information of tiles provided by this data source.
|
9801 | * Implementation should provide this information from the source data if possible.
|
9802 | */
|
9803 | copyrightInfo?: CopyrightInfo[];
|
9804 | /**
|
9805 | * Optional copyright info provider for tiles provided by this data source.
|
9806 | */
|
9807 | copyrightProvider?: CopyrightProvider;
|
9808 | /**
|
9809 | * Maximum geometry height above groud level this `OmvDataSource` can produce.
|
9810 | *
|
9811 | * Used in first stage of frustum culling before [[Tile.maxGeometryHeight]] data is available.
|
9812 | *
|
9813 | * @default [[EarthConstants.MAX_BUILDING_HEIGHT]].
|
9814 | */
|
9815 | maxGeometryHeight?: number;
|
9816 | /**
|
9817 | * Indicates whether overlay on elevation is enabled. Defaults to `false`.
|
9818 | */
|
9819 | enableElevationOverlay?: boolean;
|
9820 | /**
|
9821 | * Indicates whether to add a ground plane to cover the tile completely. This is necessary for
|
9822 | * the fallback logic, such that the parent fall back tiles don't overlap the children tiles.
|
9823 | * Default is true (i.e. if not defined it is taken to be true)
|
9824 | */
|
9825 | addGroundPlane?: boolean;
|
9826 | }
|
9827 |
|
9828 | export declare class OmvDebugLabelsTile extends OmvTile {
|
9829 | constructor(dataSource: DataSource, tileKey: TileKey);
|
9830 | /** @override */
|
9831 | loadingFinished(): void;
|
9832 | /**
|
9833 | * Create [[TextElement]] objects from the given decoded [[Tile]] and list of materials.
|
9834 | */
|
9835 | private addLabelDebugInfo;
|
9836 | }
|
9837 |
|
9838 | /**
|
9839 | * Internal interface for options passed from the [[OmvDataSource]] to the decoder.
|
9840 | *
|
9841 | * @hidden
|
9842 | */
|
9843 | export declare interface OmvDecoderOptions {
|
9844 | /**
|
9845 | * If true, features that have no technique in the theme will be printed to the console (can be
|
9846 | * excessive!).
|
9847 | */
|
9848 | showMissingTechniques?: boolean;
|
9849 | /**
|
9850 | * Gather feature attributes from [[OmvData]]. Defaults to false.
|
9851 | */
|
9852 | gatherFeatureAttributes?: boolean;
|
9853 | /**
|
9854 | * @deprecated Tile info is not decoded anymore. The same information can be generated
|
9855 | * implementing a [[IGeometryProcessor]] and using [[OmvProtobufDataAdapter]] to decode OMV
|
9856 | * data.
|
9857 | */
|
9858 | createTileInfo?: boolean;
|
9859 | /**
|
9860 | * @deprecated Tile info is not decoded anymore. The same information can be generated
|
9861 | * implementing a [[IGeometryProcessor]] and using [[OmvProtobufDataAdapter]] to decode OMV
|
9862 | * data.
|
9863 | */
|
9864 | gatherRoadSegments?: boolean;
|
9865 | /**
|
9866 | * Optional storage level offset for [[Tile]]s. Default is -2.
|
9867 | */
|
9868 | storageLevelOffset?: number;
|
9869 | /**
|
9870 | * If not set to `false` very short text labels will be skipped during decoding based on a
|
9871 | * heuristic.
|
9872 | */
|
9873 | skipShortLabels?: boolean;
|
9874 | /**
|
9875 | * A description for the feature filter which can be safely passed down to the web workers.
|
9876 | * It has to be generated with the help of the [[OmvFeatureFilterDescriptionBuilder]] (to
|
9877 | * guarantee the correctness).
|
9878 | */
|
9879 | filterDescription?: OmvFeatureFilterDescription | null;
|
9880 | /**
|
9881 | * List of user specified [[OmvFeatureModifier]]s, list order declares the order of processing.
|
9882 | *
|
9883 | * Each identifier is used to choose corresponding OmvFeatureModifier, if undefined at least
|
9884 | * [[OmvGenericFeatureModifier]] is added to decoder.
|
9885 | */
|
9886 | featureModifiers?: FeatureModifierId[];
|
9887 | /**
|
9888 | * Country code (lower-case ISO 3166-1 alpha-2) defining optional point of view to be used.
|
9889 | * Set to empty string ("") if you want to use default (widely accepted) point of view.
|
9890 | * If set to `undefined` leaves current political view decoder configuration.
|
9891 | */
|
9892 | politicalView?: string;
|
9893 | enableElevationOverlay?: boolean;
|
9894 | }
|
9895 |
|
9896 | /**
|
9897 | * The `OmvFeatureFilter` is designed to work in an `OmvVisitor`/`visitOmv` combination (for
|
9898 | * example, `OmvDecoder`). Returning `false` from any of the calls terminates processing of that
|
9899 | * layer or feature.
|
9900 | *
|
9901 | * The `OmvFeatureFilter` is an "early-opt-out" filter, which cannot filter individual features,
|
9902 | * because at that point the features are not really decoded. Use the [[OmvFeatureModifier]] to
|
9903 | * filter for individual features.
|
9904 | */
|
9905 | export declare interface OmvFeatureFilter {
|
9906 | /**
|
9907 | * Returns `true` if the filter contains rules for specific kinds.
|
9908 | */
|
9909 | hasKindFilter: boolean;
|
9910 | /**
|
9911 | * Return `false` if the layer should not be processed.
|
9912 | *
|
9913 | * @param layer - Current layer.
|
9914 | * @param level - Level of tile.
|
9915 | */
|
9916 | wantsLayer(layer: string, level: number): boolean;
|
9917 | /**
|
9918 | * Return `false` if the point feature should not be processed.
|
9919 | *
|
9920 | * @param layer - Current layer.
|
9921 | * @param feature - Current feature.
|
9922 | * @param level - Level of tile.
|
9923 | */
|
9924 | wantsPointFeature(layer: string, geometryType: OmvGeometryType, level: number): boolean;
|
9925 | /**
|
9926 | * Return `false` if the line feature should not be processed.
|
9927 | *
|
9928 | * @param layer - Current layer.
|
9929 | * @param feature - Current feature.
|
9930 | * @param level - Level of tile.
|
9931 | */
|
9932 | wantsLineFeature(layer: string, geometryType: OmvGeometryType, level: number): boolean;
|
9933 | /**
|
9934 | * Return `false` if the polygon feature should not be processed.
|
9935 | *
|
9936 | * @param layer - Current layer.
|
9937 | * @param feature - Current feature.
|
9938 | * @param level - Level of tile.
|
9939 | */
|
9940 | wantsPolygonFeature(layer: string, geometryType: OmvGeometryType, level: number): boolean;
|
9941 | /**
|
9942 | * Return `false` if kind of object is not enabled and the geometry should not be created.
|
9943 | *
|
9944 | * @param {(string | string[])} kind Tag "kind" of the tag.
|
9945 | * @returns {boolean}
|
9946 | */
|
9947 | wantsKind(kind: string | string[]): boolean;
|
9948 | }
|
9949 |
|
9950 | /**
|
9951 | * Internal type of a complete [[OmvFeatureFilter]] description, should not be publicly available.
|
9952 | *
|
9953 | * @hidden
|
9954 | */
|
9955 | export declare interface OmvFeatureFilterDescription {
|
9956 | processLayersDefault: boolean;
|
9957 | processPointsDefault: boolean;
|
9958 | processLinesDefault: boolean;
|
9959 | processPolygonsDefault: boolean;
|
9960 | layersToProcess: OmvLayerFilterDescription[];
|
9961 | layersToIgnore: OmvLayerFilterDescription[];
|
9962 | pointsToProcess: OmvFilterDescription[];
|
9963 | pointsToIgnore: OmvFilterDescription[];
|
9964 | linesToProcess: OmvFilterDescription[];
|
9965 | linesToIgnore: OmvFilterDescription[];
|
9966 | polygonsToProcess: OmvFilterDescription[];
|
9967 | polygonsToIgnore: OmvFilterDescription[];
|
9968 | kindsToProcess: string[];
|
9969 | kindsToIgnore: string[];
|
9970 | }
|
9971 |
|
9972 | /**
|
9973 | * Builds an `OmvFilterDescription` (internal type) that specifies an [[OmvFeatureFilter]] as well
|
9974 | * as an [[OmvFeatureModifier]].
|
9975 | *
|
9976 | */
|
9977 | export declare class OmvFeatureFilterDescriptionBuilder {
|
9978 | private m_processLayersDefault;
|
9979 | private m_processPointsDefault;
|
9980 | private m_processLinesDefault;
|
9981 | private m_processPolygonsDefault;
|
9982 | private readonly m_layersToProcess;
|
9983 | private readonly m_layersToIgnore;
|
9984 | private readonly m_pointsToProcess;
|
9985 | private readonly m_ignoredPoints;
|
9986 | private readonly m_linesToProcess;
|
9987 | private readonly m_linesToIgnore;
|
9988 | private readonly m_polygonsToProcess;
|
9989 | private readonly m_polygonsToIgnore;
|
9990 | private m_kindsToProcess;
|
9991 | private m_kindsToIgnore;
|
9992 | /**
|
9993 | * Builds an `OmvFilterDescription` (internal type) that specifies an [[OmvFeatureFilter]] as
|
9994 | * well as an [[OmvFeatureModifier]].
|
9995 | *
|
9996 | * @param processLayersDefault - If `true`, all unspecified layers will be processed.
|
9997 | * If `false`, all unspecified layers will be ignored.
|
9998 | * @param processPointsDefault - If `true`, all unspecified point features will be processed. If
|
9999 | * `false`, all unspecified point features will be ignored.
|
10000 | * @param processLinesDefault - If `true`, all unspecified line features will be processed. If
|
10001 | * `false`, all unspecified line features will be ignored.
|
10002 | * @param processPolygonsDefault - If `true`, all unspecified polygon features will be
|
10003 | * processed. If `false`, all unspecified polygon features will be ignored.
|
10004 | */
|
10005 | constructor(options?: OmvFeatureFilterDescriptionBuilder.OmvFeatureFilterDescriptionBuilderOptions);
|
10006 | /**
|
10007 | * Add a layer that should be processed.
|
10008 | *
|
10009 | * @param layer - Layer name to be matched.
|
10010 | * @param match - Match condition.
|
10011 | */
|
10012 | processLayer(layer: string, match?: OmvFilterString.StringMatch, minLevel?: number, maxLevel?: number): void;
|
10013 | /**
|
10014 | * Add a layer that should be ignored.
|
10015 | *
|
10016 | * @param layer - Layer name to be matched.
|
10017 | * @param match - Match condition.
|
10018 | */
|
10019 | ignoreLayer(layer: string, match?: OmvFilterString.StringMatch, minLevel?: number, maxLevel?: number): void;
|
10020 | /**
|
10021 | * Add a valid point feature.
|
10022 | *
|
10023 | * @param options - Feature options.
|
10024 | */
|
10025 | processPoint(options: OmvFeatureFilterDescriptionBuilder.FeatureOption): void;
|
10026 | /**
|
10027 | * Add valid point features.
|
10028 | *
|
10029 | * @param options - Multi feature options.
|
10030 | */
|
10031 | processPoints(options: OmvFeatureFilterDescriptionBuilder.MultiFeatureOption): void;
|
10032 | /**
|
10033 | * Add a point feature that should be ignored.
|
10034 | *
|
10035 | * @param options - Feature options.
|
10036 | */
|
10037 | ignorePoint(options: OmvFeatureFilterDescriptionBuilder.FeatureOption): void;
|
10038 | /**
|
10039 | * Add point features that should be ignored.
|
10040 | *
|
10041 | * @param options - Multi feature options.
|
10042 | */
|
10043 | ignorePoints(options: OmvFeatureFilterDescriptionBuilder.MultiFeatureOption): void;
|
10044 | /**
|
10045 | * Add a valid line feature.
|
10046 | *
|
10047 | * @param options - Feature options.
|
10048 | */
|
10049 | processLine(options: OmvFeatureFilterDescriptionBuilder.FeatureOption): void;
|
10050 | /**
|
10051 | * Add valid line features.
|
10052 | *
|
10053 | * @param options - Multi feature options.
|
10054 | */
|
10055 | processLines(options: OmvFeatureFilterDescriptionBuilder.MultiFeatureOption): void;
|
10056 | /**
|
10057 | * Ignore a line feature.
|
10058 | *
|
10059 | * @param options - Feature options.
|
10060 | */
|
10061 | ignoreLine(options: OmvFeatureFilterDescriptionBuilder.FeatureOption): void;
|
10062 | /**
|
10063 | * Ignore line features.
|
10064 | *
|
10065 | * @param options - Multi feature options.
|
10066 | */
|
10067 | ignoreLines(options: OmvFeatureFilterDescriptionBuilder.MultiFeatureOption): void;
|
10068 | /**
|
10069 | * Add a valid polygon feature.
|
10070 | *
|
10071 | * @param options - Feature options.
|
10072 | */
|
10073 | processPolygon(options: OmvFeatureFilterDescriptionBuilder.FeatureOption): void;
|
10074 | /**
|
10075 | * Add valid polygon features.
|
10076 | *
|
10077 | * @param options - Multi feature options.
|
10078 | */
|
10079 | processPolygons(options: OmvFeatureFilterDescriptionBuilder.MultiFeatureOption): void;
|
10080 | /**
|
10081 | * Ignore a valid polygon feature.
|
10082 | *
|
10083 | * @param options - Feature options.
|
10084 | */
|
10085 | ignorePolygon(options: OmvFeatureFilterDescriptionBuilder.FeatureOption): void;
|
10086 | /**
|
10087 | * Ignore polygon features.
|
10088 | *
|
10089 | * @param options - Multi feature options.
|
10090 | */
|
10091 | ignorePolygons(options: OmvFeatureFilterDescriptionBuilder.MultiFeatureOption): void;
|
10092 | /**
|
10093 | * Add all the specified strings as "enabledKinds".
|
10094 | *
|
10095 | * @param {string[]} enabledKinds List of kinds that should be generated.
|
10096 | */
|
10097 | processKinds(enabledKinds: string[]): void;
|
10098 | /**
|
10099 | * Add all the specified strings as "disabledKinds".
|
10100 | *
|
10101 | * @param {string[]} disabledKinds List of kinds that should _not_ be generated.
|
10102 | */
|
10103 | ignoreKinds(disabledKinds: string[]): void;
|
10104 | /**
|
10105 | * Create a filter description that can be passed as an option to the [[OmvDataSource]].
|
10106 | */
|
10107 | createDescription(): OmvFeatureFilterDescription;
|
10108 | private addItem;
|
10109 | private addItems;
|
10110 | }
|
10111 |
|
10112 | export declare namespace OmvFeatureFilterDescriptionBuilder {
|
10113 | /**
|
10114 | * Options for `OmvFeatureFilterDescriptionBuilder`.
|
10115 | */
|
10116 | export interface OmvFeatureFilterDescriptionBuilderOptions {
|
10117 | /**
|
10118 | * If `true`, all unspecified layers will be processed. If `false`, all unspecified layers
|
10119 | * will be ignored.
|
10120 | */
|
10121 | processLayersDefault?: boolean;
|
10122 | /**
|
10123 | * If `true`, all unspecified point features will be processed. If `false`, all unspecified
|
10124 | * point features will be ignored.
|
10125 | */
|
10126 | processPointsDefault?: boolean;
|
10127 | /**
|
10128 | * If `true`, all unspecified line features will be processed. If `false`, all unspecified
|
10129 | * line
|
10130 | * features will be ignored.
|
10131 | */
|
10132 | processLinesDefault?: boolean;
|
10133 | /**
|
10134 | * If `true`, all unspecified polygon features will be processed. If `false`, all
|
10135 | * unspecified polygon features will be ignored.
|
10136 | */
|
10137 | processPolygonsDefault?: boolean;
|
10138 | }
|
10139 | /**
|
10140 | * Description of a single feature.
|
10141 | */
|
10142 | export interface FeatureOption {
|
10143 | /**
|
10144 | * Layer name to be matched.
|
10145 | */
|
10146 | layer: string;
|
10147 | /**
|
10148 | * Optional geometry type to be limited to. If specified, but does not match, the feature is
|
10149 | * ignored.
|
10150 | */
|
10151 | geomType: OmvGeometryType | OmvGeometryType[] | undefined;
|
10152 | /**
|
10153 | * Optional class to match. If specified, but does not match, the feature is ignored.
|
10154 | */
|
10155 | featureClass: string;
|
10156 | /**
|
10157 | * Match condition for the layer name.
|
10158 | */
|
10159 | matchLayer?: OmvFilterString.StringMatch;
|
10160 | /**
|
10161 | * Match condition for `featureClass`.
|
10162 | */
|
10163 | matchClass?: OmvFilterString.StringMatch;
|
10164 | /**
|
10165 | * Minimum tile level to match.
|
10166 | */
|
10167 | minLevel?: number;
|
10168 | /**
|
10169 | * Maximum tile level to match.
|
10170 | */
|
10171 | maxLevel?: number;
|
10172 | /**
|
10173 | * Feature attribute to match.
|
10174 | */
|
10175 | featureAttribute?: OmvFilterFeatureAttribute;
|
10176 | }
|
10177 | /**
|
10178 | * Description for multiple features.
|
10179 | */
|
10180 | export interface MultiFeatureOption {
|
10181 | /**
|
10182 | * Layer name to be matched.
|
10183 | */
|
10184 | layer: string;
|
10185 | /**
|
10186 | * Optional geometry type to be limited to. If specified, but does not match, the feature is
|
10187 | * ignored.
|
10188 | */
|
10189 | geomTypes?: OmvGeometryType | OmvGeometryType[] | undefined;
|
10190 | /**
|
10191 | * Optional classes to match. If specified, but does not match, the feature is ignored.
|
10192 | */
|
10193 | featureClasses?: OmvFilterString[];
|
10194 | /**
|
10195 | * Match condition for the layer name.
|
10196 | */
|
10197 | matchLayer?: OmvFilterString.StringMatch;
|
10198 | /**
|
10199 | * Minimum tile level to match.
|
10200 | */
|
10201 | minLevel?: number;
|
10202 | /**
|
10203 | * Maximum tile level to match.
|
10204 | */
|
10205 | maxLevel?: number;
|
10206 | /**
|
10207 | * Feature attribute to match.
|
10208 | */
|
10209 | featureAttribute?: OmvFilterFeatureAttribute;
|
10210 | }
|
10211 | }
|
10212 |
|
10213 | /**
|
10214 | * The `OmvFeatureModifier` can be used to filter individual features. It gets passed in the [[Env]]
|
10215 | * of the feature, which contains all the values that can be searched for in a style. If a filter
|
10216 | * function returns false, the feature is ignored, and no geometry is being created.
|
10217 | *
|
10218 | * In addition to pure filtering, the `OmvFeatureModifier` can also modify the [[Env]] of the
|
10219 | * feature, or even add new properties to the feature, for example, traffic states. The
|
10220 | * `OmvFeatureModifier` is executed before the styles are selected, so the geometry is created with
|
10221 | * the modified feature properties.
|
10222 | */
|
10223 | export declare interface OmvFeatureModifier {
|
10224 | /**
|
10225 | * Check if the point feature described by `env` should be processed. The properties can be
|
10226 | * modified or added to.
|
10227 | *
|
10228 | * @param layer - Current layer.
|
10229 | * @param env - Properties of point feature.
|
10230 | * @param level - Level of tile.
|
10231 | * @returns `false` to ignore feature.
|
10232 | */
|
10233 | doProcessPointFeature(layer: string, env: MapEnv, level: number): boolean;
|
10234 | /**
|
10235 | * Check if the line feature described by `env` should be processed. The properties can be
|
10236 | * modified or added to.
|
10237 | *
|
10238 | * @param layer - Current layer.
|
10239 | * @param env - Properties of line feature.
|
10240 | * @param level - Level of tile.
|
10241 | * @returns `false` to ignore feature.
|
10242 | */
|
10243 | doProcessLineFeature(layer: string, env: MapEnv, level: number): boolean;
|
10244 | /**
|
10245 | * Check if the polygon feature described by `env` should be processed. The properties can be
|
10246 | * modified or added to.
|
10247 | *
|
10248 | * @param layer - Current layer.
|
10249 | * @param env - Properties of polygon feature.
|
10250 | * @param level - Level of tile.
|
10251 | * @returns `false` to ignore feature.
|
10252 | */
|
10253 | doProcessPolygonFeature(layer: string, env: MapEnv, level: number): boolean;
|
10254 | }
|
10255 |
|
10256 | /**
|
10257 | * Internal type of a single filter description, Should not be publicly available.
|
10258 | *
|
10259 | * @hidden
|
10260 | */
|
10261 | export declare interface OmvFilterDescription {
|
10262 | layerName: OmvFilterString;
|
10263 | geometryTypes?: OmvGeometryType[];
|
10264 | classes?: OmvFilterString[];
|
10265 | minLevel: number;
|
10266 | maxLevel: number;
|
10267 | featureAttribute?: OmvFilterFeatureAttribute;
|
10268 | }
|
10269 |
|
10270 | /**
|
10271 | * Definition of a filter for a feature attribute
|
10272 | */
|
10273 | export declare interface OmvFilterFeatureAttribute {
|
10274 | key: string;
|
10275 | value: Value;
|
10276 | }
|
10277 |
|
10278 | /**
|
10279 | * Definition of a filter.
|
10280 | */
|
10281 | export declare interface OmvFilterString {
|
10282 | /** String value */
|
10283 | value: string;
|
10284 | /** Match condition */
|
10285 | match: OmvFilterString.StringMatch;
|
10286 | }
|
10287 |
|
10288 | /**
|
10289 | * Adding the match condition type and the matching function to the namespace of `OmvFilterString`.
|
10290 | */
|
10291 | export declare namespace OmvFilterString {
|
10292 | /**
|
10293 | * Match condition.
|
10294 | */
|
10295 | export enum StringMatch {
|
10296 | /** Matches any. */
|
10297 | Any = 0,
|
10298 | /** Exact match. */
|
10299 | Match = 1,
|
10300 | /** Matches if a test string starts with a filter string. */
|
10301 | StartsWith = 2,
|
10302 | /** Matches if a test string contains a filter string. */
|
10303 | Contains = 3,
|
10304 | /** Matches if a test string ends with a filter string. */
|
10305 | EndsWith = 4
|
10306 | }
|
10307 | /**
|
10308 | * Check for a string against a filter.
|
10309 | *
|
10310 | * @param str - The string to check against a filter.
|
10311 | * @param filterString - The filter containing the match condition.
|
10312 | * @returns `true` if the match condition is satisfied.
|
10313 | */
|
10314 | export function matchString(str: string, filterString: OmvFilterString): boolean;
|
10315 | }
|
10316 |
|
10317 | /**
|
10318 | * `OmvFeatureFilter` implementation that uses a `OmvFeatureFilterDescription` to filter `TileData`
|
10319 | * features before they are completely decoded.
|
10320 | *
|
10321 | * @hidden
|
10322 | */
|
10323 | export declare class OmvGenericFeatureFilter implements OmvFeatureFilter {
|
10324 | private description;
|
10325 | private static matchLayer;
|
10326 | private disabledKinds;
|
10327 | private enabledKinds;
|
10328 | constructor(description: OmvFeatureFilterDescription);
|
10329 | wantsLayer(layer: string, level: number): boolean;
|
10330 | wantsPointFeature(layer: string, geometryType: OmvGeometryType, level: number): boolean;
|
10331 | wantsLineFeature(layer: string, geometryType: OmvGeometryType, level: number): boolean;
|
10332 | wantsPolygonFeature(layer: string, geometryType: OmvGeometryType, level: number): boolean;
|
10333 | wantsKind(kind: string | string[]): boolean;
|
10334 | get hasKindFilter(): boolean;
|
10335 | private wantsFeature;
|
10336 | }
|
10337 |
|
10338 | /**
|
10339 | * `OmvFeatureModifier` implementation that uses a `OmvFeatureFilterDescription` to filter
|
10340 | * `TileData` features before they are completely decoded.
|
10341 | *
|
10342 | * @hidden
|
10343 | */
|
10344 | export declare class OmvGenericFeatureModifier implements OmvFeatureModifier {
|
10345 | private description;
|
10346 | static matchItems(layerName: string, featureClass: string, items: OmvFilterDescription[]): boolean;
|
10347 | static matchAttribute(layerName: string, env: MapEnv, items: OmvFilterDescription[]): boolean;
|
10348 | constructor(description: OmvFeatureFilterDescription);
|
10349 | doProcessPointFeature(layer: string, env: MapEnv): boolean;
|
10350 | doProcessLineFeature(layer: string, env: MapEnv): boolean;
|
10351 | doProcessPolygonFeature(layer: string, env: MapEnv): boolean;
|
10352 | protected doProcessFeature(itemsToProcess: OmvFilterDescription[], itemsToIgnore: OmvFilterDescription[], layer: string, env: MapEnv, defaultResult: boolean): boolean;
|
10353 | }
|
10354 |
|
10355 | export declare enum OmvGeometryType {
|
10356 | UNKNOWN = 0,
|
10357 | POINT = 1,
|
10358 | LINESTRING = 2,
|
10359 | POLYGON = 3
|
10360 | }
|
10361 |
|
10362 | /**
|
10363 | * Internal type of a layer filter description, Should not be publicly available.
|
10364 | *
|
10365 | * @hidden
|
10366 | */
|
10367 | export declare interface OmvLayerFilterDescription {
|
10368 | name: OmvFilterString;
|
10369 | minLevel: number;
|
10370 | maxLevel: number;
|
10371 | }
|
10372 |
|
10373 | /**
|
10374 | * REST client supporting getting protobuf OMV Tile from REST-based servers.
|
10375 | */
|
10376 | export declare class OmvRestClient implements DataProvider {
|
10377 | readonly params: OmvRestClientParameters;
|
10378 | private readonly downloadManager;
|
10379 | private readonly urlParams;
|
10380 | constructor(params: OmvRestClientParameters);
|
10381 | /** Overriding abstract method, in this case doing nothing. */
|
10382 | connect(): Promise<void>;
|
10383 | /** Overriding abstract method, in this case always returning `true`. */
|
10384 | ready(): boolean;
|
10385 | /**
|
10386 | * Asynchronously fetches a tile from this restful server.
|
10387 | *
|
10388 | * **Note:** If the tile doesn't exist, a successful response with a `404` status code is
|
10389 | * returned.
|
10390 | *
|
10391 | * @example
|
10392 | * ```typescript
|
10393 | * const response = layer.getTile(tileKey);
|
10394 | * if (!response.ok) {
|
10395 | *
|
10396 | * console.error("Unable to download tile", response.statusText);
|
10397 | * return;
|
10398 | * }
|
10399 | * if (response.status === 404) {
|
10400 | *
|
10401 | * return;
|
10402 | * }
|
10403 | *
|
10404 | *
|
10405 | * const payload = await response.arrayBuffer();
|
10406 | * ```
|
10407 | *
|
10408 | * @param tileKey - The tile key of the tile.
|
10409 | * @param tileRequestInit - Optional request options to be passed to fetch when downloading a
|
10410 | * tile.
|
10411 | * @returns A `Promise` of the HTTP response that contains the payload of the requested tile.
|
10412 | */
|
10413 | getTile(tileKey: TileKey, abortSignal?: AbortSignal | undefined): Promise<ArrayBufferLike | {}>;
|
10414 | /**
|
10415 | * Get actual authentication code/token for this request according to configuration.
|
10416 | */
|
10417 | private getActualAuthenticationCode;
|
10418 | /**
|
10419 | * Get default authnentication method basing on apiFormat and other params.
|
10420 | */
|
10421 | private getDefaultAuthMethod;
|
10422 | /**
|
10423 | * Apply athentication code/token using configured (or default) authentication method.
|
10424 | *
|
10425 | * @param url -
|
10426 | * @param init - request extra data
|
10427 | * @param authenticationCode - authentication/token to be applied
|
10428 | * @return new url to be used
|
10429 | */
|
10430 | private applyAuthCode;
|
10431 | /**
|
10432 | * Get actual tile URL depending on configured API format.
|
10433 | */
|
10434 | private dataUrl;
|
10435 | private addQueryParams;
|
10436 | }
|
10437 |
|
10438 | export declare interface OmvRestClientParameters {
|
10439 | /**
|
10440 | * `URL` pattern used to fetch tile files.
|
10441 | *
|
10442 | * `URL` with special keywords replaced to retrieve specific tile:
|
10443 | * - `{z}` - zoom level of tile, @see [[TileKey.level]]
|
10444 | * - `{x}` - horizontal coordinate of tile (column number), @see [[TileKey.column]]
|
10445 | * - `{y}` - vertical coordinate of Tile (row number), @see [[TileKey.row]]
|
10446 | *
|
10447 | * Examples of `url` patterns:
|
10448 | * ```
|
10449 | * https:
|
10450 | * https:
|
10451 | * https:
|
10452 | * ```
|
10453 | *
|
10454 | * Note: To add authentication headers and/or query params, use [[authMethod]], [[urlParams]]
|
10455 | * properties or embed token directly in `url`.
|
10456 | *
|
10457 | * Complete examples:
|
10458 | * ```
|
10459 | *
|
10460 | * {
|
10461 | * url: "https://xyz.api.here.com/tiles/osmbase/512/all/{z}/{x}/{y}.mvt",
|
10462 | * urlParams: {
|
10463 | * access_token: accessToken
|
10464 | * },
|
10465 | * }
|
10466 | *
|
10467 | * {
|
10468 | * url: "https://vector.hereapi.com/v2/vectortiles/base/mc/{z}/{x}/{y}/omv",
|
10469 | * authenticationMethod: AuthenticationTypeBearer,
|
10470 | * authenticationCode: () => getBearerToken()
|
10471 | * }
|
10472 | * ```
|
10473 | */
|
10474 | url?: string;
|
10475 | /**
|
10476 | * The base URL of the REST Tile Service.
|
10477 | * @see [[APIFormat]] for the definition of `baseUrl`.
|
10478 | */
|
10479 | baseUrl?: string;
|
10480 | /**
|
10481 | * Authentication code used for the different APIs.
|
10482 | *
|
10483 | * When [[AuthenticationCodeProvider]] is is used as value, the provider is called before each
|
10484 | * to get currently valid authentication code/token.
|
10485 | *
|
10486 | * @see [[APIFormat]] for the query parameter this is used with.
|
10487 | */
|
10488 | authenticationCode?: string | AuthenticationCodeProvider;
|
10489 | /**
|
10490 | * Specifies [[AuthMethod]] to be used when requesting tiles.
|
10491 | *
|
10492 | * Defaults for each [[APIFormat]] are documented with each format type.
|
10493 | */
|
10494 | authenticationMethod?: AuthenticationMethodInfo;
|
10495 | /**
|
10496 | * The REST API format to use for the tile path generation, will default to the HERE Vector Tile
|
10497 | * API.
|
10498 | */
|
10499 | apiFormat?: APIFormat;
|
10500 | /**
|
10501 | * Tiling scheme is used in some of the APIs, not implemented yet.
|
10502 | */
|
10503 | tilingScheme?: TilingScheme;
|
10504 | /**
|
10505 | * Transfer Manager to use; creates an own instance if none passed.
|
10506 | */
|
10507 | downloadManager?: ITransferManager;
|
10508 | /**
|
10509 | * Function to retrieve the Bearer Token
|
10510 | *
|
10511 | * @deprecated Please use [[authenticationCode]].
|
10512 | */
|
10513 | getBearerToken?: () => Promise<string>;
|
10514 | /**
|
10515 | * Array of query parameters to be appended at the end of the url.
|
10516 | * It is empty by default.
|
10517 | */
|
10518 | urlParams?: {
|
10519 | [key: string]: string;
|
10520 | };
|
10521 | }
|
10522 |
|
10523 | export declare class OmvTile extends Tile {
|
10524 | constructor(dataSource: DataSource, tileKey: TileKey);
|
10525 | }
|
10526 |
|
10527 | export declare interface OmvTileFactory {
|
10528 | /** Create an instance of [[OmvTile]] or a subclass. */
|
10529 | createTile(dataSource: OmvDataSource, tileKey: TileKey): OmvTile;
|
10530 | }
|
10531 |
|
10532 | export declare type OmvWithCustomDataProvider = OmvDataSourceParameters & {
|
10533 | dataProvider: DataProvider;
|
10534 | };
|
10535 |
|
10536 | export declare type OmvWithRestClientParams = OmvRestClientParameters & OmvDataSourceParameters;
|
10537 |
|
10538 | declare type OneThatMatches<T, P> = T extends P ? T : never;
|
10539 |
|
10540 | declare interface OperatorDescriptor {
|
10541 | /**
|
10542 | * Returns `true` if this operator requires a dynamic execution context (e.g. ["zoom"]).
|
10543 | */
|
10544 | isDynamicOperator?: (call: CallExpr) => boolean;
|
10545 | /**
|
10546 | * Evaluates the given expression.
|
10547 | */
|
10548 | call: (context: ExprEvaluatorContext, call: CallExpr) => Value;
|
10549 | /**
|
10550 | * Partial evaluate the `call` expression using the given `context`.
|
10551 | */
|
10552 | partialEvaluate?: (context: ExprEvaluatorContext, call: CallExpr) => Value;
|
10553 | }
|
10554 |
|
10555 | declare interface OperatorDescriptorMap {
|
10556 | [name: string]: OperatorDescriptor;
|
10557 | }
|
10558 |
|
10559 | /**
|
10560 | * Interface for `OptionsMap` which describes a general structure of key-value pairs.
|
10561 | */
|
10562 | export declare interface OptionsMap {
|
10563 | [name: string]: any;
|
10564 | }
|
10565 |
|
10566 | export declare class OrientedBox3 implements OrientedBox3Like {
|
10567 | /**
|
10568 | * The position of the center of this `OrientedBox3`.
|
10569 | */
|
10570 | readonly position: Vector3;
|
10571 | /**
|
10572 | * The x-axis of this `OrientedBox3`.
|
10573 | */
|
10574 | readonly xAxis: Vector3;
|
10575 | /**
|
10576 | * The y-axis of this `OrientedBox3`.
|
10577 | */
|
10578 | readonly yAxis: Vector3;
|
10579 | /**
|
10580 | * The z-axis of this `OrientedBox3`.
|
10581 | */
|
10582 | readonly zAxis: Vector3;
|
10583 | /**
|
10584 | * The extents of this `OrientedBox3`.
|
10585 | */
|
10586 | readonly extents: Vector3;
|
10587 | /**
|
10588 | * Creates a new `OrientedBox3`.
|
10589 | */
|
10590 | constructor();
|
10591 | /**
|
10592 | * Creates a new `OrientedBox3` with the given position, orientation and extents.
|
10593 | *
|
10594 | * @param position - The position of the center of the `OrientedBox3`.
|
10595 | * @param rotationMatrix - The rotation of the `OrientedBox3`.
|
10596 | * @param extents - The extents of the `OrientedBox3`.
|
10597 | */
|
10598 | constructor(position: Vector3, rotationMatrix: Matrix4, extents: Vector3);
|
10599 | /**
|
10600 | * Create a copy of this [[OrientedBoundingBox]].
|
10601 | */
|
10602 | clone(): OrientedBox3;
|
10603 | /**
|
10604 | * Copies the values of `other` to this {@link OrientedBox3}.
|
10605 | * @param other - The other {@link OrientedBox3} to copy.
|
10606 | */
|
10607 | copy(other: OrientedBox3): void;
|
10608 | /**
|
10609 | * Gets the center position of this {@link OrientedBox3}.
|
10610 | *
|
10611 | * @param center - The returned center position.
|
10612 | */
|
10613 | getCenter(center?: Vector3): Vector3;
|
10614 | /**
|
10615 | * Gets the size of this {@link OrientedBox3}.
|
10616 | *
|
10617 | * @param size - The returned size.
|
10618 | */
|
10619 | getSize(size?: Vector3): Vector3;
|
10620 | /**
|
10621 | * Gets the orientation matrix of this `OrientedBox3`.
|
10622 | * @param matrix - The output orientation matrix.
|
10623 | */
|
10624 | getRotationMatrix(matrix?: Matrix4): Matrix4;
|
10625 | /**
|
10626 | * Checks intersection with the given `THREE.Frustum` or array of `THREE.Plane`s.
|
10627 | *
|
10628 | * @param frustumOrPlanes - Frustum or array of planes.
|
10629 | */
|
10630 | intersects(frustumOrPlanes: Plane[] | Frustum): boolean;
|
10631 | /**
|
10632 | * Checks intersection with the given ray.
|
10633 | *
|
10634 | * @param ray - The ray to test.
|
10635 | * @returns distance from ray origin to intersection point if it exist, undefined otherwise.
|
10636 | */
|
10637 | intersectsRay(ray: Ray): number | undefined;
|
10638 | /**
|
10639 | * Returns true if this {@link OrientedBox3} contains the given point.
|
10640 | *
|
10641 | * @param point - A valid point.
|
10642 | */
|
10643 | contains(point: Vector3): boolean;
|
10644 | /**
|
10645 | * Returns the distance from this {@link OrientedBox3} and the given `point`.
|
10646 | *
|
10647 | * @param point - A point.
|
10648 | */
|
10649 | distanceToPoint(point: Vector3): number;
|
10650 | /**
|
10651 | * Returns the squared distance from this {@link OrientedBox3} and the given `point`.
|
10652 | *
|
10653 | * @param point - A point.
|
10654 | */
|
10655 | distanceToPointSquared(point: Vector3): number;
|
10656 | }
|
10657 |
|
10658 | /**
|
10659 | * The interface {@link OrientedBox3Like} is used to represent oriented bounding box.
|
10660 | */
|
10661 | export declare interface OrientedBox3Like extends TransformLike {
|
10662 | /**
|
10663 | * The extents of this bounding box.
|
10664 | */
|
10665 | readonly extents: Vector3Like;
|
10666 | }
|
10667 |
|
10668 | /**
|
10669 | * Parse string encoded color value using all known [[StringEncodedColorFormats]].
|
10670 | *
|
10671 | * @param color - The string encoded color expression (i.e. '#FFF', 'rgb(255, 0, 0)', etc.).
|
10672 | * @returns The color parsed or __undefined__ if non of the known representations matches
|
10673 | * the expression provided in [[color]].
|
10674 | */
|
10675 | export declare function parseStringEncodedColor(color: string): number | undefined;
|
10676 |
|
10677 | /**
|
10678 | * Parse string encoded numeral values using all known [[StringEncodedNumeralFormats]].
|
10679 | *
|
10680 | * @param numeral - The string representing numeric value.
|
10681 | * @param pixelToMeters - The ratio used to convert from meters to pixels (default 1.0).
|
10682 | * @returns Number parsed or __undefined__ if non of the numeral patterns matches the expression
|
10683 | * provided in [[numeral]].
|
10684 | */
|
10685 | export declare function parseStringEncodedNumeral(numeral: string, pixelToMeters?: number): number | undefined;
|
10686 |
|
10687 | /**
|
10688 | * The base class to extend for further passes in {@link MapView},
|
10689 | * like the {@link MSAARenderPass},
|
10690 | *
|
10691 | * @remarks
|
10692 | * `Pass` provides the core logic for both :
|
10693 | * - render passes (proper scene renders),
|
10694 | * - and shader passes (quad renders, i.e. effects added on top of the render output as a
|
10695 | * postprocess).
|
10696 | *
|
10697 | * Even some shader passes still actually fall within the render pass category as they need to
|
10698 | * re-render the scene to then deduce an effect, such as masking, AO, DoF etc. Others just need the
|
10699 | * previous input image to apply a shader on top of it, as for bloom or NVIDIA's FXAA for example.
|
10700 | * These only are proper shader passes.
|
10701 | */
|
10702 | export declare class Pass implements IPass {
|
10703 | enabled: boolean;
|
10704 | renderToScreen: boolean;
|
10705 | setSize(width: number, height: number): void;
|
10706 | render(renderer: THREE_2.WebGLRenderer, scene: THREE_2.Scene, camera: THREE_2.Camera, writeBuffer: THREE_2.WebGLRenderTarget | null, readBuffer: THREE_2.WebGLRenderTarget | null, delta?: number): void;
|
10707 | }
|
10708 |
|
10709 | /**
|
10710 | * This path in world coordinates is projected to screen space and blocks all other labels.
|
10711 | *
|
10712 | * It could be used for example:
|
10713 | * - Border rejects labels.
|
10714 | * - Route blocks street labels from being rendered underneath.
|
10715 | *
|
10716 | * Could potentially be expanded in future to have a priority, however for now, this isn't required.
|
10717 | */
|
10718 | declare class PathBlockingElement {
|
10719 | readonly points: Vector3Like[];
|
10720 | /**
|
10721 | * Note, [[screenSpaceLines]] is only used as a performance improvement and contains no
|
10722 | * useful information. They are used to contain the screen space coordinates of the
|
10723 | * points. By allocating the space here, we avoid per frame allocations, see
|
10724 | * [[TextElementsRenderer.prepopulateScreenWithBlockingElements]].
|
10725 | */
|
10726 | readonly screenSpaceLines: THREE_2.Line3[];
|
10727 | /**
|
10728 | * Constructs a path from a list of points.
|
10729 | * Pre allocates the [[screenSpaceLines]] used to render.
|
10730 | * @param points - Points in world coordinates.
|
10731 | */
|
10732 | constructor(points: Vector3Like[]);
|
10733 | }
|
10734 |
|
10735 | /**
|
10736 | * This object keeps the path of the geometry. Space of the path depends on the
|
10737 | * use case, so could be either world or local tile space.
|
10738 | */
|
10739 | export declare interface PathGeometry {
|
10740 | path: Vector3Like[];
|
10741 | }
|
10742 |
|
10743 | /**
|
10744 | * Performance measurement central. Maintains the current
|
10745 | * {@link FrameStats}, which holds all individual
|
10746 | * performance numbers.
|
10747 | *
|
10748 | * Implemented as an instance for easy access.
|
10749 | */
|
10750 | export declare class PerformanceStatistics {
|
10751 | enabled: boolean;
|
10752 | maxNumFrames: number;
|
10753 | /**
|
10754 | * Returns `true` when the maximum number of storable frames is reached.
|
10755 | *
|
10756 | * @readonly
|
10757 | * @type {boolean}
|
10758 | * @memberof PerformanceStatistics
|
10759 | */
|
10760 | get isFull(): boolean;
|
10761 | /**
|
10762 | * Global instance to the instance. The current instance can be overridden by creating a new
|
10763 | * `PerformanceStatistics`.
|
10764 | */
|
10765 | static get instance(): PerformanceStatistics;
|
10766 | private static m_instance?;
|
10767 | /**
|
10768 | * Current frame statistics. Contains all values for the current frame. Will be cleared when
|
10769 | * [[PerformanceStatistics#storeFrameInfo]] is called.
|
10770 | *
|
10771 | * @type {FrameStats}
|
10772 | * @memberof PerformanceStatistics
|
10773 | */
|
10774 | readonly currentFrame: FrameStats;
|
10775 | /**
|
10776 | * @ignore
|
10777 | * Only exported for testing.
|
10778 | *
|
10779 | * Return the array of frame events.
|
10780 | */
|
10781 | get frameEvents(): FrameStatsArray;
|
10782 | /**
|
10783 | * Additional results stored for the current application run, not per frame. Only the last value
|
10784 | * is stored.
|
10785 | *
|
10786 | * @type {(Map<string, number>)}
|
10787 | */
|
10788 | readonly appResults: Map<string, number>;
|
10789 | /**
|
10790 | * Additional configuration values stored for the current application run, not per frame. Only
|
10791 | * the last value is stored.
|
10792 | *
|
10793 | * @type {(Map<string, string>)}
|
10794 | * @memberof PerformanceStatistics
|
10795 | */
|
10796 | readonly configs: Map<string, string>;
|
10797 | private m_frameEvents;
|
10798 | /**
|
10799 | * Creates an instance of PerformanceStatistics. Overrides the current `instance`.
|
10800 | *
|
10801 | * @param {boolean} [enabled=true] If `false` the performance values will not be stored.
|
10802 | * @param {number} [maxNumFrames=1000] The maximum number of frames that are to be stored.
|
10803 | * @memberof PerformanceStatistics
|
10804 | */
|
10805 | constructor(enabled?: boolean, maxNumFrames?: number);
|
10806 | /**
|
10807 | * Clears all settings, all stored frame events as well as the current frame values.
|
10808 | *
|
10809 | * @memberof PerformanceStatistics
|
10810 | */
|
10811 | clear(): void;
|
10812 | /**
|
10813 | * Clears only all stored frame events as well as the current frame values.
|
10814 | *
|
10815 | * @memberof PerformanceStatistics
|
10816 | */
|
10817 | clearFrames(): void;
|
10818 | /**
|
10819 | * Add the render state information from [[THREE.WebGLInfo]] to the current frame.
|
10820 | * @param {THREE.WebGLInfo} webGlInfo
|
10821 | */
|
10822 | addWebGLInfo(webGlInfo: THREE_2.WebGLInfo): void;
|
10823 | /**
|
10824 | * Add memory statistics to the current frame if available.
|
10825 | * @note Currently only supported on Chrome
|
10826 | */
|
10827 | addMemoryInfo(): void;
|
10828 | /**
|
10829 | * Stores the current frame events into the array of events and clears all values.
|
10830 | *
|
10831 | * @returns {boolean} Returns `false` if the maximum number of storable frames has been reached.
|
10832 | * @memberof PerformanceStatistics
|
10833 | */
|
10834 | storeAndClearFrameInfo(): boolean;
|
10835 | /**
|
10836 | * Logs all values to the logger.
|
10837 | *
|
10838 | * @param header - Optional header line.
|
10839 | * @param footer - Optional footer line.
|
10840 | */
|
10841 | log(header?: string, footer?: string): void;
|
10842 | /**
|
10843 | * Convert to a plain object that can be serialized. Required to copy the test results over to
|
10844 | * nightwatch.
|
10845 | */
|
10846 | getAsPlainObject(onlyLastFrame?: boolean): any;
|
10847 | /**
|
10848 | * Convert the last frame values to a plain object that can be serialized. Required to copy the
|
10849 | * test results over to nightwatch.
|
10850 | */
|
10851 | getLastFrameStatistics(): any;
|
10852 | /**
|
10853 | * Convert to a plain object that can be serialized. Required to copy the test results over to
|
10854 | * nightwatch.
|
10855 | */
|
10856 | getAsSimpleFrameStatistics(onlyLastFrame?: boolean): SimpleFrameStatistics;
|
10857 | }
|
10858 |
|
10859 | /**
|
10860 | * Handles the picking of scene geometry and roads.
|
10861 | * @internal
|
10862 | */
|
10863 | export declare class PickHandler {
|
10864 | readonly mapView: MapView;
|
10865 | readonly camera: THREE_2.Camera;
|
10866 | enablePickTechnique: boolean;
|
10867 | constructor(mapView: MapView, camera: THREE_2.Camera, enablePickTechnique?: boolean);
|
10868 | /**
|
10869 | * Does a raycast on all objects in the scene; useful for picking. This function is Limited to
|
10870 | * objects that THREE.js can raycast. However, any solid lines that have their geometry in the
|
10871 | * shader cannot be tested for intersection.
|
10872 | *
|
10873 | * @param x - The X position in CSS/client coordinates, without the applied display ratio.
|
10874 | * @param y - The Y position in CSS/client coordinates, without the applied display ratio.
|
10875 | * @returns the list of intersection results.
|
10876 | */
|
10877 | intersectMapObjects(x: number, y: number): PickResult[];
|
10878 | private addObjInfo;
|
10879 | }
|
10880 |
|
10881 | /**
|
10882 | * Raycasting points is not supported as necessary in Three.js. This class extends a
|
10883 | * [[THREE.Raycaster]] and adds the width / height of the canvas to allow picking of screen space
|
10884 | * geometry.
|
10885 | *
|
10886 | * @internal
|
10887 | */
|
10888 | declare class PickingRaycaster extends THREE_2.Raycaster {
|
10889 | width: number;
|
10890 | height: number;
|
10891 | /**
|
10892 | * Constructor.
|
10893 | *
|
10894 | * @param width - the canvas width.
|
10895 | * @param height - the canvas height.
|
10896 | */
|
10897 | constructor(width: number, height: number);
|
10898 | }
|
10899 |
|
10900 | /**
|
10901 | * Describes the general type of a picked object.
|
10902 | */
|
10903 | export declare enum PickObjectType {
|
10904 | /**
|
10905 | * Unspecified.
|
10906 | */
|
10907 | Unspecified = 0,
|
10908 | /**
|
10909 | * A point object.
|
10910 | */
|
10911 | Point = 1,
|
10912 | /**
|
10913 | * A line object.
|
10914 | */
|
10915 | Line = 2,
|
10916 | /**
|
10917 | * An area object.
|
10918 | */
|
10919 | Area = 3,
|
10920 | /**
|
10921 | * The text part of a {@link TextElement}
|
10922 | */
|
10923 | Text = 4,
|
10924 | /**
|
10925 | * The Icon of a {@link TextElement}.
|
10926 | */
|
10927 | Icon = 5,
|
10928 | /**
|
10929 | * Any general 3D object, for example, a landmark.
|
10930 | */
|
10931 | Object3D = 6
|
10932 | }
|
10933 |
|
10934 | /**
|
10935 | * A general pick result. You can access the details of a picked geometry from the property
|
10936 | * `intersection`, which is available if a geometry was hit. If a road was hit, a [[RoadPickResult]]
|
10937 | * is returned, which has additional information, but no `intersection`.
|
10938 | */
|
10939 | export declare interface PickResult {
|
10940 | /**
|
10941 | * General type of object.
|
10942 | */
|
10943 | type: PickObjectType;
|
10944 | /**
|
10945 | * A 2D point in screen coordinates, or a 3D point in world coordinates.
|
10946 | */
|
10947 | point: THREE_2.Vector2 | THREE_2.Vector3;
|
10948 | /**
|
10949 | * Distance from the camera to the picking point; used to determine the closest object.
|
10950 | */
|
10951 | distance: number;
|
10952 | /**
|
10953 | * An optional feature ID of the picked object; typically applies to the Optimized Map
|
10954 | * Vector (OMV) format.
|
10955 | */
|
10956 | featureId?: number;
|
10957 | /**
|
10958 | * Defined for geometry only.
|
10959 | */
|
10960 | intersection?: THREE_2.Intersection;
|
10961 | /**
|
10962 | * Defined for roads or if `enableTechniqueInfo` option is enabled.
|
10963 | */
|
10964 | technique?: Technique;
|
10965 | /**
|
10966 | * Optional user data that has been defined in the picked object.
|
10967 | *
|
10968 | * @remarks
|
10969 | * This object points directly to
|
10970 | * information contained in the original {@link TileFeatureData}
|
10971 | * stored in {@link MapView}, and should
|
10972 | * not be modified.
|
10973 | */
|
10974 | userData?: any;
|
10975 | }
|
10976 |
|
10977 | export declare type PixelFormat = "Alpha" | "RGB" | "RGBA" | "Luminance" | "LuminanceAlpha" | "RGBE" | "Depth" | "DepthStencil" | "Red";
|
10978 |
|
10979 | /**
|
10980 | * A class representing Pixels.
|
10981 | *
|
10982 | * @hidden
|
10983 | * @internal
|
10984 | */
|
10985 | declare class Pixels {
|
10986 | readonly value: number;
|
10987 | /**
|
10988 | * Parses a pixel string literal.
|
10989 | *
|
10990 | * @param text - The string color literal
|
10991 | */
|
10992 | static parse(text: string): Pixels | undefined;
|
10993 | /**
|
10994 | * Constructs a [[Pixels]] literal
|
10995 | *
|
10996 | * @param value - The number of pixels.
|
10997 | */
|
10998 | constructor(value: number);
|
10999 | toJSON(): string;
|
11000 | }
|
11001 |
|
11002 | /**
|
11003 | * Defines options (tokens) supported for text placements defined via [[placements]] attribute.
|
11004 | *
|
11005 | * @remarks
|
11006 | * Possible values are defined as vertical placement letter and horizontal letter, where
|
11007 | * one of the axis may be ignored and then assumed centered. Moving clock-wise, we have:
|
11008 | * `TL` (top-left), `T` (top-center), `TR` (top-right), `R` (center-right), `BR` (bottom-right),
|
11009 | * `B` (bottom-center), `BL` (bottom-left), `L` (left), `C` (center-center).
|
11010 | * Alternatively instead of `T`, `B`, `L`, `R` geographic directions may be used accordingly:
|
11011 | * `NW` (north-west), `N` (north), `NE` (north-east), `E` (east), `SE` (south-east), `S` (south),
|
11012 | * `SW` (south-west), `W` (west).
|
11013 | */
|
11014 | export declare enum PlacementToken {
|
11015 | TopLeft = "TL",
|
11016 | Top = "T",
|
11017 | TopRight = "TR",
|
11018 | Right = "R",
|
11019 | BottomRight = "BR",
|
11020 | Bottom = "B",
|
11021 | BottomLeft = "BL",
|
11022 | Left = "L",
|
11023 | Center = "C",
|
11024 | NorthWest = "NW",
|
11025 | North = "N",
|
11026 | NorthEast = "NE",
|
11027 | East = "E",
|
11028 | SouthEast = "SE",
|
11029 | South = "S",
|
11030 | SouthWest = "SW",
|
11031 | West = "W"
|
11032 | }
|
11033 |
|
11034 | /**
|
11035 | * Structured clone compliant version of a `three.js` geometry object with points of interest (POIs)
|
11036 | * to be rendered. It is composed of buffers with metadata for POI objects.
|
11037 | */
|
11038 | export declare interface PoiGeometry {
|
11039 | positions: BufferAttribute;
|
11040 | texts: number[];
|
11041 | /**
|
11042 | * Names of the image texture or the name of the POI as indices into the array `stringCatalog`.
|
11043 | */
|
11044 | imageTextures?: number[];
|
11045 | technique?: number;
|
11046 | stringCatalog?: Array<string | undefined>;
|
11047 | objInfos?: AttributeMap[];
|
11048 | offsetDirections?: number[];
|
11049 | }
|
11050 |
|
11051 | /**
|
11052 | * Additional information for an icon that is to be rendered along with a {@link TextElement}.
|
11053 | */
|
11054 | export declare interface PoiInfo {
|
11055 | /**
|
11056 | * Technique defining the POI or LineMarker
|
11057 | */
|
11058 | technique: PoiTechnique | LineMarkerTechnique;
|
11059 | /**
|
11060 | * Name of the {@link @here/harp-datasource-protocol#ImageTexture}.
|
11061 | */
|
11062 | imageTextureName: string;
|
11063 | /**
|
11064 | * Icon color override
|
11065 | *
|
11066 | * @see {@link @here/harp-datasource-protocol#MarkerTechniqueParams.iconColor};
|
11067 | */
|
11068 | iconColor?: THREE_2.Color;
|
11069 | /**
|
11070 | * Icon brightness.
|
11071 | *
|
11072 | * @see {@link @here/harp-datasource-protocol#MarkerTechniqueParams.iconBrightness};
|
11073 | */
|
11074 | iconBrightness?: number;
|
11075 | /**
|
11076 | * Name of the POI table {@link PoiTable}.
|
11077 | */
|
11078 | poiTableName?: string;
|
11079 | /**
|
11080 | * Name of the POI description in the {@link PoiTable}.
|
11081 | */
|
11082 | poiName?: string;
|
11083 | /**
|
11084 | * Specify stack mode. Defaults to `ShowInStack`.
|
11085 | */
|
11086 | stackMode?: PoiStackMode;
|
11087 | /**
|
11088 | * Minimum zoomLevel at which to display the label icon. No default.
|
11089 | */
|
11090 | iconMinZoomLevel?: number;
|
11091 | /**
|
11092 | * Maximum zoomLevel at which to display the label icon. No default.
|
11093 | */
|
11094 | iconMaxZoomLevel?: number;
|
11095 | /**
|
11096 | * Minimum zoomLevel at which to display the label text. No default.
|
11097 | */
|
11098 | textMinZoomLevel?: number;
|
11099 | /**
|
11100 | * Maximum zoomLevel at which to display the label text. No default.
|
11101 | */
|
11102 | textMaxZoomLevel?: number;
|
11103 | /**
|
11104 | * If true, the text icon will appear even if the text part is blocked by other labels. Defaults
|
11105 | * to `false`.
|
11106 | */
|
11107 | textIsOptional?: boolean;
|
11108 | /**
|
11109 | * If true, the text will appear even if the icon cannot be rendered because of missing icon
|
11110 | * graphics. Defaults to `true`.
|
11111 | */
|
11112 | iconIsOptional?: boolean;
|
11113 | /**
|
11114 | * If `true`, icon is allowed to overlap other labels or icons of lower priority.
|
11115 | */
|
11116 | mayOverlap?: boolean;
|
11117 | /**
|
11118 | * If `true`, icon will reserve screen space, other markers of lower priority will not be
|
11119 | * able to overlap.
|
11120 | */
|
11121 | reserveSpace?: boolean;
|
11122 | /**
|
11123 | * If isValid is `false`, the icon will no longer be placed or rendered. The reason may be a
|
11124 | * missing resource.
|
11125 | */
|
11126 | isValid?: boolean;
|
11127 | /**
|
11128 | * ID to identify the (POI) icon.
|
11129 | */
|
11130 | featureId?: number;
|
11131 | /**
|
11132 | * Reference back to owning {@link TextElement}.
|
11133 | */
|
11134 | textElement: TextElement;
|
11135 | /**
|
11136 | * @hidden
|
11137 | * If false, text will not be rendered during camera movements. Defaults to `true`;
|
11138 | */
|
11139 | renderTextDuringMovements?: boolean;
|
11140 | /**
|
11141 | * @hidden
|
11142 | * Direct access to {@link ImageItem} once it is resolved.
|
11143 | */
|
11144 | imageItem?: ImageItem;
|
11145 | /**
|
11146 | * @hidden
|
11147 | * Direct access to {@link @here/harp-datasource-protocol#ImageTexture} once it is resolved.
|
11148 | */
|
11149 | imageTexture?: ImageTexture;
|
11150 | /**
|
11151 | * @hidden
|
11152 | * Layout help: A shield group is for all [[LineMarker]]s that have the same icon and text,
|
11153 | * making them the same road shield icon.
|
11154 | */
|
11155 | shieldGroupIndex?: number;
|
11156 | /**
|
11157 | * @hidden
|
11158 | * Internal reference to a render batch, made up of all icons that use the same Material.
|
11159 | */
|
11160 | poiRenderBatch?: number;
|
11161 | /**
|
11162 | * @hidden
|
11163 | * Should be computed during loading/initializing of `ImageTexture`.
|
11164 | */
|
11165 | computedWidth?: number;
|
11166 | /**
|
11167 | * @hidden
|
11168 | * Should be computed during loading/initializing of `ImageTexture`.
|
11169 | */
|
11170 | computedHeight?: number;
|
11171 | /**
|
11172 | * @hidden
|
11173 | * Should be computed during loading/initializing of `ImageTexture`.
|
11174 | */
|
11175 | uvBox?: Math2D.UvBox;
|
11176 | /**
|
11177 | * @hidden
|
11178 | * Computed from owning {@link TextElement}. Value is set when `PoiInfo` is assigned to
|
11179 | * {@link TextElement}.
|
11180 | */
|
11181 | renderOrder?: number;
|
11182 | }
|
11183 |
|
11184 | /**
|
11185 | * Return 'true' if the POI has been successfully prepared for rendering.
|
11186 | *
|
11187 | * @param poiInfo - PoiInfo containing information for rendering the POI icon.
|
11188 | */
|
11189 | export declare function poiIsRenderable(poiInfo: PoiInfo): boolean;
|
11190 |
|
11191 | /**
|
11192 | * POI manager class, responsible for loading the
|
11193 | * {@link @here/harp-datasource-protocol#PoiGeometry} objects
|
11194 | * from the {@link @here/harp-datasource-protocol#DecodedTile},
|
11195 | * and preparing them for rendering.
|
11196 | *
|
11197 | * @remarks
|
11198 | * Also loads and manages the texture atlases for the icons.
|
11199 | */
|
11200 | export declare class PoiManager {
|
11201 | readonly mapView: MapView;
|
11202 | private static m_missingPoiTableName;
|
11203 | private static m_missingPoiName;
|
11204 | /**
|
11205 | * Warn about a missing POI table name, but only once.
|
11206 | * @param poiTableName - POI mapping table name.
|
11207 | * @param poiTable - POI table instance.
|
11208 | */
|
11209 | private static notifyMissingPoiTable;
|
11210 | /**
|
11211 | * Warn about a missing POI name, but only once.
|
11212 | * @param poiName - name of POI.
|
11213 | * @param poiTableName - POI mapping table name.
|
11214 | */
|
11215 | private static notifyMissingPoi;
|
11216 | private m_imageTextures;
|
11217 | private m_poiShieldGroups;
|
11218 | /**
|
11219 | * The constructor of the `PoiManager`.
|
11220 | *
|
11221 | * @param mapView - The {@link MapView} instance that should display the POIs.
|
11222 | */
|
11223 | constructor(mapView: MapView);
|
11224 | /**
|
11225 | * Add all POIs from a decoded tile and store them as {@link TextElement}s in the {@link Tile}.
|
11226 | *
|
11227 | * Also handles LineMarkers, which is a recurring marker along a line (road).
|
11228 | *
|
11229 | * @param tile - Tile to add POIs to.
|
11230 | * @param decodedTile - DecodedTile containing the raw
|
11231 | * {@link @here/harp-datasource-protocol#PoiGeometry}
|
11232 | * objects describing the POIs.
|
11233 | */
|
11234 | addPois(tile: Tile, decodedTile: DecodedTile): void;
|
11235 | /**
|
11236 | * Load the texture atlas that defines the segments of the texture that should be used for
|
11237 | * specific icons.
|
11238 | *
|
11239 | * @remarks
|
11240 | * Creates an {@link @here/harp-datasource-protocol#ImageTexture}
|
11241 | * for every element in the atlas, such that it can
|
11242 | * be addressed in the theme file.
|
11243 | *
|
11244 | * @param imageName - Name of the image from the theme (NOT the url!).
|
11245 | * @param atlas - URL of the JSON file defining the texture atlas.
|
11246 | */
|
11247 | addTextureAtlas(imageName: string, atlas: string): void;
|
11248 | /**
|
11249 | * Add an {@link @here/harp-datasource-protocol#ImageTexture} such that it
|
11250 | * is available as a named entity for techniques in theme files.
|
11251 | *
|
11252 | * @param imageTexture - {@link @here/harp-datasource-protocol#ImageTexture}
|
11253 | * that should be available for POIs.
|
11254 | */
|
11255 | addImageTexture(imageTexture: ImageTexture): void;
|
11256 | /**
|
11257 | * Return the {@link @here/harp-datasource-protocol#ImageTexture}
|
11258 | * registered under the specified name.
|
11259 | *
|
11260 | * @param name - Name of the {@link @here/harp-datasource-protocol#ImageTexture}.
|
11261 | */
|
11262 | getImageTexture(name: string): ImageTexture | undefined;
|
11263 | /**
|
11264 | * Update the {@link TextElement} with the information taken from the {@link PoiTable} which is
|
11265 | * referenced in the {@link PoiInfo} of the pointLabel.
|
11266 | *
|
11267 | * If the requested {@link PoiTable} is not available yet, the function returns `false`.
|
11268 | * If the {@link PoiTable} is not defined, or if the references POI has no entry in
|
11269 | * the {@link PoiTable}, no action is taken, and the function returns `false`.
|
11270 | *
|
11271 | * If the {@link PoiTable} has been processed, it returns `true`, indicating that this function
|
11272 | * doesn't have to be called again.
|
11273 | *
|
11274 | * @param pointLabel - The {@link TextElement} to update.
|
11275 | *
|
11276 | * @returns `true` if the {@link PoiTable} has been processed, and the
|
11277 | * function does not have to be called again.
|
11278 | */
|
11279 | updatePoiFromPoiTable(pointLabel: TextElement): boolean;
|
11280 | /**
|
11281 | * Clear internal state. Applicable when switching themes.
|
11282 | */
|
11283 | clear(): void;
|
11284 | /**
|
11285 | * Add the LineMarker as a POI with a series of positions. Make sure that the LineMarkers
|
11286 | * having the same visual all get their `shieldGroupIndex` set appropriately, so it can be taken
|
11287 | * care of later that not too many of them are rendered (obey `minDistance` attribute).
|
11288 | */
|
11289 | private addLineMarker;
|
11290 | /**
|
11291 | * Create and add POI {@link TextElement}s to tile with a series of positions.
|
11292 | */
|
11293 | private addPoi;
|
11294 | /**
|
11295 | * Create the {@link TextElement} for a POI.
|
11296 | *
|
11297 | * @remarks
|
11298 | * Even if the POI has no text, it is required that there
|
11299 | * is a {@link TextElement}, since POIs are hooked onto {@link TextElement}s
|
11300 | * for sorting.(Sorted by priority attribute).
|
11301 | */
|
11302 | private checkCreateTextElement;
|
11303 | }
|
11304 |
|
11305 | /**
|
11306 | * Represents "Point" GeoJSON geometry object.
|
11307 | */
|
11308 | export declare interface Point {
|
11309 | type: "Point";
|
11310 | coordinates: number[];
|
11311 | }
|
11312 |
|
11313 | /**
|
11314 | * Possible parameters of [[PointTechnique]].
|
11315 | */
|
11316 | export declare interface PointTechniqueParams extends BaseTechniqueParams {
|
11317 | /**
|
11318 | * Color of a point in hexadecimal or CSS-style notation, for example: `"#e4e9ec"`, `"#fff"`,
|
11319 | * `"rgb(255, 0, 0)"`, or `"hsl(35, 11%, 88%)"`.
|
11320 | * @format color-hex
|
11321 | */
|
11322 | color?: DynamicProperty<StyleColor>;
|
11323 | /**
|
11324 | * URL of a texture image to be loaded.
|
11325 | */
|
11326 | texture?: string;
|
11327 | /**
|
11328 | * Set to `true` if line should appear transparent. Rendering transparent lines may come with a
|
11329 | * slight performance impact.
|
11330 | */
|
11331 | transparent?: boolean;
|
11332 | /**
|
11333 | * For transparent lines, set a value between 0.0 for totally transparent, to 1.0 for totally
|
11334 | * opaque.
|
11335 | */
|
11336 | opacity?: DynamicProperty<number>;
|
11337 | /**
|
11338 | * Size of point in pixels.
|
11339 | */
|
11340 | size?: number;
|
11341 | /**
|
11342 | * Whether to enable picking on these points.
|
11343 | */
|
11344 | enablePicking?: boolean;
|
11345 | }
|
11346 |
|
11347 | /** @internal */
|
11348 | export declare const pointTechniquePropTypes: TechniqueDescriptor<PointTechniqueParams>;
|
11349 |
|
11350 | /**
|
11351 | * Manage POI rendering. Uses a [[PoiRenderBuffer]] to actually create the geometry that is being
|
11352 | * rendered.
|
11353 | */
|
11354 | declare class PoiRenderer {
|
11355 | readonly mapView: MapView;
|
11356 | readonly textCanvas: TextCanvas;
|
11357 | /**
|
11358 | * Compute screen box for icon. It is required that `prepareRender` has been successfully called
|
11359 | * before `computeScreenBox` may be called.
|
11360 | *
|
11361 | * @param poiInfo - PoiInfo containing information for rendering the POI icon.
|
11362 | * @param screenPosition - Position on screen (2D).
|
11363 | * @param scale - Scale to apply to icon.
|
11364 | * @param env - Current zoom level.
|
11365 | * @param screenBox - Box that will be used to store the result.
|
11366 | * @returns The computed screen box for the icon.
|
11367 | */
|
11368 | static computeIconScreenBox(poiInfo: PoiInfo, screenPosition: THREE_2.Vector2, scale: number, env: Env, screenBox?: Math2D.Box): Math2D.Box;
|
11369 | private static m_missingTextureName;
|
11370 | private m_renderBuffer;
|
11371 | private m_tempScreenBox;
|
11372 | /**
|
11373 | * Create the `PoiRenderer` for the specified {@link MapView}.
|
11374 | *
|
11375 | * @param mapView - The MapView to be rendered to.
|
11376 | * @param textCanvas - The [[TextCanvas]] this `PoiRenderer` is associated to. POIs are added to
|
11377 | * the different layers of this [[TextCanvas]] based on renderOrder.
|
11378 | */
|
11379 | constructor(mapView: MapView, textCanvas: TextCanvas);
|
11380 | /**
|
11381 | * Prepare the POI for rendering, and determine which `poiRenderBatch` should be used. If a
|
11382 | * `poiRenderBatch` is assigned, the POI is ready to be rendered.
|
11383 | *
|
11384 | * @param pointLabel - TextElement with PoiInfo for rendering the POI icon.
|
11385 | * @param env - TODO! The current zoomLevel level of {@link MapView}
|
11386 | *
|
11387 | * @returns `True` if the space is not already allocated by another object (text label or POI)
|
11388 | */
|
11389 | prepareRender(pointLabel: TextElement, env: Env): boolean;
|
11390 | /**
|
11391 | * Reset all batches, removing all content from the [[PoiRenderBuffer]]es. Called at the
|
11392 | * beginning of a frame before the POIs are placed.
|
11393 | */
|
11394 | reset(): void;
|
11395 | /**
|
11396 | * Render the icon.
|
11397 | *
|
11398 | * @param poiInfo - PoiInfo containing information for rendering the POI icon.
|
11399 | * @param screenPosition - Position on screen (2D):
|
11400 | * @param screenCollisions - Object handling the collision checks for screen-aligned 2D boxes.
|
11401 | * @param viewDistance - Box's distance to camera.
|
11402 | * @param scale - Scaling factor to apply to text and icon.
|
11403 | * @param allocateScreenSpace - If `true` screen space will be allocated for the icon.
|
11404 | * @param opacity - Opacity of icon to allow fade in/out.
|
11405 | */
|
11406 | renderPoi(poiInfo: PoiInfo, screenPosition: THREE_2.Vector2, screenCollisions: ScreenCollisions, viewDistance: number, scale: number, allocateScreenSpace: boolean, opacity: number, env: Env): void;
|
11407 | /**
|
11408 | * Update the geometry of all [[PoiRenderBuffer]]es. Called before rendering.
|
11409 | */
|
11410 | update(): void;
|
11411 | /**
|
11412 | * Fill the picking results for the pixel with the given screen coordinate. If multiple
|
11413 | * {@link PoiInfo}s are found, the order of the results is unspecified.
|
11414 | *
|
11415 | * @param screenPosition - Screen coordinate of picking position.
|
11416 | * @param pickCallback - Callback to be called for every picked element.
|
11417 | */
|
11418 | pickTextElements(screenPosition: THREE_2.Vector2, pickCallback: (pickData: any | undefined) => void): void;
|
11419 | /**
|
11420 | * Update the info with the memory footprint caused by objects owned by the `PoiRenderer`.
|
11421 | *
|
11422 | * @param info - The info object to increment with the values from this `PoiRenderer`.
|
11423 | */
|
11424 | getMemoryUsage(info: MemoryUsage): void;
|
11425 | /**
|
11426 | * Register the POI at the [[PoiRenderBuffer]] which may require some setup, for example loading
|
11427 | * of the actual image.
|
11428 | */
|
11429 | private preparePoi;
|
11430 | /**
|
11431 | * Setup texture and material for the batch.
|
11432 | *
|
11433 | * @param poiInfo - {@link PoiInfo} to initialize.
|
11434 | * @param imageTexture - Shared {@link @here/harp-datasource-protocol#ImageTexture},
|
11435 | * defines used area in atlas.
|
11436 | * @param imageItem - Shared {@link ImageItem}, contains cached image for texture.
|
11437 | * @param env - The current zoom level of {@link MapView}
|
11438 | */
|
11439 | private setupPoiInfo;
|
11440 | }
|
11441 |
|
11442 | declare class PoiRendererFactory {
|
11443 | private readonly m_mapView;
|
11444 | /**
|
11445 | * Creates an instance of poi renderer factory.
|
11446 | * @param m_mapView -
|
11447 | */
|
11448 | constructor(m_mapView: MapView);
|
11449 | /**
|
11450 | * Creates poi renderer
|
11451 | * @param textCanvas -
|
11452 | * @returns
|
11453 | */
|
11454 | createPoiRenderer(textCanvas: TextCanvas): PoiRenderer;
|
11455 | }
|
11456 |
|
11457 | /**
|
11458 | * Define the stacking option. Enum values for theme file are in "kebab-case".
|
11459 | */
|
11460 | export declare enum PoiStackMode {
|
11461 | /**
|
11462 | * Show in a stack.
|
11463 | */
|
11464 | Show = "show-in-stack",
|
11465 | /**
|
11466 | * Do not show in a stack.
|
11467 | */
|
11468 | Hide = "hide-in-stack",
|
11469 | /**
|
11470 | * Show category parent in the stack.
|
11471 | */
|
11472 | ShowParent = "show-parent"
|
11473 | }
|
11474 |
|
11475 | /**
|
11476 | * Render feature as POIs (icons and text) rendered in screen space.
|
11477 | *
|
11478 | * @see [[MarkerTechniqueParams]].
|
11479 | */
|
11480 | export declare type PoiStyle = BaseStyle<"labeled-icon", MarkerTechniqueParams>;
|
11481 |
|
11482 | /**
|
11483 | * The `PoiTable` stores individual information for each POI type. If a {@link TextElement} has a
|
11484 | * reference to a PoiTable (if TextElement.poiInfo.poiTableName is set), information for the
|
11485 | * TextElement and its icon are read from the PoiTable.
|
11486 | *
|
11487 | * The key to look up the POI is taken from the data, in case of OSM data with TileZen data, the
|
11488 | * `poiNameField` is set to `kind`, which makes the content of the field `kind` in the data the key
|
11489 | * to look up the POIs in the {@link PoiTable}.
|
11490 | *
|
11491 | * On the side of the {@link PoiTable}, the key to look up the PoiTableEntry is either the property
|
11492 | * "name" of the [[PoiTableEntry]] (which should be unique), or the alternative list of names
|
11493 | * `altNames`, where each value should also be unique. If the property `useAltNamesForKey` is set to
|
11494 | * `true`, the `altNames` will be used.
|
11495 | */
|
11496 | export declare class PoiTable {
|
11497 | readonly name: string;
|
11498 | readonly useAltNamesForKey: boolean;
|
11499 | /**
|
11500 | * Stores the list of [[PoiTableEntry]]s.
|
11501 | */
|
11502 | private readonly poiList;
|
11503 | /**
|
11504 | * Dictionary to look up for [[PoiTableEntry]] quickly. The dictionary is either created for
|
11505 | * the `name` property of the [[PoiTableEntry]], which will identify POI, or for all of
|
11506 | * alternative the names defined in `altNames` of [[PoiTableEntry]] JSON object.
|
11507 | * Value assigned to key it is the index to [[poiList]] array which contain actual
|
11508 | * [[PoiTabelEntry]] objects.
|
11509 | */
|
11510 | private readonly poiDict;
|
11511 | private m_isLoading;
|
11512 | private m_loadedOk;
|
11513 | /**
|
11514 | * Creates an instance of PoiTable.
|
11515 | *
|
11516 | * @param {string} name Name of the `PoiTable`. Must be unique.
|
11517 | * @param {boolean} useAltNamesForKey Pass `true` to use the contents of the property `altNames`
|
11518 | * to find a [[PoiTableEntry]] in the table.
|
11519 | */
|
11520 | constructor(name: string, useAltNamesForKey: boolean);
|
11521 | /**
|
11522 | * Returns `true` if the table is currently being loaded, `false` otherwise.
|
11523 | *
|
11524 | * @readonly
|
11525 | */
|
11526 | get isLoading(): boolean;
|
11527 | /**
|
11528 | * Returns `true` if the table has been loaded correctly, `false` otherwise.
|
11529 | *
|
11530 | * @readonly
|
11531 | */
|
11532 | get loadedOk(): boolean;
|
11533 | /**
|
11534 | * Gets [[PoiTableEntry]] for poi name specified.
|
11535 | *
|
11536 | * @param poiName - poi name or one of its alternative names if [[useAltNamesForKey]] is
|
11537 | * set to `true`.
|
11538 | * @returns [[PoiTableEntry]] object or undefined if name was not found in dictionary.
|
11539 | */
|
11540 | getEntry(poiName: string): PoiTableEntry | undefined;
|
11541 | /**
|
11542 | * Start to load the PoiTable from the specified URL. Can only be called once per table.
|
11543 | *
|
11544 | * @param {string} poiTableUrl URL that points to the JSON file.
|
11545 | *
|
11546 | * @returns {Promise<boolean>} Promise is being resolved once the JSON file has been fetched and
|
11547 | * the `PoiTable` has been set up.
|
11548 | */
|
11549 | load(poiTableUrl: string): Promise<boolean>;
|
11550 | private startLoading;
|
11551 | private finishedLoading;
|
11552 | }
|
11553 |
|
11554 | /**
|
11555 | * Interface for the JSON description of the [[PoiTable]]. It is being implemented in [[PoiTable]].
|
11556 | */
|
11557 | export declare interface PoiTableDef {
|
11558 | /** Name of the `PoiTable`. Must be unique. */
|
11559 | name?: string;
|
11560 | /**
|
11561 | * Stores the list of [[PoiTableEntry]]s.
|
11562 | */
|
11563 | poiList?: PoiTableEntryDef[];
|
11564 | }
|
11565 |
|
11566 | /**
|
11567 | * Class to store and maintain individual POI information for the {@link PoiTable}.
|
11568 | */
|
11569 | declare class PoiTableEntry implements PoiTableEntryDef {
|
11570 | /**
|
11571 | * Verify that the JSON description of the POI table entry is valid.
|
11572 | *
|
11573 | * @param jsonEntry - JSON description of the POI table entry.
|
11574 | *
|
11575 | * @returns `true` if the `jsonEntry` is valid.
|
11576 | */
|
11577 | static verifyJSON(jsonEntry: PoiTableEntryDef): boolean;
|
11578 | /** Default name of the POI as the key for looking it up. */
|
11579 | name?: string;
|
11580 | /** Alternative names of the POI. */
|
11581 | altNames?: string[];
|
11582 | /** Visibility of the POI. If `false`, the POI will not be rendered. */
|
11583 | visible?: boolean;
|
11584 | /** Name of the icon, defined in the the texture atlases. */
|
11585 | iconName?: string;
|
11586 | /** Stacking mode of the POI. For future use. */
|
11587 | stackMode?: PoiStackMode;
|
11588 | /**
|
11589 | * Priority of the POI to select the visible set in case there are more POIs than can be
|
11590 | * handled.
|
11591 | */
|
11592 | priority?: number;
|
11593 | /** Minimum zoom level to render the icon on. */
|
11594 | iconMinLevel?: number;
|
11595 | /** Maximum zoom level to render the icon on. */
|
11596 | iconMaxLevel?: number;
|
11597 | /** Minimum zoom level to render the text label on. */
|
11598 | textMinLevel?: number;
|
11599 | /** Maximum zoom level to render the text label on. */
|
11600 | textMaxLevel?: number;
|
11601 | /**
|
11602 | * Setup the [[PoiTableEntry]] from the JSON description. It is assumed that the jsonEntry has
|
11603 | * been verified with [[PoiTableEntry#verifyJSON]].
|
11604 | *
|
11605 | * @param jsonEntry - JSON description of the POI table entry. Expected to have been verified
|
11606 | * with [[PoiTableEntry#verifyJSON]].
|
11607 | */
|
11608 | setup(jsonEntry: PoiTableEntryDef): void;
|
11609 | }
|
11610 |
|
11611 | /**
|
11612 | * Interface for the JSON description of the [[PoiTableEntry]]. The interface is being implemented
|
11613 | * as [[PoiTableEntry]].
|
11614 | */
|
11615 | export declare interface PoiTableEntryDef {
|
11616 | /** Default name of the POI as the key for looking it up. */
|
11617 | name?: string;
|
11618 | /** Alternative names of the POI. */
|
11619 | altNames?: string[];
|
11620 | /** Visibility of the POI. If `false`, the POI will not be rendered. */
|
11621 | visible?: boolean;
|
11622 | /** Name of the icon, defined in the the texture atlases. */
|
11623 | iconName?: string;
|
11624 | /** Stacking mode of the POI. For future use. */
|
11625 | stackMode?: string;
|
11626 | /**
|
11627 | * Priority of the POI to select the visible set in case there are more POIs than can be
|
11628 | * handled.
|
11629 | */
|
11630 | priority?: number;
|
11631 | /** Minimum zoom level to render the icon on. */
|
11632 | iconMinLevel?: number;
|
11633 | /** Maximum zoom level to render the icon on. */
|
11634 | iconMaxLevel?: number;
|
11635 | /** Minimum zoom level to render the text label on. */
|
11636 | textMinLevel?: number;
|
11637 | /** Maximum zoom level to render the text label on. */
|
11638 | textMaxLevel?: number;
|
11639 | }
|
11640 |
|
11641 | /**
|
11642 | * The `PoiTableManager` manages the list of [[PoiTables]] that
|
11643 | * can be defined in the {@link @here/harp-datasource-protocol#Theme} sfile.
|
11644 | */
|
11645 | export declare class PoiTableManager {
|
11646 | readonly mapView: MapView;
|
11647 | private m_isLoading;
|
11648 | private m_poiTables;
|
11649 | /**
|
11650 | * Creates an instance of PoiTableManager.
|
11651 | * @param {MapView} mapView Owning {@link MapView}.
|
11652 | */
|
11653 | constructor(mapView: MapView);
|
11654 | /**
|
11655 | * Load the {@link PoiTable}s that are stored in the {@link MapView}s
|
11656 | * {@link @here/harp-datasource-protocol#Theme}.
|
11657 | *
|
11658 | * @remarks
|
11659 | * Note that duplicate names of {@link PoiTable}s in the
|
11660 | * {@link @here/harp-datasource-protocol#Theme} will lead to inaccessible {@link PoiTable}s.
|
11661 | *
|
11662 | * @param theme - {@link @here/harp-datasource-protocol#Theme}
|
11663 | * containing all {@link PoiTable}s to load.
|
11664 | *
|
11665 | * @returns Resolved once all the {@link PoiTable}s in
|
11666 | * the {@link @here/harp-datasource-protocol#Theme} have been loaded.
|
11667 | */
|
11668 | loadPoiTables(theme: Theme): Promise<void>;
|
11669 | /**
|
11670 | * Clear the list of {@link PoiTable}s.
|
11671 | */
|
11672 | clear(): void;
|
11673 | /**
|
11674 | * Return the map of {@link PoiTable}s.
|
11675 | */
|
11676 | get poiTables(): Map<string, PoiTable>;
|
11677 | /**
|
11678 | * Manually add a {@link PoiTable}. Normally, the [[PoiTables]]s
|
11679 | * are specified in the {@link @here/harp-datasource-protocol#Theme}.
|
11680 | *
|
11681 | * @remarks
|
11682 | * Ensure that the name is unique.
|
11683 | */
|
11684 | addTable(poiTable: PoiTable): void;
|
11685 | /**
|
11686 | * Retrieve a {@link PoiTable} by name.
|
11687 | *
|
11688 | * @param {(string | undefined)} poiTableName Name of the {@link PoiTable}.
|
11689 | *
|
11690 | * @returns {(PoiTable | undefined)} The found [[poiTable]] if it could be found, `undefined`
|
11691 | * otherwise.
|
11692 | */
|
11693 | getPoiTable(poiTableName: string | undefined): PoiTable | undefined;
|
11694 | /**
|
11695 | * Return `true` if the {@link PoiTable}s have finished loading.
|
11696 | *
|
11697 | * @readonly
|
11698 | */
|
11699 | get finishedLoading(): boolean;
|
11700 | private startLoading;
|
11701 | private finishLoading;
|
11702 | }
|
11703 |
|
11704 | /**
|
11705 | * Definition for a [[PoiTable]] reference as part of the {@link Theme} object.
|
11706 | */
|
11707 | export declare interface PoiTableRef {
|
11708 | /** Required name of the [[PoiTable]] for later reference. */
|
11709 | name: string;
|
11710 | /**
|
11711 | * Required URL from where to load [[PoiTable]].
|
11712 | *
|
11713 | * Should refer to JSON that is matched [[PoiTableDef]] interface.
|
11714 | */
|
11715 | url: string;
|
11716 | /**
|
11717 | * If set to `true`, the list of values in the field "altNames" will be used as names for this
|
11718 | * POI.
|
11719 | */
|
11720 | useAltNamesForKey: boolean;
|
11721 | }
|
11722 |
|
11723 | /**
|
11724 | * Runtime representation of [[PoiStyle]] as parsed by [[StyleSetEvaluator]].
|
11725 | * For technique parameters see [[MarkerTechniqueParams]].
|
11726 | */
|
11727 | export declare interface PoiTechnique extends MakeTechniqueAttrs<MarkerTechniqueParams> {
|
11728 | name: "labeled-icon";
|
11729 | }
|
11730 |
|
11731 | /**
|
11732 | * {@link DataSource} providing geometry for poles
|
11733 | */
|
11734 | export declare class PolarTileDataSource extends DataSource {
|
11735 | private m_tilingScheme;
|
11736 | private m_maxLatitude;
|
11737 | private m_geometryLevelOffset;
|
11738 | private m_debugTiles;
|
11739 | private m_styleSetEvaluator?;
|
11740 | private m_northPoleEntry?;
|
11741 | private m_southPoleEntry?;
|
11742 | constructor({ name, styleSetName, minDataLevel, maxDataLevel, minDisplayLevel, maxDisplayLevel, storageLevelOffset, geometryLevelOffset, debugTiles }: PolarTileDataSourceOptions);
|
11743 | /** @override */
|
11744 | dispose(): void;
|
11745 | createTechiqueEntry(kind: string): TechniqueEntry | undefined;
|
11746 | /** @override */
|
11747 | setStyleSet(styleSet?: StyleSet, definitions?: Definitions, languages?: string[]): void;
|
11748 | /** @override */
|
11749 | setTheme(theme: Theme, languages?: string[]): void;
|
11750 | /** @override */
|
11751 | canGetTile(zoomLevel: number, tileKey: TileKey): boolean;
|
11752 | /** @override */
|
11753 | shouldSubdivide(zoomLevel: number, tileKey: TileKey): boolean;
|
11754 | /** @override */
|
11755 | getTilingScheme(): TilingScheme;
|
11756 | /** @override */
|
11757 | getTile(tileKey: TileKey): Tile;
|
11758 | get geometryLevelOffset(): number;
|
11759 | set geometryLevelOffset(geometryLevelOffset: number);
|
11760 | private intersectEdge;
|
11761 | private createTileGeometry;
|
11762 | }
|
11763 |
|
11764 | export declare interface PolarTileDataSourceOptions extends DataSourceOptions {
|
11765 | /**
|
11766 | * Optional level offset of regular tiles from reference datasource to align tiles to.
|
11767 | * Default is -1.
|
11768 | */
|
11769 | geometryLevelOffset?: number;
|
11770 | /**
|
11771 | * Enable debug display for generated tiles.
|
11772 | * Default is false.
|
11773 | */
|
11774 | debugTiles?: boolean;
|
11775 | }
|
11776 |
|
11777 | /**
|
11778 | * A {@link TilingScheme} featuring quadtree subdivision scheme and
|
11779 | * transverse Mercator projection.
|
11780 | */
|
11781 | export declare const polarTilingScheme: TilingScheme;
|
11782 |
|
11783 | /**
|
11784 | * Represents "Polygon" GeoJSON geometry object.
|
11785 | */
|
11786 | export declare interface Polygon {
|
11787 | type: "Polygon";
|
11788 | coordinates: number[][][];
|
11789 | }
|
11790 |
|
11791 | /**
|
11792 | * Declares a a geometry as a polygon.
|
11793 | */
|
11794 | export declare interface PolygonalTechniqueParams {
|
11795 | /**
|
11796 | * Whether to use polygon offset. Default is false. This corresponds to the
|
11797 | * GL_POLYGON_OFFSET_FILL WebGL feature.
|
11798 | *
|
11799 | * PolygonOffset is used to raise the geometry towards the geometry (for depth calculation
|
11800 | * only). Default is false.
|
11801 | *
|
11802 | * See here: https://sites.google.com/site/threejstuts/home/polygon_offset
|
11803 | *
|
11804 | * To activate polygonOffset these values have to be set to pull the line "forwards":
|
11805 | *
|
11806 | * transparent: true
|
11807 | *
|
11808 | * polygonOffset: true
|
11809 | *
|
11810 | * polygonOffsetFactor : -1.0, (as an example, see link above)
|
11811 | *
|
11812 | * polygonOffsetUnits: -1 (as an example, see link above)
|
11813 | */
|
11814 | polygonOffset?: boolean;
|
11815 | /**
|
11816 | * Sets the polygon offset factor. Default is 0.
|
11817 | */
|
11818 | polygonOffsetFactor?: DynamicProperty<number>;
|
11819 | /**
|
11820 | * Sets the polygon offset units. Default is 0.
|
11821 | */
|
11822 | polygonOffsetUnits?: DynamicProperty<number>;
|
11823 | /**
|
11824 | * Sets the polygon outline color.
|
11825 | * @format color-hex
|
11826 | */
|
11827 | lineColor?: DynamicProperty<StyleColor>;
|
11828 | /**
|
11829 | * Distance to the camera (0.0 = nearPlane, 1.0 = farPlane) at which the object edges start
|
11830 | * fading out.
|
11831 | */
|
11832 | lineFadeNear?: DynamicProperty<number>;
|
11833 | /**
|
11834 | * Distance to the camera (0.0 = nearPlane, 1.0 = farPlane) at which the object edges become
|
11835 | * transparent. A value of <= 0.0 disables fading.
|
11836 | */
|
11837 | lineFadeFar?: DynamicProperty<number>;
|
11838 | }
|
11839 |
|
11840 | export declare interface PostEffects {
|
11841 | bloom?: IBloomEffect;
|
11842 | outline?: IOutlineEffect;
|
11843 | vignette?: IVignetteEffect;
|
11844 | sepia?: ISepiaEffect;
|
11845 | }
|
11846 |
|
11847 | /**
|
11848 | * A `PriorityListElement` has a priority to assist in sorting. The idea is that the items in a
|
11849 | * grouped priority list will not modify their priority during processing to such an amount, that
|
11850 | * they will change into another group. Smaller lists are smaller to sort, and in case of resource
|
11851 | * limitation (maximum number of rendered objects reached), not all items have to be sorted at all.
|
11852 | */
|
11853 | declare interface PriorityListElement {
|
11854 | /**
|
11855 | * The integer value of this priority is used to group objects of "same" priority.
|
11856 | */
|
11857 | priority: number;
|
11858 | }
|
11859 |
|
11860 | /**
|
11861 | * The `PriorityListGroup` contains a list of {@link PriorityListElement}s that all have the same
|
11862 | * (integer) priority.
|
11863 | */
|
11864 | declare class PriorityListGroup<T extends PriorityListElement> {
|
11865 | readonly priority: number;
|
11866 | elements: T[];
|
11867 | constructor(priority: number, elements?: T[]);
|
11868 | /**
|
11869 | * Create and return a deep copy of the `PriorityListGroup<T>`.
|
11870 | *
|
11871 | * @returns A clone of the `PriorityListGroup<T>`.
|
11872 | */
|
11873 | clone(): PriorityListGroup<T>;
|
11874 | /**
|
11875 | * Removes an element from the group.
|
11876 | * @param element - The element to remove.
|
11877 | * @returns true if the element was removed, false if it was not found in the group.
|
11878 | */
|
11879 | remove(element: T): boolean;
|
11880 | }
|
11881 |
|
11882 | /**
|
11883 | * The `PriorityListGroupMap` is a map to map the (integer) priority to a {@link PriorityListGroup}.
|
11884 | */
|
11885 | declare type PriorityListGroupMap<T extends PriorityListElement> = Map<number, PriorityListGroup<T>>;
|
11886 |
|
11887 | /**
|
11888 | * `Projection` is used to convert positions from geo coordinates to world coordinates and vice
|
11889 | * versa.
|
11890 | */
|
11891 | export declare abstract class Projection {
|
11892 | readonly unitScale: number;
|
11893 | /**
|
11894 | * The type of this [Projection].
|
11895 | */
|
11896 | abstract get type(): ProjectionType;
|
11897 | /**
|
11898 | * Constructs the Projection
|
11899 | *
|
11900 | * @param unitScale - How to transform the projected coordinates to world units.
|
11901 | */
|
11902 | constructor(unitScale: number);
|
11903 | /**
|
11904 | * Returns the world extents in world coordinates.
|
11905 | *
|
11906 | * @param minElevation - The minimum elevation in meters.
|
11907 | * @param maxElevation - The maximum elevation in meters.
|
11908 | * @param result - The optional object that will be used to create the resulting bounding box.
|
11909 | */
|
11910 | abstract worldExtent<Bounds extends Box3Like>(minElevation: number, maxElevation: number, result?: Bounds): Bounds;
|
11911 | /**
|
11912 | * Projects a point from geo coordinates (latitude, longitude, altitude) to world coordinates
|
11913 | * (x,y,z).
|
11914 | *
|
11915 | * Example:
|
11916 | * ```typescript
|
11917 | * const worldPos = new THREE.Vector3();
|
11918 | * projection.projectPoint(geoPos, worldPos);
|
11919 | * ```
|
11920 | *
|
11921 | * @param geoPoint - The position in geo coordinates.
|
11922 | * @param result - The optional object used to store the resulting world position, result must
|
11923 | * implement {@link Vector3Like}.
|
11924 | */
|
11925 | abstract projectPoint<WorldCoordinates extends Vector3Like>(geoPoint: GeoCoordinatesLike, result?: WorldCoordinates): WorldCoordinates;
|
11926 | /**
|
11927 | * Gets the {@link TransformLike} of the local tangent space at the given point.
|
11928 | *
|
11929 | * @param point - The geo / world coordinates.
|
11930 | * @param result - The {@link TransformLike}.
|
11931 | */
|
11932 | localTangentSpace(point: GeoCoordinatesLike | Vector3Like, result: TransformLike): TransformLike;
|
11933 | /**
|
11934 | * Returns the geo coordinates (latitude, longitude, altitude) from the given world position
|
11935 | * (x,y,z).
|
11936 | *
|
11937 | * Example:
|
11938 | * ```typescript
|
11939 | * const geoPos = projection.unprojectPoint(worldPos);
|
11940 | * console.log(geoPos.latitude, geoPos.longitude, geoPos.altitude);
|
11941 | * ```
|
11942 | *
|
11943 | * @param worldPoint - The position in world coordinates.
|
11944 | */
|
11945 | abstract unprojectPoint(worldPoint: Vector3Like): GeoCoordinates;
|
11946 | /**
|
11947 | * Returns the altitude at the given world position (x,y,z) in meters.
|
11948 | *
|
11949 | * @param worldPoint - The position in world coordinates.
|
11950 | */
|
11951 | abstract unprojectAltitude(worldPoint: Vector3Like): number;
|
11952 | /**
|
11953 | * Projects bounds in geo coordinates to a bounding box in world coordinates.
|
11954 | *
|
11955 | * Example:
|
11956 | * ```typescript
|
11957 | * const bounds = projection.projectBox(geoBox);
|
11958 | * console.log(bounds.min, bounds.max);
|
11959 | * ```
|
11960 | *
|
11961 | * @param geoBox - The bounding box in geo coordinates.
|
11962 | */
|
11963 | abstract projectBox(geoBox: GeoBox): Box3Like;
|
11964 | /**
|
11965 | * Projects bounds in geo coordinates to a bounding box in world coordinates.
|
11966 | *
|
11967 | * Example:
|
11968 | * ```typescript
|
11969 | * const bounds = projection.projectBox(geoBox, new THREE.Box3());
|
11970 | * console.log(bounds.min, bounds.max);
|
11971 | * ```
|
11972 | *
|
11973 | * @param geoBox - The bounding box in geo coordinates.
|
11974 | * @param result - The resulting {@link OrientedBox3Like}.
|
11975 | */
|
11976 | abstract projectBox<WorldBoundingBox extends Box3Like | OrientedBox3Like>(geoBox: GeoBox, result: WorldBoundingBox): WorldBoundingBox;
|
11977 | /**
|
11978 | * Converts a bounding box in world coordinates to a bounding box in geo coordinates.
|
11979 | *
|
11980 | * Example:
|
11981 | * ```typescript
|
11982 | * const geoPos = projection.unprojectPoint(worldPos);
|
11983 | * console.log(geoPos.latitude, geoPos.longitude, geoPos.altitude);
|
11984 | * ```
|
11985 | *
|
11986 | * @param worldBox - The bounding box in world coordinates.
|
11987 | */
|
11988 | abstract unprojectBox(worldBox: Box3Like): GeoBox;
|
11989 | /**
|
11990 | * Returns the scaling factor that must be used to convert the units used by `worldPoint` to
|
11991 | * meters.
|
11992 | *
|
11993 | * @param worldPoint - The position in world coordinates.
|
11994 | */
|
11995 | abstract getScaleFactor(worldPoint: Vector3Like): number;
|
11996 | /**
|
11997 | * Returns the surface normal at the given world position.
|
11998 | *
|
11999 | * @param worldPoint - The position in world coordinates.
|
12000 | */
|
12001 | abstract surfaceNormal(worldPoint: Vector3Like): Vector3Like;
|
12002 | /**
|
12003 | * Returns the surface normal at the given world position.
|
12004 | *
|
12005 | * @param worldPoint - The position in world coordinates.
|
12006 | * @returns The resulting normal vector.
|
12007 | */
|
12008 | abstract surfaceNormal<Normal extends Vector3Like>(worldPoint: Vector3Like, result: Normal): Normal;
|
12009 | /**
|
12010 | * Returns the signed distance between the given coordinates and
|
12011 | * the closest point on the surface.
|
12012 | *
|
12013 | * @param worldPoint - The position in world coordinates.
|
12014 | */
|
12015 | abstract groundDistance(worldPoint: Vector3Like): number;
|
12016 | /**
|
12017 | * Scales the given world coordinates to the surface.
|
12018 | *
|
12019 | * @param worldPoint - The position in world coordinates.
|
12020 | */
|
12021 | abstract scalePointToSurface(worldPoint: Vector3Like): Vector3Like;
|
12022 | /**
|
12023 | * Reproject a world position from the given source {@link Projection}.
|
12024 | *
|
12025 | * @param sourceProjection - The source projection.
|
12026 | * @param worldPos - A valid world position for the given source projection.
|
12027 | * @returns The world position reprojected using this {@link Projection}.
|
12028 | */
|
12029 | reprojectPoint(sourceProjection: Projection, worldPos: Vector3Like): Vector3Like;
|
12030 | /**
|
12031 | * Reproject a world position from the given source {@link Projection}.
|
12032 | *
|
12033 | * @param sourceProjection - The source projection.
|
12034 | * @param worldPos - A valid position in the world space defined by the source projection.
|
12035 | * @param result - The resulting position reprojected using this {@link Projection}.
|
12036 | */
|
12037 | reprojectPoint<WorldCoordinates extends Vector3Like>(sourceProjection: Projection, worldPos: Vector3Like, result: WorldCoordinates): WorldCoordinates;
|
12038 | }
|
12039 |
|
12040 | /**
|
12041 | * The type of projection.
|
12042 | */
|
12043 | export declare enum ProjectionType {
|
12044 | /**
|
12045 | * A type of [Projection] with zero curvature.
|
12046 | */
|
12047 | Planar = 0,
|
12048 | /**
|
12049 | * A spherical [Projection].
|
12050 | */
|
12051 | Spherical = 1
|
12052 | }
|
12053 |
|
12054 | /**
|
12055 | * A class used to represent a quadtree.
|
12056 | */
|
12057 | export declare class QuadTree {
|
12058 | readonly tilingScheme: TilingScheme;
|
12059 | /**
|
12060 | * Constructs a new `QuadTree` for the given {@link TilingScheme}.
|
12061 | *
|
12062 | * Example:
|
12063 | * ```typescript
|
12064 | * const quadTree = new QuadTree(hereTilingScheme);
|
12065 | * const geoBox = quadTree.getGeoBox(tileKey);
|
12066 | * console.log(geoBox.center);
|
12067 | * ```
|
12068 | *
|
12069 | * @param tilingScheme - The TilingScheme used by this `QuadTree`.
|
12070 | */
|
12071 | constructor(tilingScheme: TilingScheme);
|
12072 | /**
|
12073 | * Visits this `QuadTree` and invoke the given accept method
|
12074 | * with the current {@link TileKey} and
|
12075 | * its bounding box in geo coordinates.
|
12076 | *
|
12077 | * Example:
|
12078 | * ```typescript
|
12079 | * const geoPos = new GeoCoordinates(latitude, longitude);
|
12080 | * const quadTree = new QuadTree(hereTilingScheme);
|
12081 | * quadTree.visit((tileKey, geoBox) => {
|
12082 | * if (geoBox.contains(geoPos)) {
|
12083 | * console.log("tile", tileKey, "contains", geoPos);
|
12084 | * return tileKey.level < 14;
|
12085 | * }
|
12086 | * return false;
|
12087 | *
|
12088 | * });
|
12089 | * ```
|
12090 | *
|
12091 | * @param accept - A function that takes a {@link TileKey}
|
12092 | * and its bounding box in geo coordinates
|
12093 | * and returns `true` if the visit of the `QuadTree`
|
12094 | * should continue; otherwise `false`.
|
12095 | */
|
12096 | visit(accept: (tileKey: TileKey, geoBox: GeoBox) => boolean): void;
|
12097 | /**
|
12098 | * Visits the subtree starting from the given tile.
|
12099 | *
|
12100 | * @param tileKey - The root of the subtree that should be visited.
|
12101 | * @param accept - A function that takes a {@link TileKey}
|
12102 | * and its bounding box in geo coordinates
|
12103 | * and returns `true` if the visit of the
|
12104 | * `QuadTree` should continue; otherwise `false`.
|
12105 | */
|
12106 | visitTileKey(tileKey: TileKey, accept: (tileKey: TileKey, geoBox: GeoBox) => boolean): void;
|
12107 | }
|
12108 |
|
12109 | /**
|
12110 | * {@link SubdivisionScheme} representing a quadtree.
|
12111 | */
|
12112 | export declare const quadTreeSubdivisionScheme: SubdivisionScheme;
|
12113 |
|
12114 | /**
|
12115 | * @internal
|
12116 | */
|
12117 | export declare type RelationalOp = "<" | ">" | "<=" | ">=";
|
12118 |
|
12119 | export declare type RemoveInterpolatedPropDef<T> = T | InterpolatedPropertyDefinition<any> extends T ? Exclude<T, InterpolatedPropertyDefinition<any>> : T;
|
12120 |
|
12121 | export declare type RemoveJsonExpr<T> = T | JsonExpr extends T ? Exclude<T, JsonExpr> : T;
|
12122 |
|
12123 | /**
|
12124 | * The type of `RenderEvent`.
|
12125 | */
|
12126 | export declare interface RenderEvent extends THREE_2.Event {
|
12127 | type: MapViewEventNames.Render | MapViewEventNames.FirstFrame | MapViewEventNames.FrameComplete | MapViewEventNames.ThemeLoaded | MapViewEventNames.AnimationStarted | MapViewEventNames.AnimationFinished | MapViewEventNames.MovementStarted | MapViewEventNames.MovementFinished | MapViewEventNames.ContextLost | MapViewEventNames.ContextRestored | MapViewEventNames.CopyrightChanged;
|
12128 | time?: number;
|
12129 | }
|
12130 |
|
12131 | /**
|
12132 | * Allows to cancel and prioritize requests inside the requestQueue.
|
12133 | *
|
12134 | * @remarks
|
12135 | * Useful to optimize the order of decoding tiles during animations and camera movements.
|
12136 | *
|
12137 | * `RequestController` is not extending [[AbortController]], because this is not supported in ES5.
|
12138 | */
|
12139 | export declare class RequestController implements AbortController {
|
12140 | priority: number;
|
12141 | abortController: AbortController;
|
12142 | /**
|
12143 | * Creates an instance of `RequestController`.
|
12144 | *
|
12145 | * @param {number} priority
|
12146 | * @param {AbortController} abortController Optional [[AbortController]] used internally, since
|
12147 | * [[AbortController]]s should not be subclassed.
|
12148 | */
|
12149 | constructor(priority?: number, abortController?: AbortController);
|
12150 | get signal(): AbortSignal;
|
12151 | /**
|
12152 | * Invoking this method will set this object's AbortSignal's aborted flag and
|
12153 | * signal to any observers that the associated activity is to be aborted.
|
12154 | */
|
12155 | abort(): void;
|
12156 | }
|
12157 |
|
12158 | export declare interface RequestHeaders {
|
12159 | [field: string]: string;
|
12160 | }
|
12161 |
|
12162 | declare interface RequestHeaders_2 {
|
12163 | [field: string]: string;
|
12164 | }
|
12165 |
|
12166 | /**
|
12167 | * Like [[StyleDeclaration]], but without [[Reference]] type.
|
12168 | */
|
12169 | export declare type ResolvedStyleDeclaration = Style & StyleSelector;
|
12170 |
|
12171 | /**
|
12172 | * Like [[StyleSet]], but without [[Reference]] type.
|
12173 | */
|
12174 | export declare type ResolvedStyleSet = ResolvedStyleDeclaration[];
|
12175 |
|
12176 | /**
|
12177 | * Way the memory consumption of a tile is computed. Either in number of tiles, or in MegaBytes. If
|
12178 | * it is in MB, an estimation is used.
|
12179 | */
|
12180 | export declare enum ResourceComputationType {
|
12181 | EstimationInMb = 0,
|
12182 | NumberOfTiles = 1
|
12183 | }
|
12184 |
|
12185 | /**
|
12186 | * A class representing RGBA colors.
|
12187 | *
|
12188 | * @hidden
|
12189 | * @internal
|
12190 | */
|
12191 | declare class RGBA {
|
12192 | r: number;
|
12193 | g: number;
|
12194 | b: number;
|
12195 | a: number;
|
12196 | /**
|
12197 | * Parses a string describing a color.
|
12198 | *
|
12199 | * @param text - The string color literal
|
12200 | */
|
12201 | static parse(text: string): RGBA | undefined;
|
12202 | /**
|
12203 | * Constructs a [[RGBA]] color using the given components in the [0..1] range.
|
12204 | */
|
12205 | constructor(r?: number, g?: number, b?: number, a?: number);
|
12206 | /**
|
12207 | * Clones this [[RGBA]] color.
|
12208 | */
|
12209 | clone(): RGBA;
|
12210 | /**
|
12211 | * Returns this color encoded as one single number.
|
12212 | */
|
12213 | getHex(): number;
|
12214 | /**
|
12215 | * Linearly interpolate the components of this color.
|
12216 | */
|
12217 | lerp(target: RGBA, t: number): this;
|
12218 | /**
|
12219 | * Returns this color encoded as JSON literal.
|
12220 | */
|
12221 | toJSON(): string;
|
12222 | }
|
12223 |
|
12224 | /**
|
12225 | * A simple ring buffer to store the last `n` values of the timer. The buffer works on
|
12226 | * a First-In-First-Out (FIFO) basis.
|
12227 | */
|
12228 | export declare class RingBuffer<T> {
|
12229 | readonly capacity: number;
|
12230 | buffer: T[];
|
12231 | size: number;
|
12232 | head: number;
|
12233 | tail: number;
|
12234 | /**
|
12235 | * Sets up the ring buffer.
|
12236 | *
|
12237 | * @param capacity - The buffer's capacity.
|
12238 | */
|
12239 | constructor(capacity: number);
|
12240 | /**
|
12241 | * Clears the contents, removes all elements.
|
12242 | */
|
12243 | clear(): void;
|
12244 | /**
|
12245 | * Adds a single element to the ring buffer.
|
12246 | *
|
12247 | * @param data - Data element.
|
12248 | */
|
12249 | enqOne(data: T): void;
|
12250 | /**
|
12251 | * Adds one or more elements.
|
12252 | *
|
12253 | * @param data - The elements to add.
|
12254 | */
|
12255 | enq(...data: T[]): void;
|
12256 | /**
|
12257 | * Obtains the oldest element (FIFO). May throw an exception if a buffer underrun occurs.
|
12258 | * Before calling this method, make sure that `size > 0`.
|
12259 | */
|
12260 | deq(): T;
|
12261 | /**
|
12262 | * Obtains the oldest element (FIFO) without removing it. Throws an exception if a buffer is
|
12263 | * empty. Before calling this method, make sure that `size > 0`.
|
12264 | */
|
12265 | get top(): T;
|
12266 | /**
|
12267 | * Obtains the latest element (LIFO) without removing it. Throws an exception if a buffer is
|
12268 | * empty. Before calling this method, make sure that `size > 0`.
|
12269 | */
|
12270 | get bottom(): T;
|
12271 | /**
|
12272 | * Creates an iterator for the buffer.
|
12273 | */
|
12274 | iterator(): RingBuffer.Iterator<T>;
|
12275 | /**
|
12276 | * Returns a copy of the buffer, where the elements are properly sorted from oldest to newest.
|
12277 | */
|
12278 | asArray(): T[];
|
12279 | }
|
12280 |
|
12281 | export declare namespace RingBuffer {
|
12282 | /**
|
12283 | * A local class for RingBuffer<T>
|
12284 | */
|
12285 | export class Iterator<T> {
|
12286 | private m_buffer;
|
12287 | private m_index;
|
12288 | /**
|
12289 | * Creates an iterator for the ring buffer.
|
12290 | *
|
12291 | * @param m_buffer - `Ringbuffer` to iterate over.
|
12292 | * @param m_index - Start index.
|
12293 | */
|
12294 | constructor(m_buffer: RingBuffer<T>, m_index?: number);
|
12295 | /**
|
12296 | * Gets the iterator's current value. This function does not fail even if an overrun occurs.
|
12297 | * To detect an overrun, watch the result for [[next]].
|
12298 | */
|
12299 | get value(): T;
|
12300 | /**
|
12301 | * Advances the iterator to the next element.
|
12302 | *
|
12303 | * @returns `true` if the iterator is still valid; `false` if an overrun occurs.
|
12304 | */
|
12305 | next(): boolean;
|
12306 | }
|
12307 | }
|
12308 |
|
12309 | /**
|
12310 | * A timer that stores the last `n` samples in a ring buffer.
|
12311 | */
|
12312 | export declare class SampledTimer extends SimpleTimer {
|
12313 | statistics: Statistics;
|
12314 | readonly name: string;
|
12315 | /**
|
12316 | * The number of times the timer has reset.
|
12317 | */
|
12318 | numResets: number;
|
12319 | /**
|
12320 | * Maximum samples until the statistics are reset and updated, which may destroy a median
|
12321 | * computation.
|
12322 | */
|
12323 | maxNumSamples: number;
|
12324 | /**
|
12325 | * The array of sampled values, its length cannot exceed `maxNumSamples`.
|
12326 | */
|
12327 | samples: RingBuffer<number>;
|
12328 | /**
|
12329 | * Creates a `SampledTimer` instance. Must still be added to statistics if it should be logged!
|
12330 | *
|
12331 | * @param statistics - Statistics to use for management.
|
12332 | * @param name - Name of the timer. Use colons to build a hierarchy.
|
12333 | */
|
12334 | constructor(statistics: Statistics, name: string);
|
12335 | /**
|
12336 | * Resets the timer and clears all of its historical values.
|
12337 | * @override
|
12338 | */
|
12339 | reset(): void;
|
12340 | /**
|
12341 | * Add a single measurement to the sample.
|
12342 | *
|
12343 | * @param val - A measurement to add.
|
12344 | * @override
|
12345 | */
|
12346 | setValue(val: number | undefined): void;
|
12347 | /**
|
12348 | * Updates the `min`, `max`, `avg`, and `median` values. Currently, this function is expensive,
|
12349 | * as it requires a copy of the sampled values.
|
12350 | */
|
12351 | getStats(): Stats | undefined;
|
12352 | }
|
12353 |
|
12354 | declare class ScreenCollisions {
|
12355 | /** The screen bounding box. */
|
12356 | readonly screenBounds: Math2D.Box;
|
12357 | /** Tree of allocated bounds. */
|
12358 | private rtree;
|
12359 | /**
|
12360 | * Constructs a new ScreenCollisions object.
|
12361 | */
|
12362 | constructor();
|
12363 | /**
|
12364 | * Resets the list of allocated screen bounds.
|
12365 | */
|
12366 | reset(): void;
|
12367 | /**
|
12368 | * Updates the screen bounds that are used to check if bounding boxes are visible.
|
12369 | *
|
12370 | * @param width - The width of the container.
|
12371 | * @param height - The height of the container.
|
12372 | */
|
12373 | update(width: number, height: number): void;
|
12374 | /**
|
12375 | * Marks the region of the screen intersecting with the given bounding box as allocated.
|
12376 | *
|
12377 | * @param bounds - The bounding box in NDC scaled coordinates (i.e. top left is -width/2,
|
12378 | * -height/2)
|
12379 | */
|
12380 | allocate(bounds: Math2D.Box | CollisionBox | DetailedCollisionBox): void;
|
12381 | /**
|
12382 | * Inserts the given bounds into the rtree.
|
12383 | *
|
12384 | * @param bounds - The bounding boxes (the bounding boxes must be in the space returned from the
|
12385 | * ScreenProjector.project method).
|
12386 | */
|
12387 | allocateIBoxes(bounds: IBox[]): void;
|
12388 | /**
|
12389 | * Search for all bounds in the tree intersecting with the given box.
|
12390 | * @param box - The box used for the search.
|
12391 | * @returns An array of all IBoxes intersecting with the given box.
|
12392 | */
|
12393 | search(box: CollisionBox): IBox[];
|
12394 | /**
|
12395 | * Checks if the given bounding box is already allocated.
|
12396 | *
|
12397 | * @param bounds - The bounding box in world coordinates.
|
12398 | */
|
12399 | isAllocated(bounds: Math2D.Box | CollisionBox): boolean;
|
12400 | /**
|
12401 | * Checks if the given screen bounds intersects with the frustum of the active camera.
|
12402 | *
|
12403 | * @param bounds - The bounding box in world coordinates.
|
12404 | */
|
12405 | isVisible(bounds: Math2D.Box): boolean;
|
12406 | /**
|
12407 | * Checks if the given screen bounds is contained within the frustum of the active camera.
|
12408 | *
|
12409 | * @param bounds - The bounding box in world coordinates.
|
12410 | */
|
12411 | isFullyVisible(bounds: Math2D.Box): boolean;
|
12412 | /**
|
12413 | * Test whether a given [[CollisionBox]] intersects with any of the details in the specified
|
12414 | * [[IBox]]es.
|
12415 | *
|
12416 | * @param testBox - The box to test for intersection.
|
12417 | * @param boxes - The candidate boxes the test box may intersect with. It's assumed that the
|
12418 | * global bounds of these boxes intersect with the given test box.
|
12419 | * @returns `true` if any intersection found.
|
12420 | */
|
12421 | intersectsDetails(testBox: CollisionBox, boxes: IBox[]): boolean;
|
12422 | /**
|
12423 | * Computes the intersection between the supplied CollisionBox and the LineWithBound.
|
12424 | * @note The [[CollisionBox]] is in Screen Bounds space, whereas the line must be
|
12425 | * in Screen Coordinate space
|
12426 | */
|
12427 | private intersectsLine;
|
12428 | }
|
12429 |
|
12430 | /**
|
12431 | * @hidden
|
12432 | * Handles the projection of world coordinates to screen coordinates.
|
12433 | */
|
12434 | declare class ScreenProjector {
|
12435 | private m_camera;
|
12436 | static tempV2: THREE_2.Vector2;
|
12437 | static tempV3: THREE_2.Vector3;
|
12438 | private m_width;
|
12439 | private m_height;
|
12440 | /**
|
12441 | * Constructs a new `ScreenProjector`.
|
12442 | *
|
12443 | * @param m_camera - Camera to project against.
|
12444 | */
|
12445 | constructor(m_camera: THREE_2.Camera);
|
12446 | /**
|
12447 | * Height of the screen.
|
12448 | */
|
12449 | get width(): number;
|
12450 | /**
|
12451 | * Width of the screen.
|
12452 | */
|
12453 | get height(): number;
|
12454 | /**
|
12455 | * Apply current projectionViewMatrix of the camera to project the source vector into
|
12456 | * screen coordinates.
|
12457 | *
|
12458 | * @param {(Vector3Like)} source The source vector to project.
|
12459 | * @param {THREE.Vector2} target The target vector.
|
12460 | * @returns {THREE.Vector2} The projected vector (the parameter 'target') or undefined if
|
12461 | * outside the near / far plane.
|
12462 | */
|
12463 | project(source: Vector3Like, target?: THREE_2.Vector2): THREE_2.Vector2 | undefined;
|
12464 | /**
|
12465 | * Apply current projectionViewMatrix of the camera to project the source vector into
|
12466 | * screen coordinates.
|
12467 | *
|
12468 | * @param {(Vector3Like)} source The source vector to project.
|
12469 | * @param {THREE.Vector2} target The target vector.
|
12470 | * @returns {THREE.Vector2} The projected vector (the parameter 'target') or undefined if
|
12471 | * outside the screen.
|
12472 | */
|
12473 | projectOnScreen(source: Vector3Like, target?: THREE_2.Vector2): THREE_2.Vector2 | undefined;
|
12474 | /**
|
12475 | * Apply current projectionViewMatrix of the camera to project the source vector into
|
12476 | * screen coordinates. The z component between -1 and 1 is also returned.
|
12477 | *
|
12478 | * @param {(Vector3Like)} source The source vector to project.
|
12479 | * @param {THREE.Vector3} target The target vector.
|
12480 | * @returns {THREE.Vector3} The projected vector (the parameter 'target') or undefined if
|
12481 | * outside the near / far plane.
|
12482 | */
|
12483 | project3(source: Vector3Like, target?: THREE_2.Vector3): THREE_2.Vector3 | undefined;
|
12484 | /**
|
12485 | * Apply current projectionViewMatrix of the camera to project the source vector. Stores
|
12486 | * result in NDC in the target vector.
|
12487 | *
|
12488 | * @param {(Vector3Like)} source The source vector to project.
|
12489 | * @param {THREE.Vector3} target The target vector.
|
12490 | * @returns {THREE.Vector3} The projected vector (the parameter 'target').
|
12491 | */
|
12492 | projectVector(source: Vector3Like, target: THREE_2.Vector3): THREE_2.Vector3;
|
12493 | /**
|
12494 | * Fast test to check if projected point is on screen.
|
12495 | *
|
12496 | * @returns {boolean} `true` if point is on screen, `false` otherwise.
|
12497 | */
|
12498 | onScreen(source: Vector3Like): boolean;
|
12499 | /**
|
12500 | * Update the `ScreenProjector` with the latest values of the screen and the camera.
|
12501 | *
|
12502 | * @param {THREE.Camera} camera Camera to project against.
|
12503 | * @param {number} width Width of screen/canvas.
|
12504 | * @param {number} height Height of screen/canvas.
|
12505 | */
|
12506 | update(camera: THREE_2.Camera, width: number, height: number): void;
|
12507 | private ndcToScreen;
|
12508 | }
|
12509 |
|
12510 | /**
|
12511 | * Render feature as segments.
|
12512 | */
|
12513 | export declare type SegmentsStyle = BaseStyle<"segments", SegmentsTechniqueParams>;
|
12514 |
|
12515 | /**
|
12516 | * Runtime representation of [[SegmentsStyle]] as parsed by [[StyleSetEvaluator]].
|
12517 | * For technique parameters see [[SegmentsTechniqueParams]].
|
12518 | */
|
12519 | export declare interface SegmentsTechnique extends MakeTechniqueAttrs<SegmentsTechniqueParams> {
|
12520 | name: "segments";
|
12521 | }
|
12522 |
|
12523 | /**
|
12524 | * Declares a geometry as a segment.
|
12525 | */
|
12526 | export declare interface SegmentsTechniqueParams extends BaseTechniqueParams {
|
12527 | /**
|
12528 | * Color of segments in a hexadecimal notation, for example: `"#e4e9ec"` or `"#fff"`.
|
12529 | * @format color-hex
|
12530 | */
|
12531 | color: DynamicProperty<StyleColor>;
|
12532 | /**
|
12533 | * Set to `true` if line should appear transparent. Rendering transparent lines may come with a
|
12534 | * slight performance impact.
|
12535 | */
|
12536 | transparent?: boolean;
|
12537 | /**
|
12538 | * For transparent lines, set a value between `0.0` for fully transparent, to `1.0` for fully
|
12539 | * opaque.
|
12540 | */
|
12541 | opacity?: DynamicProperty<number>;
|
12542 | /**
|
12543 | * Width of a line in meters.
|
12544 | */
|
12545 | lineWidth: DynamicProperty<number>;
|
12546 | }
|
12547 |
|
12548 | /**
|
12549 | * Sets up all the needed stencil logic needed for the depth pre-pass.
|
12550 | *
|
12551 | * This logic is in place to avoid z-fighting artifacts that can appear in geometries that have
|
12552 | * coplanar triangles inside the same mesh.
|
12553 | *
|
12554 | * @param depthMesh - Mesh created by `createDepthPrePassMesh`.
|
12555 | * @param colorMesh - Original mesh.
|
12556 | */
|
12557 | export declare function setDepthPrePassStencil(depthMesh: THREE_2.Mesh, colorMesh: THREE_2.Mesh): void;
|
12558 |
|
12559 | export declare type ShaderStyle = BaseStyle<"shader", ShaderTechniqueParams>;
|
12560 |
|
12561 | /**
|
12562 | * Special technique for user-defined shaders.
|
12563 | * For technique parameters see [[ShaderTechniqueParams]].
|
12564 | */
|
12565 | export declare interface ShaderTechnique extends MakeTechniqueAttrs<ShaderTechniqueParams> {
|
12566 | name: "shader";
|
12567 | }
|
12568 |
|
12569 | export declare interface ShaderTechniqueMaterialParameters {
|
12570 | [name: string]: any;
|
12571 | }
|
12572 |
|
12573 | /**
|
12574 | * Special technique for user-defined shaders. See
|
12575 | * https://threejs.org/docs/#api/harp-materials/ShaderMaterial for details.
|
12576 | */
|
12577 | export declare interface ShaderTechniqueParams extends BaseTechniqueParams {
|
12578 | /**
|
12579 | * Parameters for shader. See `THREE.ShaderMaterialParameters`.
|
12580 | */
|
12581 | params: ShaderTechniqueMaterialParameters;
|
12582 | /**
|
12583 | * Type of primitive for the shader technique. Valid values are "point" | "line" | "segments" |
|
12584 | * "mesh"
|
12585 | */
|
12586 | primitive: "point" | "line" | "segments" | "mesh";
|
12587 | /**
|
12588 | * Set to 'true' if line should appear transparent. Rendering transparent lines may come with a
|
12589 | * slight performance impact.
|
12590 | * See https://threejs.org/docs/#api/en/materials/Material.transparent.
|
12591 | */
|
12592 | transparent?: boolean;
|
12593 | [name: string]: any;
|
12594 | }
|
12595 |
|
12596 | export declare interface SimpleFrameStatistics {
|
12597 | configs: Map<string, string>;
|
12598 | appResults: Map<string, number>;
|
12599 | frames: Map<string, number | number[]>;
|
12600 | messages: Array<string[] | undefined>;
|
12601 | frameStats?: Map<string, Stats | undefined>;
|
12602 | zoomLevelLabels?: string[];
|
12603 | zoomLevelData?: Map<string, number | number[]>;
|
12604 | }
|
12605 |
|
12606 | /**
|
12607 | * A simple timer that stores only the latest measurement.
|
12608 | */
|
12609 | export declare class SimpleTimer implements Timer {
|
12610 | statistics: Statistics;
|
12611 | readonly name: string;
|
12612 | /** `true` if timer has been started. */
|
12613 | running: boolean;
|
12614 | private m_currentValue?;
|
12615 | constructor(statistics: Statistics, name: string);
|
12616 | /**
|
12617 | * Gets the latest measurement. This function may return `undefined` if no measurement
|
12618 | * was done.
|
12619 | */
|
12620 | get value(): number | undefined;
|
12621 | /**
|
12622 | * Sets the measurement value for the amount of time that has elapsed from start() to stop().
|
12623 | * Use this function to override the timer's duration.
|
12624 | *
|
12625 | * @param val - The timer's duration.
|
12626 | */
|
12627 | setValue(val: number | undefined): void;
|
12628 | /**
|
12629 | * Resets the value to be able to start again.
|
12630 | */
|
12631 | reset(): void;
|
12632 | /**
|
12633 | * Starts the timer. Returns the current time, based on `Performance.now()`.
|
12634 | */
|
12635 | start(): number;
|
12636 | /**
|
12637 | * Stops the timer. Requires that the timer has started.
|
12638 | */
|
12639 | stop(): number;
|
12640 | /**
|
12641 | * Samples the timer. Requires that the timer has started.
|
12642 | *
|
12643 | * @returns the current timer value; `-1` if statistics are disabled.
|
12644 | */
|
12645 | now(): number;
|
12646 | }
|
12647 |
|
12648 | /**
|
12649 | * Interface that defines the options to configure the sky.
|
12650 | */
|
12651 | export declare type Sky = GradientSky | CubemapSky;
|
12652 |
|
12653 | export declare type SolidLineStyle = BaseStyle<"solid-line" | "dashed-line", SolidLineTechniqueParams>;
|
12654 |
|
12655 | /**
|
12656 | * Runtime representation of [[SolidLineStyle]] as parsed by [[StyleSetEvaluator]].
|
12657 | * For technique parameters see [[SolidLineTechniqueParams]].
|
12658 | */
|
12659 | export declare interface SolidLineTechnique extends MakeTechniqueAttrs<SolidLineTechniqueParams> {
|
12660 | name: "solid-line" | "dashed-line";
|
12661 | }
|
12662 |
|
12663 | /** @internal */
|
12664 | export declare const solidLineTechniqueDescriptor: TechniqueDescriptor<SolidLineTechnique>;
|
12665 |
|
12666 | /**
|
12667 | * Declares a a geometry as a solid line.
|
12668 | */
|
12669 | export declare interface SolidLineTechniqueParams extends BaseTechniqueParams, PolygonalTechniqueParams {
|
12670 | /**
|
12671 | * Color of a line in hexadecimal or CSS-style notation, for example: `"#e4e9ec"`, `"#fff"`,
|
12672 | * `"rgb(255, 0, 0)"`, or `"hsl(35, 11%, 88%)"`.
|
12673 | * @format color-hex
|
12674 | */
|
12675 | color: DynamicProperty<StyleColor>;
|
12676 | /**
|
12677 | * Color of a line outline in hexadecimal or CSS-style notation,
|
12678 | * for example: `"#e4e9ec"`, `"#fff"`, `"rgb(255, 0, 0)"`, or `"hsl(35, 11%, 88%)"`.
|
12679 | * @format color-hex
|
12680 | */
|
12681 | outlineColor?: DynamicProperty<StyleColor>;
|
12682 | /**
|
12683 | * Set to `true` if line should appear transparent. Rendering transparent lines may come with a
|
12684 | * slight performance impact.
|
12685 | */
|
12686 | transparent?: boolean;
|
12687 | /**
|
12688 | * For transparent lines, set a value between `0.0` for fully transparent, to `1.0` for fully
|
12689 | * opaque.
|
12690 | */
|
12691 | opacity?: DynamicProperty<number>;
|
12692 | /**
|
12693 | * @deprecated Specify metrics units as part of the value instead.
|
12694 | * Units in which different size properties are specified. Either `Meter` (default) or `Pixel`.
|
12695 | */
|
12696 | metricUnit?: string;
|
12697 | /**
|
12698 | * Width of a line in `metricUnit` for different zoom levels.
|
12699 | */
|
12700 | lineWidth: DynamicProperty<StyleLength>;
|
12701 | /**
|
12702 | * Outline width of a line in `metricUnit`s for different zoom levels.
|
12703 | */
|
12704 | outlineWidth?: DynamicProperty<StyleLength>;
|
12705 | /**
|
12706 | * Clip the line outside the tile if `true`.
|
12707 | */
|
12708 | clipping?: DynamicProperty<boolean>;
|
12709 | /**
|
12710 | * Describes line caps type (`"None"`, `"Round"`, `"Square"`, `"TriangleOut"`, `"TriangleIn"`).
|
12711 | * Default is `"Round"`.
|
12712 | */
|
12713 | caps?: DynamicProperty<LineCaps>;
|
12714 | /**
|
12715 | * Color of secondary line geometry in hexadecimal or CSS-style notation, for example:
|
12716 | * `"#e4e9ec"`, `"#fff"`, `"rgb(255, 0, 0)"`, or `"hsl(35, 11%, 88%)"`.
|
12717 | * @format color-hex
|
12718 | */
|
12719 | secondaryColor?: DynamicProperty<StyleColor>;
|
12720 | /**
|
12721 | * Width of secondary line geometry in `metricUnit`s for different zoom levels.
|
12722 | */
|
12723 | secondaryWidth?: DynamicProperty<StyleLength>;
|
12724 | /**
|
12725 | * The render order of the secondary line geometry object created using this technique.
|
12726 | */
|
12727 | secondaryRenderOrder?: DynamicProperty<number>;
|
12728 | /**
|
12729 | * Describes secondary line caps type (`"None"`, `"Round"`, `"Square"`, `"TriangleOut"`,
|
12730 | * `"TriangleIn"`).
|
12731 | * Default is `"Round"`.
|
12732 | */
|
12733 | secondaryCaps?: DynamicProperty<LineCaps>;
|
12734 | /**
|
12735 | * Describes the category of the secondary geometry object created using this technique.
|
12736 | */
|
12737 | secondaryCategory?: DynamicProperty<string>;
|
12738 | /**
|
12739 | * Describes the starting drawing position for the line (in the range [0...1]).
|
12740 | * Default is `0.0`.
|
12741 | */
|
12742 | drawRangeStart?: number;
|
12743 | /**
|
12744 | * Describes the ending drawing position for the line (in the range [0...1]).
|
12745 | * Default is `1.0`.
|
12746 | */
|
12747 | drawRangeEnd?: number;
|
12748 | /**
|
12749 | * Describes line dash type (`"Round"`, `"Square"`, `"Diamond"`).
|
12750 | * Default is `"Square"`.
|
12751 | */
|
12752 | dashes?: DynamicProperty<LineDashes>;
|
12753 | /**
|
12754 | * Color of a line dashes in hexadecimal or CSS-style notation,
|
12755 | * for example: `"#e4e9ec"`, `"#fff"`, `"rgb(255, 0, 0)"`, or `"hsl(35, 11%, 88%)"`.
|
12756 | * @format color-hex
|
12757 | */
|
12758 | dashColor?: DynamicProperty<StyleColor>;
|
12759 | /**
|
12760 | * Length of a line in meters for different zoom levels.
|
12761 | */
|
12762 | dashSize?: DynamicProperty<StyleLength>;
|
12763 | /**
|
12764 | * Size of a gap between lines in meters for different zoom levels.
|
12765 | */
|
12766 | gapSize?: DynamicProperty<StyleLength>;
|
12767 | /**
|
12768 | * Size in world units how far to offset the line perpendicular to its direction.
|
12769 | */
|
12770 | offset?: DynamicProperty<number>;
|
12771 | }
|
12772 |
|
12773 | export declare const sphereProjection: Projection;
|
12774 |
|
12775 | /**
|
12776 | * Point object that implements the raycasting of squares in screen space.
|
12777 | */
|
12778 | export declare class Squares extends MapViewPoints {
|
12779 | /** @override */
|
12780 | testPoint(point: THREE_2.Vector3, screenPosition: THREE_2.Vector2, pickCoordinates: THREE_2.Vector2, index: number, distance: number, intersects: THREE_2.Intersection[]): void;
|
12781 | }
|
12782 |
|
12783 | /**
|
12784 | * Render feature as set of squares rendered in screen space.
|
12785 | *
|
12786 | * @see [[PointTechniqueParams]].
|
12787 | */
|
12788 | export declare type SquaresStyle = BaseStyle<"squares", PointTechniqueParams>;
|
12789 |
|
12790 | /**
|
12791 | * Runtime representation of [[SquaresStyle]] as parsed by [[StyleSetEvaluator]].
|
12792 | * For technique parameters see [[PointTechniqueParams]].
|
12793 | */
|
12794 | export declare interface SquaresTechnique extends MakeTechniqueAttrs<PointTechniqueParams> {
|
12795 | name: "squares";
|
12796 | }
|
12797 |
|
12798 | /** @internal */
|
12799 | export declare const squaresTechniquePropTypes: TechniqueDescriptor<SquaresTechnique>;
|
12800 |
|
12801 | export declare type StandardExtrudedLineStyle = BaseStyle<"extruded-line", StandardExtrudedLineTechniqueParams>;
|
12802 |
|
12803 | /**
|
12804 | * Runtime representation of [[StandardExtrudedLineStyle]] as parsed by [[StyleSetEvaluator]].
|
12805 | * For technique parameters see [[StandardExtrudedLineTechniqueParams]].
|
12806 | */
|
12807 | export declare interface StandardExtrudedLineTechnique extends MakeTechniqueAttrs<StandardExtrudedLineTechniqueParams> {
|
12808 | name: "extruded-line";
|
12809 | }
|
12810 |
|
12811 | /**
|
12812 | * Declares a a geometry as a standard extruded line.
|
12813 | */
|
12814 | export declare interface StandardExtrudedLineTechniqueParams extends StandardTechniqueParams, PolygonalTechniqueParams {
|
12815 | /**
|
12816 | * A value determining the shading technique. Valid values are `"basic"` and `"standard"`.
|
12817 | * Default is `"basic"`.
|
12818 | *
|
12819 | * `"basic"` : Simple shading, faster to render. Only simple color and opacity are effective.
|
12820 | * `"standard"` : Elaborate shading, with metalness, and roughness.
|
12821 | */
|
12822 | shading: "standard";
|
12823 | /**
|
12824 | * Width of a line in meters for different zoom levels.
|
12825 | */
|
12826 | lineWidth: DynamicProperty<number>;
|
12827 | /**
|
12828 | * Style of both end caps. Possible values: `"None"`, `"Circle"`. A value of undefined maps to
|
12829 | * `"Circle"`.
|
12830 | */
|
12831 | caps?: DynamicProperty<"None" | "Circle">;
|
12832 | }
|
12833 |
|
12834 | /**
|
12835 | * Standard kinds of geometry.
|
12836 | */
|
12837 | export declare enum StandardGeometryKind {
|
12838 | /**
|
12839 | * Used in the enabledKinds/disabledKinds filter to match any kind.
|
12840 | */
|
12841 | All = "_all_",
|
12842 | /**
|
12843 | * Background geometry.
|
12844 | */
|
12845 | Background = "background",
|
12846 | /**
|
12847 | * Terrain geometry.
|
12848 | */
|
12849 | Terrain = "terrain",
|
12850 | /**
|
12851 | * Default value for the FillTechnique.
|
12852 | */
|
12853 | Area = "area",
|
12854 | /**
|
12855 | * Default value for all line techniques.
|
12856 | */
|
12857 | Line = "line",
|
12858 | /**
|
12859 | * Default value for the FillTechnique.
|
12860 | */
|
12861 | Water = "water",
|
12862 | /**
|
12863 | * Political borders.
|
12864 | */
|
12865 | Border = "border",
|
12866 | /**
|
12867 | * Basis for all roads.
|
12868 | */
|
12869 | Road = "road",
|
12870 | /**
|
12871 | * Default value for the ExtrudedPolygonTechnique.
|
12872 | */
|
12873 | Building = "building",
|
12874 | /**
|
12875 | * Default value for the TextTechnique, LineMarkerTechnique and the PoiTechnique.
|
12876 | */
|
12877 | Label = "label",
|
12878 | /**
|
12879 | * Anything that may show up last.
|
12880 | */
|
12881 | Detail = "detail"
|
12882 | }
|
12883 |
|
12884 | export declare type StandardStyle = BaseStyle<"standard", StandardTechniqueParams>;
|
12885 |
|
12886 | /**
|
12887 | * Technique used to render a mesh geometry.
|
12888 | * For technique parameters see [[StandardTechniqueParams]].
|
12889 | */
|
12890 | export declare interface StandardTechnique extends MakeTechniqueAttrs<StandardTechniqueParams> {
|
12891 | name: "standard";
|
12892 | }
|
12893 |
|
12894 | /**
|
12895 | * Standard technique parameters.
|
12896 | */
|
12897 | export declare interface StandardTechniqueParams extends BaseTechniqueParams {
|
12898 | /**
|
12899 | * Color of the feature in hexadecimal or CSS-style notation, for example: `"#e4e9ec"`,
|
12900 | * `"#fff"`, `"rgb(255, 0, 0)"`, or `"hsl(35, 11%, 88%)"`.
|
12901 | * See https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.color.
|
12902 | * @format color-hex
|
12903 | */
|
12904 | color?: DynamicProperty<StyleColor>;
|
12905 | /**
|
12906 | * A value of `true` creates a wireframe geometry. (May not be supported with all techniques).
|
12907 | * See https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.wireframe.
|
12908 | */
|
12909 | wireframe?: boolean;
|
12910 | /**
|
12911 | * If `vertexColors` is `true`, every vertex has color information, which is interpolated
|
12912 | * between vertices.
|
12913 | * See https://threejs.org/docs/#api/en/materials/Material.vertexColors.
|
12914 | */
|
12915 | vertexColors?: boolean;
|
12916 | /**
|
12917 | * How rough the material appears. `0.0` means a smooth mirror reflection. `1.0` means fully
|
12918 | * diffuse. Default is `1.0`.
|
12919 | * See https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness.
|
12920 | */
|
12921 | roughness?: DynamicProperty<number>;
|
12922 | /**
|
12923 | * How much the material is like a metal. Nonmetallic materials such as wood or stone use `0.0`,
|
12924 | * metallic ones use `1.0`, with nothing (usually) in between. Default is `0.0`. A value between
|
12925 | * `0.0` and `1.0` can be used for a rusty metal look. If `metalnessMap` is also provided, both
|
12926 | * values are multiplied.
|
12927 | * See https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness.
|
12928 | */
|
12929 | metalness?: DynamicProperty<number>;
|
12930 | /**
|
12931 | * The material will not be rendered if the opacity is lower than this value.
|
12932 | * See https://threejs.org/docs/#api/en/materials/Material.alphaTest.
|
12933 | */
|
12934 | alphaTest?: DynamicProperty<number>;
|
12935 | /**
|
12936 | * Skip rendering clobbered pixels.
|
12937 | * See https://threejs.org/docs/#api/en/materials/Material.depthTest.
|
12938 | */
|
12939 | depthTest?: boolean;
|
12940 | /**
|
12941 | * Set to 'true' if line should appear transparent. Rendering transparent lines may come with a
|
12942 | * slight performance impact.
|
12943 | * See https://threejs.org/docs/#api/en/materials/Material.transparent.
|
12944 | */
|
12945 | transparent?: boolean;
|
12946 | /**
|
12947 | * For transparent lines, set a value between 0.0 for totally transparent, to 1.0 for totally
|
12948 | * opaque.
|
12949 | * See https://threejs.org/docs/#api/en/materials/Material.opacity.
|
12950 | */
|
12951 | opacity?: DynamicProperty<number>;
|
12952 | /**
|
12953 | * Emissive (light) color of the material, essentially a solid color unaffected by other
|
12954 | * lighting. Default is black.
|
12955 | * See https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.emissive.
|
12956 | * @format color-hex
|
12957 | */
|
12958 | emissive?: DynamicProperty<StyleColor>;
|
12959 | /**
|
12960 | * Intensity of the emissive light. Modulates the emissive color. Default is `1`.
|
12961 | * See https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.emissiveIntensity.
|
12962 | */
|
12963 | emissiveIntensity?: DynamicProperty<number>;
|
12964 | /**
|
12965 | * The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of
|
12966 | * the material. It is used with environment mapping modes `THREE.CubeRefractionMapping` and
|
12967 | * `THREE.EquirectangularRefractionMapping`. The refraction ratio should not exceed `1`. Default
|
12968 | * is `0.98`.
|
12969 | * See https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.refractionRatio.
|
12970 | */
|
12971 | refractionRatio?: DynamicProperty<number>;
|
12972 | /**
|
12973 | * Whether and how texture coordinates should be generated. No texture coordinates are
|
12974 | * generated if `undefined`.
|
12975 | * Should be set if any texture assigned (e.g. `map`, `normalMap`, ...).
|
12976 | */
|
12977 | textureCoordinateType?: TextureCoordinateType;
|
12978 | map?: string | TextureBuffer;
|
12979 | mapProperties?: TextureProperties;
|
12980 | /**
|
12981 | * URL or texture buffer that should be used as normal map. See:
|
12982 | * https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.normalMap
|
12983 | */
|
12984 | normalMap?: string | TextureBuffer;
|
12985 | normalMapType?: number;
|
12986 | normalMapProperties?: TextureProperties;
|
12987 | /**
|
12988 | * URL or texture buffer that should be used as displacement map. See:
|
12989 | * https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.displacementMap
|
12990 | */
|
12991 | displacementMap?: string | TextureBuffer;
|
12992 | displacementMapProperties?: TextureProperties;
|
12993 | /**
|
12994 | * URL or texture buffer that should be used as roughness map. See:
|
12995 | * https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughnessMap
|
12996 | */
|
12997 | roughnessMap?: string | TextureBuffer;
|
12998 | roughnessMapProperties?: TextureProperties;
|
12999 | /**
|
13000 | * URL or texture buffer that should be used as emissive map. See:
|
13001 | * https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.emissiveMap
|
13002 | */
|
13003 | emissiveMap?: string | TextureBuffer;
|
13004 | emissiveMapProperties?: TextureProperties;
|
13005 | /**
|
13006 | * URL or texture buffer that should be used as bump map. See:
|
13007 | * https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.bumpMap
|
13008 | */
|
13009 | bumpMap?: string | TextureBuffer;
|
13010 | bumpMapProperties?: TextureProperties;
|
13011 | /**
|
13012 | * URL or texture buffer that should be used as metalness map. See:
|
13013 | * https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalnessMap
|
13014 | */
|
13015 | metalnessMap?: string | TextureBuffer;
|
13016 | metalnessMapProperties?: TextureProperties;
|
13017 | /**
|
13018 | * URL or texture buffer that should be used as alpha map. See:
|
13019 | * https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.alphaMap
|
13020 | */
|
13021 | alphaMap?: string | TextureBuffer;
|
13022 | alphaMapProperties?: TextureProperties;
|
13023 | }
|
13024 |
|
13025 | /**
|
13026 | * Manages a set of timers. The main objective of `Statistics` is to log these timers. You can
|
13027 | * disable statistics to minimize their impact on performance.
|
13028 | */
|
13029 | export declare class Statistics {
|
13030 | name?: string | undefined;
|
13031 | enabled: boolean;
|
13032 | private timers;
|
13033 | private nullTimer;
|
13034 | /**
|
13035 | * Sets up a group of timers.
|
13036 | *
|
13037 | * @param name - The statistics name, for logging purposes.
|
13038 | * @param enabled - If `false`, the timers do not measure the performance.
|
13039 | */
|
13040 | constructor(name?: string | undefined, enabled?: boolean);
|
13041 | /**
|
13042 | * Adds a timer, based on the name specified.
|
13043 | *
|
13044 | * @param name - The timer's name; must be unique.
|
13045 | */
|
13046 | createTimer(name: string, keepSamples?: boolean): Timer;
|
13047 | /**
|
13048 | * Adds the timer specified.
|
13049 | *
|
13050 | * @param timer - The timer's name, which must be unique within this statistics object.
|
13051 | */
|
13052 | addTimer(timer: Timer): Timer;
|
13053 | /**
|
13054 | * Gets a timer by name.
|
13055 | *
|
13056 | * @param name - The timer's name.
|
13057 | */
|
13058 | getTimer(name: string): Timer;
|
13059 | /**
|
13060 | * Checks if a timer with the specified name already exists.
|
13061 | *
|
13062 | * @param name - The timer's name.
|
13063 | * @returns `true` if a timer with `name` already exists; `false` otherwise.
|
13064 | */
|
13065 | hasTimer(name: string): boolean;
|
13066 | /**
|
13067 | * Resets all timers.
|
13068 | */
|
13069 | reset(): void;
|
13070 | /**
|
13071 | * Prints all values to the console.
|
13072 | *
|
13073 | * @param header - Optional header line.
|
13074 | * @param footer - Optional footer line.
|
13075 | */
|
13076 | log(header?: string, footer?: string): void;
|
13077 | }
|
13078 |
|
13079 | /**
|
13080 | * Simple statistics about the values in an array.
|
13081 | */
|
13082 | export declare interface Stats {
|
13083 | /**
|
13084 | * The lowest value in the array.
|
13085 | */
|
13086 | min: number;
|
13087 | /**
|
13088 | * The highest value in the array.
|
13089 | */
|
13090 | max: number;
|
13091 | /**
|
13092 | * The average duration of all values in the array.
|
13093 | */
|
13094 | avg: number;
|
13095 | /**
|
13096 | * The median duration of all values in the array.
|
13097 | */
|
13098 | median: number;
|
13099 | /**
|
13100 | * The 75th percentile median of all values in the array.
|
13101 | */
|
13102 | median75: number;
|
13103 | /**
|
13104 | * The 90th percentile median of all values in the array.
|
13105 | */
|
13106 | median90: number;
|
13107 | /**
|
13108 | * The 95th percentile median of all values in the array.
|
13109 | */
|
13110 | median95: number;
|
13111 | /**
|
13112 | * The 97th percentile median of all values in the array.
|
13113 | */
|
13114 | median97: number;
|
13115 | /**
|
13116 | * The 99th percentile median of all values in the array.
|
13117 | */
|
13118 | median99: number;
|
13119 | /**
|
13120 | * The 99.9th percentile median of all values in the array.
|
13121 | */
|
13122 | median999: number;
|
13123 | /**
|
13124 | * The number of values in the array.
|
13125 | */
|
13126 | numSamples: number;
|
13127 | }
|
13128 |
|
13129 | /**
|
13130 | * A node representing a `step` expression.
|
13131 | */
|
13132 | export declare class StepExpr extends Expr {
|
13133 | readonly input: Expr;
|
13134 | readonly defaultValue: Expr;
|
13135 | readonly stops: Array<[number, Expr]>;
|
13136 | constructor(input: Expr, defaultValue: Expr, stops: Array<[number, Expr]>);
|
13137 | /** @override */
|
13138 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
13139 | /** @override */
|
13140 | protected exprIsDynamic(): boolean;
|
13141 | }
|
13142 |
|
13143 | /**
|
13144 | * Array of all supported [[StringEncodedNumeralFormat]]s describing color data.
|
13145 | * @internal
|
13146 | */
|
13147 | export declare const StringEncodedColorFormats: StringEncodedNumeralFormat[];
|
13148 |
|
13149 | /**
|
13150 | * Array of all supported [[StringEncodedNumeralFormat]]s describing sizes, lengths and distances.
|
13151 | * @internal
|
13152 | */
|
13153 | export declare const StringEncodedMetricFormats: StringEncodedNumeralFormat[];
|
13154 |
|
13155 | /**
|
13156 | * Interface containing information about a [[StringEncodedNumeral]] format, component size and
|
13157 | * evaluation.
|
13158 | * @internal
|
13159 | */
|
13160 | export declare interface StringEncodedNumeralFormat {
|
13161 | readonly type: StringEncodedNumeralType;
|
13162 | readonly size: number;
|
13163 | readonly regExp: RegExp;
|
13164 | mask?: number;
|
13165 | decoder: (encodedValue: string, target: number[]) => boolean;
|
13166 | }
|
13167 |
|
13168 | /**
|
13169 | * @internal
|
13170 | */
|
13171 | export declare const StringEncodedNumeralFormatMaxSize: number;
|
13172 |
|
13173 | /**
|
13174 | * Array of supported [[StringEncodedNumeralFormat]]s (intended to be indexed with
|
13175 | * [[StringEncodedNumeralType]] enum).
|
13176 | * @internal
|
13177 | */
|
13178 | export declare const StringEncodedNumeralFormats: StringEncodedNumeralFormat[];
|
13179 |
|
13180 | /**
|
13181 | * Enumeration of supported string encoded numerals.
|
13182 | * @internal
|
13183 | */
|
13184 | export declare enum StringEncodedNumeralType {
|
13185 | Meters = 0,
|
13186 | Pixels = 1,
|
13187 | Hex = 2
|
13188 | }
|
13189 |
|
13190 | /**
|
13191 | * String literal expression.
|
13192 | */
|
13193 | export declare class StringLiteralExpr extends LiteralExpr {
|
13194 | readonly value: string;
|
13195 | private m_promotedValue?;
|
13196 | constructor(value: string);
|
13197 | /**
|
13198 | * Returns the value of parsing this string as [[RGBA]] or [[Pixels]] constant.
|
13199 | */
|
13200 | get promotedValue(): RGBA | Pixels | undefined;
|
13201 | /** @override */
|
13202 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
13203 | }
|
13204 |
|
13205 | export declare type Style = SquaresStyle | CirclesStyle | PoiStyle | LineMarkerStyle | LineStyle | SegmentsStyle | SolidLineStyle | LabelRejectionLineStyle | FillStyle | StandardStyle | BasicExtrudedLineStyle | StandardExtrudedLineStyle | ExtrudedPolygonStyle | ShaderStyle | TerrainStyle | TextTechniqueStyle | NoneStyle;
|
13206 |
|
13207 | /**
|
13208 | * Color literals.
|
13209 | *
|
13210 | * @remarks
|
13211 | * Description of colors inside a style. Supports hex values as well as CSS hex, rgb and hsl values
|
13212 | * (i.e. `0xffffff`, `#f00fab`, `#aaa`, `rgb(255, 0 120)`, `hsl(360, 100%, 100%)`, etc.).
|
13213 | */
|
13214 | export declare type StyleColor = string | number;
|
13215 |
|
13216 | /**
|
13217 | * Compound type that merges all raw [Style] with selector arguments from [BaseSelector], optionally
|
13218 | * a [[Reference]].
|
13219 | */
|
13220 | export declare type StyleDeclaration = (Style & StyleSelector) | JsonExpr;
|
13221 |
|
13222 | /**
|
13223 | * Length literals.
|
13224 | *
|
13225 | * @remarks
|
13226 | * Description of length units inside a style. Supports literal values (interpreted as `m`), `m` and
|
13227 | * `px`(i.e. `80`, `14px`, `0.6m`, etc.).
|
13228 | */
|
13229 | export declare type StyleLength = string | number;
|
13230 |
|
13231 | /**
|
13232 | * A type representing symbolic render orders.
|
13233 | */
|
13234 | export declare interface StylePriority {
|
13235 | /**
|
13236 | * The group of this [[StylePriority]].
|
13237 | */
|
13238 | group: string;
|
13239 | /**
|
13240 | * The category of this [[StylePriority]].
|
13241 | */
|
13242 | category?: string;
|
13243 | }
|
13244 |
|
13245 | /**
|
13246 | * A dictionary of [[StyleSet]]s.
|
13247 | */
|
13248 | export declare interface Styles {
|
13249 | [styleSetName: string]: StyleSet;
|
13250 | }
|
13251 |
|
13252 | /**
|
13253 | * Base [StyleSelector] attributes required to match [Style] object against given feature.
|
13254 | *
|
13255 | * Contains [Style]'s members related to feature matching in [[StyleSetEvaluator]].
|
13256 | */
|
13257 | export declare interface StyleSelector {
|
13258 | /**
|
13259 | * Condition when this style rule applies.
|
13260 | *
|
13261 | * @remarks
|
13262 | * Condition that is applied to feature properties to check if given [[Style]] this feature
|
13263 | * should emit geometry of this style.
|
13264 | */
|
13265 | when: string | JsonExpr;
|
13266 | /**
|
13267 | * The layer containing the carto features processed by this style rule.
|
13268 | */
|
13269 | layer?: string;
|
13270 | /**
|
13271 | * Optional. If `true`, no more matching styles will be evaluated.
|
13272 | */
|
13273 | final?: boolean;
|
13274 | }
|
13275 |
|
13276 | /**
|
13277 | * An array of [[StyleSelector]]s that are used together to define how a [[DataSource]] should be
|
13278 | * rendered. `StyleSet`s are applied to sources providing vector tiles via their method
|
13279 | * `setStyleSet`. This is also handle internally when a whole theme is passed to a [[MapView]] via
|
13280 | * `mapview.theme`.
|
13281 | */
|
13282 | export declare type StyleSet = StyleDeclaration[];
|
13283 |
|
13284 | /**
|
13285 | * Interface representing a `SubdivisionScheme`.
|
13286 | */
|
13287 | export declare interface SubdivisionScheme {
|
13288 | /**
|
13289 | * Returns the number of columns for the given level.
|
13290 | *
|
13291 | * @param level - The level.
|
13292 | */
|
13293 | getSubdivisionX(level: number): number;
|
13294 | /**
|
13295 | * Returns the number of rows for the given level.
|
13296 | *
|
13297 | * @param level - The level.
|
13298 | */
|
13299 | getSubdivisionY(level: number): number;
|
13300 | /**
|
13301 | * Returns the width of the partitions at the given level.
|
13302 | *
|
13303 | * @param level - The level.
|
13304 | */
|
13305 | getLevelDimensionX(level: number): number;
|
13306 | /**
|
13307 | * Returns the height of the partitions at the given level.
|
13308 | *
|
13309 | * @param level - The level.
|
13310 | */
|
13311 | getLevelDimensionY(level: number): number;
|
13312 | }
|
13313 |
|
13314 | export declare class SubTiles implements Iterable<TileKey> {
|
13315 | tileKey: TileKey;
|
13316 | sizeX: number;
|
13317 | sizeY: number;
|
13318 | constructor(tileKey: TileKey, sizeX: number, sizeY: number);
|
13319 | [Symbol.iterator](): Iterator<TileKey>;
|
13320 | }
|
13321 |
|
13322 | export declare namespace SubTiles {
|
13323 | export function RowColumnIterator(parentKey: TileKey, sizeX: number, sizeY: number): Iterator<TileKey>;
|
13324 | export function ZCurveIterator(parentKey: TileKey): Iterator<TileKey>;
|
13325 | }
|
13326 |
|
13327 | /**
|
13328 | * Possible techniques that can be used to draw a geometry on the map.
|
13329 | */
|
13330 | export declare type Technique = SquaresTechnique | CirclesTechnique | PoiTechnique | LineMarkerTechnique | LineTechnique | SegmentsTechnique | SolidLineTechnique | FillTechnique | StandardTechnique | TerrainTechnique | BasicExtrudedLineTechnique | StandardExtrudedLineTechnique | ExtrudedPolygonTechnique | ShaderTechnique | TextTechnique | LabelRejectionLineTechnique;
|
13331 |
|
13332 | declare type TechniqueByName<K extends Technique["name"]> = OneThatMatches<Technique, {
|
13333 | name: K;
|
13334 | }>;
|
13335 |
|
13336 | declare interface TechniqueDescriptor<T> {
|
13337 | attrTransparencyColor?: string;
|
13338 | attrScopes: TechniquePropScopes<T>;
|
13339 | }
|
13340 |
|
13341 | declare type TechniqueDescriptorRegistry = {
|
13342 | [P in Technique["name"]]?: TechniqueDescriptor<TechniqueByName<P>>;
|
13343 | };
|
13344 |
|
13345 | /** @internal */
|
13346 | export declare const techniqueDescriptors: TechniqueDescriptorRegistry;
|
13347 |
|
13348 | declare interface TechniqueEntry {
|
13349 | technique: Technique;
|
13350 | material: THREE_2.Material;
|
13351 | }
|
13352 |
|
13353 | /**
|
13354 | * Extract property names from [[Technique]]-like interface (excluding `name`) as union of string
|
13355 | * literals.
|
13356 | *
|
13357 | * TechniquePropName<Base
|
13358 | *
|
13359 | */
|
13360 | declare type TechniquePropNames<T> = T extends {
|
13361 | name: any;
|
13362 | } ? keyof Omit<T, "name"> : keyof T;
|
13363 |
|
13364 | declare type TechniquePropScopes<T> = {
|
13365 | [P in TechniquePropNames<T>]?: AttrScope;
|
13366 | };
|
13367 |
|
13368 | export declare type TerrainStyle = BaseStyle<"terrain", TerrainTechniqueParams>;
|
13369 |
|
13370 | /**
|
13371 | * Technique used to render a terrain geometry with textures.
|
13372 | * For technique parameters see [[TerrainTechniqueParams]].
|
13373 | */
|
13374 | export declare interface TerrainTechnique extends MakeTechniqueAttrs<TerrainTechniqueParams> {
|
13375 | name: "terrain";
|
13376 | }
|
13377 |
|
13378 | /**
|
13379 | * Technique used to render a terrain geometry with a texture.
|
13380 | * When using this technique, the datasource will produce texture coordinates in
|
13381 | * local tile space (i.e. [0,0] at south-west and [1,1] at north-east tile corner).
|
13382 | */
|
13383 | export declare interface TerrainTechniqueParams extends StandardTechniqueParams {
|
13384 | /**
|
13385 | * Colors to be applied at different heights (as a results of a `displacementMap`).
|
13386 | */
|
13387 | heightBasedColors?: HeightBasedColors;
|
13388 | /**
|
13389 | * If `heightBasedColors` is defined, this value defines the interpolation method used to
|
13390 | * generate the height-based gradient texture (defaults to `Discrete`).
|
13391 | */
|
13392 | heightGradientInterpolation?: "Discrete" | "Linear" | "Cubic";
|
13393 | /**
|
13394 | * If `heightBasedColors` is defined, this value defines the width (in pixels) of the generated
|
13395 | * gradient texture (defaults to `128`).
|
13396 | */
|
13397 | heightGradientWidth?: number;
|
13398 | }
|
13399 |
|
13400 | /**
|
13401 | * Optional parameters passed on [[TextCanvas]].`addTextBufferObject` function call.
|
13402 | */
|
13403 | declare interface TextBufferAdditionParameters {
|
13404 | layer?: number;
|
13405 | position?: THREE_2.Vector3;
|
13406 | scale?: number;
|
13407 | rotation?: number;
|
13408 | color?: THREE_2.Color;
|
13409 | opacity?: number;
|
13410 | backgroundColor?: THREE_2.Color;
|
13411 | backgroundOpacity?: number;
|
13412 | pickingData?: any;
|
13413 | }
|
13414 |
|
13415 | /**
|
13416 | * Optional parameters passed on [[TextCanvas]].`createTextBufferObject` function call.
|
13417 | */
|
13418 | declare interface TextBufferCreationParameters {
|
13419 | /**
|
13420 | * Path where text should be placed on. Overrides the original position parameter.
|
13421 | */
|
13422 | path?: THREE_2.Path | THREE_2.CurvePath<THREE_2.Vector2>;
|
13423 | /**
|
13424 | * If `true`, text on a path will be placed even when its size its bigger than the path's size.
|
13425 | */
|
13426 | pathOverflow?: boolean;
|
13427 | /**
|
13428 | * Output text bounding-box.
|
13429 | */
|
13430 | outputBounds?: boolean;
|
13431 | /**
|
13432 | * Output per-character bounds.
|
13433 | */
|
13434 | outputCharacterBounds?: boolean;
|
13435 | /**
|
13436 | * Array containing info on whether the glyphs are upper or lower case. Needed to support
|
13437 | * `SmallCaps`.
|
13438 | */
|
13439 | letterCaseArray?: boolean[];
|
13440 | /**
|
13441 | * If `true`, both the [[TextRenderStyle]] and [[TextLayoutStyle]] used to generate the
|
13442 | * [[TextBufferObject]] will be stored in it.
|
13443 | */
|
13444 | storeStyles?: boolean;
|
13445 | }
|
13446 |
|
13447 | /**
|
13448 | * Object containing vertex buffer data generated by [[TextCanvas]].
|
13449 | */
|
13450 | declare class TextBufferObject {
|
13451 | readonly glyphs: GlyphData[];
|
13452 | readonly buffer: Float32Array;
|
13453 | readonly bounds?: THREE_2.Box2 | undefined;
|
13454 | readonly characterBounds?: THREE_2.Box2[] | undefined;
|
13455 | readonly textRenderStyle?: TextRenderStyle | undefined;
|
13456 | readonly textLayoutStyle?: TextLayoutStyle | undefined;
|
13457 | /**
|
13458 | * Constructs a new `TextBufferObject`.
|
13459 | *
|
13460 | * @param glyphs - Input glyphs.
|
13461 | * @param buffer - Buffer containing the data generated by [[TextCanvas]].
|
13462 | * @param bounds - Optional text bounds.
|
13463 | * @param characterBounds - Optional character bounds.
|
13464 | * @param textRenderStyle - [[TextRenderStyle]] applied by [[TextCanvas]].
|
13465 | * @param textLayoutStyle - [[TextLayoutStyle]] applied by [[TextCanvas]].
|
13466 | *
|
13467 | * @returns New `TextBufferObject`.
|
13468 | */
|
13469 | constructor(glyphs: GlyphData[], buffer: Float32Array, bounds?: THREE_2.Box2 | undefined, characterBounds?: THREE_2.Box2[] | undefined, textRenderStyle?: TextRenderStyle | undefined, textLayoutStyle?: TextLayoutStyle | undefined);
|
13470 | }
|
13471 |
|
13472 | /**
|
13473 | * three.js text rendering engine which can manage and render high-quality, transformable, stylable
|
13474 | * and properly layout SDF and MSDF text.
|
13475 | */
|
13476 | declare class TextCanvas {
|
13477 | private static defaultTextRenderStyle;
|
13478 | private static defaultTextLayoutStyle;
|
13479 | /**
|
13480 | * Minimum amount of glyphs each [[TextCanvas]] layer can store.
|
13481 | */
|
13482 | readonly minGlyphCount: number;
|
13483 | /**
|
13484 | * Maximum amount of glyphs each [[TextCanvas]] layer can store.
|
13485 | */
|
13486 | readonly maxGlyphCount: number;
|
13487 | private m_renderer;
|
13488 | private m_fontCatalog;
|
13489 | private m_currentTextRenderStyle;
|
13490 | private m_currentTextLayoutStyle;
|
13491 | private m_material;
|
13492 | private m_bgMaterial;
|
13493 | private m_ownsMaterial;
|
13494 | private m_ownsBgMaterial;
|
13495 | private m_defaultLayer;
|
13496 | private m_layers;
|
13497 | private m_lineTypesetter;
|
13498 | private m_pathTypesetter;
|
13499 | /**
|
13500 | * Constructs a new `TextCanvas`.
|
13501 | *
|
13502 | * @param params - `TextCanvas` construction parameters.
|
13503 | *
|
13504 | * @returns New `TextCanvas`.
|
13505 | */
|
13506 | constructor(params: TextCanvasParameters);
|
13507 | /**
|
13508 | * Currently active [[FontCatalog]].
|
13509 | */
|
13510 | get fontCatalog(): FontCatalog;
|
13511 | set fontCatalog(value: FontCatalog);
|
13512 | /**
|
13513 | * Currently active text rendering material.
|
13514 | */
|
13515 | get material(): THREE_2.Material;
|
13516 | set material(value: THREE_2.Material);
|
13517 | /**
|
13518 | * Currently active text background rendering material.
|
13519 | */
|
13520 | get backgroundMaterial(): THREE_2.Material;
|
13521 | set backgroundMaterial(value: THREE_2.Material);
|
13522 | /**
|
13523 | * Currently active text rendering style.
|
13524 | */
|
13525 | get textRenderStyle(): TextRenderStyle;
|
13526 | set textRenderStyle(style: TextRenderStyle);
|
13527 | /**
|
13528 | * Currently active text layout style.
|
13529 | */
|
13530 | get textLayoutStyle(): TextLayoutStyle;
|
13531 | set textLayoutStyle(style: TextLayoutStyle);
|
13532 | /**
|
13533 | * Clears all the placed glyphs in this `TextCanvas` (as well as resetting the current style).
|
13534 | */
|
13535 | clear(): void;
|
13536 | /**
|
13537 | * Renders the content of this `TextCanvas`.
|
13538 | *
|
13539 | * @param camera - Orthographic camera.
|
13540 | * @param target - Optional render target.
|
13541 | * @param clear - Optional render target clear operation.
|
13542 | */
|
13543 | render(camera: THREE_2.OrthographicCamera, target?: THREE_2.WebGLRenderTarget, clear?: boolean): void;
|
13544 | /**
|
13545 | * Creates a new `TextCanvas` rendering layer and returns. If there was already a layer for the
|
13546 | * input `layerId`, it just returns this one instead.
|
13547 | *
|
13548 | * @param layerId - Desired layer identifier.
|
13549 | *
|
13550 | * @returns Created [[TextCanvasLayer]].
|
13551 | */
|
13552 | addLayer(layerId: number): TextCanvasLayer;
|
13553 | /**
|
13554 | * Retrieves a specific `TextCanvas` rendering layer.
|
13555 | *
|
13556 | * @param layerId - Desired layer identifier.
|
13557 | *
|
13558 | * @returns Selected [[TextCanvasLayer]].
|
13559 | */
|
13560 | getLayer(layerId: number): TextCanvasLayer | undefined;
|
13561 | /**
|
13562 | * Retrieves all `TextCanvas` rendering layers.
|
13563 | *
|
13564 | * @returns Array of [[TextCanvasLayer]]s.
|
13565 | */
|
13566 | getAllLayers(): TextCanvasLayer[];
|
13567 | /**
|
13568 | * Returns the computed bounding box for the input text. The current [[TextRenderStyle]] and
|
13569 | * [[TextLayoutStyle]] will influence the results of this function.
|
13570 | *
|
13571 | * @param text - Input text. Provide an array of [[GlyphData]] for better performance.
|
13572 | * @param outputBounds - Output text bounding box.
|
13573 | * @param params - Optional measurement parameters.
|
13574 | *
|
13575 | * @returns Result of the measurement. If `false`, some error occurred during execution and the
|
13576 | * input text couldn't be properly measured.
|
13577 | */
|
13578 | measureText(text: string | GlyphData[], outputBounds: THREE_2.Box2, params?: MeasurementParameters): boolean;
|
13579 | /**
|
13580 | * Adds the input text to this `TextCanvas` in the specified screen position. The current
|
13581 | * [[TextRenderStyle]] and [[TextLayoutStyle]] will influence the results of this function.
|
13582 | *
|
13583 | * @param text - Input text. Provide an array of [[GlyphData]] for better performance.
|
13584 | * @param position - Screen position.
|
13585 | * @param params - Optional addition parameters.
|
13586 | *
|
13587 | * @returns Result of the addition. If `false`, some error occurred during execution and the
|
13588 | * input text couldn't be properly added.
|
13589 | */
|
13590 | addText(text: string | GlyphData[], position: THREE_2.Vector3, params?: AdditionParameters): boolean;
|
13591 | /**
|
13592 | * Creates a new [[TextBufferObject]]. The computed text vertex buffer is equivalent to the
|
13593 | * result of performing the `addText` function for the input text in the screen origin.
|
13594 | *
|
13595 | * @param text - Input text. Provide an array of [[GlyphData]] for better performance.
|
13596 | * @param params - Optional creation parameters.
|
13597 | *
|
13598 | * @returns New [[TextBufferObject]] (or `undefined` if requested text glyphs couldn't be
|
13599 | * retrieved from the current [[FontCatalog]]).
|
13600 | */
|
13601 | createTextBufferObject(text: string | GlyphData[], params?: TextBufferCreationParameters): TextBufferObject | undefined;
|
13602 | /**
|
13603 | * Adds a previously created [[TextBufferObject]] to the `TextCanvas`. Additional parameters can
|
13604 | * be provided to override the attributes stored in the buffer.
|
13605 | *
|
13606 | * @param textBufferObject - [[TextBufferObject]] to add.
|
13607 | * @param params - Optional addition parameters.
|
13608 | *
|
13609 | * @returns Result of the addition. If `false`, some error occurred during execution and the
|
13610 | * input text couldn't be properly added.
|
13611 | */
|
13612 | addTextBufferObject(textBufferObject: TextBufferObject, params?: TextBufferAdditionParameters): boolean;
|
13613 | /**
|
13614 | * Executes the `pickCallback` for all previously stored picking data for text covering the
|
13615 | * specified screen position.
|
13616 | *
|
13617 | * @param screenPosition - Screen coordinate of picking position.
|
13618 | * @param pickCallback - Callback to be called for every picked element.
|
13619 | */
|
13620 | pickText(position: THREE_2.Vector2, callback: (pickData: any | undefined) => void): void;
|
13621 | /**
|
13622 | * Update the info with the memory footprint caused by objects owned by the `TextCanvas`.
|
13623 | *
|
13624 | * @param info - The info object to increment with the values from this `TextCanvas`.
|
13625 | */
|
13626 | getMemoryUsage(info: MemoryUsage): void;
|
13627 | private placeText;
|
13628 | }
|
13629 |
|
13630 | declare class TextCanvasFactory {
|
13631 | private readonly m_renderer;
|
13632 | private m_minGlyphCount;
|
13633 | private m_maxGlyphCount;
|
13634 | /**
|
13635 | * Creates an instance of text canvas factory.
|
13636 | * @param m_renderer -
|
13637 | */
|
13638 | constructor(m_renderer: THREE.WebGLRenderer);
|
13639 | setGlyphCountLimits(min: number, max: number): void;
|
13640 | /**
|
13641 | * Creates text canvas
|
13642 | * @param fontCatalog - Initial [[FontCatalog]].
|
13643 | */
|
13644 | createTextCanvas(fontCatalog: FontCatalog): TextCanvas;
|
13645 | }
|
13646 |
|
13647 | /**
|
13648 | * [[TextCanvas]] rendering layer.
|
13649 | */
|
13650 | declare interface TextCanvasLayer {
|
13651 | id: number;
|
13652 | storage: TextGeometry_2;
|
13653 | }
|
13654 |
|
13655 | /**
|
13656 | * [[TextCanvas]] construction parameters.
|
13657 | */
|
13658 | declare interface TextCanvasParameters {
|
13659 | /**
|
13660 | * WebGLRenderer internally used by this `TextCanvas`.
|
13661 | */
|
13662 | renderer: THREE_2.WebGLRenderer;
|
13663 | /**
|
13664 | * Initial [[FontCatalog]].
|
13665 | */
|
13666 | fontCatalog: FontCatalog;
|
13667 | /**
|
13668 | * Minimum amount of glyphs each [[TextCanvas]] layer can store.
|
13669 | */
|
13670 | minGlyphCount: number;
|
13671 | /**
|
13672 | * Maximum amount of glyphs each [[TextCanvas]] layer can store.
|
13673 | */
|
13674 | maxGlyphCount: number;
|
13675 | /**
|
13676 | * Material used to render text.
|
13677 | */
|
13678 | material?: THREE_2.Material;
|
13679 | /**
|
13680 | * Material used to render text background.
|
13681 | */
|
13682 | backgroundMaterial?: THREE_2.Material;
|
13683 | }
|
13684 |
|
13685 | declare interface TextCanvasRenderer {
|
13686 | fontCatalog: string;
|
13687 | textCanvas: TextCanvas;
|
13688 | poiRenderer: PoiRenderer;
|
13689 | }
|
13690 |
|
13691 | /**
|
13692 | * `TextElement` is used to create 2D text elements (for example, labels).
|
13693 | */
|
13694 | export declare class TextElement {
|
13695 | readonly text: string;
|
13696 | readonly points: THREE_2.Vector3[] | THREE_2.Vector3;
|
13697 | readonly renderParams: TextRenderParameters | TextRenderStyle;
|
13698 | readonly layoutParams: TextLayoutParameters | TextLayoutStyle;
|
13699 | priority: number;
|
13700 | xOffset: number;
|
13701 | yOffset: number;
|
13702 | featureId?: number | undefined;
|
13703 | style?: string | undefined;
|
13704 | fadeNear?: number | undefined;
|
13705 | fadeFar?: number | undefined;
|
13706 | readonly tileOffset?: number | undefined;
|
13707 | readonly offsetDirection?: number | undefined;
|
13708 | /**
|
13709 | * Text elements with this priority are placed on screen before any others.
|
13710 | */
|
13711 | static readonly HIGHEST_PRIORITY: number;
|
13712 | /**
|
13713 | * Determines visibility. If set to `false`, it will not be rendered.
|
13714 | */
|
13715 | visible: boolean;
|
13716 | /**
|
13717 | * Determines minimum zoom level for visibility. Can be used to reduce the number of visible
|
13718 | * `TextElement`s based on zoom level.
|
13719 | */
|
13720 | minZoomLevel?: number;
|
13721 | /**
|
13722 | * Determines maximum zoom level for visibility. Can be used to reduce the number of visible
|
13723 | * `TextElement`s based on zoom level.
|
13724 | */
|
13725 | maxZoomLevel?: number;
|
13726 | /**
|
13727 | * If `true`, label is allowed to overlap other labels or icons of lower priority.
|
13728 | * @default `false`
|
13729 | */
|
13730 | mayOverlap?: boolean;
|
13731 | /**
|
13732 | * If `true`, label will reserve screen space, other markers of lower priority will not be
|
13733 | * able to overlap.
|
13734 | * @default `true`
|
13735 | */
|
13736 | reserveSpace?: boolean;
|
13737 | /**
|
13738 | * If `true`, the label will always be rendered on top. If overlapping with other labels, the
|
13739 | * render order is undefined;
|
13740 | * @default `false`
|
13741 | */
|
13742 | alwaysOnTop?: boolean;
|
13743 | /**
|
13744 | * Ignore distance limit. Used for label in labeled-icons.
|
13745 | */
|
13746 | ignoreDistance?: boolean;
|
13747 | /**
|
13748 | * Scaling factor of text. Defaults to 0.5, reducing the size ot 50% in the distance.
|
13749 | */
|
13750 | distanceScale: number;
|
13751 | /**
|
13752 | * Optional user data. Will be retrieved during picking.
|
13753 | */
|
13754 | userData?: any;
|
13755 | /**
|
13756 | * If specified, determines the render order between `TextElement`s. The number different
|
13757 | * renderOrders should be as small as possible, because every specific `renderOrder` may result
|
13758 | * in one or more draw calls.
|
13759 | *
|
13760 | * TextElements with the same integer `renderOrder` will be rendered in the same batch.
|
13761 | *
|
13762 | * The `renderOrder` of `TextElement`s are only relative to other `TextElement`s, and not other
|
13763 | * map elements.
|
13764 | *
|
13765 | * A `TextElement` with a higher `renderOrder` will be rendered after a `TextElement` with a
|
13766 | * lower `renderOrder`.
|
13767 | */
|
13768 | renderOrder?: number;
|
13769 | /**
|
13770 | * Specified kind of geometry. One kind is set as default in the technique, and can be
|
13771 | * overridden in the style.
|
13772 | */
|
13773 | kind?: GeometryKind | GeometryKindSet;
|
13774 | /**
|
13775 | * @hidden
|
13776 | * Used during rendering.
|
13777 | */
|
13778 | loadingState?: LoadingState;
|
13779 | /**
|
13780 | * If set to `true` the geometry has been already overlaid on elevation.
|
13781 | */
|
13782 | elevated: boolean;
|
13783 | /**
|
13784 | * @hidden
|
13785 | * Array storing the style {@link @here/harp-text-canvas#GlyphData} for
|
13786 | * this `TextElement` to speed up label placement in
|
13787 | * {@link TextElementsRenderer}. Valid after `loadingState` is `Initialized`.
|
13788 | */
|
13789 | glyphs?: GlyphData[];
|
13790 | /**
|
13791 | * @hidden
|
13792 | * Array storing the casing (`true`: uppercase, `false`: lowercase)
|
13793 | * for this `TextElement`.
|
13794 | * Used by labels in {@link TextElementsRenderer} to support
|
13795 | * `SmallCaps`. Valid after `loadingState`
|
13796 | * is `Initialized`.
|
13797 | */
|
13798 | glyphCaseArray?: boolean[];
|
13799 | /**
|
13800 | * Screen space bounds for this `TextElement`.
|
13801 | *
|
13802 | * @remarks
|
13803 | * Used by point labels in {@link TextElementsRenderer}.
|
13804 | * Valid after `loadingState` is `Initialized`.
|
13805 | */
|
13806 | bounds?: THREE_2.Box2;
|
13807 | /**
|
13808 | * @hidden
|
13809 | * Pre-computed text vertex buffer. Used by point labels in {@link TextElementsRenderer}. Valid
|
13810 | * after label becomes visible for the first time.
|
13811 | */
|
13812 | textBufferObject?: TextBufferObject;
|
13813 | /**
|
13814 | * @hidden
|
13815 | * If `true`, the estimated bounding box of the path is too small for the label to fit, so it is
|
13816 | * being ignored for rendering in the latest frame.
|
13817 | */
|
13818 | dbgPathTooSmall?: boolean;
|
13819 | pathLengthSqr?: number;
|
13820 | /**
|
13821 | * Time to fade in text in milliseconds.
|
13822 | * @default [[DEFAULT_FADE_TIME]] 800
|
13823 | */
|
13824 | textFadeTime?: number;
|
13825 | type: TextElementType;
|
13826 | private m_poiInfo?;
|
13827 | private m_renderStyle?;
|
13828 | private m_layoutStyle?;
|
13829 | /**
|
13830 | * Creates a new `TextElement`.
|
13831 | *
|
13832 | * @param text - The text to display.
|
13833 | * @param points - The position or a list of points for a curved text, both in world space.
|
13834 | * @param renderParams - `TextElement` text rendering parameters.
|
13835 | * @param layoutParams - `TextElement` text layout parameters.
|
13836 | * @param priority - The priority of the `TextElement. Elements with the highest priority get
|
13837 | * placed first, elements with priority of `0` are placed last, elements with a
|
13838 | * negative value are always rendered, ignoring priorities and allowing overrides.
|
13839 | * @param xOffset - Optional X offset of this `TextElement` in screen coordinates.
|
13840 | * @param yOffset - Optional Y offset of this `TextElement` in screen coordinates.
|
13841 | * @param featureId - Optional number to identify feature (originated from `OmvDataSource`).
|
13842 | * @param fadeNear - Distance to the camera (0.0 = camera position, 1.0 = farPlane) at which the
|
13843 | * label starts fading out (opacity decreases).
|
13844 | * @param fadeFar - Distance to the camera (0.0 = camera position, 1.0 = farPlane) at which the
|
13845 | * label becomes transparent. A value of <= 0.0 disables fading.
|
13846 | * @param offsetDirection - Direction represented as an angle in degrees clockwise from north to
|
13847 | * offset the icon in world space.
|
13848 | */
|
13849 | constructor(text: string, points: THREE_2.Vector3[] | THREE_2.Vector3, renderParams: TextRenderParameters | TextRenderStyle, layoutParams: TextLayoutParameters | TextLayoutStyle, priority?: number, xOffset?: number, yOffset?: number, featureId?: number | undefined, style?: string | undefined, fadeNear?: number | undefined, fadeFar?: number | undefined, tileOffset?: number | undefined, offsetDirection?: number | undefined);
|
13850 | /**
|
13851 | * The text element position or the first point of the path used to render a curved text, both
|
13852 | * in world space.
|
13853 | */
|
13854 | get position(): THREE_2.Vector3;
|
13855 | /**
|
13856 | * The list of points in world space used to render the text along a path or `undefined`.
|
13857 | */
|
13858 | get path(): THREE_2.Vector3[] | undefined;
|
13859 | /**
|
13860 | * If `true`, `TextElement` is allowed to overlap other labels or icons of lower priority.
|
13861 | *
|
13862 | * @default `false`
|
13863 | */
|
13864 | get textMayOverlap(): boolean;
|
13865 | set textMayOverlap(mayOverlap: boolean);
|
13866 | /**
|
13867 | * If `true`, `TextElement` will reserve screen space, other markers of lower priority will not
|
13868 | * be able to overlap.
|
13869 | *
|
13870 | * @default `true`
|
13871 | */
|
13872 | get textReservesSpace(): boolean;
|
13873 | set textReservesSpace(reserveSpace: boolean);
|
13874 | /**
|
13875 | * Contains additional information about icon to be rendered along with text.
|
13876 | */
|
13877 | get poiInfo(): PoiInfo | undefined;
|
13878 | set poiInfo(poiInfo: PoiInfo | undefined);
|
13879 | /**
|
13880 | * @returns The style used to render this text element, undefined if not set yet.
|
13881 | */
|
13882 | get renderStyle(): TextRenderStyle | undefined;
|
13883 | /**
|
13884 | * Sets style used for text rendering.
|
13885 | * @param style - The style to use.
|
13886 | */
|
13887 | set renderStyle(style: TextRenderStyle | undefined);
|
13888 | /**
|
13889 | * @returns The style used to layout this text element, undefined if not set yet.
|
13890 | */
|
13891 | get layoutStyle(): TextLayoutStyle | undefined;
|
13892 | /**
|
13893 | * Sets the style used for text layout.
|
13894 | * @param style - The style to use.
|
13895 | */
|
13896 | set layoutStyle(style: TextLayoutStyle | undefined);
|
13897 | hasFeatureId(): boolean;
|
13898 | /**
|
13899 | * Update the minZoomLevel and maxZoomLevel from the values set in {@link PoiInfo}.
|
13900 | * Selects the smaller/larger one of the two min/max values for icon and text, because the
|
13901 | * TextElement is a container for both.
|
13902 | */
|
13903 | updateMinMaxZoomLevelsFromPoiInfo(): void;
|
13904 | }
|
13905 |
|
13906 |
|
13907 |
|
13908 |
|
13909 | declare class TextElementGroup extends PriorityListGroup<TextElement> {
|
13910 | }
|
13911 |
|
13912 |
|
13913 |
|
13914 |
|
13915 | declare class TextElementGroupPriorityList extends GroupedPriorityList<TextElement> {
|
13916 | }
|
13917 |
|
13918 | export declare interface TextElementIndex {
|
13919 | groupIndex: number;
|
13920 | elementIndex: number;
|
13921 | }
|
13922 |
|
13923 |
|
13924 |
|
13925 |
|
13926 |
|
13927 | export declare class TextElementsRenderer {
|
13928 | private m_viewState;
|
13929 | private m_viewCamera;
|
13930 | private m_viewUpdateCallback;
|
13931 | private m_screenCollisions;
|
13932 | private m_screenProjector;
|
13933 | private m_textCanvasFactory;
|
13934 | private m_poiManager;
|
13935 | private m_poiRendererFactory;
|
13936 | private m_fontCatalogLoader;
|
13937 | private m_theme;
|
13938 | private m_initialized;
|
13939 | private m_initPromise;
|
13940 | private m_glyphLoadingCount;
|
13941 | private m_loadPromise;
|
13942 | private readonly m_options;
|
13943 | private readonly m_textStyleCache;
|
13944 | private m_textRenderers;
|
13945 | private m_overlayTextElements?;
|
13946 | private m_debugGlyphTextureCacheMesh?;
|
13947 | private m_debugGlyphTextureCacheWireMesh?;
|
13948 | private m_tmpVector;
|
13949 | private m_tmpVector3;
|
13950 | private m_cameraLookAt;
|
13951 | private m_overloaded;
|
13952 | private m_cacheInvalidated;
|
13953 | private m_forceNewLabelsPass;
|
13954 | private m_addNewLabels;
|
13955 | private readonly m_textElementStateCache;
|
13956 | |
13957 |
|
13958 |
|
13959 |
|
13960 |
|
13961 |
|
13962 |
|
13963 |
|
13964 |
|
13965 |
|
13966 |
|
13967 |
|
13968 |
|
13969 |
|
13970 |
|
13971 |
|
13972 |
|
13973 |
|
13974 |
|
13975 | constructor(m_viewState: ViewState, m_viewCamera: THREE_2.Camera, m_viewUpdateCallback: ViewUpdateCallback, m_screenCollisions: ScreenCollisions, m_screenProjector: ScreenProjector, m_textCanvasFactory: TextCanvasFactory, m_poiManager: PoiManager, m_poiRendererFactory: PoiRendererFactory, m_fontCatalogLoader: FontCatalogLoader, m_theme: Theme, options: TextElementsRendererOptions);
|
13976 | /**
|
13977 | * Disable all fading animations (for debugging and performance measurement). Defaults to
|
13978 | * `false`.
|
13979 | */
|
13980 | set disableFading(disable: boolean);
|
13981 | get disableFading(): boolean;
|
13982 | get styleCache(): TextStyleCache;
|
13983 | get delayLabelsUntilMovementFinished(): boolean;
|
13984 | set delayLabelsUntilMovementFinished(delay: boolean);
|
13985 | /**
|
13986 | * Render the text using the specified camera into the current canvas.
|
13987 | *
|
13988 | * @param camera - Orthographic camera to use.
|
13989 | */
|
13990 | renderText(camera: THREE_2.OrthographicCamera): void;
|
13991 | /**
|
13992 | * Forces update of text elements in the next call to [[placeText]].
|
13993 | */
|
13994 | invalidateCache(): void;
|
13995 | /**
|
13996 | * Notify `TextElementsRenderer` that the camera has started a movement.
|
13997 | */
|
13998 | movementStarted(): void;
|
13999 | /**
|
14000 | * Notify `TextElementsRenderer` that the camera has finished its movement.
|
14001 | */
|
14002 | movementFinished(): void;
|
14003 | /**
|
14004 | * Is `true` if number of {@link TextElement}s in visible tiles is larger than the recommended
|
14005 | * number `OVERLOAD_LABEL_LIMIT`.
|
14006 | */
|
14007 | get overloaded(): boolean;
|
14008 | |
14009 |
|
14010 |
|
14011 |
|
14012 |
|
14013 | placeText(dataSourceTileList: DataSourceTileList[], time: number): void;
|
14014 | |
14015 |
|
14016 |
|
14017 |
|
14018 |
|
14019 | addOverlayText(textElements: TextElement[]): void;
|
14020 | |
14021 |
|
14022 |
|
14023 |
|
14024 |
|
14025 | clearOverlayText(): void;
|
14026 | |
14027 |
|
14028 |
|
14029 | hasOverlayText(): boolean;
|
14030 | get overlayText(): TextElement[] | undefined;
|
14031 | |
14032 |
|
14033 |
|
14034 |
|
14035 |
|
14036 |
|
14037 |
|
14038 |
|
14039 |
|
14040 |
|
14041 |
|
14042 | pickTextElements(screenPosition: THREE_2.Vector2, pickResults: PickResult[]): void;
|
14043 | |
14044 |
|
14045 |
|
14046 | get loading(): boolean;
|
14047 | |
14048 |
|
14049 |
|
14050 | waitLoaded(): Promise<boolean>;
|
14051 | |
14052 |
|
14053 |
|
14054 |
|
14055 |
|
14056 |
|
14057 |
|
14058 | clearRenderStates(): void;
|
14059 | |
14060 |
|
14061 |
|
14062 |
|
14063 |
|
14064 | getMemoryUsage(): MapViewUtils.MemoryUsage;
|
14065 | get initialized(): boolean;
|
14066 | get initializing(): boolean;
|
14067 | |
14068 |
|
14069 |
|
14070 |
|
14071 | waitInitialized(): Promise<boolean>;
|
14072 | |
14073 |
|
14074 |
|
14075 |
|
14076 |
|
14077 | private initialize;
|
14078 | |
14079 |
|
14080 |
|
14081 | private reset;
|
14082 | |
14083 |
|
14084 |
|
14085 | private updateTextRenderers;
|
14086 | |
14087 |
|
14088 |
|
14089 |
|
14090 |
|
14091 | private prepopulateScreenWithBlockingElements;
|
14092 | |
14093 |
|
14094 |
|
14095 |
|
14096 | private placeTextElementGroup;
|
14097 | private initializeGlyphs;
|
14098 | private initializeDefaultAssets;
|
14099 | private initializeTextCanvases;
|
14100 | private updateGlyphDebugMesh;
|
14101 | private initializeGlyphDebugMesh;
|
14102 | |
14103 |
|
14104 |
|
14105 |
|
14106 |
|
14107 |
|
14108 |
|
14109 |
|
14110 |
|
14111 |
|
14112 |
|
14113 |
|
14114 |
|
14115 | private updateTextElements;
|
14116 | private updateTextElementsFromSource;
|
14117 | private prepareTextElementGroup;
|
14118 | private createSortedGroupsForSorting;
|
14119 | private selectTextElementsToUpdateByDistance;
|
14120 | private placeTextElements;
|
14121 | private placeNewTextElements;
|
14122 | private placeOverlayTextElements;
|
14123 | private getDistanceScalingFactor;
|
14124 | private getDistanceFadingFactor;
|
14125 | private addPointLabel;
|
14126 | private addPoiLabel;
|
14127 | private addLineMarkerLabel;
|
14128 | private addPathLabel;
|
14129 | private checkIfOverloaded;
|
14130 | }
|
14131 |
|
14132 | declare interface TextElementsRendererOptions {
|
14133 | |
14134 |
|
14135 |
|
14136 | fontCatalog?: string;
|
14137 | |
14138 |
|
14139 |
|
14140 |
|
14141 |
|
14142 |
|
14143 | minNumGlyphs?: number;
|
14144 | |
14145 |
|
14146 |
|
14147 |
|
14148 |
|
14149 |
|
14150 | maxNumGlyphs?: number;
|
14151 | |
14152 |
|
14153 |
|
14154 |
|
14155 |
|
14156 | maxNumVisibleLabels?: number;
|
14157 | |
14158 |
|
14159 |
|
14160 |
|
14161 |
|
14162 |
|
14163 | numSecondChanceLabels?: number;
|
14164 | |
14165 |
|
14166 |
|
14167 |
|
14168 |
|
14169 | maxDistanceRatioForTextLabels?: number;
|
14170 | |
14171 |
|
14172 |
|
14173 |
|
14174 |
|
14175 |
|
14176 | maxDistanceRatioForPoiLabels?: number;
|
14177 | |
14178 |
|
14179 |
|
14180 |
|
14181 |
|
14182 | labelDistanceScaleMin?: number;
|
14183 | |
14184 |
|
14185 |
|
14186 |
|
14187 |
|
14188 | labelDistanceScaleMax?: number;
|
14189 | |
14190 |
|
14191 |
|
14192 |
|
14193 | disableFading?: boolean;
|
14194 | |
14195 |
|
14196 |
|
14197 |
|
14198 | delayLabelsUntilMovementFinished?: boolean;
|
14199 | }
|
14200 |
|
14201 |
|
14202 |
|
14203 |
|
14204 |
|
14205 | export declare interface TextElementStyle {
|
14206 | name: string;
|
14207 | fontCatalog: string;
|
14208 | renderParams: TextRenderParameters;
|
14209 | layoutParams: TextLayoutParameters;
|
14210 | textCanvas?: TextCanvas;
|
14211 | poiRenderer?: PoiRenderer;
|
14212 | }
|
14213 |
|
14214 |
|
14215 |
|
14216 |
|
14217 | declare enum TextElementType {
|
14218 | PoiLabel = 0,
|
14219 | PathLabel = 1,
|
14220 | LineMarker = 2
|
14221 | }
|
14222 |
|
14223 |
|
14224 |
|
14225 |
|
14226 |
|
14227 | export declare interface TextGeometry {
|
14228 | positions: BufferAttribute;
|
14229 | texts: number[];
|
14230 | technique?: number;
|
14231 | stringCatalog?: Array<string | undefined>;
|
14232 | objInfos?: AttributeMap[];
|
14233 | }
|
14234 |
|
14235 |
|
14236 |
|
14237 |
|
14238 | declare class TextGeometry_2 {
|
14239 | readonly scene: THREE_2.Scene;
|
14240 | |
14241 |
|
14242 |
|
14243 | get drawCount(): number;
|
14244 | |
14245 |
|
14246 |
|
14247 | get mesh(): THREE_2.Mesh;
|
14248 | |
14249 |
|
14250 |
|
14251 | get backgroundMesh(): THREE_2.Mesh;
|
14252 | |
14253 |
|
14254 |
|
14255 | readonly capacity: number;
|
14256 | private m_currentCapacity;
|
14257 | private m_drawCount;
|
14258 | private m_updateOffset;
|
14259 | private m_vertexBuffer;
|
14260 | private m_positionAttribute;
|
14261 | private m_uvAttribute;
|
14262 | private m_colorAttribute;
|
14263 | private m_bgColorAttribute;
|
14264 | private m_indexBuffer;
|
14265 | private m_geometry;
|
14266 | private m_mesh;
|
14267 | private m_bgMesh;
|
14268 | private m_pickingCount;
|
14269 | private m_pickingDataArray;
|
14270 | |
14271 |
|
14272 |
|
14273 |
|
14274 |
|
14275 |
|
14276 |
|
14277 |
|
14278 |
|
14279 |
|
14280 | constructor(scene: THREE_2.Scene, material: THREE_2.Material, backgroundMaterial: THREE_2.Material, initialSize: number, capacity: number);
|
14281 | /**
|
14282 | * Release all allocated resources.
|
14283 | */
|
14284 | dispose(): void;
|
14285 | /**
|
14286 | * Clear the geometry.
|
14287 | */
|
14288 | clear(): void;
|
14289 | /**
|
14290 | * Update the GPU resources to reflect the latest additions to the geometry.
|
14291 | */
|
14292 | update(): void;
|
14293 | /**
|
14294 | * Add a new glyph to the `TextGeometry`.
|
14295 | *
|
14296 | * @param glyphData - [[GlyphData]] holding the glyph description.
|
14297 | * @param corners - Transformed glyph corners.
|
14298 | * @param weight - Foreground glyph sampling weight.
|
14299 | * @param bgWeight - Foreground glyph sampling weight.
|
14300 | * @param mirrored - If `true`, UVs will be horizontally mirrored (needed for RTL punctuation).
|
14301 | * @param style - Currently set [[TextRenderStyle]].
|
14302 | *
|
14303 | * @returns Result of the addition.
|
14304 | */
|
14305 | add(glyphData: GlyphData, corners: THREE_2.Vector3[], weight: number, bgWeight: number, mirrored: boolean, style: TextRenderStyle): boolean;
|
14306 | /**
|
14307 | * Add a new glyph to a text buffer.
|
14308 | *
|
14309 | * @param buffer - Target buffer where glyph attributes will be stored.
|
14310 | * @param offset - Offset of the target buffer.
|
14311 | * @param glyphData - [[GlyphData]] holding the glyph description.
|
14312 | * @param corners - Transformed glyph corners.
|
14313 | * @param weight - Foreground glyph sampling weight.
|
14314 | * @param bgWeight - Foreground glyph sampling weight.
|
14315 | * @param mirrored - If `true`, UVs will be mirrored (needed for RTL punctuation).
|
14316 | * @param style - Currently set [[TextRenderStyle]].
|
14317 | */
|
14318 | addToBuffer(buffer: Float32Array, offset: number, glyphData: GlyphData, corners: THREE_2.Vector3[], weight: number, bgWeight: number, mirrored: boolean, style: TextRenderStyle): void;
|
14319 | /**
|
14320 | * Add a previously computed [[TextBufferObject]] to the `TextGeometry`. Extra parameters can
|
14321 | * be passed to override the passed attribute data.
|
14322 | *
|
14323 | * @param textBufferObject - [[TextBufferObject]] containing computed glyphs.
|
14324 | * @param position - Override position value.
|
14325 | * @param scale - Override scale value.
|
14326 | * @param rotation - Override rotation value.
|
14327 | * @param color - Override color value.
|
14328 | * @param opacity - Override opacity value.
|
14329 | * @param bgColor - Override background color value.
|
14330 | * @param bgOpacity - Override background opacity value.
|
14331 | *
|
14332 | * @returns Result of the addition.
|
14333 | */
|
14334 | addTextBufferObject(textBufferObject: TextBufferObject, position?: THREE_2.Vector3, scale?: number, rotation?: number, color?: THREE_2.Color, opacity?: number, bgColor?: THREE_2.Color, bgOpacity?: number): boolean;
|
14335 | /**
|
14336 | * Adds picking data for glyphs from the specified start until the last glyph added.
|
14337 | *
|
14338 | * @param startIdx - First glyph index that this picking data is associated to.
|
14339 | * @param endIdx - Last glyph index that this picking data is associated to.
|
14340 | * @param pickingData - Picking data to be added.
|
14341 | */
|
14342 | addPickingData(startIdx: number, endIdx: number, pickingData: any): boolean;
|
14343 | /**
|
14344 | * Fill the picking results for the pixel with the given screen coordinate. If multiple glyphs
|
14345 | * are found, the order of the results is unspecified.
|
14346 | *
|
14347 | * @param screenPosition - Screen coordinate of picking position.
|
14348 | * @param pickCallback - Callback to be called for every picked element.
|
14349 | */
|
14350 | pick(screenPosition: THREE_2.Vector2, pickCallback: (pickData: any | undefined) => void): void;
|
14351 | /**
|
14352 | * Update the info with the memory footprint caused by objects owned by the `TextGeometry`.
|
14353 | *
|
14354 | * @param info - The info object to increment with the values from this `TextGeometry`.
|
14355 | */
|
14356 | updateMemoryUsage(info: MemoryUsage): void;
|
14357 | private resizeBuffers;
|
14358 | }
|
14359 |
|
14360 | /**
|
14361 | * [[TextCanvas]] text layout parameters.
|
14362 | */
|
14363 | declare interface TextLayoutParameters {
|
14364 | tracking?: number;
|
14365 | leading?: number;
|
14366 | maxLines?: number;
|
14367 | lineWidth?: number;
|
14368 | canvasRotation?: number;
|
14369 | lineRotation?: number;
|
14370 | wrappingMode?: WrappingMode_2;
|
14371 | verticalAlignment?: VerticalAlignment;
|
14372 | horizontalAlignment?: HorizontalAlignment;
|
14373 | placements?: TextPlacements;
|
14374 | }
|
14375 |
|
14376 |
|
14377 |
|
14378 |
|
14379 | declare class TextLayoutStyle {
|
14380 | private m_params;
|
14381 | |
14382 |
|
14383 |
|
14384 |
|
14385 |
|
14386 |
|
14387 |
|
14388 | constructor(params?: TextLayoutParameters);
|
14389 | /**
|
14390 | * Current [[TextLayoutParameters]] for this style.
|
14391 | */
|
14392 | get params(): TextLayoutParameters;
|
14393 | set params(value: TextLayoutParameters);
|
14394 | /**
|
14395 | * Inter-glyph spacing (pixels). Scaled by [[FontSize]].
|
14396 | */
|
14397 | get tracking(): number;
|
14398 | set tracking(value: number);
|
14399 | /**
|
14400 | * Inter-line spacing (pixels). Scaled by [[FontSize]].
|
14401 | */
|
14402 | get leading(): number;
|
14403 | set leading(value: number);
|
14404 | /**
|
14405 | * Maximum number of lines to be considered when using [[TextCanvas]].
|
14406 | */
|
14407 | get maxLines(): number;
|
14408 | set maxLines(value: number);
|
14409 | /**
|
14410 | * Maximum line width (pixels).
|
14411 | */
|
14412 | get lineWidth(): number;
|
14413 | set lineWidth(value: number);
|
14414 | /**
|
14415 | * [[TextCanvas]] rotation (radians).
|
14416 | */
|
14417 | get canvasRotation(): number;
|
14418 | set canvasRotation(value: number);
|
14419 | /**
|
14420 | * Line typesetting rotation (radians).
|
14421 | */
|
14422 | get lineRotation(): number;
|
14423 | set lineRotation(value: number);
|
14424 | /**
|
14425 | * Wrapping (line-breaking) mode.
|
14426 | */
|
14427 | get wrappingMode(): WrappingMode_2;
|
14428 | set wrappingMode(value: WrappingMode_2);
|
14429 | /**
|
14430 | * Text position regarding the baseline.
|
14431 | */
|
14432 | get verticalAlignment(): VerticalAlignment;
|
14433 | set verticalAlignment(value: VerticalAlignment);
|
14434 | /**
|
14435 | * Text position inside a line.
|
14436 | */
|
14437 | get horizontalAlignment(): HorizontalAlignment;
|
14438 | set horizontalAlignment(value: HorizontalAlignment);
|
14439 | /**
|
14440 | * Text placement options relative to label anchor (origin).
|
14441 | *
|
14442 | * @note [[TextPlacement]]s options may override alignment settings.
|
14443 | */
|
14444 | get placements(): TextPlacements;
|
14445 | set placements(value: TextPlacements);
|
14446 | /**
|
14447 | * Clone this [[TextLayoutStyle]].
|
14448 | *
|
14449 | * @param params - Input [[TextLayoutParameters]].
|
14450 | *
|
14451 | * @returns Cloned [[TextLayoutStyle]].
|
14452 | */
|
14453 | clone(params?: TextLayoutParameters): TextLayoutStyle;
|
14454 | /**
|
14455 | * Copy other [[TextLayoutStyle]] properties into this object instance.
|
14456 | *
|
14457 | * @param other - The object to be copied.
|
14458 | *
|
14459 | * @returns reference to `this` object.
|
14460 | */
|
14461 | copy(other: TextLayoutStyle): TextLayoutStyle;
|
14462 | }
|
14463 |
|
14464 | /**
|
14465 | * This object keeps textual data together with metadata to place it on the map.
|
14466 | */
|
14467 | export declare interface TextPathGeometry {
|
14468 | path: number[];
|
14469 | pathLengthSqr: number;
|
14470 | text: string;
|
14471 | technique: number;
|
14472 | objInfos?: AttributeMap;
|
14473 | }
|
14474 |
|
14475 | export declare interface TextPickResult extends PickResult {
|
14476 | |
14477 |
|
14478 |
|
14479 | text?: string;
|
14480 | }
|
14481 |
|
14482 | declare interface TextPlacement {
|
14483 | v: VerticalPlacement;
|
14484 | h: HorizontalPlacement;
|
14485 | }
|
14486 |
|
14487 | declare type TextPlacements = TextPlacement[];
|
14488 |
|
14489 |
|
14490 |
|
14491 |
|
14492 | declare interface TextRenderParameters {
|
14493 | fontName?: string;
|
14494 | fontSize?: FontSize;
|
14495 | fontStyle?: FontStyle;
|
14496 | fontVariant?: FontVariant;
|
14497 | rotation?: number;
|
14498 | color?: THREE_2.Color;
|
14499 | backgroundColor?: THREE_2.Color;
|
14500 | opacity?: number;
|
14501 | backgroundOpacity?: number;
|
14502 | }
|
14503 |
|
14504 |
|
14505 |
|
14506 |
|
14507 | declare class TextRenderStyle {
|
14508 | private m_params;
|
14509 | |
14510 |
|
14511 |
|
14512 |
|
14513 |
|
14514 |
|
14515 |
|
14516 | constructor(params?: TextRenderParameters);
|
14517 | /**
|
14518 | * Current [[TextRenderParameters]] for this style.
|
14519 | */
|
14520 | get params(): TextRenderParameters;
|
14521 | set params(value: TextRenderParameters);
|
14522 | /**
|
14523 | * Name of the preferred [[Font]] to be used when rendering.
|
14524 | */
|
14525 | get fontName(): string;
|
14526 | set fontName(value: string);
|
14527 | /**
|
14528 | * Collection of unit and sizes to apply for the currently active [[Font]].
|
14529 | */
|
14530 | get fontSize(): FontSize;
|
14531 | set fontSize(value: FontSize);
|
14532 | /**
|
14533 | * Glyph style to apply for the currently active [[Font]].
|
14534 | */
|
14535 | get fontStyle(): FontStyle;
|
14536 | set fontStyle(value: FontStyle);
|
14537 | /**
|
14538 | * Glyph variant to apply for the currently active [[Font]].
|
14539 | */
|
14540 | get fontVariant(): FontVariant;
|
14541 | set fontVariant(value: FontVariant);
|
14542 | /**
|
14543 | * Glyph local rotation (radians).
|
14544 | */
|
14545 | get rotation(): number;
|
14546 | set rotation(value: number);
|
14547 | /**
|
14548 | * Glyph color.
|
14549 | */
|
14550 | get color(): THREE_2.Color;
|
14551 | set color(value: THREE_2.Color);
|
14552 | /**
|
14553 | * Glyph background color.
|
14554 | */
|
14555 | get backgroundColor(): THREE_2.Color;
|
14556 | set backgroundColor(value: THREE_2.Color);
|
14557 | /**
|
14558 | * Glyph opacity.
|
14559 | */
|
14560 | get opacity(): number;
|
14561 | set opacity(value: number);
|
14562 | /**
|
14563 | * Glyph background opacity.
|
14564 | */
|
14565 | get backgroundOpacity(): number;
|
14566 | set backgroundOpacity(value: number);
|
14567 | /**
|
14568 | * Clone this [[TextRenderStyle]].
|
14569 | *
|
14570 | * @param params - Input [[TextRenderParameters]].
|
14571 | *
|
14572 | * @returns Cloned [[TextRenderStyle]].
|
14573 | */
|
14574 | clone(params?: TextRenderParameters): TextRenderStyle;
|
14575 | /**
|
14576 | * Copy other [[TextRenderStyle]] properties into this object instance.
|
14577 | *
|
14578 | * @param source - The source object to be copied.
|
14579 | *
|
14580 | * @returns reference to `this` object.
|
14581 | */
|
14582 | copy(source: TextRenderStyle): TextRenderStyle;
|
14583 | }
|
14584 |
|
14585 | export declare class TextStyleCache {
|
14586 | private m_theme;
|
14587 | private m_textStyles;
|
14588 | private m_defaultStyle;
|
14589 | constructor(m_theme: Theme);
|
14590 | initializeDefaultTextElementStyle(defaultFontCatalogName: string): void;
|
14591 | initializeTextElementStyles(defaultPoiRenderer: PoiRenderer, defaultTextCanvas: TextCanvas, textRenderers: TextCanvasRenderer[]): void;
|
14592 | /**
|
14593 | * Retrieves a {@link TextElementStyle} for {@link @here/harp-datasource-protocol#Theme}'s
|
14594 | * [[TextStyle]] id.
|
14595 | */
|
14596 | getTextElementStyle(styleId?: string): TextElementStyle;
|
14597 | |
14598 |
|
14599 |
|
14600 |
|
14601 |
|
14602 | createRenderStyle(tile: Tile, technique: TextTechnique | PoiTechnique | LineMarkerTechnique): TextRenderStyle;
|
14603 | |
14604 |
|
14605 |
|
14606 |
|
14607 |
|
14608 |
|
14609 |
|
14610 |
|
14611 | createLayoutStyle(tile: Tile, technique: TextTechnique | PoiTechnique | LineMarkerTechnique): TextLayoutStyle;
|
14612 | private createTextElementStyle;
|
14613 | }
|
14614 |
|
14615 |
|
14616 |
|
14617 |
|
14618 | export declare interface TextStyleDefinition {
|
14619 | name?: string;
|
14620 | fontCatalogName?: string;
|
14621 | fontName?: string;
|
14622 | size?: number;
|
14623 | backgroundSize?: number;
|
14624 | fontStyle?: "Regular" | "Bold" | "Italic" | "BoldItalic";
|
14625 | fontVariant?: "Regular" | "AllCaps" | "SmallCaps";
|
14626 | rotation?: number;
|
14627 | |
14628 |
|
14629 |
|
14630 | color?: string;
|
14631 | |
14632 |
|
14633 |
|
14634 | backgroundColor?: string;
|
14635 | opacity?: number;
|
14636 | backgroundOpacity?: number;
|
14637 | tracking?: number;
|
14638 | leading?: number;
|
14639 | maxLines?: number;
|
14640 | lineWidth?: number;
|
14641 | canvasRotation?: number;
|
14642 | lineRotation?: number;
|
14643 | wrappingMode?: "None" | "Character" | "Word";
|
14644 | hAlignment?: "Left" | "Center" | "Right";
|
14645 | vAlignment?: "Above" | "Center" | "Below";
|
14646 | |
14647 |
|
14648 |
|
14649 |
|
14650 | placements?: string;
|
14651 | }
|
14652 |
|
14653 |
|
14654 |
|
14655 |
|
14656 |
|
14657 | export declare interface TextTechnique extends MakeTechniqueAttrs<TextTechniqueParams> {
|
14658 | name: "text";
|
14659 | }
|
14660 |
|
14661 |
|
14662 |
|
14663 |
|
14664 | export declare interface TextTechniqueParams extends BaseTechniqueParams {
|
14665 | |
14666 |
|
14667 |
|
14668 |
|
14669 |
|
14670 |
|
14671 |
|
14672 |
|
14673 |
|
14674 |
|
14675 |
|
14676 |
|
14677 | text?: DynamicProperty<string>;
|
14678 | |
14679 |
|
14680 |
|
14681 |
|
14682 |
|
14683 | label?: string;
|
14684 | |
14685 |
|
14686 |
|
14687 |
|
14688 |
|
14689 | useAbbreviation?: boolean;
|
14690 | |
14691 |
|
14692 |
|
14693 |
|
14694 |
|
14695 |
|
14696 | useIsoCode?: boolean;
|
14697 | |
14698 |
|
14699 |
|
14700 | priority?: DynamicProperty<number>;
|
14701 | |
14702 |
|
14703 |
|
14704 | minZoomLevel?: number;
|
14705 | |
14706 |
|
14707 |
|
14708 | maxZoomLevel?: number;
|
14709 | |
14710 |
|
14711 |
|
14712 | distanceScale?: number;
|
14713 | |
14714 |
|
14715 |
|
14716 |
|
14717 | mayOverlap?: boolean;
|
14718 | |
14719 |
|
14720 |
|
14721 |
|
14722 |
|
14723 | reserveSpace?: boolean;
|
14724 | |
14725 |
|
14726 |
|
14727 | textFadeTime?: number;
|
14728 | |
14729 |
|
14730 |
|
14731 | xOffset?: number;
|
14732 | |
14733 |
|
14734 |
|
14735 | yOffset?: number;
|
14736 | |
14737 |
|
14738 |
|
14739 | style?: string;
|
14740 | |
14741 |
|
14742 |
|
14743 | fontName?: string;
|
14744 | |
14745 |
|
14746 |
|
14747 | size?: DynamicProperty<number>;
|
14748 | |
14749 |
|
14750 |
|
14751 | backgroundSize?: DynamicProperty<number>;
|
14752 | |
14753 |
|
14754 |
|
14755 | fontStyle?: "Regular" | "Bold" | "Italic" | "BoldItalic";
|
14756 | |
14757 |
|
14758 |
|
14759 | fontVariant?: "Regular" | "AllCaps" | "SmallCaps";
|
14760 | |
14761 |
|
14762 |
|
14763 | rotation?: number;
|
14764 | |
14765 |
|
14766 |
|
14767 |
|
14768 |
|
14769 | color?: DynamicProperty<StyleColor>;
|
14770 | |
14771 |
|
14772 |
|
14773 |
|
14774 |
|
14775 | backgroundColor?: DynamicProperty<StyleColor>;
|
14776 | |
14777 |
|
14778 |
|
14779 |
|
14780 | opacity?: DynamicProperty<number>;
|
14781 | |
14782 |
|
14783 |
|
14784 | backgroundOpacity?: DynamicProperty<number>;
|
14785 | |
14786 |
|
14787 |
|
14788 | tracking?: DynamicProperty<number>;
|
14789 | |
14790 |
|
14791 |
|
14792 | leading?: DynamicProperty<number>;
|
14793 | |
14794 |
|
14795 |
|
14796 | maxLines?: DynamicProperty<number>;
|
14797 | |
14798 |
|
14799 |
|
14800 | lineWidth?: DynamicProperty<number>;
|
14801 | |
14802 |
|
14803 |
|
14804 | canvasRotation?: DynamicProperty<number>;
|
14805 | |
14806 |
|
14807 |
|
14808 | lineRotation?: DynamicProperty<number>;
|
14809 | |
14810 |
|
14811 |
|
14812 | wrappingMode?: DynamicProperty<"None" | "Character" | "Word">;
|
14813 | |
14814 |
|
14815 |
|
14816 | hAlignment?: DynamicProperty<"Left" | "Center" | "Right">;
|
14817 | |
14818 |
|
14819 |
|
14820 | vAlignment?: DynamicProperty<"Above" | "Center" | "Below">;
|
14821 | }
|
14822 |
|
14823 | export declare type TextTechniqueStyle = BaseStyle<"text", TextTechniqueParams>;
|
14824 |
|
14825 |
|
14826 |
|
14827 |
|
14828 |
|
14829 | export declare const TEXTURE_PROPERTY_KEYS: string[];
|
14830 |
|
14831 |
|
14832 |
|
14833 |
|
14834 | export declare interface TextureBuffer {
|
14835 | |
14836 |
|
14837 |
|
14838 | buffer: ArrayBuffer;
|
14839 | |
14840 |
|
14841 |
|
14842 | type: string;
|
14843 | |
14844 |
|
14845 |
|
14846 |
|
14847 | dataTextureProperties?: DataTextureProperties;
|
14848 | }
|
14849 |
|
14850 | export declare enum TextureCoordinateType {
|
14851 | |
14852 |
|
14853 |
|
14854 |
|
14855 | TileSpace = "tile-space",
|
14856 | |
14857 |
|
14858 |
|
14859 |
|
14860 | EquirectangularSpace = "equirectangular-space",
|
14861 | |
14862 |
|
14863 |
|
14864 |
|
14865 |
|
14866 |
|
14867 |
|
14868 | FeatureSpace = "feature-space"
|
14869 | }
|
14870 |
|
14871 |
|
14872 |
|
14873 |
|
14874 | export declare function textureCoordinateType(technique: Technique): TextureCoordinateType | undefined;
|
14875 |
|
14876 | export declare type TextureDataType = "UnsignedByte" | "Byte" | "Short" | "UnsignedShort" | "Int" | "UnsignedInt" | "Float" | "HalfFloat";
|
14877 |
|
14878 |
|
14879 |
|
14880 |
|
14881 | export declare class TextureLoader {
|
14882 | private m_textureLoader;
|
14883 | |
14884 |
|
14885 |
|
14886 |
|
14887 |
|
14888 |
|
14889 | load(url: string, requestHeaders?: RequestHeaders | undefined, crossOrigin?: boolean): Promise<THREE_2.Texture>;
|
14890 | private loadWithThreeLoader;
|
14891 | }
|
14892 |
|
14893 |
|
14894 |
|
14895 |
|
14896 | export declare interface TextureProperties {
|
14897 | |
14898 |
|
14899 |
|
14900 |
|
14901 | wrapS?: WrappingMode;
|
14902 | |
14903 |
|
14904 |
|
14905 |
|
14906 | wrapT?: WrappingMode;
|
14907 | |
14908 |
|
14909 |
|
14910 | magFilter?: MagFilter;
|
14911 | |
14912 |
|
14913 |
|
14914 | minFilter?: MinFilter;
|
14915 | |
14916 |
|
14917 |
|
14918 |
|
14919 | flipY?: boolean;
|
14920 | |
14921 |
|
14922 |
|
14923 |
|
14924 | repeatU?: number;
|
14925 | |
14926 |
|
14927 |
|
14928 |
|
14929 | repeatV?: number;
|
14930 | }
|
14931 |
|
14932 |
|
14933 |
|
14934 |
|
14935 |
|
14936 | export declare interface Theme {
|
14937 | |
14938 |
|
14939 |
|
14940 | $schema?: string;
|
14941 | |
14942 |
|
14943 |
|
14944 |
|
14945 |
|
14946 |
|
14947 |
|
14948 | extends?: string | Theme | Array<string | Theme>;
|
14949 | |
14950 |
|
14951 |
|
14952 | url?: string;
|
14953 | |
14954 |
|
14955 |
|
14956 |
|
14957 | clearColor?: string;
|
14958 | |
14959 |
|
14960 |
|
14961 |
|
14962 | clearAlpha?: number;
|
14963 | |
14964 |
|
14965 |
|
14966 | defaultTextStyle?: TextStyleDefinition;
|
14967 | |
14968 |
|
14969 |
|
14970 | lights?: Light[];
|
14971 | |
14972 |
|
14973 |
|
14974 | sky?: Sky;
|
14975 | |
14976 |
|
14977 |
|
14978 | fog?: Fog;
|
14979 | |
14980 |
|
14981 |
|
14982 | definitions?: Definitions;
|
14983 | |
14984 |
|
14985 |
|
14986 | styles?: Styles;
|
14987 | |
14988 |
|
14989 |
|
14990 | textStyles?: TextStyleDefinition[];
|
14991 | |
14992 |
|
14993 |
|
14994 | fontCatalogs?: FontCatalogConfig[];
|
14995 | |
14996 |
|
14997 |
|
14998 | images?: ImageDefinitions;
|
14999 | |
15000 |
|
15001 |
|
15002 | imageTextures?: ImageTexture[];
|
15003 | |
15004 |
|
15005 |
|
15006 | poiTables?: PoiTableRef[];
|
15007 | |
15008 |
|
15009 |
|
15010 |
|
15011 |
|
15012 |
|
15013 |
|
15014 |
|
15015 |
|
15016 |
|
15017 |
|
15018 |
|
15019 |
|
15020 |
|
15021 |
|
15022 |
|
15023 |
|
15024 |
|
15025 |
|
15026 |
|
15027 |
|
15028 |
|
15029 |
|
15030 |
|
15031 | priorities?: StylePriority[];
|
15032 | |
15033 |
|
15034 |
|
15035 |
|
15036 |
|
15037 |
|
15038 |
|
15039 |
|
15040 |
|
15041 |
|
15042 |
|
15043 |
|
15044 |
|
15045 |
|
15046 |
|
15047 |
|
15048 |
|
15049 |
|
15050 |
|
15051 |
|
15052 |
|
15053 |
|
15054 |
|
15055 |
|
15056 |
|
15057 | labelPriorities?: string[];
|
15058 | }
|
15059 |
|
15060 |
|
15061 |
|
15062 |
|
15063 | export declare class ThemeLoader {
|
15064 | |
15065 |
|
15066 |
|
15067 |
|
15068 |
|
15069 |
|
15070 |
|
15071 |
|
15072 |
|
15073 |
|
15074 |
|
15075 |
|
15076 |
|
15077 |
|
15078 |
|
15079 |
|
15080 |
|
15081 |
|
15082 |
|
15083 |
|
15084 |
|
15085 |
|
15086 |
|
15087 |
|
15088 | static load(theme: string | Theme | FlatTheme, options?: ThemeLoadOptions): Promise<Theme>;
|
15089 | |
15090 |
|
15091 |
|
15092 |
|
15093 |
|
15094 | static isThemeLoaded(theme: Theme | FlatTheme): boolean;
|
15095 | |
15096 |
|
15097 |
|
15098 |
|
15099 |
|
15100 |
|
15101 |
|
15102 |
|
15103 |
|
15104 |
|
15105 | static loadAsync(themeUrl: string): Promise<Theme>;
|
15106 | |
15107 |
|
15108 |
|
15109 |
|
15110 |
|
15111 |
|
15112 |
|
15113 |
|
15114 |
|
15115 | private static resolveUrls;
|
15116 | private static checkTechniqueSupport;
|
15117 | |
15118 |
|
15119 |
|
15120 |
|
15121 |
|
15122 |
|
15123 |
|
15124 | private static resolveThemeReferences;
|
15125 | |
15126 |
|
15127 |
|
15128 | private static resolveStyleSet;
|
15129 | |
15130 |
|
15131 |
|
15132 | private static resolveStyle;
|
15133 | |
15134 |
|
15135 |
|
15136 |
|
15137 |
|
15138 | private static resolveExpressionReferences;
|
15139 | |
15140 |
|
15141 |
|
15142 |
|
15143 |
|
15144 |
|
15145 |
|
15146 |
|
15147 |
|
15148 | private static resolveBaseThemes;
|
15149 | private static mergeThemes;
|
15150 | private static convertFlatTheme;
|
15151 | private static resolveResources;
|
15152 | }
|
15153 |
|
15154 |
|
15155 |
|
15156 |
|
15157 |
|
15158 |
|
15159 | export declare interface ThemeLoadOptions {
|
15160 | |
15161 |
|
15162 |
|
15163 |
|
15164 |
|
15165 | resolveDefinitions?: boolean;
|
15166 | |
15167 |
|
15168 |
|
15169 |
|
15170 |
|
15171 | resolveResourceUris?: boolean;
|
15172 | |
15173 |
|
15174 |
|
15175 |
|
15176 |
|
15177 | resolveIncludeUris?: boolean;
|
15178 | |
15179 |
|
15180 |
|
15181 |
|
15182 |
|
15183 |
|
15184 |
|
15185 |
|
15186 |
|
15187 | signal?: AbortSignal;
|
15188 | |
15189 |
|
15190 |
|
15191 |
|
15192 |
|
15193 |
|
15194 | maxInheritanceDepth?: number;
|
15195 | |
15196 |
|
15197 |
|
15198 |
|
15199 |
|
15200 | logger?: ISimpleChannel;
|
15201 | |
15202 |
|
15203 |
|
15204 | uriResolver?: UriResolver;
|
15205 | }
|
15206 |
|
15207 |
|
15208 |
|
15209 |
|
15210 | export declare class ThemeVisitor {
|
15211 | readonly theme: Theme;
|
15212 | constructor(theme: Theme);
|
15213 | /**
|
15214 | * Applies a function to every style in the theme.
|
15215 | *
|
15216 | * @param visitFunc - Function to be called with `style` as an argument. Function should return
|
15217 | * `true` to cancel visitation.
|
15218 | * @returns `true` if function has finished prematurely.
|
15219 | */
|
15220 | visitStyles(visitFunc: (style: StyleDeclaration) => boolean): boolean;
|
15221 | }
|
15222 |
|
15223 | /**
|
15224 | * The class that holds the tiled data for a {@link DataSource}.
|
15225 | */
|
15226 | export declare class Tile implements CachedResource {
|
15227 | readonly dataSource: DataSource;
|
15228 | readonly tileKey: TileKey;
|
15229 | |
15230 |
|
15231 |
|
15232 | readonly objects: TileObject[];
|
15233 | |
15234 |
|
15235 |
|
15236 |
|
15237 | readonly dependencies: string[];
|
15238 | |
15239 |
|
15240 |
|
15241 | readonly geoBox: GeoBox;
|
15242 | |
15243 |
|
15244 |
|
15245 | copyrightInfo?: CopyrightInfo[];
|
15246 | |
15247 |
|
15248 |
|
15249 |
|
15250 |
|
15251 |
|
15252 |
|
15253 | frameNumLastRequested: number;
|
15254 | |
15255 |
|
15256 |
|
15257 | frameNumVisible: number;
|
15258 | |
15259 |
|
15260 |
|
15261 |
|
15262 |
|
15263 | frameNumLastVisible: number;
|
15264 | |
15265 |
|
15266 |
|
15267 | numFramesVisible: number;
|
15268 | |
15269 |
|
15270 |
|
15271 |
|
15272 |
|
15273 | visibilityCounter: number;
|
15274 | |
15275 |
|
15276 |
|
15277 |
|
15278 |
|
15279 |
|
15280 |
|
15281 |
|
15282 |
|
15283 | levelOffset: number;
|
15284 | |
15285 |
|
15286 |
|
15287 |
|
15288 |
|
15289 |
|
15290 | skipRendering: boolean;
|
15291 | |
15292 |
|
15293 |
|
15294 |
|
15295 |
|
15296 | protected preparedTextPaths: TextPathGeometry[] | undefined;
|
15297 | |
15298 |
|
15299 |
|
15300 | private readonly m_boundingBox;
|
15301 | private m_disposed;
|
15302 | private m_disposeCallback?;
|
15303 | private m_localTangentSpace;
|
15304 | private m_forceHasGeometry;
|
15305 | private m_tileLoader?;
|
15306 | private m_decodedTile?;
|
15307 | private m_tileGeometryLoader?;
|
15308 | private m_textElementGroups;
|
15309 | private readonly m_pathBlockingElements;
|
15310 | private m_textElementsChanged;
|
15311 | private readonly m_worldCenter;
|
15312 | private m_visibleArea;
|
15313 | private readonly m_elevationRange;
|
15314 | private m_maxGeometryHeight?;
|
15315 | private m_resourceInfo;
|
15316 | private m_ownedTextures;
|
15317 | private m_textStyleCache;
|
15318 | private m_uniqueKey;
|
15319 | private m_offset;
|
15320 | |
15321 |
|
15322 |
|
15323 |
|
15324 |
|
15325 |
|
15326 |
|
15327 |
|
15328 |
|
15329 |
|
15330 |
|
15331 | constructor(dataSource: DataSource, tileKey: TileKey, offset?: number, localTangentSpace?: boolean);
|
15332 | /**
|
15333 | * The visibility status of the {@link Tile}. It is actually
|
15334 | * visible or planned to become visible.
|
15335 | */
|
15336 | get isVisible(): boolean;
|
15337 | set isVisible(visible: boolean);
|
15338 | |
15339 |
|
15340 |
|
15341 | get projection(): Projection;
|
15342 | |
15343 |
|
15344 |
|
15345 | get mapView(): MapView;
|
15346 | |
15347 |
|
15348 |
|
15349 |
|
15350 |
|
15351 |
|
15352 | get localTangentSpace(): boolean;
|
15353 | get memoryUsage(): number;
|
15354 | |
15355 |
|
15356 |
|
15357 | get center(): THREE_2.Vector3;
|
15358 | |
15359 |
|
15360 |
|
15361 |
|
15362 |
|
15363 |
|
15364 |
|
15365 | get uniqueKey(): number;
|
15366 | |
15367 |
|
15368 |
|
15369 |
|
15370 | get offset(): number;
|
15371 | |
15372 |
|
15373 |
|
15374 |
|
15375 |
|
15376 | set offset(offset: number);
|
15377 | |
15378 |
|
15379 |
|
15380 |
|
15381 |
|
15382 |
|
15383 | getResourceInfo(): TileResourceInfo;
|
15384 | |
15385 |
|
15386 |
|
15387 |
|
15388 | invalidateResourceInfo(): void;
|
15389 | |
15390 |
|
15391 |
|
15392 |
|
15393 |
|
15394 | addOwnedTexture(texture: THREE_2.Texture): void;
|
15395 | |
15396 |
|
15397 |
|
15398 |
|
15399 |
|
15400 |
|
15401 |
|
15402 | get userTextElements(): TextElementGroup;
|
15403 | |
15404 |
|
15405 |
|
15406 |
|
15407 |
|
15408 |
|
15409 |
|
15410 |
|
15411 |
|
15412 |
|
15413 |
|
15414 | addUserTextElement(textElement: TextElement): void;
|
15415 | |
15416 |
|
15417 |
|
15418 |
|
15419 |
|
15420 |
|
15421 |
|
15422 |
|
15423 | removeUserTextElement(textElement: TextElement): boolean;
|
15424 | |
15425 |
|
15426 |
|
15427 |
|
15428 |
|
15429 |
|
15430 |
|
15431 |
|
15432 |
|
15433 |
|
15434 |
|
15435 | addTextElement(textElement: TextElement): void;
|
15436 | |
15437 |
|
15438 |
|
15439 |
|
15440 |
|
15441 |
|
15442 | addBlockingElement(blockingElement: PathBlockingElement): void;
|
15443 | |
15444 |
|
15445 |
|
15446 |
|
15447 |
|
15448 |
|
15449 |
|
15450 |
|
15451 |
|
15452 |
|
15453 | removeTextElement(textElement: TextElement): boolean;
|
15454 | |
15455 |
|
15456 |
|
15457 |
|
15458 |
|
15459 |
|
15460 |
|
15461 | get textElementGroups(): TextElementGroupPriorityList;
|
15462 | |
15463 |
|
15464 |
|
15465 |
|
15466 |
|
15467 |
|
15468 | get textElementsChanged(): boolean;
|
15469 | set textElementsChanged(changed: boolean);
|
15470 | |
15471 |
|
15472 |
|
15473 | hasTextElements(): boolean;
|
15474 | |
15475 |
|
15476 |
|
15477 | get blockingElements(): PathBlockingElement[];
|
15478 | |
15479 |
|
15480 |
|
15481 |
|
15482 |
|
15483 |
|
15484 |
|
15485 | willRender(_zoomLevel: number): boolean;
|
15486 | |
15487 |
|
15488 |
|
15489 | didRender(): void;
|
15490 | |
15491 |
|
15492 |
|
15493 | get visibleArea(): number;
|
15494 | set visibleArea(area: number);
|
15495 | |
15496 |
|
15497 |
|
15498 |
|
15499 | get elevationRange(): ElevationRange;
|
15500 | |
15501 |
|
15502 |
|
15503 |
|
15504 |
|
15505 |
|
15506 | set elevationRange(elevationRange: ElevationRange);
|
15507 | |
15508 |
|
15509 |
|
15510 | get decodedTile(): DecodedTile | undefined;
|
15511 | |
15512 |
|
15513 |
|
15514 |
|
15515 |
|
15516 |
|
15517 | set decodedTile(decodedTile: DecodedTile | undefined);
|
15518 | |
15519 |
|
15520 |
|
15521 | removeDecodedTile(): void;
|
15522 | |
15523 |
|
15524 |
|
15525 |
|
15526 |
|
15527 |
|
15528 |
|
15529 |
|
15530 | loadingFinished(): void;
|
15531 | |
15532 |
|
15533 |
|
15534 |
|
15535 |
|
15536 |
|
15537 |
|
15538 | shouldDisposeObjectGeometry(object: TileObject): boolean;
|
15539 | |
15540 |
|
15541 |
|
15542 |
|
15543 |
|
15544 |
|
15545 |
|
15546 | shouldDisposeObjectMaterial(object: TileObject): boolean;
|
15547 | |
15548 |
|
15549 |
|
15550 |
|
15551 |
|
15552 |
|
15553 |
|
15554 | shouldDisposeTexture(texture: THREE_2.Texture): boolean;
|
15555 | |
15556 |
|
15557 |
|
15558 | get disposed(): boolean;
|
15559 | |
15560 |
|
15561 |
|
15562 | get tileGeometryLoader(): TileGeometryLoader | undefined;
|
15563 | |
15564 |
|
15565 |
|
15566 |
|
15567 |
|
15568 |
|
15569 | set tileGeometryLoader(tileGeometryLoader: TileGeometryLoader | undefined);
|
15570 | |
15571 |
|
15572 |
|
15573 | get basicGeometryLoaded(): boolean;
|
15574 | |
15575 |
|
15576 |
|
15577 | get allGeometryLoaded(): boolean;
|
15578 | |
15579 |
|
15580 |
|
15581 |
|
15582 |
|
15583 |
|
15584 | get hasGeometry(): boolean;
|
15585 | |
15586 |
|
15587 |
|
15588 |
|
15589 |
|
15590 | forceHasGeometry(value: boolean | undefined): void;
|
15591 | |
15592 |
|
15593 |
|
15594 |
|
15595 | resetVisibilityCounter(): void;
|
15596 | |
15597 |
|
15598 |
|
15599 | get tileLoader(): ITileLoader | undefined;
|
15600 | |
15601 |
|
15602 |
|
15603 |
|
15604 |
|
15605 |
|
15606 | set tileLoader(tileLoader: ITileLoader | undefined);
|
15607 | |
15608 |
|
15609 |
|
15610 | load(): void;
|
15611 | |
15612 |
|
15613 |
|
15614 |
|
15615 | get textStyleCache(): TileTextStyleCache;
|
15616 | |
15617 |
|
15618 |
|
15619 |
|
15620 |
|
15621 |
|
15622 |
|
15623 |
|
15624 | clear(): void;
|
15625 | |
15626 |
|
15627 |
|
15628 | clearTextElements(): void;
|
15629 | |
15630 |
|
15631 |
|
15632 |
|
15633 |
|
15634 |
|
15635 | addDisposeCallback(callback: TileCallback): void;
|
15636 | |
15637 |
|
15638 |
|
15639 | dispose(): void;
|
15640 | |
15641 |
|
15642 |
|
15643 |
|
15644 |
|
15645 | computeWorldOffsetX(): number;
|
15646 | |
15647 |
|
15648 |
|
15649 |
|
15650 | update(zoomLevel: number): void;
|
15651 | |
15652 |
|
15653 |
|
15654 | get boundingBox(): OrientedBox3;
|
15655 | |
15656 |
|
15657 |
|
15658 |
|
15659 |
|
15660 | private updateBoundingBox;
|
15661 | |
15662 |
|
15663 |
|
15664 | private elevateGeoBox;
|
15665 | private computeResourceInfo;
|
15666 | }
|
15667 |
|
15668 | declare type TileCallback = (tile: Tile) => void;
|
15669 |
|
15670 |
|
15671 |
|
15672 |
|
15673 |
|
15674 |
|
15675 |
|
15676 |
|
15677 |
|
15678 |
|
15679 | export declare class TileDataAccessor {
|
15680 | tile: Tile;
|
15681 | private visitor;
|
15682 | private m_wantsPoints;
|
15683 | private m_wantsLines;
|
15684 | private m_wantsAreas;
|
15685 | private m_wantsObject3D;
|
15686 | |
15687 |
|
15688 |
|
15689 |
|
15690 |
|
15691 |
|
15692 |
|
15693 | constructor(tile: Tile, visitor: ITileDataVisitor, options: TileDataAccessorOptions);
|
15694 | /**
|
15695 | * Calls the visitor on all objects in the tile.
|
15696 | */
|
15697 | visitAll(): void;
|
15698 | /**
|
15699 | * Visits a single object. This function should normally be called during visiting.
|
15700 | *
|
15701 | * @param object - The object to visit.
|
15702 | */
|
15703 | protected visitObject(object: THREE_2.Object3D): void;
|
15704 | /**
|
15705 | * Gets the `BufferGeometry` from the specified object. This function requires the
|
15706 | * attribute `position` in `BufferGeometry` to be set.
|
15707 | *
|
15708 | * @param object - The object from which to get the geometry.
|
15709 | * @returns the geometry of the object, or `undefined`.
|
15710 | */
|
15711 | protected getBufferGeometry(object: THREE_2.Mesh): THREE_2.BufferGeometry | undefined;
|
15712 | /**
|
15713 | * Obtains an accessor for the nonindexed geometry. This function may return `undefined`
|
15714 | * if the accessor is not implemented.
|
15715 | *
|
15716 | * @param geometryType - The type of geometry.
|
15717 | * @param object - The object for which to access the attributes and geometry.
|
15718 | * @param bufferGeometry - The object's `BufferGeometry`.
|
15719 | * @returns an accessor for a specified object, if available.
|
15720 | */
|
15721 | protected getGeometryAccessor(geometryType: GeometryType, object: THREE_2.Mesh, bufferGeometry: THREE_2.BufferGeometry): IGeometryAccessor | undefined;
|
15722 | /**
|
15723 | * Obtains an accessor for the indexed geometry. This function may return `undefined`
|
15724 | * if the accessor is not implemented.
|
15725 | *
|
15726 | * @param geometryType - The type of geometry.
|
15727 | * @param object - The object for which to access the attributes and geometry.
|
15728 | * @param bufferGeometry - The object's `BufferGeometry`.
|
15729 | * @returns an accessor for a specified object, if available.
|
15730 | */
|
15731 | protected getIndexedGeometryAccessor(geometryType: GeometryType, object: THREE_2.Mesh, bufferGeometry: THREE_2.BufferGeometry): IGeometryAccessor | undefined;
|
15732 | /**
|
15733 | * Visit the object.
|
15734 | *
|
15735 | * @param meshObject - Object of type `Mesh`.
|
15736 | * @param featureData - Dataset stored along with the object.
|
15737 | */
|
15738 | protected visitMesh(meshObject: THREE_2.Mesh, featureData: TileFeatureData): void;
|
15739 | }
|
15740 |
|
15741 | /**
|
15742 | * An interface that provides options for {@link TileDataAccessor}.
|
15743 | */
|
15744 | export declare interface TileDataAccessorOptions {
|
15745 |
|
15746 | onlyWithFeatureIds?: boolean;
|
15747 |
|
15748 | wantsAll?: boolean;
|
15749 |
|
15750 | wantsPoints?: boolean;
|
15751 |
|
15752 | wantsLines?: boolean;
|
15753 |
|
15754 | wantsAreas?: boolean;
|
15755 |
|
15756 | wantsObject3D?: boolean;
|
15757 | }
|
15758 |
|
15759 |
|
15760 |
|
15761 |
|
15762 |
|
15763 |
|
15764 | export declare class TileDataSource<TileType extends Tile> extends DataSource {
|
15765 | private readonly m_tileFactory;
|
15766 | private readonly m_options;
|
15767 | protected readonly logger: ILogger;
|
15768 | protected readonly m_decoder: ITileDecoder;
|
15769 | private m_isReady;
|
15770 | |
15771 |
|
15772 |
|
15773 |
|
15774 |
|
15775 |
|
15776 | constructor(m_tileFactory: TileFactory<TileType>, m_options: TileDataSourceOptions);
|
15777 | /** @override */
|
15778 | dispose(): void;
|
15779 | /** @override */
|
15780 | ready(): boolean;
|
15781 | /**
|
15782 | * Get the [[ITileDecoder]] of this `ITileDataSource`, which has either been passed in with
|
15783 | * the options, or has been supplied by the [[ConcurrentDecoderFacade]].
|
15784 | */
|
15785 | get decoder(): ITileDecoder;
|
15786 | /** @override */
|
15787 | connect(): Promise<void>;
|
15788 | /** @override */
|
15789 | setStyleSet(styleSet?: StyleSet, definitions?: Definitions, languages?: string[]): void;
|
15790 | /**
|
15791 | * Apply the [[Theme]] to this data source.
|
15792 | *
|
15793 | * Applies new [[StyleSet]] and definitions from theme only if matching styleset (see
|
15794 | * `styleSetName` property) is found in `theme`.
|
15795 | * @override
|
15796 | */
|
15797 | setTheme(theme: Theme, languages?: string[]): void;
|
15798 | /**
|
15799 | * Get the [[DataProvider]] that has been passed in with the options.
|
15800 | */
|
15801 | dataProvider(): DataProvider;
|
15802 | /** @override */
|
15803 | getTilingScheme(): TilingScheme;
|
15804 | /**
|
15805 | * Create a [[Tile]] and start the asynchronous download of the tile content. The [[Tile]] will
|
15806 | * be empty, but the download and decoding will be scheduled immediately. [[Tile]] instance is
|
15807 | * initialized with default copyrights, concatenated with copyrights from copyright provider of
|
15808 | * this data source.
|
15809 | *
|
15810 | * @param tileKey - Quadtree address of the requested tile.
|
15811 | * @override
|
15812 | */
|
15813 | getTile(tileKey: TileKey): TileType | undefined;
|
15814 | /**
|
15815 | * Get [[TileInfo]] of a tile.
|
15816 | *
|
15817 | * @param tileKey - Quadtree address of the requested tile.
|
15818 | * @returns A promise which will contain the [[TileInfo]] when resolved.
|
15819 | */
|
15820 | getTileInfo(tileKey: TileKey): Promise<TileInfo | undefined>;
|
15821 | }
|
15822 |
|
15823 | /**
|
15824 | * Set of common options for all [[TileDataSource]]s.
|
15825 | */
|
15826 | export declare interface TileDataSourceOptions extends DataSourceOptions {
|
15827 | |
15828 |
|
15829 |
|
15830 | tilingScheme: TilingScheme;
|
15831 | |
15832 |
|
15833 |
|
15834 | dataProvider: DataProvider;
|
15835 | |
15836 |
|
15837 |
|
15838 | decoder?: ITileDecoder;
|
15839 | |
15840 |
|
15841 |
|
15842 |
|
15843 |
|
15844 | concurrentDecoderServiceName?: string;
|
15845 | |
15846 |
|
15847 |
|
15848 | concurrentDecoderScriptUrl?: string;
|
15849 | |
15850 |
|
15851 |
|
15852 | concurrentDecoderWorkerCount?: number;
|
15853 | |
15854 |
|
15855 |
|
15856 |
|
15857 | copyrightInfo?: CopyrightInfo[];
|
15858 | |
15859 |
|
15860 |
|
15861 |
|
15862 | copyrightProvider?: CopyrightProvider;
|
15863 | }
|
15864 |
|
15865 | export declare interface TileDisplacementMap {
|
15866 | tileKey: TileKey;
|
15867 | texture: THREE.DataTexture;
|
15868 | displacementMap: DisplacementMap;
|
15869 | geoBox: GeoBox;
|
15870 | }
|
15871 |
|
15872 |
|
15873 |
|
15874 |
|
15875 | export declare class TileFactory<TileType extends Tile> {
|
15876 | private m_modelConstructor;
|
15877 | |
15878 |
|
15879 |
|
15880 |
|
15881 |
|
15882 |
|
15883 | constructor(m_modelConstructor: new (dataSource: DataSource, tileKey: TileKey) => TileType);
|
15884 | /**
|
15885 | * Create an instance of (subclass of) [[Tile]]. The required parameters are passed as arguments
|
15886 | * to the constructor of [[Tile]].
|
15887 | *
|
15888 | * @param dataSource - [[Datasource]] this class belongs to.
|
15889 | * @param tileKey - Quadtree address of the [[Tile]].
|
15890 | */
|
15891 | create(dataSource: DataSource, tileKey: TileKey): TileType;
|
15892 | }
|
15893 |
|
15894 | /**
|
15895 | * An interface for optional feature data that is saved in a `THREE.Object3D`'s `userData`
|
15896 | * property.
|
15897 | */
|
15898 | export declare interface TileFeatureData {
|
15899 | /**
|
15900 | * The original type of geometry.
|
15901 | */
|
15902 | geometryType?: GeometryType;
|
15903 | /**
|
15904 | * An optional array of sorted indices into geometry where the feature starts. The lists of IDs
|
15905 | * and starting indices (starts) must have the same size.
|
15906 | * Feature i starts at starts[i] and ends at starts[i+1]-1, except for the last feature, which
|
15907 | * ends at the last index in the object's geometry.
|
15908 | */
|
15909 | starts?: number[];
|
15910 | /**
|
15911 | * An optional object containing properties defined by the developer. It has the same size as
|
15912 | * the list of IDs and the starting indices (starts).
|
15913 | */
|
15914 | objInfos?: Array<{} | undefined>;
|
15915 | }
|
15916 |
|
15917 |
|
15918 |
|
15919 |
|
15920 | declare class TileGeometryLoader {
|
15921 | private m_tile;
|
15922 | |
15923 |
|
15924 |
|
15925 |
|
15926 |
|
15927 |
|
15928 |
|
15929 |
|
15930 |
|
15931 | static prepareAvailableGeometryKinds(decodedTile: DecodedTile): GeometryKindSet;
|
15932 | |
15933 |
|
15934 |
|
15935 |
|
15936 |
|
15937 |
|
15938 | static compileGeometryKind(technique: Technique): GeometryKind | GeometryKindSet;
|
15939 | private m_decodedTile?;
|
15940 | private m_isFinished;
|
15941 | private m_availableGeometryKinds;
|
15942 | private m_enabledKinds;
|
15943 | private m_disabledKinds;
|
15944 | private m_timeout;
|
15945 | constructor(m_tile: Tile);
|
15946 | /**
|
15947 | * The {@link Tile} this `TileGeometryLoader` is managing.
|
15948 | */
|
15949 | get tile(): Tile;
|
15950 | |
15951 |
|
15952 |
|
15953 | get isFinished(): boolean;
|
15954 | |
15955 |
|
15956 |
|
15957 | get geometryCreationPending(): boolean;
|
15958 | |
15959 |
|
15960 |
|
15961 | get basicGeometryLoaded(): boolean;
|
15962 | |
15963 |
|
15964 |
|
15965 | get allGeometryLoaded(): boolean;
|
15966 | |
15967 |
|
15968 |
|
15969 |
|
15970 |
|
15971 |
|
15972 |
|
15973 |
|
15974 |
|
15975 |
|
15976 |
|
15977 | setDecodedTile(decodedTile: DecodedTile): DecodedTile;
|
15978 | |
15979 |
|
15980 |
|
15981 | get availableGeometryKinds(): GeometryKindSet | undefined;
|
15982 | |
15983 |
|
15984 |
|
15985 | update(enabledKinds: GeometryKindSet | undefined, disabledKinds: GeometryKindSet | undefined): void;
|
15986 | |
15987 |
|
15988 |
|
15989 | dispose(): void;
|
15990 | |
15991 |
|
15992 |
|
15993 | reset(): void;
|
15994 | private finish;
|
15995 | |
15996 |
|
15997 |
|
15998 |
|
15999 | private prepareForRender;
|
16000 | private discardNeedlessTile;
|
16001 | |
16002 |
|
16003 |
|
16004 |
|
16005 |
|
16006 |
|
16007 |
|
16008 |
|
16009 | private setGeometryKinds;
|
16010 | |
16011 |
|
16012 |
|
16013 |
|
16014 |
|
16015 |
|
16016 |
|
16017 |
|
16018 |
|
16019 |
|
16020 |
|
16021 | private compareGeometryKinds;
|
16022 | }
|
16023 |
|
16024 |
|
16025 |
|
16026 |
|
16027 | declare class TileGeometryManager {
|
16028 | protected mapView: MapView;
|
16029 | |
16030 |
|
16031 |
|
16032 | get enabledGeometryKinds(): GeometryKindSet;
|
16033 | set enabledGeometryKinds(kinds: GeometryKindSet);
|
16034 | |
16035 |
|
16036 |
|
16037 |
|
16038 | get disabledGeometryKinds(): GeometryKindSet;
|
16039 | set disabledGeometryKinds(kinds: GeometryKindSet);
|
16040 | |
16041 |
|
16042 |
|
16043 |
|
16044 | get hiddenGeometryKinds(): GeometryKindSet;
|
16045 | set hiddenGeometryKinds(kinds: GeometryKindSet);
|
16046 | |
16047 |
|
16048 |
|
16049 |
|
16050 | enableFilterByKind: boolean;
|
16051 | protected get visibilityCounter(): number;
|
16052 | protected enabledKinds: GeometryKindSet;
|
16053 | protected disabledKinds: GeometryKindSet;
|
16054 | protected hiddenKinds: GeometryKindSet;
|
16055 | protected m_tileUpdateCallback: TileUpdateCallback | undefined;
|
16056 | |
16057 |
|
16058 |
|
16059 |
|
16060 | private m_visibilityCounter;
|
16061 | |
16062 |
|
16063 |
|
16064 | constructor(mapView: MapView);
|
16065 | /**
|
16066 | * Initialize the {@link Tile} with the TileGeometryManager.
|
16067 | */
|
16068 | initTile(tile: Tile): void;
|
16069 | |
16070 |
|
16071 |
|
16072 | updateTiles(tiles: Tile[]): void;
|
16073 | |
16074 |
|
16075 |
|
16076 | clear(): void;
|
16077 | |
16078 |
|
16079 |
|
16080 |
|
16081 |
|
16082 |
|
16083 |
|
16084 |
|
16085 | enableKind(kind: GeometryKind | GeometryKind[] | GeometryKindSet, addOrRemoveToEnabledSet?: boolean): void;
|
16086 | |
16087 |
|
16088 |
|
16089 |
|
16090 |
|
16091 |
|
16092 |
|
16093 |
|
16094 | disableKind(kind: GeometryKind | GeometryKind[] | GeometryKindSet, addOrRemoveToDisabledSet?: boolean): void;
|
16095 | |
16096 |
|
16097 |
|
16098 |
|
16099 |
|
16100 |
|
16101 |
|
16102 |
|
16103 | hideKind(kind: GeometryKind | GeometryKind[] | GeometryKindSet, addOrRemoveToHiddenSet?: boolean): void;
|
16104 | |
16105 |
|
16106 |
|
16107 |
|
16108 |
|
16109 |
|
16110 | getAvailableKinds(tiles: IterableIterator<Tile>): GeometryKindSet;
|
16111 | |
16112 |
|
16113 |
|
16114 |
|
16115 |
|
16116 |
|
16117 | updateTileObjectVisibility(tiles: Tile[]): boolean;
|
16118 | |
16119 |
|
16120 |
|
16121 |
|
16122 |
|
16123 |
|
16124 |
|
16125 | setTileUpdateCallback(callback?: TileUpdateCallback): void;
|
16126 | protected incrementVisibilityCounter(): number;
|
16127 | |
16128 |
|
16129 |
|
16130 |
|
16131 |
|
16132 |
|
16133 |
|
16134 |
|
16135 | private enableDisableKinds;
|
16136 | |
16137 |
|
16138 |
|
16139 |
|
16140 |
|
16141 |
|
16142 |
|
16143 |
|
16144 | private addRemove;
|
16145 | }
|
16146 |
|
16147 |
|
16148 |
|
16149 |
|
16150 | export declare interface TileInfo {
|
16151 | readonly tileKey: TileKey;
|
16152 | readonly setupTime: number;
|
16153 | readonly transferList?: ArrayBuffer[];
|
16154 | readonly numBytes: number;
|
16155 | }
|
16156 |
|
16157 |
|
16158 |
|
16159 |
|
16160 |
|
16161 | export declare class TileInfoLoader extends TileLoader {
|
16162 | tileInfo?: TileInfo;
|
16163 |
|
16164 | protected startDecodeTile(): void;
|
16165 | }
|
16166 |
|
16167 |
|
16168 |
|
16169 |
|
16170 |
|
16171 |
|
16172 |
|
16173 |
|
16174 |
|
16175 |
|
16176 |
|
16177 |
|
16178 |
|
16179 |
|
16180 |
|
16181 |
|
16182 |
|
16183 |
|
16184 |
|
16185 |
|
16186 |
|
16187 |
|
16188 |
|
16189 |
|
16190 |
|
16191 |
|
16192 |
|
16193 |
|
16194 |
|
16195 |
|
16196 |
|
16197 | export declare class TileKey {
|
16198 | readonly row: number;
|
16199 | readonly column: number;
|
16200 | readonly level: number;
|
16201 | |
16202 |
|
16203 |
|
16204 |
|
16205 |
|
16206 |
|
16207 |
|
16208 | static fromRowColumnLevel(row: number, column: number, level: number): TileKey;
|
16209 | |
16210 |
|
16211 |
|
16212 |
|
16213 |
|
16214 |
|
16215 |
|
16216 |
|
16217 | static fromQuadKey(quadkey: string): TileKey;
|
16218 | |
16219 |
|
16220 |
|
16221 |
|
16222 |
|
16223 |
|
16224 |
|
16225 |
|
16226 | static fromMortonCode(quadKey64: number): TileKey;
|
16227 | |
16228 |
|
16229 |
|
16230 |
|
16231 |
|
16232 |
|
16233 |
|
16234 |
|
16235 | static fromHereTile(quadkey64: string): TileKey;
|
16236 | |
16237 |
|
16238 |
|
16239 |
|
16240 |
|
16241 |
|
16242 |
|
16243 |
|
16244 | static columnsAtLevel(level: number): number;
|
16245 | |
16246 |
|
16247 |
|
16248 |
|
16249 |
|
16250 |
|
16251 |
|
16252 |
|
16253 | static rowsAtLevel(level: number): number;
|
16254 | |
16255 |
|
16256 |
|
16257 |
|
16258 |
|
16259 |
|
16260 |
|
16261 |
|
16262 |
|
16263 |
|
16264 | static atCoords(level: number, coordX: number, coordY: number, totalWidth: number, totalHeight: number): TileKey;
|
16265 | |
16266 |
|
16267 |
|
16268 |
|
16269 |
|
16270 |
|
16271 |
|
16272 |
|
16273 | static parentMortonCode(mortonCode: number): number;
|
16274 | private m_mortonCode?;
|
16275 | private m_hereTile?;
|
16276 | |
16277 |
|
16278 |
|
16279 |
|
16280 |
|
16281 |
|
16282 |
|
16283 |
|
16284 |
|
16285 |
|
16286 |
|
16287 | constructor(row: number, column: number, level: number);
|
16288 | /**
|
16289 | * Returns a tile key representing the parent of the tile addressed by this tile key.
|
16290 | *
|
16291 | * Throws an exception is this tile is already the root.
|
16292 | */
|
16293 | parent(): TileKey;
|
16294 | /**
|
16295 | * Returns a new tile key at a level that differs from this tile's level by delta.
|
16296 | *
|
16297 | * Equivalent to `changedLevelTo(level() + delta)`.
|
16298 | *
|
16299 | * Note - root key is returned if `delta` is smaller than the level of this tile key.
|
16300 | *
|
16301 | * @param delta - The numeric difference between the current level and the requested level.
|
16302 | */
|
16303 | changedLevelBy(delta: number): TileKey;
|
16304 | /**
|
16305 | * Returns a new tile key at the requested level.
|
16306 | *
|
16307 | * If the requested level is smaller than the tile's level, then the key of an ancestor of this
|
16308 | * tile is returned. If the requested level is larger than the tile's level, then the key of
|
16309 | * first child or grandchild of this tile is returned, for example, the child with the lowest
|
16310 | * row and column number. If the requested level equals this tile's level, then the tile key
|
16311 | * itself is returned. If the requested level is negative, the root tile key is returned.
|
16312 | *
|
16313 | * @param level - The requested level.
|
16314 | */
|
16315 | changedLevelTo(level: number): TileKey;
|
16316 | /**
|
16317 | * Converts the tile key to a numeric code representation.
|
16318 | *
|
16319 | * You can create a tile key from a numeric Morton code with [[fromMortonCode]].
|
16320 | *
|
16321 | * Note - only levels <= 26 are supported.
|
16322 | */
|
16323 | mortonCode(): number;
|
16324 | /**
|
16325 | * Converts the tile key into a string for using in REST API calls.
|
16326 | *
|
16327 | * The string is a quadkey Morton code representation as a string.
|
16328 | *
|
16329 | * You can convert back from a quadkey string with [[fromHereTile]].
|
16330 | */
|
16331 | toHereTile(): string;
|
16332 | /**
|
16333 | * Converts the tile key into a string for using in REST API calls.
|
16334 | *
|
16335 | * If the tile is the root tile, the quadkey is '-'. Otherwise the string is a number to the
|
16336 | * base of 4, but without the leading 1, with the following properties:
|
16337 | * 1. the number of digits equals the level.
|
16338 | * 2. removing the last digit gives the parent tile's quadkey string, i.e. appending 0,1,2,3
|
16339 | * to a quadkey string gives the tiles's children.
|
16340 | *
|
16341 | * You can convert back from a quadkey string with [[fromQuadKey]].
|
16342 | */
|
16343 | toQuadKey(): string;
|
16344 | /**
|
16345 | * Equality operator.
|
16346 | *
|
16347 | * @param qnr - The tile key to compare to.
|
16348 | * @returns `true` if this tile key has identical row, column and level, `false` otherwise.
|
16349 | */
|
16350 | equals(qnr: TileKey): boolean;
|
16351 | /**
|
16352 | * Returns the absolute quadkey that is constructed from its sub quadkey.
|
16353 | *
|
16354 | * @param sub - The sub key.
|
16355 | * @returns The absolute tile key in the quadtree.
|
16356 | */
|
16357 | addedSubKey(sub: string): TileKey;
|
16358 | /**
|
16359 | * Returns the absolute quadkey that is constructed from its sub HERE tile key.
|
16360 | *
|
16361 | * @param sub - The sub HERE key.
|
16362 | * @returns The absolute tile key in the quadtree.
|
16363 | */
|
16364 | addedSubHereTile(sub: string): TileKey;
|
16365 | /**
|
16366 | * Returns a sub quadkey that is relative to its parent.
|
16367 | *
|
16368 | * This function can be used to generate sub keys that are relative to a parent that is delta
|
16369 | * levels up in the quadtree.
|
16370 | *
|
16371 | * This function can be used to create shortened keys for quads on lower levels if the parent is
|
16372 | * known.
|
16373 | *
|
16374 | * Note - the sub quadkeys fit in a 16-bit unsigned integer if the `delta` is smaller than 8. If
|
16375 | * `delta` is smaller than 16, the sub quadkey fits into an unsigned 32-bit integer.
|
16376 | *
|
16377 | * Deltas larger than 16 are not supported.
|
16378 | *
|
16379 | * @param delta - The number of levels relative to its parent quadkey. Must be greater or equal
|
16380 | * to 0 and smaller than 16.
|
16381 | * @returns The quadkey relative to its parent that is `delta` levels up the tree.
|
16382 | */
|
16383 | getSubHereTile(delta: number): string;
|
16384 | /**
|
16385 | * Returns the number of available rows in the tile's [[level]].
|
16386 | *
|
16387 | * This is 2 to the power of the level.
|
16388 | */
|
16389 | rowCount(): number;
|
16390 | /**
|
16391 | * Returns the number of available columns in the tile's [[level]].
|
16392 | *
|
16393 | * This is 2 to the power of the level.
|
16394 | */
|
16395 | columnCount(): number;
|
16396 | }
|
16397 |
|
16398 | /**
|
16399 | * Map tile keys to TileKeyEntry.
|
16400 | * Keys are a combination of morton code and tile offset,
|
16401 | * see [[TileOffsetUtils.getKeyForTileKeyAndOffset]].
|
16402 | */
|
16403 | declare type TileKeyEntries = Map<number, TileKeyEntry>;
|
16404 |
|
16405 | /**
|
16406 | * Represents a unique TileKey and the area it takes up on screen.
|
16407 | *
|
16408 | * Note, in certain tiling projections, it is possible to have an offset, which represents a tile
|
16409 | * which has fully wrapped around, hence this defaults to 0 to simplify usage for projections which
|
16410 | * don't require it.
|
16411 | */
|
16412 | declare class TileKeyEntry {
|
16413 | tileKey: TileKey;
|
16414 | area: number;
|
16415 | offset: number;
|
16416 | minElevation: number;
|
16417 | maxElevation: number;
|
16418 | distance: number;
|
16419 | constructor(tileKey: TileKey, area: number, offset?: number, minElevation?: number, maxElevation?: number, distance?: number);
|
16420 | }
|
16421 |
|
16422 | export declare class TileKeyUtils {
|
16423 | static geoCoordinatesToTileKey(tilingScheme: TilingScheme, geoPoint: GeoCoordinatesLike, level: number): TileKey | null;
|
16424 | static worldCoordinatesToTileKey(tilingScheme: TilingScheme, worldPoint: Vector3Like, level: number): TileKey | null;
|
16425 | static geoRectangleToTileKeys(tilingScheme: TilingScheme, geoBox: GeoBox, level: number): TileKey[];
|
16426 | }
|
16427 |
|
16428 |
|
16429 |
|
16430 |
|
16431 |
|
16432 | export declare class TileLoader {
|
16433 | protected dataSource: DataSource;
|
16434 | protected tileKey: TileKey;
|
16435 | protected dataProvider: DataProvider;
|
16436 | protected tileDecoder: ITileDecoder;
|
16437 | priority: number;
|
16438 | |
16439 |
|
16440 |
|
16441 | state: TileLoaderState;
|
16442 | |
16443 |
|
16444 |
|
16445 | error?: Error;
|
16446 | |
16447 |
|
16448 |
|
16449 | payload?: ArrayBufferLike | {};
|
16450 | |
16451 |
|
16452 |
|
16453 | decodedTile?: DecodedTile;
|
16454 | |
16455 |
|
16456 |
|
16457 | protected loadAbortController: AbortController;
|
16458 | |
16459 |
|
16460 |
|
16461 | protected requestController?: RequestController;
|
16462 | |
16463 |
|
16464 |
|
16465 | protected donePromise?: Promise<TileLoaderState>;
|
16466 | |
16467 |
|
16468 |
|
16469 | protected resolveDonePromise?: (state: TileLoaderState) => void;
|
16470 | |
16471 |
|
16472 |
|
16473 | protected rejectedDonePromise?: (state: TileLoaderState) => void;
|
16474 | |
16475 |
|
16476 |
|
16477 |
|
16478 |
|
16479 |
|
16480 |
|
16481 |
|
16482 |
|
16483 | constructor(dataSource: DataSource, tileKey: TileKey, dataProvider: DataProvider, tileDecoder: ITileDecoder, priority: number);
|
16484 | /**
|
16485 | * Start loading and/or proceed through the various states of loading of this tile.
|
16486 | *
|
16487 | * @returns A promise which resolves the [[TileLoaderState]].
|
16488 | */
|
16489 | loadAndDecode(): Promise<TileLoaderState>;
|
16490 | /**
|
16491 | * Return the current state in form of a promise. Caller can then wait for the promise to be
|
16492 | * resolved.
|
16493 | *
|
16494 | * @returns A promise which resolves the current [[TileLoaderState]].
|
16495 | */
|
16496 | waitSettled(): Promise<TileLoaderState>;
|
16497 | /**
|
16498 | * Cancel loading of the [[Tile]].
|
16499 | * Cancellation token is notified, an internal state is cleaned up.
|
16500 | */
|
16501 | cancel(): void;
|
16502 | /**
|
16503 | * Return `true` if [[Tile]] is still loading, `false` otherwise.
|
16504 | */
|
16505 | get isFinished(): boolean;
|
16506 | /**
|
16507 | * Update the priority of this [[Tile]]'s priority. Is effective to sort the decoding requests
|
16508 | * in the request queue (used during heavy load).
|
16509 | */
|
16510 | updatePriority(priority: number): void;
|
16511 | /**
|
16512 | * Start loading. Only call if loading did not start yet.
|
16513 | */
|
16514 | protected startLoading(): void;
|
16515 | /**
|
16516 | * Called when binary data has been loaded. The loading state is now progressing to decoding.
|
16517 | *
|
16518 | * @param payload - Binary data in form of [[ArrayBufferLike]], or any object.
|
16519 | */
|
16520 | protected onLoaded(payload: ArrayBufferLike | {}): void;
|
16521 | /**
|
16522 | * Start decoding the payload.
|
16523 | */
|
16524 | protected startDecodeTile(): void;
|
16525 | /**
|
16526 | * Called when the decoding is finished, and the [[DecodedTile]] has been created.
|
16527 | *
|
16528 | * @param decodedTile - The [[DecodedTile]].
|
16529 | */
|
16530 | protected onDecoded(decodedTile: DecodedTile): void;
|
16531 | /**
|
16532 | * Cancel the decoding process.
|
16533 | */
|
16534 | protected cancelDecoding(): void;
|
16535 | /**
|
16536 | * Called when loading and decoding has finished successfully. Resolves loading promise if the
|
16537 | * state is Ready, otherwise it rejects the promise with the supplied state.
|
16538 | *
|
16539 | * @param doneState - The latest state of loading.
|
16540 | */
|
16541 | protected onDone(doneState: TileLoaderState): void;
|
16542 | /**
|
16543 | * Called when loading or decoding has finished with an error.
|
16544 | *
|
16545 | * @param error - Error object describing the failing.
|
16546 | */
|
16547 | protected onError(error: Error): void;
|
16548 | }
|
16549 |
|
16550 | /**
|
16551 | * Missing Typedoc
|
16552 | */
|
16553 | export declare enum TileLoaderState {
|
16554 | Initialized = 0,
|
16555 | Loading = 1,
|
16556 | Loaded = 2,
|
16557 | Decoding = 3,
|
16558 | Ready = 4,
|
16559 | Canceled = 5,
|
16560 | Failed = 6
|
16561 | }
|
16562 |
|
16563 | export declare type TileObject = THREE_2.Object3D & {
|
16564 | |
16565 |
|
16566 |
|
16567 | displacement?: THREE_2.Vector3;
|
16568 | |
16569 |
|
16570 |
|
16571 |
|
16572 |
|
16573 |
|
16574 | _backupRenderOrder?: number;
|
16575 | };
|
16576 |
|
16577 | export declare namespace TileOffsetUtils {
|
16578 | |
16579 |
|
16580 |
|
16581 |
|
16582 |
|
16583 |
|
16584 |
|
16585 |
|
16586 |
|
16587 |
|
16588 |
|
16589 |
|
16590 |
|
16591 | export function getKeyForTileKeyAndOffset(tileKey: TileKey, offset: number, bitshift?: number): number;
|
16592 | |
16593 |
|
16594 |
|
16595 |
|
16596 |
|
16597 |
|
16598 |
|
16599 |
|
16600 |
|
16601 |
|
16602 |
|
16603 | export function extractOffsetAndMortonKeyFromKey(key: number, bitshift?: number): {
|
16604 | offset: number;
|
16605 | mortonCode: number;
|
16606 | };
|
16607 | |
16608 |
|
16609 |
|
16610 |
|
16611 |
|
16612 |
|
16613 |
|
16614 | export function getParentKeyFromKey(calculatedKey: number, bitshift?: number): number;
|
16615 | }
|
16616 |
|
16617 |
|
16618 |
|
16619 |
|
16620 |
|
16621 | export declare interface TileResourceInfo {
|
16622 | |
16623 |
|
16624 |
|
16625 | heapSize: number;
|
16626 | |
16627 |
|
16628 |
|
16629 | gpuSize: number;
|
16630 | |
16631 |
|
16632 |
|
16633 | num3dObjects: number;
|
16634 | |
16635 |
|
16636 |
|
16637 | numTextElements: number;
|
16638 | |
16639 |
|
16640 |
|
16641 |
|
16642 | numUserTextElements: number;
|
16643 | }
|
16644 |
|
16645 |
|
16646 |
|
16647 |
|
16648 | export declare interface TileResourceUsage {
|
16649 | |
16650 |
|
16651 |
|
16652 | estimatedMemoryUsage: number;
|
16653 | |
16654 |
|
16655 |
|
16656 | numVertices: number;
|
16657 | |
16658 |
|
16659 |
|
16660 | numColors: number;
|
16661 | |
16662 |
|
16663 |
|
16664 | numObjects: number;
|
16665 | |
16666 |
|
16667 |
|
16668 | numGeometries: number;
|
16669 | |
16670 |
|
16671 |
|
16672 | numMaterials: number;
|
16673 | }
|
16674 |
|
16675 | declare class TileTextStyleCache {
|
16676 | private textRenderStyles;
|
16677 | private textLayoutStyles;
|
16678 | private tile;
|
16679 | constructor(tile: Tile);
|
16680 | clear(): void;
|
16681 | getRenderStyle(technique: (TextTechnique | PoiTechnique | LineMarkerTechnique) & IndexedTechniqueParams): TextRenderStyle;
|
16682 | getLayoutStyle(technique: (TextTechnique | PoiTechnique | LineMarkerTechnique) & IndexedTechniqueParams): TextLayoutStyle;
|
16683 | }
|
16684 |
|
16685 | export declare class TileTreeTraverse {
|
16686 | private m_subdivisionScheme;
|
16687 | constructor(subdivisionScheme: SubdivisionScheme);
|
16688 | subTiles(tileKey: TileKey): Iterable<TileKey>;
|
16689 | }
|
16690 |
|
16691 | declare type TileUpdateCallback = (tile: Tile) => void;
|
16692 |
|
16693 | /**
|
16694 | * The `TilingScheme` represents how the data is tiled.
|
16695 | */
|
16696 | export declare class TilingScheme {
|
16697 | readonly subdivisionScheme: SubdivisionScheme;
|
16698 | readonly projection: Projection;
|
16699 | readonly boundingBoxGenerator: FlatTileBoundingBoxGenerator;
|
16700 | readonly tileTreeTraverse: TileTreeTraverse;
|
16701 | |
16702 |
|
16703 |
|
16704 |
|
16705 |
|
16706 |
|
16707 | constructor(subdivisionScheme: SubdivisionScheme, projection: Projection);
|
16708 | /**
|
16709 | * Returns the sub tile keys of the given tile.
|
16710 | *
|
16711 | * @param tileKey - The {@link TileKey}.
|
16712 | * @returns The list of the sub tile keys.
|
16713 | */
|
16714 | getSubTileKeys(tileKey: TileKey): Iterable<TileKey>;
|
16715 | |
16716 |
|
16717 |
|
16718 |
|
16719 |
|
16720 |
|
16721 | getTileKey(geoPoint: GeoCoordinatesLike, level: number): TileKey | null;
|
16722 | |
16723 |
|
16724 |
|
16725 |
|
16726 |
|
16727 |
|
16728 | getTileKeys(geoBox: GeoBox, level: number): TileKey[];
|
16729 | |
16730 |
|
16731 |
|
16732 |
|
16733 |
|
16734 | getGeoBox(tileKey: TileKey): GeoBox;
|
16735 | |
16736 |
|
16737 |
|
16738 |
|
16739 |
|
16740 |
|
16741 | getWorldBox(tileKey: TileKey, result?: Box3Like): Box3Like;
|
16742 | }
|
16743 |
|
16744 | export declare enum TiltState {
|
16745 | Tilted = 0,
|
16746 | Down = 1
|
16747 | }
|
16748 |
|
16749 |
|
16750 |
|
16751 |
|
16752 |
|
16753 |
|
16754 |
|
16755 | export declare class TiltViewClipPlanesEvaluator extends TopViewClipPlanesEvaluator {
|
16756 | |
16757 |
|
16758 |
|
16759 |
|
16760 |
|
16761 |
|
16762 |
|
16763 |
|
16764 |
|
16765 |
|
16766 | protected getFrustumGroundIntersectionDist(camera: THREE_2.Camera, projection: Projection): {
|
16767 | top: number;
|
16768 | bottom: number;
|
16769 | };
|
16770 |
|
16771 | protected evaluateDistancePlanarProj(camera: THREE_2.Camera, projection: Projection, elevationProvider?: ElevationProvider): ViewRanges;
|
16772 |
|
16773 | protected evaluateDistanceSphericalProj(camera: THREE_2.Camera, projection: Projection, elevationProvider?: ElevationProvider): ViewRanges;
|
16774 | protected getTiltedFovBasedFarPlane(d: number, r: number, halfFovAngle: number, cameraPitch: number): number;
|
16775 | private getCameraPitch;
|
16776 | }
|
16777 |
|
16778 |
|
16779 |
|
16780 |
|
16781 |
|
16782 | export declare interface Timer {
|
16783 | readonly name: string;
|
16784 | readonly value?: number;
|
16785 | |
16786 |
|
16787 |
|
16788 | reset(): void;
|
16789 | |
16790 |
|
16791 |
|
16792 | start(): number;
|
16793 | |
16794 |
|
16795 |
|
16796 | stop(): number;
|
16797 | |
16798 |
|
16799 |
|
16800 |
|
16801 |
|
16802 |
|
16803 | now(): number;
|
16804 | |
16805 |
|
16806 |
|
16807 |
|
16808 |
|
16809 |
|
16810 | setValue(val: number | undefined): void;
|
16811 | }
|
16812 |
|
16813 |
|
16814 |
|
16815 |
|
16816 | declare interface TokenAuthentication {
|
16817 | |
16818 |
|
16819 |
|
16820 |
|
16821 |
|
16822 |
|
16823 | authenticationCode: string | AuthenticationProvider;
|
16824 | }
|
16825 |
|
16826 |
|
16827 |
|
16828 |
|
16829 |
|
16830 |
|
16831 |
|
16832 |
|
16833 |
|
16834 |
|
16835 |
|
16836 |
|
16837 |
|
16838 | export declare class TopViewClipPlanesEvaluator extends ElevationBasedClipPlanesEvaluator {
|
16839 | readonly nearMin: number;
|
16840 | readonly nearFarMarginRatio: number;
|
16841 | readonly farMaxRatio: number;
|
16842 | |
16843 |
|
16844 |
|
16845 | protected m_tmpVectors: THREE_2.Vector3[];
|
16846 | |
16847 |
|
16848 |
|
16849 | protected m_tmpQuaternion: THREE_2.Quaternion;
|
16850 | private m_minimumViewRange;
|
16851 | |
16852 |
|
16853 |
|
16854 |
|
16855 |
|
16856 |
|
16857 |
|
16858 |
|
16859 |
|
16860 |
|
16861 |
|
16862 |
|
16863 |
|
16864 |
|
16865 |
|
16866 |
|
16867 |
|
16868 |
|
16869 |
|
16870 |
|
16871 |
|
16872 |
|
16873 |
|
16874 |
|
16875 |
|
16876 |
|
16877 |
|
16878 |
|
16879 |
|
16880 |
|
16881 | constructor(maxElevation?: number, minElevation?: number, nearMin?: number, nearFarMarginRatio?: number, farMaxRatio?: number);
|
16882 | /** @override */
|
16883 | evaluateClipPlanes(camera: THREE_2.Camera, projection: Projection, elevationProvider?: ElevationProvider): ViewRanges;
|
16884 | /**
|
16885 | * Get minimum view range that is possible to achieve with current evaluator settings.
|
16886 | * @note This value will not change after evaluator is constructed.
|
16887 | */
|
16888 | protected get minimumViewRange(): ViewRanges;
|
16889 | /**
|
16890 | * Calculate camera altitude (closest distance) to ground level in world units.
|
16891 | * @param camera -
|
16892 | * @param projection -
|
16893 | */
|
16894 | protected getCameraAltitude(camera: THREE_2.Camera, projection: Projection): number;
|
16895 | protected evaluateDistancePlanarProj(camera: THREE_2.Camera, projection: Projection, elevationProvider?: ElevationProvider): ViewRanges;
|
16896 | protected evaluateDistanceSphericalProj(camera: THREE_2.Camera, projection: Projection, elevationProvider?: ElevationProvider): ViewRanges;
|
16897 | /**
|
16898 | * Calculate distance from a point to the tangent point of a sphere.
|
16899 | *
|
16900 | * Returns zero if point is below surface or only very slightly above surface of sphere.
|
16901 | * @param d - Distance from point to center of sphere
|
16902 | * @param r - Radius of sphere
|
16903 | */
|
16904 | protected getTangentDistance(d: number, r: number): number;
|
16905 | /**
|
16906 | * Calculate far plane depending on furthest visible distance from camera position.
|
16907 | *
|
16908 | * Furthest visible distance is assumed to be distance from camera to horizon
|
16909 | * plus distance from elevated geometry to horizon(so that high objects behind horizon
|
16910 | * remain visible).
|
16911 | * @param camera - The camera of the mapview
|
16912 | * @param d - Distance from camera to origin
|
16913 | * @param r - Radius of earth
|
16914 | * @param alpha - Angle between camera eye vector and tangent
|
16915 | */
|
16916 | protected getTangentBasedFarPlane(camera: THREE_2.PerspectiveCamera, d: number, r: number, alpha: number): number;
|
16917 | protected getFovBasedFarPlane(camera: THREE_2.PerspectiveCamera, d: number, r: number, fovAngle: number, projection: Projection): number;
|
16918 | protected getOrthoBasedFarPlane(d: number, r: number): number;
|
16919 | }
|
16920 |
|
16921 | /**
|
16922 | * The interface {@link TransformLike} is used to represent transforms with
|
16923 | * only translation and rotation.
|
16924 | */
|
16925 | export declare interface TransformLike {
|
16926 | |
16927 |
|
16928 |
|
16929 | readonly position: Vector3Like;
|
16930 | |
16931 |
|
16932 |
|
16933 | readonly xAxis: Vector3Like;
|
16934 | |
16935 |
|
16936 |
|
16937 | readonly yAxis: Vector3Like;
|
16938 | |
16939 |
|
16940 |
|
16941 | readonly zAxis: Vector3Like;
|
16942 | }
|
16943 |
|
16944 |
|
16945 |
|
16946 |
|
16947 |
|
16948 | export declare const TRANSPARENCY_PROPERTY_KEYS: string[];
|
16949 |
|
16950 |
|
16951 |
|
16952 |
|
16953 |
|
16954 | export declare const transverseMercatorProjection: Projection;
|
16955 |
|
16956 | export declare class TransverseMercatorUtils {
|
16957 | static POLE_EDGE: number;
|
16958 | static POLE_EDGE_DEG: number;
|
16959 | static POLE_RADIUS: number;
|
16960 | static POLE_RADIUS_SQ: number;
|
16961 | |
16962 |
|
16963 |
|
16964 |
|
16965 |
|
16966 |
|
16967 |
|
16968 | static alignLatitude(points: GeoCoordinatesLike[], referencePoint: GeoCoordinatesLike): void;
|
16969 | |
16970 |
|
16971 |
|
16972 |
|
16973 |
|
16974 |
|
16975 | static alignLongitude(points: GeoCoordinatesLike[], referencePoint: GeoCoordinatesLike): void;
|
16976 | }
|
16977 |
|
16978 |
|
16979 |
|
16980 |
|
16981 |
|
16982 | declare interface UnicodeBlock {
|
16983 | name: string;
|
16984 | min: number;
|
16985 | max: number;
|
16986 | fonts: string[];
|
16987 | }
|
16988 |
|
16989 |
|
16990 |
|
16991 |
|
16992 | declare namespace UnicodeUtils {
|
16993 | |
16994 |
|
16995 |
|
16996 |
|
16997 | const whiteSpaceRanges: number[][];
|
16998 | |
16999 |
|
17000 |
|
17001 |
|
17002 |
|
17003 |
|
17004 |
|
17005 | function isWhiteSpace(codePoint: number): boolean;
|
17006 | |
17007 |
|
17008 |
|
17009 |
|
17010 | const newLineRanges: number[][];
|
17011 | |
17012 |
|
17013 |
|
17014 |
|
17015 |
|
17016 |
|
17017 |
|
17018 | function isNewLine(codePoint: number): boolean;
|
17019 | |
17020 |
|
17021 |
|
17022 |
|
17023 | const nonPrintableRanges: number[][];
|
17024 | |
17025 |
|
17026 |
|
17027 |
|
17028 |
|
17029 |
|
17030 |
|
17031 | function isPrintable(codePoint: number): boolean;
|
17032 | |
17033 |
|
17034 |
|
17035 | enum Direction {
|
17036 | Neutral = 0,
|
17037 | Weak = 0.5,
|
17038 | LTR = 1,
|
17039 | RTL = -1
|
17040 | }
|
17041 | |
17042 |
|
17043 |
|
17044 |
|
17045 |
|
17046 | const rtlBlocks: string[];
|
17047 | |
17048 |
|
17049 |
|
17050 |
|
17051 | const neutralBidirectionalRanges: number[][];
|
17052 | |
17053 |
|
17054 |
|
17055 |
|
17056 |
|
17057 | const weakBidirectionalRanges: number[][];
|
17058 | |
17059 |
|
17060 |
|
17061 |
|
17062 |
|
17063 |
|
17064 |
|
17065 |
|
17066 | function getDirection(codePoint: number, block: string): Direction;
|
17067 | |
17068 |
|
17069 |
|
17070 |
|
17071 |
|
17072 | const rtlMirroredCodePoints: number[];
|
17073 | |
17074 |
|
17075 |
|
17076 |
|
17077 |
|
17078 |
|
17079 |
|
17080 | function isRtlMirrored(codePoint: number): boolean;
|
17081 | }
|
17082 |
|
17083 |
|
17084 |
|
17085 |
|
17086 | declare interface UriResolver {
|
17087 | |
17088 |
|
17089 |
|
17090 |
|
17091 |
|
17092 |
|
17093 |
|
17094 |
|
17095 |
|
17096 | resolveUri(uri: string): string;
|
17097 | }
|
17098 |
|
17099 |
|
17100 |
|
17101 |
|
17102 | export declare class UrlCopyrightProvider extends CopyrightCoverageProvider {
|
17103 | private m_fetchURL;
|
17104 | private m_baseScheme;
|
17105 | private m_requestHeaders?;
|
17106 | private m_transferManager;
|
17107 | private m_cachedCopyrightResponse;
|
17108 | |
17109 |
|
17110 |
|
17111 |
|
17112 |
|
17113 |
|
17114 |
|
17115 | constructor(m_fetchURL: string, m_baseScheme: string, m_requestHeaders?: RequestHeaders_2 | undefined, m_transferManager?: ITransferManager);
|
17116 | /**
|
17117 | * Sets request headers.
|
17118 | * @param headers -
|
17119 | */
|
17120 | setRequestHeaders(headers: RequestHeaders_2 | undefined): void;
|
17121 | /**
|
17122 | * @inheritdoc
|
17123 | * @override
|
17124 | */
|
17125 | getCopyrightCoverageData(): Promise<AreaCopyrightInfo[]>;
|
17126 | }
|
17127 |
|
17128 | /**
|
17129 | * Determines if a technique uses THREE.Object3D instances.
|
17130 | * @param technique - The technique to check.
|
17131 | * @returns true if technique uses THREE.Object3D, false otherwise.
|
17132 | */
|
17133 | export declare function usesObject3D(technique: Technique): boolean;
|
17134 |
|
17135 | /**
|
17136 | * The type representing the value of a property.
|
17137 | */
|
17138 | export declare type Value = null | boolean | number | string | object;
|
17139 |
|
17140 | /**
|
17141 | * An interface defining a collection of named properties.
|
17142 | *
|
17143 | * @example
|
17144 | * ```typescript
|
17145 | * const properties: ValueMap = {
|
17146 | * $id: 123,
|
17147 | * color: "rgba(255, 0, 0, 1)"
|
17148 | * }
|
17149 | * ```
|
17150 | */
|
17151 | export declare interface ValueMap {
|
17152 | [name: string]: Value;
|
17153 | }
|
17154 |
|
17155 | /**
|
17156 | * A node representing a `get` expression.
|
17157 | */
|
17158 | export declare class VarExpr extends Expr {
|
17159 | readonly name: string;
|
17160 | constructor(name: string);
|
17161 | /** @override */
|
17162 | accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result;
|
17163 | /** @override */
|
17164 | protected exprIsDynamic(): boolean;
|
17165 | }
|
17166 |
|
17167 | /**
|
17168 | * Interface representing a Vector3.
|
17169 | */
|
17170 | export declare interface Vector3Like {
|
17171 | /**
|
17172 | * The X position.
|
17173 | */
|
17174 | x: number;
|
17175 | /**
|
17176 | * The Y position.
|
17177 | */
|
17178 | y: number;
|
17179 | /**
|
17180 | * The Z position.
|
17181 | */
|
17182 | z: number;
|
17183 | }
|
17184 |
|
17185 | /**
|
17186 | * Describes vertex attribute parameters of interleaved buffer.
|
17187 | */
|
17188 | declare interface VertexAttributeDescriptor {
|
17189 | name: string;
|
17190 | itemSize: number;
|
17191 | offset: number;
|
17192 | }
|
17193 |
|
17194 | /**
|
17195 | * Vertical alignment to be used when placing text.
|
17196 | */
|
17197 | declare enum VerticalAlignment {
|
17198 | Above = 0,
|
17199 | Center = -0.5,
|
17200 | Below = -1
|
17201 | }
|
17202 |
|
17203 | /**
|
17204 | * Vertical position of text area relative to the placement context (point, line).
|
17205 | */
|
17206 | declare enum VerticalPlacement {
|
17207 | Top = 0,
|
17208 | Center = -0.5,
|
17209 | Bottom = -1
|
17210 | }
|
17211 |
|
17212 | /**
|
17213 | * Structure that holds near, far planes distances and maximum visibility range.
|
17214 | */
|
17215 | declare interface ViewRanges {
|
17216 | /**
|
17217 | * Distance from camera to near clipping plane along camera eye vector.
|
17218 | * @note This value is always positive and in camera space, should be bigger then zero.
|
17219 | */
|
17220 | near: number;
|
17221 | /**
|
17222 | * Far clipping plane distance in camera space, along its eye vector.
|
17223 | * @note Should be always positive and bigger then [[near]] plane distance.
|
17224 | */
|
17225 | far: number;
|
17226 | /**
|
17227 | * Minimum distance that may be applied to near plane.
|
17228 | *
|
17229 | * Reflects minimum possible near plane distance regardless of camera orientation.
|
17230 | *
|
17231 | * @note Such constraint is always required because near plane can not be placed at zero
|
17232 | * distance from camera (regardless of rendering Api used). Moreover this value may be
|
17233 | * used as input for algorighms related to frustum planes, but rather based on visibility
|
17234 | * ranges such as it does not change during tilt. Frustum planes may change dynamically with
|
17235 | * camera orientation changes, while this value preserve constness for certain camera
|
17236 | * position and may be used for effects like near geometry fading.
|
17237 | */
|
17238 | minimum: number;
|
17239 | /**
|
17240 | * Maximum possible distance for far plane placement.
|
17241 | *
|
17242 | * This accounts for maximum visibility range in camera space, regardless of camera
|
17243 | * orientation. Far plane will never be placed beyond that distance, this value says
|
17244 | * about viewing distance limit, thus it is constrained for performance reasons and
|
17245 | * allows to compute effects applied at the end of viewing range such as fog or
|
17246 | * geometry fading.
|
17247 | *
|
17248 | * @note Holds the maximum distance that may be applied for [[far]] plane at
|
17249 | * certain camera position, it is const in between orientation changes. You may use this
|
17250 | * value to calculate fog or other depth effects that are related to frustum planes,
|
17251 | * but should not change as dynamically as current near/far planes distances.
|
17252 | */
|
17253 | maximum: number;
|
17254 | }
|
17255 |
|
17256 | /**
|
17257 | * State parameters of a view that are required by the text renderer.
|
17258 | */
|
17259 | declare interface ViewState {
|
17260 | worldCenter: THREE.Vector3;
|
17261 | cameraIsMoving: boolean;
|
17262 | maxVisibilityDist: number;
|
17263 | zoomLevel: number;
|
17264 | env: Env;
|
17265 | frameNumber: number;
|
17266 | lookAtVector: THREE.Vector3;
|
17267 | lookAtDistance: number;
|
17268 | isDynamic: boolean;
|
17269 | hiddenGeometryKinds?: GeometryKindSet;
|
17270 | renderedTilesChanged: boolean;
|
17271 | projection: Projection;
|
17272 | elevationProvider?: ElevationProvider;
|
17273 | }
|
17274 |
|
17275 | export declare type ViewUpdateCallback = () => void;
|
17276 |
|
17277 | /**
|
17278 | * Manages visible {@link Tile}s for {@link MapView}.
|
17279 | *
|
17280 | * Responsible for election of rendered tiles:
|
17281 | * - quad-tree traversal
|
17282 | * - frustum culling
|
17283 | * - sorting tiles by relevance (visible area) to prioritize load
|
17284 | * - limiting number of visible tiles
|
17285 | * - caching tiles
|
17286 | * - searching cache to replace visible but yet empty tiles with already loaded siblings in nearby
|
17287 | * zoom levels
|
17288 | */
|
17289 | export declare class VisibleTileSet {
|
17290 | private readonly m_frustumIntersection;
|
17291 | private readonly m_tileGeometryManager;
|
17292 | options: VisibleTileSetOptions;
|
17293 | dataSourceTileList: DataSourceTileList[];
|
17294 | allVisibleTilesLoaded: boolean;
|
17295 | private readonly m_cameraOverride;
|
17296 | private m_dataSourceCache;
|
17297 | private m_viewRange;
|
17298 | private m_coveringMap;
|
17299 | private m_resourceComputationType;
|
17300 | constructor(m_frustumIntersection: FrustumIntersection, m_tileGeometryManager: TileGeometryManager, options: VisibleTileSetOptions);
|
17301 | /**
|
17302 | * Returns cache size.
|
17303 | */
|
17304 | getDataSourceCacheSize(): number;
|
17305 | /**
|
17306 | * Sets cache size.
|
17307 | *
|
17308 | * @param size - cache size
|
17309 | * @param computationType - Optional value specifying the way a {@link Tile}s cache usage is
|
17310 | * computed, either based on size in MB (mega bytes) or in number of tiles. Defaults to
|
17311 | * `ResourceComputationType.EstimationInMb`.
|
17312 | */
|
17313 | setDataSourceCacheSize(size: number, computationType?: ResourceComputationType): void;
|
17314 | /**
|
17315 | * Retrieves maximum number of visible tiles.
|
17316 | */
|
17317 | getNumberOfVisibleTiles(): number;
|
17318 | /**
|
17319 | * Sets maximum number of visible tiles.
|
17320 | *
|
17321 | * @param size - size of visible tiles array
|
17322 | */
|
17323 | setNumberOfVisibleTiles(size: number): void;
|
17324 | /**
|
17325 | * The way the cache usage is computed, either based on size in MB (mega bytes) or in number of
|
17326 | * tiles.
|
17327 | */
|
17328 | get resourceComputationType(): ResourceComputationType;
|
17329 | /**
|
17330 | * Sets the way tile cache is managing its elements.
|
17331 | *
|
17332 | * Cache may be either keeping number of elements stored or the memory consumed by them.
|
17333 | *
|
17334 | * @param computationType - Type of algorith used in cache for checking full saturation,
|
17335 | * may be counting number of elements or memory consumed by them.
|
17336 | */
|
17337 | set resourceComputationType(computationType: ResourceComputationType);
|
17338 | /**
|
17339 | * Evaluate frustum near/far clip planes and visibility ranges.
|
17340 | */
|
17341 | updateClipPlanes(maxElevation?: number, minElevation?: number): ViewRanges;
|
17342 | /**
|
17343 | * Calculates a new set of visible tiles.
|
17344 | * @param storageLevel - The camera storage level, see {@link MapView.storageLevel}.
|
17345 | * @param zoomLevel - The camera zoom level.
|
17346 | * @param dataSources - The data sources for which the visible tiles will be calculated.
|
17347 | * @param elevationRangeSource - Source of elevation range data if any.
|
17348 | * @returns view ranges and their status since last update (changed or not).
|
17349 | */
|
17350 | updateRenderList(storageLevel: number, zoomLevel: number, dataSources: DataSource[], elevationRangeSource?: ElevationRangeSource): {
|
17351 | viewRanges: ViewRanges;
|
17352 | viewRangesChanged: boolean;
|
17353 | };
|
17354 | /**
|
17355 | * Gets the tile corresponding to the given data source, key and offset, creating it if
|
17356 | * necessary.
|
17357 | *
|
17358 | * @param dataSource - The data source the tile belongs to.
|
17359 | * @param tileKey - The key identifying the tile.
|
17360 | * @param offset - Tile offset.
|
17361 | * @return The tile if it was found or created, undefined otherwise.
|
17362 | */
|
17363 | getTile(dataSource: DataSource, tileKey: TileKey, offset?: number): Tile | undefined;
|
17364 | /**
|
17365 | * Gets the tile corresponding to the given data source, key and offset from the cache.
|
17366 | *
|
17367 | * @param dataSource - The data source the tile belongs to.
|
17368 | * @param tileKey - The key identifying the tile.
|
17369 | * @param offset - Tile offset.
|
17370 | * @return The tile if found in cache, undefined otherwise.
|
17371 | */
|
17372 | getCachedTile(dataSource: DataSource, tileKey: TileKey, offset?: number): Tile | undefined;
|
17373 | /**
|
17374 | * Gets the tile corresponding to the given data source, key and offset from the rendered tiles.
|
17375 | *
|
17376 | * @param dataSource - The data source the tile belongs to.
|
17377 | * @param tileKey - The key identifying the tile.
|
17378 | * @param offset - Tile offset.
|
17379 | * @return The tile if found among the rendered tiles, undefined otherwise.
|
17380 | */
|
17381 | getRenderedTile(dataSource: DataSource, tileKey: TileKey, offset?: number): Tile | undefined;
|
17382 | /**
|
17383 | * Gets the tile corresponding to the given data source and location from the rendered tiles.
|
17384 | *
|
17385 | * @param dataSource - The data source the tile belongs to.
|
17386 | * @param geoPoint - The geolocation included within the tile.
|
17387 | * @return The tile if found among the rendered tiles, undefined otherwise.
|
17388 | */
|
17389 | getRenderedTileAtLocation(dataSource: DataSource, geoPoint: GeoCoordinates, offset?: number): Tile | undefined;
|
17390 | /**
|
17391 | * Removes all internal bookkeeping entries and cache related to specified datasource.
|
17392 | *
|
17393 | * Called by {@link MapView} when {@link DataSource} has been removed from {@link MapView}.
|
17394 | */
|
17395 | removeDataSource(dataSource: DataSource): void;
|
17396 | /**
|
17397 | * Clear the tile cache.
|
17398 | *
|
17399 | * Remove the {@link Tile} objects created by cacheable {@link DataSource}.
|
17400 | * If a {@link DataSource} name is
|
17401 | * provided, this method restricts the eviction
|
17402 | * the {@link DataSource} with the given name.
|
17403 | *
|
17404 | * @param dataSourceName - The name of the {@link DataSource}.
|
17405 | */
|
17406 | clearTileCache(dataSource?: DataSource): void;
|
17407 | /**
|
17408 | * Visit each tile in visible, rendered, and cached sets.
|
17409 | *
|
17410 | * * Visible and temporarily rendered tiles will be marked for update and retained.
|
17411 | * * Cached but not rendered/visible will be evicted.
|
17412 | *
|
17413 | * @param dataSource - If passed, only the tiles from this {@link DataSource} instance
|
17414 | * are processed. If `undefined`, tiles from all {@link DataSource}s are processed.
|
17415 | */
|
17416 | markTilesDirty(dataSource?: DataSource): void;
|
17417 | /**
|
17418 | * Dispose tiles that are marked for removal by {@link @here/harp-lrucache#LRUCache} algorithm.
|
17419 | */
|
17420 | disposePendingTiles(): void;
|
17421 | /**
|
17422 | * Process callback function [[fun]] with each visible tile in set.
|
17423 | *
|
17424 | * @param fun - The callback function to be called.
|
17425 | */
|
17426 | forEachVisibleTile(fun: (tile: Tile) => void): void;
|
17427 | /**
|
17428 | * Process callback function [[fun]] with each tile in the cache.
|
17429 | *
|
17430 | * Optional [[dataSource]] parameter limits processing to the tiles that belongs to
|
17431 | * DataSource passed in.
|
17432 | *
|
17433 | * @param fun - The callback function to be called.
|
17434 | * @param dataSource - The optional DataSource reference for tiles selection.
|
17435 | */
|
17436 | forEachCachedTile(fun: (tile: Tile) => void, dataSource?: DataSource): void;
|
17437 | /**
|
17438 | * Dispose a `Tile` from cache, 'dispose()' is also called on the tile to free its resources.
|
17439 | */
|
17440 | disposeTile(tile: Tile): void;
|
17441 | /**
|
17442 | * Skips rendering of tiles that are overlapped. The overlapping {@link Tile} comes from a
|
17443 | * {@link DataSource} which is fully covering, i.e. there it is fully opaque.
|
17444 | **/
|
17445 | private skipOverlappedTiles;
|
17446 | private getSearchDirection;
|
17447 | /**
|
17448 | * Populates the list of tiles to render, see "renderedTiles". Tiles that are loaded and which
|
17449 | * are an exact match are added straight to the list, tiles that are still loading are replaced
|
17450 | * with tiles in the cache that are either a parent or child of the requested tile. This helps
|
17451 | * to prevent flickering when zooming in / out. The distance to search is based on the options
|
17452 | * [[quadTreeSearchDistanceDown]] and [[quadTreeSearchDistanceUp]].
|
17453 | *
|
17454 | * Each {@link DataSource} can also switch this behaviour on / off using the
|
17455 | * [[allowOverlappingTiles]] flag.
|
17456 | *
|
17457 | */
|
17458 | private populateRenderedTiles;
|
17459 | private findDown;
|
17460 | /**
|
17461 | * Returns true if a tile was found in the cache which is a parent
|
17462 | * @param tileKeyCode - Morton code of the current tile that should be searched for.
|
17463 | * @param dataZoomLevel - The current data zoom level of tiles that are to be displayed.
|
17464 | * @param renderedTiles - The list of tiles that are shown to the user.
|
17465 | * @param checkedTiles - Used to map a given code to a boolean which tells us if an ancestor is
|
17466 | * displayed or not.
|
17467 | * @param dataSource - The provider of tiles.
|
17468 | * @returns Whether a parent tile exists.
|
17469 | */
|
17470 | private findUp;
|
17471 | private getTileImpl;
|
17472 | private markDataSourceTilesDirty;
|
17473 | private getVisibleTileKeysForDataSources;
|
17474 | }
|
17475 |
|
17476 | /**
|
17477 | * Limited set of {@link MapViewOptions} used for {@link VisibleTileSet}.
|
17478 | */
|
17479 | export declare interface VisibleTileSetOptions {
|
17480 | /**
|
17481 | * The projection of the view.
|
17482 | */
|
17483 | projection: Projection;
|
17484 | /**
|
17485 | * User-defined camera clipping planes evaluator.
|
17486 | */
|
17487 | clipPlanesEvaluator: ClipPlanesEvaluator;
|
17488 | /**
|
17489 | * Limit of tiles that can be visible per datasource.
|
17490 | */
|
17491 | maxVisibleDataSourceTiles: number;
|
17492 | /**
|
17493 | * In addition to the simple frustum culling also do additional checks with [[MapTileCuller]].
|
17494 | */
|
17495 | extendedFrustumCulling: boolean;
|
17496 | /**
|
17497 | * Missing Typedoc
|
17498 | */
|
17499 | tileCacheSize: number;
|
17500 | /**
|
17501 | * Missing Typedoc
|
17502 | */
|
17503 | resourceComputationType: ResourceComputationType;
|
17504 | /**
|
17505 | * Number of levels to go up when searching for fallback tiles.
|
17506 | */
|
17507 | quadTreeSearchDistanceUp: number;
|
17508 | /**
|
17509 | * Number of levels to go down when searching for fallback tiles.
|
17510 | */
|
17511 | quadTreeSearchDistanceDown: number;
|
17512 | }
|
17513 |
|
17514 | /**
|
17515 | * Web Mercator {@link Projection} used to convert geo coordinates to world coordinates
|
17516 | * and vice versa.
|
17517 | */
|
17518 | export declare const webMercatorProjection: Projection;
|
17519 |
|
17520 | /**
|
17521 | * A {@link TilingScheme} featuring quadtree subdivision scheme and web Mercator projection.
|
17522 | */
|
17523 | export declare const webMercatorTilingScheme: TilingScheme;
|
17524 |
|
17525 | /**
|
17526 | * Instances of `WebTileDataSource` can be used to add Web Tile to [[MapView]].
|
17527 | *
|
17528 | * Example:
|
17529 | *
|
17530 | * ```typescript
|
17531 | * const webTileDataSource = new WebTileDataSource({
|
17532 | * authenticationCode: <authenticationCode>
|
17533 | * });
|
17534 | * ```
|
17535 | * @see [[DataSource]], [[OmvDataSource]].
|
17536 | */
|
17537 | export declare class WebTileDataSource extends DataSource {
|
17538 | private readonly m_options;
|
17539 | /**
|
17540 | * Base address for Base Map rendered using `normal.day` scheme.
|
17541 | * @see https://developer.here.com/documentation/map-tile/topics/example-normal-day-view.html
|
17542 | */
|
17543 | static readonly TILE_BASE_NORMAL = "base.maps.ls.hereapi.com/maptile/2.1/maptile/newest/normal.day";
|
17544 | /**
|
17545 | * Base address for Aerial Map rendered using `hybrid.day` scheme.
|
17546 | * @see https://developer.here.com/documentation/map-tile/topics/example-hybrid-map.html
|
17547 | */
|
17548 | static readonly TILE_AERIAL_HYBRID = "aerial.maps.ls.hereapi.com/maptile/2.1/maptile/newest/hybrid.day";
|
17549 | /**
|
17550 | * Base address for Aerial Map rendered using `satellite.day` scheme.
|
17551 | * @see https://developer.here.com/documentation/map-tile/topics/example-satellite-map.html
|
17552 | */
|
17553 | static readonly TILE_AERIAL_SATELLITE = "aerial.maps.ls.hereapi.com/maptile/2.1/maptile/newest/satellite.day";
|
17554 | /**
|
17555 | * Base address for Traffic Map rendered using `normal.day` scheme.
|
17556 | * @see https://developer.here.com/documentation/map-tile/topics/example-traffic.html
|
17557 | */
|
17558 | static readonly TILE_TRAFFIC_NORMAL = "traffic.maps.ls.hereapi.com/maptile/2.1/traffictile/newest/normal.day";
|
17559 | private m_resolution;
|
17560 | private m_ppi;
|
17561 | private m_tileBaseAddress;
|
17562 | private m_languages?;
|
17563 | /** Copyright provider instance. */
|
17564 | private m_copyrightProvider;
|
17565 | /** Predefined fixed HERE copyright info. */
|
17566 | private readonly HERE_COPYRIGHT_INFO;
|
17567 | /**
|
17568 | * Constructs a new `WebTileDataSource`.
|
17569 | *
|
17570 | * @param m_options - Represents the [[WebTileDataSourceParameters]].
|
17571 | */
|
17572 | constructor(m_options: WebTileDataSourceParameters);
|
17573 | /** @override */
|
17574 | shouldPreloadTiles(): boolean;
|
17575 | /** @override */
|
17576 | getTilingScheme(): TilingScheme;
|
17577 | /** @override */
|
17578 | setLanguages(languages?: string[]): void;
|
17579 | /** @override */
|
17580 | getTile(tileKey: TileKey): Tile;
|
17581 | /** @override */
|
17582 | isFullyCovering(): boolean;
|
17583 | private parseBaseUrl;
|
17584 | private getAuthParams;
|
17585 | private getCopyrightRequestParams;
|
17586 | private getImageRequestParams;
|
17587 | private getRequestHeaders;
|
17588 | private getTileCopyright;
|
17589 | private mapIsoLanguageToWebTile;
|
17590 | }
|
17591 |
|
17592 | /**
|
17593 | * Definitions of variable values to be used with `WebTileDataSource`
|
17594 | */
|
17595 | export declare namespace WebTileDataSource {
|
17596 | export enum ppiValue {
|
17597 | ppi72 = 72,
|
17598 | ppi250 = 250,
|
17599 | ppi320 = 320,
|
17600 | ppi500 = 500
|
17601 | }
|
17602 | export enum resolutionValue {
|
17603 | resolution256 = 256,
|
17604 | resolution512 = 512
|
17605 | }
|
17606 | }
|
17607 |
|
17608 | /**
|
17609 | * Options for [[WebTileDataSource]].
|
17610 | */
|
17611 | declare interface WebTileDataSourceOptions {
|
17612 | /**
|
17613 | * This parameter specifies static part of the final Web Tile URL:
|
17614 | * * base url without protocol and load-balancing (`{1-4}.`) prefix
|
17615 | * * path,
|
17616 | * * resource (tile type)
|
17617 | * * map version,
|
17618 | * * scheme
|
17619 | *
|
17620 | * See [Map Tile API]
|
17621 | * (https://developer.here.com/documentation/map-tile/topics/request-constructing.html) for
|
17622 | * details.
|
17623 | *
|
17624 | * For example, given final url presented in documentation
|
17625 | * (https://developer.here.com/documentation/map-tile/topics/examples-base.html):
|
17626 | *
|
17627 | * https://
|
17628 | * 2.base.maps.ls.hereapi.com/maptile/2.1/maptile/newest/normal.day/11/525/761/256/png8
|
17629 | * ?apikey={YOUR_API_KEY}
|
17630 | *
|
17631 | * `tileBaseAddress` should be:
|
17632 | *
|
17633 | * base.maps.ls.hereapi.com/maptile/2.1/maptile/newest/normal.day
|
17634 | *
|
17635 | * Rest of parameters are added by [[WebTileDataSource]].
|
17636 | *
|
17637 | * @see [Map Tile API]
|
17638 | * (https://developer.here.com/documentation/map-tile/topics/introduction.html)
|
17639 | * @default [[WebTileDataSource.TILE_BASE_NORMAL]]
|
17640 | * @see [[WebTileDataSource.TILE_BASE_NORMAL]]
|
17641 | * @see [[WebTileDataSource.TILE_AERIAL_HYBRID]]
|
17642 | * @see [[WebTileDataSource.TILE_AERIAL_SATELLITE]]
|
17643 | * @see [[WebTileDataSource.TILE_TRAFFIC_NORMAL]]
|
17644 | */
|
17645 | tileBaseAddress?: string;
|
17646 | /**
|
17647 | * The resolution of Web Tile images, defaults to 512.
|
17648 | */
|
17649 | resolution?: WebTileDataSource.resolutionValue;
|
17650 | /**
|
17651 | * String which is appended to the tile request url, e.g. to add additional parameters
|
17652 | * to the tile requests as described in
|
17653 | * @see https://developer.here.com/documentation/map-tile/topics/resource-base-basetile.html
|
17654 | */
|
17655 | additionalRequestParameters?: string;
|
17656 | /**
|
17657 | * ppi parameter which impacts font/icon sizes, road width and other content
|
17658 | * of the map tiles. For valid values and restrictions see
|
17659 | * @see https://developer.here.com/documentation/map-tile/topics/resource-base-basetile.html#ppi
|
17660 | * By default it is not used.
|
17661 | */
|
17662 | ppi?: WebTileDataSource.ppiValue;
|
17663 | /**
|
17664 | * Whether to provide copyright info.
|
17665 | *
|
17666 | * @default `true`
|
17667 | */
|
17668 | gatherCopyrightInfo?: boolean;
|
17669 | /**
|
17670 | * Options affecting the rendering of the web tiles.
|
17671 | */
|
17672 | renderingOptions?: WebTileRenderingOptions;
|
17673 | }
|
17674 |
|
17675 | /**
|
17676 | * An interface for the type of options that can be passed to the [[WebTileDataSource]].
|
17677 | */
|
17678 | export declare type WebTileDataSourceParameters = WebTileDataSourceOptions & (ApiKeyAuthentication | AppIdAuthentication | TokenAuthentication);
|
17679 |
|
17680 | /**
|
17681 | * An interface for the rendering options that can be passed to the [[WebTileDataSource]].
|
17682 | */
|
17683 | export declare interface WebTileRenderingOptions {
|
17684 | /**
|
17685 | * Opacity of the rendered images.
|
17686 | * @default 1.0
|
17687 | */
|
17688 | opacity?: number;
|
17689 | }
|
17690 |
|
17691 | /**
|
17692 | * Decoder based on [[ConcurrentWorkerSet]].
|
17693 | *
|
17694 | * Decodes tiles using workers running in separate contexts (also known as `WebWorkers`):
|
17695 | * - connection establishment,
|
17696 | * - sends decode requests,
|
17697 | * - configuration.
|
17698 | */
|
17699 | export declare class WorkerBasedDecoder implements ITileDecoder {
|
17700 | private readonly workerSet;
|
17701 | private readonly decoderServiceType;
|
17702 | private serviceId;
|
17703 | private m_serviceCreated;
|
17704 | /**
|
17705 | * Creates a new `WorkerBasedDecoder`.
|
17706 | *
|
17707 | * @param workerSet - [[ConcurrentWorkerSet]] this tiler will live in.
|
17708 | * @param decoderServiceType - Service type identifier.
|
17709 | */
|
17710 | constructor(workerSet: ConcurrentWorkerSet, decoderServiceType: string);
|
17711 | /**
|
17712 | * Dispose of dedicated tile decoder services in workers and remove reference to underlying
|
17713 | * [[ConcurrentWorkerSet]].
|
17714 | */
|
17715 | dispose(): void;
|
17716 | /**
|
17717 | * Connects to [[WorkerServiceManager]]s in underlying [[ConcurrentWorkerSet]] and creates
|
17718 | * dedicated [[TileDecoderService]]s in all workers to serve decode requests.
|
17719 | */
|
17720 | connect(): Promise<void>;
|
17721 | /**
|
17722 | * Get {@link Tile} from tile decoder service in worker.
|
17723 | *
|
17724 | * @remarks
|
17725 | * Invokes {@link @here/harp-datasource-protocol#DecodeTileRequest} on
|
17726 | * [[TileDecoderService]] running in worker pool.
|
17727 | */
|
17728 | decodeTile(data: ArrayBufferLike, tileKey: TileKey, projection: Projection, requestController?: RequestController): Promise<DecodedTile>;
|
17729 | /**
|
17730 | * Get {@link @here/harp-datasource-protocol#TileInfo} from tile decoder service in worker.
|
17731 | *
|
17732 | * @remarks
|
17733 | * Invokes {@link @here/harp-datasource-protocol#TileInfoRequest}
|
17734 | * on [[TileDecoderService]] running in worker pool.
|
17735 | */
|
17736 | getTileInfo(data: ArrayBufferLike, tileKey: TileKey, projection: Projection, requestController?: RequestController): Promise<TileInfo | undefined>;
|
17737 | /**
|
17738 | * Configure tile decoder service in workers.
|
17739 | *
|
17740 | * @remarks
|
17741 | * Broadcasts {@link @here/harp-datasource-protocol#ConfigurationMessage}
|
17742 | * to all [[TileDecoderService]]s running in worker pool.
|
17743 | *
|
17744 | * @param styleSet - new [[StyleSet]], undefined means no change
|
17745 | * @param languages - new list of languages
|
17746 | * @param options - new options, undefined options are not changed
|
17747 | */
|
17748 | configure(styleSet?: StyleSet, definitions?: Definitions, languages?: string[], options?: OptionsMap): void;
|
17749 | /**
|
17750 | * The number of workers started for this decoder. The value is `undefined` until the workers
|
17751 | * have been created.
|
17752 | */
|
17753 | get workerCount(): number | undefined;
|
17754 | }
|
17755 |
|
17756 | /**
|
17757 | * Tiler based on [[ConcurrentWorkerSet]].
|
17758 | *
|
17759 | * Tiles payloads using workers running in separate contexts (also known as `WebWorkers`):
|
17760 | * - connection establishment,
|
17761 | * - sends tile requests,
|
17762 | * - configuration.
|
17763 | */
|
17764 | export declare class WorkerBasedTiler implements ITiler {
|
17765 | private readonly workerSet;
|
17766 | private readonly tilerServiceType;
|
17767 | private serviceId;
|
17768 | private m_serviceCreated;
|
17769 | /**
|
17770 | * Creates a new `WorkerBasedTiler`.
|
17771 | *
|
17772 | * @param workerSet - [[ConcurrentWorkerSet]] this tiler will live in.
|
17773 | * @param tilerServiceType - Service type identifier.
|
17774 | */
|
17775 | constructor(workerSet: ConcurrentWorkerSet, tilerServiceType: string);
|
17776 | /**
|
17777 | * Dispose of dedicated tiler services in workers and remove reference to underlying
|
17778 | * [[ConcurrentWorkerSet]].
|
17779 | */
|
17780 | dispose(): void;
|
17781 | /**
|
17782 | * Connects to [[WorkerServiceManager]]s in underlying [[ConcurrentWorkerSet]] and creates
|
17783 | * dedicated [[TilerService]]s in all workers to serve tiling requests.
|
17784 | */
|
17785 | connect(): Promise<void>;
|
17786 | /**
|
17787 | * Register index in the tiler. Indexes registered in the tiler can be later used to retrieved
|
17788 | * tiled payloads using `getTile`.
|
17789 | *
|
17790 | * @param indexId - Index identifier.
|
17791 | * @param input - Url to the index payload, or direct GeoJSON.
|
17792 | */
|
17793 | registerIndex(indexId: string, input: URL | GeoJson): Promise<void>;
|
17794 | /**
|
17795 | * Update index in the tiler. Indexes registered in the tiler can be later used to retrieved
|
17796 | * tiled payloads using `getTile`.
|
17797 | *
|
17798 | * @param indexId - Index identifier.
|
17799 | * @param input - Url to the index payload, or direct GeoJSON.
|
17800 | */
|
17801 | updateIndex(indexId: string, input: URL | GeoJson): Promise<void>;
|
17802 | /**
|
17803 | * Retrieves a tile for a previously registered index.
|
17804 | *
|
17805 | * @param indexId - Index identifier.
|
17806 | * @param tileKey - The {@link @here/harp-geoutils#TileKey} that identifies the tile.
|
17807 | */
|
17808 | getTile(indexId: string, tileKey: TileKey): Promise<{}>;
|
17809 | }
|
17810 |
|
17811 | /**
|
17812 | * Communication protocol with [[ITileDecoder]].
|
17813 | */
|
17814 | export declare namespace WorkerDecoderProtocol {
|
17815 | /**
|
17816 | * Define possible names of messages exchanged with decoder services within `WebWorker`.
|
17817 | */
|
17818 | export enum DecoderMessageName {
|
17819 | Configuration = "configuration"
|
17820 | }
|
17821 | /**
|
17822 | * Interface for `DecodedTileMessage` which describes metadata for a decoded tile.
|
17823 | */
|
17824 | export interface DecoderMessage {
|
17825 | service: string;
|
17826 | type: DecoderMessageName;
|
17827 | }
|
17828 | /**
|
17829 | * Interface for a ConfigurationMessage that is sent from the datasource to the decoder. The
|
17830 | * message used to configure the [[ITileDecoder]].
|
17831 | */
|
17832 | export interface ConfigurationMessage extends DecoderMessage {
|
17833 | type: DecoderMessageName.Configuration;
|
17834 | styleSet?: StyleSet;
|
17835 | definitions?: Definitions;
|
17836 | options?: OptionsMap;
|
17837 | languages?: string[];
|
17838 | }
|
17839 | /**
|
17840 | * Type guard to check if an object is an instance of `ConfigurationMessage`.
|
17841 | */
|
17842 | export function isConfigurationMessage(message: any): message is ConfigurationMessage;
|
17843 | /**
|
17844 | * Define possible names of requests called on decoder services within `WebWorker`.
|
17845 | */
|
17846 | export enum Requests {
|
17847 | DecodeTileRequest = "decode-tile-request",
|
17848 | TileInfoRequest = "tile-info-request"
|
17849 | }
|
17850 | /**
|
17851 | * This object is sent to the decoder asking to decode a specific tile. The expected response
|
17852 | * type is a [[DecodedTile]].
|
17853 | */
|
17854 | export interface DecodeTileRequest extends WorkerServiceProtocol.ServiceRequest {
|
17855 | type: Requests.DecodeTileRequest;
|
17856 | tileKey: number;
|
17857 | data: ArrayBufferLike;
|
17858 | projection: string;
|
17859 | }
|
17860 | /**
|
17861 | * Type guard to check if an object is a decoded tile object sent to a worker.
|
17862 | */
|
17863 | export function isDecodeTileRequest(message: any): message is DecodeTileRequest;
|
17864 | /**
|
17865 | * This object is sent to the decoder asking for a tile info of a specific tile. The expected
|
17866 | * response type is a [[DecodedTile]].
|
17867 | */
|
17868 | export interface TileInfoRequest extends WorkerServiceProtocol.ServiceRequest {
|
17869 | type: Requests.TileInfoRequest;
|
17870 | tileKey: number;
|
17871 | data: ArrayBufferLike;
|
17872 | projection: string;
|
17873 | }
|
17874 | /**
|
17875 | * Type guard to check if an object is an info tile object sent to a worker.
|
17876 | */
|
17877 | export function isTileInfoRequest(message: any): message is TileInfoRequest;
|
17878 | }
|
17879 |
|
17880 | /**
|
17881 | * Set of `Worker` loading and initialization helpers:
|
17882 | * - starting Worker from URL with fallback to XHR+blob {@link WorkerLoader.startWorker}
|
17883 | * - waiting for proper worker initialization, see {@link WorkerLoader.waitWorkerInitialized}
|
17884 | */
|
17885 | export declare class WorkerLoader {
|
17886 | static directlyFallbackToBlobBasedLoading: boolean;
|
17887 | static sourceLoaderCache: Map<string, Promise<string>>;
|
17888 | static dependencyUrlMapping: {
|
17889 | [name: string]: string;
|
17890 | };
|
17891 | /**
|
17892 | * Starts worker by first attempting load from `scriptUrl` using native `Worker` constructor.
|
17893 | * Then waits (using [[waitWorkerInitialized]]) for first message that indicates successful
|
17894 | * initialization.
|
17895 | * If `scriptUrl`'s origin is different than `baseUrl`, then in case of error falls back to
|
17896 | * [[startWorkerBlob]].
|
17897 | *
|
17898 | * We must resolve/reject promise at some time, so it is expected that any sane application will
|
17899 | * be able to load worker code in some amount of time.
|
17900 | * By default, this method timeouts after 10 seconds (configurable using `timeout` argument).
|
17901 | *
|
17902 | * This method is needed as browsers in general forbid to load worker if it's not on 'same
|
17903 | * origin' regardless of Content-Security-Policy.
|
17904 | *
|
17905 | * For blob-based fallback work, one need to ensure that Content Security Policy (CSP) allows
|
17906 | * loading web worker code from `Blob`s. By default browsers, allow 'blob:' for workers, but
|
17907 | * this may change.
|
17908 | *
|
17909 | * Following snippet setups CSP, so workers can be started from blob urls:
|
17910 | *
|
17911 | * <head>
|
17912 | * <meta http-equiv="Content-Security-Policy" content="child-src blob:">
|
17913 | * </head>
|
17914 | *
|
17915 | * Tested on:
|
17916 | * * Chrome 67 / Linux, Window, OSX, Android
|
17917 | * * Firefox 60 / Linux, Windows, OSX
|
17918 | * * Edge 41 / Windows
|
17919 | * * Safari 11 / OSX
|
17920 | * * Samsung Internet 7.2
|
17921 | *
|
17922 | * See
|
17923 | * * https://benohead.com/cross-domain-cross-browser-web-workers/
|
17924 | * * MapBox
|
17925 | * * https://stackoverflow.com/questions/21913673/execute-web-worker-from-different-origin
|
17926 | * * https://github.com/mapbox/mapbox-gl-js/issues/2658
|
17927 | * * https://github.com/mapbox/mapbox-gl-js/issues/559
|
17928 | * * https://github.com/mapbox/mapbox-gl-js/issues/6058
|
17929 | *
|
17930 | * Findings:
|
17931 | *
|
17932 | * * Chrome reports CSP by exception when constructing [[Worker]] instance.
|
17933 | * * Firefox reports CSP errors when loading in first event:
|
17934 | * https://bugzilla.mozilla.org/show_bug.cgi?id=1241888
|
17935 | * * Firefox 62, Chrome 67 obeys `<meta http-equiv="Content-Security-Policy">` with
|
17936 | * `worker-src blob:` but doesn't obey `worker-src URL` when used
|
17937 | * * Chrome 67 doesn't obey CSP `worker-src URL` despite it's documented as supported
|
17938 | * (https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/worker-src)
|
17939 | *
|
17940 | * @param scriptUrl - web worker script URL
|
17941 | * @param timeout - timeout in milliseconds, in which worker should set initial message
|
17942 | * (default 10 seconds)
|
17943 | */
|
17944 | static startWorker(scriptUrl: string, timeout?: number): Promise<Worker>;
|
17945 | /**
|
17946 | * Start worker, loading it immediately from `scriptUrl`. Waits (using
|
17947 | * [[waitWorkerInitialized]]) for successful worker start.
|
17948 | *
|
17949 | * @param scriptUrl - web worker script URL
|
17950 | */
|
17951 | static startWorkerImmediately(scriptUrl: string, timeout: number): Promise<Worker>;
|
17952 | /**
|
17953 | * Start worker "via blob" by first loading worker script code with [[fetch]], creating `Blob`
|
17954 | * and attempting to start worker from blob url. Waits (using [[waitWorkerInitialized]]) for
|
17955 | * successful worker start.
|
17956 | *
|
17957 | * @param scriptUrl - web worker script URL
|
17958 | */
|
17959 | static startWorkerBlob(scriptUrl: string, timeout: number): Promise<Worker>;
|
17960 | /**
|
17961 | * Fetch script source as `Blob` url.
|
17962 | *
|
17963 | * Reuses results, if there are many simultaneous requests.
|
17964 | *
|
17965 | * @param scriptUrl - web worker script URL
|
17966 | * @return promise that resolves to url of a `Blob` with script source code
|
17967 | */
|
17968 | static fetchScriptSourceToBlobUrl(scriptUrl: string): Promise<string>;
|
17969 | /**
|
17970 | * Waits for successful Web Worker start.
|
17971 | *
|
17972 | * Expects that worker script sends initial message.
|
17973 | *
|
17974 | * If first event is `message` then assumes that worker has been loaded sussesfully and promise
|
17975 | * resolves to `worker` object passed as argument.
|
17976 | *
|
17977 | * If first event is 'error', then it is assumed that worker failed to load and promise is
|
17978 | * rejected.
|
17979 | *
|
17980 | * (NOTE: The initial 'message' - if received - is immediately replayed using worker's
|
17981 | * `dispatchEvent`, so application code can also consume it as confirmation of successful
|
17982 | * worker initialization.
|
17983 | *
|
17984 | * We must resolve/reject promise at some time, so it is expected that any sane application will
|
17985 | * be able to load worker code in some amount of time.
|
17986 | *
|
17987 | * @param worker - [[Worker]] instance to be checked
|
17988 | * @param timeout - timeout in milliseconds, in which worker should set initial message
|
17989 | * @returns `Promise` that resolves to `worker` on success
|
17990 | */
|
17991 | static waitWorkerInitialized(worker: Worker, timeout: number): Promise<Worker>;
|
17992 | }
|
17993 |
|
17994 | /**
|
17995 | * Common communication protocol for [[WorkerService]].
|
17996 | */
|
17997 | export declare namespace WorkerServiceProtocol {
|
17998 | /**
|
17999 | * Service id of worker manager ([[WorkerServiceManager]]) used to create/destroy service
|
18000 | * instances in workers.
|
18001 | */
|
18002 | const WORKER_SERVICE_MANAGER_SERVICE_ID = "worker-service-manager";
|
18003 | /**
|
18004 | * Define possible names of messages exchanged with services within `WebWorker`.
|
18005 | */
|
18006 | export enum ServiceMessageName {
|
18007 | Initialized = "initialized",
|
18008 | Request = "request",
|
18009 | Response = "response"
|
18010 | }
|
18011 | /**
|
18012 | * Interface for `ServiceMessage` which describes metadata for a service messages.
|
18013 | */
|
18014 | export interface ServiceMessage {
|
18015 | service: string;
|
18016 | type: ServiceMessageName;
|
18017 | }
|
18018 | /**
|
18019 | * This message is sent by the worker to the main thread. No data is sent. Receiving this
|
18020 | * message confirms that the worker has started successfully.
|
18021 | */
|
18022 | export interface InitializedMessage extends ServiceMessage {
|
18023 | type: ServiceMessageName.Initialized;
|
18024 | }
|
18025 | /**
|
18026 | * Type guard to check if an object is a signal message from worker.
|
18027 | */
|
18028 | export function isInitializedMessage(message: any): message is InitializedMessage;
|
18029 | /**
|
18030 | * Define possible names of requests called on services within `WebWorker`.
|
18031 | */
|
18032 | export enum Requests {
|
18033 | CreateService = "create-service",
|
18034 | DestroyService = "destroy-service"
|
18035 | }
|
18036 | /**
|
18037 | * This is an internal general interface used in communication with workers.
|
18038 | * Check [[ConcurrentWorkerSet]]'s invokeRequest function for exemplary usage.
|
18039 | */
|
18040 | export interface ServiceRequest {
|
18041 | type: string;
|
18042 | }
|
18043 | /**
|
18044 | * This message is sent by the main thread to [[WorkerServiceManager]] to dynamically create a
|
18045 | * new service.
|
18046 | *
|
18047 | * May throw `UnknownServiceError` if service of given type is not registered in
|
18048 | * [[WorkerServiceManager]], see [[isUnknownServiceError]].
|
18049 | */
|
18050 | export interface CreateServiceRequest extends ServiceRequest {
|
18051 | type: Requests.CreateService;
|
18052 | /**
|
18053 | * Type of service to be created.
|
18054 | *
|
18055 | * @see [[WorkerServiceManager.register]]
|
18056 | */
|
18057 | targetServiceType: string;
|
18058 | /**
|
18059 | * The newly created service instance will be available under this id.
|
18060 | */
|
18061 | targetServiceId: string;
|
18062 | }
|
18063 | /**
|
18064 | * Test if `error` thrown by [[CreateServiceRequest]] was caused by unknown type of service.
|
18065 | */
|
18066 | export function isUnknownServiceError(error: Error): boolean;
|
18067 | /**
|
18068 | * This message is sent by the main thread to [[WorkerServiceManager]] to dynamically destroy a
|
18069 | * service.
|
18070 | */
|
18071 | export interface DestroyServiceRequest extends ServiceRequest {
|
18072 | type: Requests.DestroyService;
|
18073 | /**
|
18074 | * Id of service to be destroyed.
|
18075 | */
|
18076 | targetServiceId: string;
|
18077 | }
|
18078 | /**
|
18079 | * Possible service management messages (`CreateService` or `DestroyService`) sent to WebWorker.
|
18080 | */
|
18081 | export type WorkerServiceManagerRequest = CreateServiceRequest | DestroyServiceRequest;
|
18082 | /**
|
18083 | * This message is a part of the Request-Response scheme implemented to be used in communication
|
18084 | * between workers and the decoder.
|
18085 | */
|
18086 | export interface RequestMessage extends ServiceMessage {
|
18087 | type: ServiceMessageName.Request;
|
18088 | messageId: number;
|
18089 | request: any;
|
18090 | }
|
18091 | /**
|
18092 | * Type guard to check if an object is a request message sent to a worker.
|
18093 | */
|
18094 | export function isRequestMessage(message: any): message is RequestMessage;
|
18095 | /**
|
18096 | * This message is a part of the Request-Response scheme implemented to be used in communication
|
18097 | * between workers and the decoder.
|
18098 | */
|
18099 | export interface ResponseMessage extends ServiceMessage {
|
18100 | type: ServiceMessageName.Response;
|
18101 | messageId: number;
|
18102 | errorMessage?: string;
|
18103 | errorStack?: string;
|
18104 | response?: object;
|
18105 | }
|
18106 | /**
|
18107 | * Type guard to check if an object is a request message sent to a worker.
|
18108 | */
|
18109 | export function isResponseMessage(message: any): message is ResponseMessage;
|
18110 | }
|
18111 |
|
18112 | /**
|
18113 | * Communication protocol with [[ITiler]].
|
18114 | */
|
18115 | export declare namespace WorkerTilerProtocol {
|
18116 | /**
|
18117 | * Define possible names of requests called on tiler services within `WebWorker`.
|
18118 | */
|
18119 | export enum Requests {
|
18120 | RegisterIndex = "register-index",
|
18121 | UpdateIndex = "update-index",
|
18122 | TileRequest = "tile-request"
|
18123 | }
|
18124 | /**
|
18125 | * This object is sent to the tiler to register a new tile index in the worker.
|
18126 | */
|
18127 | export interface RegisterIndexRequest extends WorkerServiceProtocol.ServiceRequest {
|
18128 | type: Requests.RegisterIndex;
|
18129 | id: string;
|
18130 | input: string | GeoJson;
|
18131 | }
|
18132 | /**
|
18133 | * Type guard to check if an object is an index registration request sent to a worker.
|
18134 | */
|
18135 | export function isRegisterIndexRequest(message: any): message is RegisterIndexRequest;
|
18136 | /**
|
18137 | * This object is sent to the tiler to register a new tile index in the worker.
|
18138 | */
|
18139 | export interface UpdateIndexRequest extends WorkerServiceProtocol.ServiceRequest {
|
18140 | type: Requests.UpdateIndex;
|
18141 | id: string;
|
18142 | input: string | GeoJson;
|
18143 | }
|
18144 | /**
|
18145 | * Type guard to check if an object is an update request for the index registration.
|
18146 | */
|
18147 | export function isUpdateIndexRequest(message: any): message is UpdateIndexRequest;
|
18148 | /**
|
18149 | * This object is sent to the tiler asking to retrieve a specific tile. The expected response
|
18150 | * type is an object containing a tiled payload.
|
18151 | */
|
18152 | export interface TileRequest extends WorkerServiceProtocol.ServiceRequest {
|
18153 | type: Requests.TileRequest;
|
18154 | index: string;
|
18155 | tileKey: number;
|
18156 | }
|
18157 | /**
|
18158 | * Type guard to check if an object is a tile request sent to a worker.
|
18159 | */
|
18160 | export function isTileRequest(message: any): message is TileRequest;
|
18161 | }
|
18162 |
|
18163 | /**
|
18164 | * Available texture wrapping modes.
|
18165 | */
|
18166 | export declare type WrappingMode = "clamp" | "repeat" | "mirror";
|
18167 |
|
18168 | /**
|
18169 | * Text wrapping rule used when `lineWidth` is reached.
|
18170 | */
|
18171 | declare enum WrappingMode_2 {
|
18172 | None = 0,
|
18173 | Character = 1,
|
18174 | Word = 2
|
18175 | }
|
18176 |
|
18177 | /**
|
18178 | * Map zoom level to map of visible tile key entries
|
18179 | */
|
18180 | declare type ZoomLevelTileKeyMap = Map<number, TileKeyEntries>;
|
18181 |
|
18182 | export { }
|
18183 | export as namespace harp;
|
18184 |
|
\ | No newline at end of file |