@mapcreator/sdk 1.3.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,10 +3,18 @@ import { PopupElement } from './Registry';
3
3
  export declare class HighlightManager {
4
4
  private map;
5
5
  private popupElements;
6
+ private currentPopupElement;
6
7
  private markerLayerIds;
7
8
  private resizeObserver?;
9
+ private hiddenCluster?;
10
+ private clusterCheckId;
8
11
  constructor(map: Map, popupElements: PopupElement[]);
9
- highlight(popupElement: PopupElement | undefined): void;
12
+ highlight(popupElement: PopupElement | undefined, cycle?: boolean): void;
13
+ private resetCluster;
14
+ private setSelectedClusterState;
15
+ private resetHiddenCluster;
16
+ private checkCluster;
17
+ private refreshCurrentCluster;
10
18
  private deselect;
11
19
  private highlightGroupedMarker;
12
20
  private fadeOtherMarkers;
@@ -14,10 +22,4 @@ export declare class HighlightManager {
14
22
  private getElementBounds;
15
23
  private flattenCoordinates;
16
24
  private panToElement;
17
- private visibleOnGlobe;
18
- private lngLatToUnitVector;
19
- private rotateVectorAroundAxis;
20
- private rotateAroundZ;
21
- private cross;
22
- private normalize;
23
25
  }
package/dist/MCMap.d.ts CHANGED
@@ -22,5 +22,6 @@ export declare class MCMap extends Evented {
22
22
  pause(): void;
23
23
  seekTo(time: number): void;
24
24
  frames(): AsyncGenerator<ImageData, void, void>;
25
+ preload(): Promise<void>;
25
26
  }
26
27
  export {};
@@ -1,25 +1,23 @@
1
1
  import { Map as MapLibre, MapGeoJSONFeature, MapLayerMouseEvent, LngLatLike } from '@mapcreator/maplibre-gl';
2
2
  import { JobObject, PopupPosition } from './types/jobObject';
3
- import { PopupElement } from './Registry';
4
3
  import { Mode } from './types';
5
4
  export declare class PopupManager {
6
5
  private map;
6
+ private mode;
7
+ private language;
8
+ private publication;
9
+ private restrictMapMovement;
10
+ private center;
7
11
  private popupPosition;
8
12
  private mapContainer;
13
+ private highlightManager;
14
+ private registry;
15
+ private promoteIdCache;
16
+ private popupElements;
9
17
  private popupContainer;
18
+ private floatingPopup;
10
19
  private feature;
11
- private currentFeatureId;
12
20
  private currentModelId;
13
- private popupElements;
14
- private language;
15
- private promoteIdCache;
16
- private publication;
17
- private floatingPopup;
18
- private registry;
19
- private highlightManager;
20
- private mode;
21
- private restrictMapMovement;
22
- private center;
23
21
  constructor(map: MapLibre, mode: Mode);
24
22
  setJobObject(jobObject: JobObject): void;
25
23
  setParams(popupPosition: PopupPosition, language: string, restrictMapMovement: boolean, center: LngLatLike): void;
@@ -28,7 +26,6 @@ export declare class PopupManager {
28
26
  setHighlightManager(): void;
29
27
  private onMouseMove;
30
28
  private onClick;
31
- getPopupElementFromFeature(feature: MapGeoJSONFeature): PopupElement | undefined;
32
29
  getInteractiveFeature(e: MapLayerMouseEvent): MapGeoJSONFeature | undefined;
33
30
  private addPopup;
34
31
  private addFloatingPopup;
@@ -1,5 +1,5 @@
1
+ import { JobObject, PopupMedia, JobObjectDot, JobObjectLine, JobObjectArea, JobObjectCircle, JobObjectMarker, JobObjectPolygon, JobObjectDotGroup, JobObjectLineGroup, JobObjectAreaGroup, JobObjectCircleGroup, JobObjectMarkerGroup, JobObjectPolygonGroup, JobObjectDataBindings } from './types/jobObject';
1
2
  import { Position } from './types/geometry';
2
- import { JobObject, JobObjectArea, JobObjectCircle, JobObjectDot, JobObjectLine, JobObjectMarker, JobObjectPolygon, PopupMedia, JobObjectDataBindings } from './types/jobObject';
3
3
  import { LngLat, MapGeoJSONFeature } from '@mapcreator/maplibre-gl';
4
4
  type Model = JobObjectArea | JobObjectCircle | JobObjectDot | JobObjectLine | JobObjectMarker | JobObjectPolygon;
5
5
  export type PopupElement = {
@@ -14,7 +14,58 @@ export type PopupElement = {
14
14
  dataBindings: JobObjectDataBindings;
15
15
  };
16
16
  export declare class Registry {
17
- private data;
17
+ models: {
18
+ area: {
19
+ [groupId: string]: {
20
+ [modelId: string]: JobObjectArea;
21
+ };
22
+ };
23
+ circle: {
24
+ [groupId: string]: {
25
+ [modelId: string]: JobObjectCircle;
26
+ };
27
+ };
28
+ dot: {
29
+ [groupId: string]: {
30
+ [modelId: string]: JobObjectDot;
31
+ };
32
+ };
33
+ line: {
34
+ [groupId: string]: {
35
+ [modelId: string]: JobObjectLine;
36
+ };
37
+ };
38
+ marker: {
39
+ [groupId: string]: {
40
+ [modelId: string]: JobObjectMarker;
41
+ };
42
+ };
43
+ polygon: {
44
+ [groupId: string]: {
45
+ [modelId: string]: JobObjectPolygon;
46
+ };
47
+ };
48
+ };
49
+ groups: {
50
+ area: {
51
+ [groupId: string]: JobObjectAreaGroup;
52
+ };
53
+ circle: {
54
+ [groupId: string]: JobObjectCircleGroup;
55
+ };
56
+ dot: {
57
+ [groupId: string]: JobObjectDotGroup;
58
+ };
59
+ line: {
60
+ [groupId: string]: JobObjectLineGroup;
61
+ };
62
+ marker: {
63
+ [groupId: string]: JobObjectMarkerGroup;
64
+ };
65
+ polygon: {
66
+ [groupId: string]: JobObjectPolygonGroup;
67
+ };
68
+ };
18
69
  private customGroupIds;
19
70
  constructor(jobObject: JobObject);
20
71
  getModel(feature: MapGeoJSONFeature): Model | undefined;
package/dist/Video.d.ts CHANGED
@@ -6,10 +6,13 @@ import { StyleSpecification } from '@mapcreator/maplibre-gl';
6
6
  export declare class Video {
7
7
  private mcMap;
8
8
  private cameraCurve;
9
- private jobObject;
9
+ private registryAnimations;
10
+ private layerAnimations;
11
+ private registry;
10
12
  private svgs;
11
13
  private svgCache;
12
14
  private duration;
15
+ private frameRate;
13
16
  private mapstyle;
14
17
  private overlays;
15
18
  private layerInfo;
@@ -21,9 +24,18 @@ export declare class Video {
21
24
  pause(): void;
22
25
  seekTo(time: number): void;
23
26
  frames(): AsyncGenerator<ImageData, void, void>;
27
+ preload(): Promise<void>;
28
+ /**
29
+ * Waits for the next 'render' or a meaningful 'dataabort' event, whichever
30
+ * comes first. 'dataabort' events for tiles that aren't in the 'loading'
31
+ * state (e.g. errored tiles being evicted) are ignored — they don't indicate
32
+ * lost in-flight work.
33
+ */
34
+ private waitForRenderOrAbort;
24
35
  private captureFrame;
25
36
  private drawAdornments;
26
37
  private playFrame;
38
+ private setFrame;
27
39
  private setCamera;
28
40
  private applyAnimations;
29
41
  /**