@mapcreator/sdk 1.6.0 → 2.0.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.
- package/dist/MCMap.d.ts +2 -2
- package/dist/PopupManager.d.ts +2 -3
- package/dist/Video.d.ts +4 -10
- package/dist/VideoControls.d.ts +24 -0
- package/dist/VideoPreloadOverlay.d.ts +8 -0
- package/dist/adornments/connectedLegend.d.ts +2 -1
- package/dist/adornments/copyright.d.ts +1 -1
- package/dist/adornments/customAdornment.d.ts +3 -1
- package/dist/adornments/heading.d.ts +3 -1
- package/dist/adornments/insetMap.d.ts +2 -1
- package/dist/adornments/manualLegend.d.ts +3 -1
- package/dist/adornments/northArrow.d.ts +2 -1
- package/dist/adornments/scalebar.d.ts +2 -1
- package/dist/constants/index.d.ts +20 -1
- package/dist/initMap.d.ts +3 -2
- package/dist/mapcreator-sdk.css +1 -1
- package/dist/mapcreator-sdk.js +3984 -3898
- package/dist/mapcreator-sdk.umd.cjs +210 -169
- package/dist/models/marker.d.ts +2 -2
- package/dist/renderAdornments.d.ts +2 -2
- package/dist/report.html +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/jobObject.d.ts +6 -1
- package/dist/utils/fullscreen.d.ts +1 -4
- package/dist/utils/helpers.d.ts +3 -2
- package/dist/utils/template.d.ts +1 -2
- package/dist/utils/video/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/MCMap.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Evented, Map as MapLibre, StyleSpecification } from '@mapcreator/maplibre-gl';
|
|
2
|
+
import { ExportType, LayerInfo, Svgs } from './types';
|
|
2
3
|
import { JobObject } from './types/jobObject';
|
|
3
4
|
import { SvgCache } from './utils/svgHelpers';
|
|
4
|
-
import { LayerInfo, Svgs } from './types';
|
|
5
5
|
type SdkEventType = {
|
|
6
6
|
playstart: VideoEvent;
|
|
7
7
|
playend: VideoEvent;
|
|
@@ -13,7 +13,7 @@ type VideoEvent = {
|
|
|
13
13
|
export declare class MCMap extends Evented {
|
|
14
14
|
map: MapLibre;
|
|
15
15
|
private video;
|
|
16
|
-
constructor(map: MapLibre, jobObject: JobObject, svgs: Svgs, svgCache: SvgCache, mapstyle: StyleSpecification, overlays: Map<number, StyleSpecification>, layerInfo: LayerInfo, backgroundColor: string);
|
|
16
|
+
constructor(map: MapLibre, exportType: ExportType, jobObject: JobObject, svgs: Svgs, svgCache: SvgCache, mapstyle: StyleSpecification, overlays: Map<number, StyleSpecification>, layerInfo: LayerInfo, backgroundColor: string);
|
|
17
17
|
on<T extends keyof SdkEventType>(type: T, listener: (e: SdkEventType[T]) => void): import('@mapcreator/maplibre-gl').Subscription;
|
|
18
18
|
once<T extends keyof SdkEventType>(type: T, listener: (e: SdkEventType[T]) => void): Promise<any> | this;
|
|
19
19
|
off<T extends keyof SdkEventType>(type: T, listener: (e: SdkEventType[T]) => void): this;
|
package/dist/PopupManager.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Map as MapLibre, MapGeoJSONFeature, MapLayerMouseEvent, LngLatLike } from '@mapcreator/maplibre-gl';
|
|
2
2
|
import { JobObject, PopupPosition } from './types/jobObject';
|
|
3
|
-
import { Mode } from './types';
|
|
4
3
|
export declare class PopupManager {
|
|
5
4
|
private map;
|
|
6
|
-
private
|
|
5
|
+
private youTubePlaceholder;
|
|
7
6
|
private language;
|
|
8
7
|
private publication;
|
|
9
8
|
private restrictMapMovement;
|
|
@@ -18,7 +17,7 @@ export declare class PopupManager {
|
|
|
18
17
|
private floatingPopup;
|
|
19
18
|
private feature;
|
|
20
19
|
private currentModelId;
|
|
21
|
-
constructor(map: MapLibre,
|
|
20
|
+
constructor(map: MapLibre, youTubePlaceholder: boolean);
|
|
22
21
|
setJobObject(jobObject: JobObject): void;
|
|
23
22
|
setParams(popupPosition: PopupPosition, language: string, restrictMapMovement: boolean, center: LngLatLike): void;
|
|
24
23
|
setPublication(publication: string | undefined): void;
|
package/dist/Video.d.ts
CHANGED
|
@@ -13,13 +13,17 @@ export declare class Video {
|
|
|
13
13
|
private svgCache;
|
|
14
14
|
private duration;
|
|
15
15
|
private frameRate;
|
|
16
|
+
private loop;
|
|
16
17
|
private mapstyle;
|
|
17
18
|
private overlays;
|
|
18
19
|
private layerInfo;
|
|
19
20
|
private backgroundColor;
|
|
20
21
|
private playhead;
|
|
21
22
|
private playbackContext;
|
|
23
|
+
private controls;
|
|
24
|
+
private preloadOverlay;
|
|
22
25
|
constructor(mcMap: MCMap, jobObject: JobObject, svgs: Svgs, svgCache: SvgCache, mapstyle: StyleSpecification, overlays: Map<number, StyleSpecification>, layerInfo: LayerInfo, backgroundColor: string);
|
|
26
|
+
private launch;
|
|
23
27
|
play(): void;
|
|
24
28
|
pause(): void;
|
|
25
29
|
seekTo(time: number): void;
|
|
@@ -39,16 +43,6 @@ export declare class Video {
|
|
|
39
43
|
private setFrame;
|
|
40
44
|
private setCamera;
|
|
41
45
|
private applyAnimations;
|
|
42
|
-
/**
|
|
43
|
-
* Prepares map for any change during playback (camera movement or animation update):
|
|
44
|
-
*
|
|
45
|
-
* 1. Disables center clamping to ground for manual elevation control
|
|
46
|
-
* 2. Disables paint property transitions
|
|
47
|
-
*
|
|
48
|
-
* Initial state is restored 300ms later
|
|
49
|
-
*/
|
|
50
|
-
private prepareForPlayback;
|
|
51
|
-
private restoreAfterPlayback;
|
|
52
46
|
private getGroupAnimations;
|
|
53
47
|
private getLayerOpacity;
|
|
54
48
|
private setLayerOpacity;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Map } from '@mapcreator/maplibre-gl';
|
|
2
|
+
export type VideoControlsCallbacks = {
|
|
3
|
+
playPause: () => void;
|
|
4
|
+
restart: () => void;
|
|
5
|
+
seek: (time: number) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare class VideoControls {
|
|
8
|
+
private callbacks;
|
|
9
|
+
private duration;
|
|
10
|
+
private container;
|
|
11
|
+
private mapContainer;
|
|
12
|
+
private playButton;
|
|
13
|
+
private restartButton;
|
|
14
|
+
private fullscreenButton;
|
|
15
|
+
private slider;
|
|
16
|
+
private sliderFill;
|
|
17
|
+
private playheadLabel;
|
|
18
|
+
private playhead;
|
|
19
|
+
private isPlaying;
|
|
20
|
+
constructor(map: Map, duration: number, callbacks: VideoControlsCallbacks);
|
|
21
|
+
setPlayhead(playhead: number): void;
|
|
22
|
+
setPlaying(isPlaying: boolean): void;
|
|
23
|
+
private update;
|
|
24
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Map as MapLibre } from '@mapcreator/maplibre-gl';
|
|
2
2
|
import { JobObject, JobObjectConnectedLegend } from '../types/jobObject';
|
|
3
|
-
|
|
3
|
+
import { ExportType } from '../types';
|
|
4
|
+
export declare function useConnectedLegend(legend: JobObjectConnectedLegend, jobObject: JobObject, map: MapLibre, vapiUrl: string, accessToken: string, exportType: ExportType): {
|
|
4
5
|
element: HTMLElement;
|
|
5
6
|
ready: Promise<void>;
|
|
6
7
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Map } from '@mapcreator/maplibre-gl';
|
|
2
2
|
import { JobObjectCopyright } from '../types/jobObject';
|
|
3
|
-
export declare function useCopyright(copyright: JobObjectCopyright, map: Map
|
|
3
|
+
export declare function useCopyright(copyright: JobObjectCopyright, map: Map): HTMLElement;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { JobObjectCustomAdornment } from '../types/jobObject';
|
|
2
|
-
|
|
2
|
+
import { Map } from '@mapcreator/maplibre-gl';
|
|
3
|
+
import { ExportType } from '../types';
|
|
4
|
+
export declare function useCustomAdornment(adornment: JobObjectCustomAdornment, map: Map, exportType: ExportType): HTMLElement;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { JobObjectHeading } from '../types/jobObject';
|
|
2
|
-
|
|
2
|
+
import { Map } from '@mapcreator/maplibre-gl';
|
|
3
|
+
import { ExportType } from '../types';
|
|
4
|
+
export declare function useHeading(heading: JobObjectHeading, map: Map, vapiUrl: string, accessToken: string, exportType: ExportType): {
|
|
3
5
|
element: HTMLElement;
|
|
4
6
|
ready: Promise<void>;
|
|
5
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JobObjectInsetMap } from '../types/jobObject';
|
|
2
2
|
import { Map } from '@mapcreator/maplibre-gl';
|
|
3
|
-
|
|
3
|
+
import { ExportType } from '../types';
|
|
4
|
+
export declare function useInsetMap(insetMap: JobObjectInsetMap, map: Map, cdnUrl: string, exportType: ExportType): {
|
|
4
5
|
element: HTMLElement;
|
|
5
6
|
ready: Promise<void>;
|
|
6
7
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { JobObjectManualLegend } from '../types/jobObject';
|
|
2
|
-
|
|
2
|
+
import { Map } from '@mapcreator/maplibre-gl';
|
|
3
|
+
import { ExportType } from '../types';
|
|
4
|
+
export declare function useManualLegend(legend: JobObjectManualLegend, map: Map, vapiUrl: string, accessToken: string, exportType: ExportType): {
|
|
3
5
|
element: HTMLElement;
|
|
4
6
|
ready: Promise<void>;
|
|
5
7
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ExportType } from '../types';
|
|
1
2
|
import { Map } from '@mapcreator/maplibre-gl';
|
|
2
3
|
import { JobObjectNorthArrow } from '../types/jobObject';
|
|
3
|
-
export declare function useNorthArrow(northArrow: JobObjectNorthArrow, map: Map,
|
|
4
|
+
export declare function useNorthArrow(northArrow: JobObjectNorthArrow, map: Map, exportType: ExportType): HTMLElement;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JobObjectScalebar } from '../types/jobObject';
|
|
2
2
|
import { Map } from '@mapcreator/maplibre-gl';
|
|
3
|
-
|
|
3
|
+
import { ExportType } from '../types';
|
|
4
|
+
export declare function useScalebar(scalebar: JobObjectScalebar, map: Map, vapiUrl: string, accessToken: string, exportType: ExportType): {
|
|
4
5
|
element: HTMLElement;
|
|
5
6
|
ready: Promise<void>;
|
|
6
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PositionOffsets, AdornmentPosition, JobObjectSlotName } from '../types/jobObject';
|
|
2
2
|
import { SkySpecification, StyleLayer } from '@mapcreator/maplibre-gl';
|
|
3
3
|
export declare const defaultSky: SkySpecification;
|
|
4
4
|
type PositionConfig = {
|
|
@@ -19,4 +19,23 @@ export declare const allSlotNames: JobObjectSlotName[];
|
|
|
19
19
|
export declare const slotNameToLayerId: {
|
|
20
20
|
[key in JobObjectSlotName]: string;
|
|
21
21
|
};
|
|
22
|
+
export declare const fileFormatToExportType: {
|
|
23
|
+
readonly jpg: "static";
|
|
24
|
+
readonly png: "static";
|
|
25
|
+
readonly svg: "static";
|
|
26
|
+
readonly pdf: "static";
|
|
27
|
+
readonly tiff: "static";
|
|
28
|
+
readonly eps: "static";
|
|
29
|
+
readonly eps_log: "static";
|
|
30
|
+
readonly mp4: "video";
|
|
31
|
+
readonly mov: "video";
|
|
32
|
+
readonly mkv: "video";
|
|
33
|
+
readonly mxf: "video";
|
|
34
|
+
readonly webm: "video";
|
|
35
|
+
readonly jpg_sequence: "video";
|
|
36
|
+
readonly png_sequence: "video";
|
|
37
|
+
readonly web_video: "video";
|
|
38
|
+
readonly web: "interactive";
|
|
39
|
+
readonly web_download: "interactive";
|
|
40
|
+
};
|
|
22
41
|
export {};
|
package/dist/initMap.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { MCMap } from './MCMap';
|
|
2
2
|
import { JobObject } from './types/jobObject';
|
|
3
|
-
import { Env
|
|
3
|
+
import { Env } from './types';
|
|
4
4
|
export declare function initMap(options: {
|
|
5
5
|
container: HTMLElement | string;
|
|
6
6
|
job: JobObject | string;
|
|
7
7
|
accessToken: string;
|
|
8
|
-
mode?: Mode | undefined;
|
|
9
8
|
env?: Env | undefined;
|
|
9
|
+
youTubePlaceholder?: boolean | undefined;
|
|
10
|
+
preserveDrawingBuffer?: boolean | undefined;
|
|
10
11
|
}): Promise<MCMap>;
|