@mapcreator/sdk 0.0.0-preload.1 → 0.0.0-preload.3
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/Video.d.ts +1 -0
- package/dist/constants/index.d.ts +6 -2
- package/dist/mapcreator-sdk.js +2417 -2376
- package/dist/mapcreator-sdk.umd.cjs +113 -113
- package/dist/report.html +1 -1
- package/dist/types/jobObject.d.ts +8 -5
- package/dist/types/video.d.ts +9 -0
- package/dist/utils/mapstyle.d.ts +2 -0
- package/dist/utils/video/cameraCurve.d.ts +1 -11
- package/dist/utils/video/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ export type JobObject = {
|
|
|
31
31
|
layerInfo?: Optional<Array<{
|
|
32
32
|
id: string;
|
|
33
33
|
visibility: boolean;
|
|
34
|
-
opacity
|
|
34
|
+
opacity?: Optional<number>;
|
|
35
35
|
}>>;
|
|
36
36
|
overlays?: Optional<number[]>;
|
|
37
37
|
projection?: Optional<'mercator' | 'globe'>;
|
|
@@ -70,6 +70,7 @@ export type JobObjectModels = {
|
|
|
70
70
|
marker?: Optional<JobObjectMarkerGroup[]>;
|
|
71
71
|
polygon?: Optional<JobObjectPolygonGroup[]>;
|
|
72
72
|
};
|
|
73
|
+
export type JobObjectJustify = 'left' | 'center' | 'right';
|
|
73
74
|
export type PopupPosition = 'bottomLeft' | 'mapElement';
|
|
74
75
|
type Optional<T> = T | undefined;
|
|
75
76
|
type JobObjectGroupType = JobObjectArea | JobObjectCircle | JobObjectDot | JobObjectLine | JobObjectMarker | JobObjectPolygon;
|
|
@@ -100,6 +101,7 @@ export type JobObjectMarkerGroup = JobObjectGroupBase<JobObjectMarker> & {
|
|
|
100
101
|
textColor?: Optional<string>;
|
|
101
102
|
textHaloColor?: Optional<string>;
|
|
102
103
|
collisionDetection?: Optional<boolean>;
|
|
104
|
+
labelCollisionDetection?: Optional<boolean>;
|
|
103
105
|
clustering?: Optional<boolean>;
|
|
104
106
|
clusterMaxZoom?: Optional<number>;
|
|
105
107
|
clusterRadius?: Optional<number>;
|
|
@@ -140,6 +142,7 @@ export type JobObjectNorthArrow = {
|
|
|
140
142
|
position: AdornmentPosition;
|
|
141
143
|
stacking?: Optional<Orientation>;
|
|
142
144
|
scale?: Optional<number>;
|
|
145
|
+
svgString?: Optional<string>;
|
|
143
146
|
};
|
|
144
147
|
export type JobObjectScalebar = {
|
|
145
148
|
type: 'scalebar';
|
|
@@ -152,6 +155,7 @@ export type JobObjectScalebar = {
|
|
|
152
155
|
fontSize?: Optional<number>;
|
|
153
156
|
maxWidth?: Optional<number>;
|
|
154
157
|
unit?: Optional<ScalebarUnit>;
|
|
158
|
+
svgString?: Optional<string>;
|
|
155
159
|
};
|
|
156
160
|
export type JobObjectWebControls = {
|
|
157
161
|
type: 'webControls';
|
|
@@ -194,12 +198,12 @@ export type JobObjectHeading = {
|
|
|
194
198
|
titleColor?: Optional<string>;
|
|
195
199
|
titleFont?: Optional<string>;
|
|
196
200
|
titleFontSize?: Optional<number>;
|
|
197
|
-
titleJustify?: Optional<
|
|
201
|
+
titleJustify?: Optional<JobObjectJustify>;
|
|
198
202
|
subtitle: string;
|
|
199
203
|
subtitleColor?: Optional<string>;
|
|
200
204
|
subtitleFont?: Optional<string>;
|
|
201
205
|
subtitleFontSize?: Optional<number>;
|
|
202
|
-
subtitleJustify?: Optional<
|
|
206
|
+
subtitleJustify?: Optional<JobObjectJustify>;
|
|
203
207
|
background?: Optional<string>;
|
|
204
208
|
showBackground?: Optional<boolean>;
|
|
205
209
|
};
|
|
@@ -261,7 +265,6 @@ export type JobObjectLine = {
|
|
|
261
265
|
lineColor?: Optional<string>;
|
|
262
266
|
lineStyle?: Optional<'solid' | 'dashed' | 'dotted'>;
|
|
263
267
|
lineType?: Optional<'line' | 'route'>;
|
|
264
|
-
lineDashArray?: Optional<number[]>;
|
|
265
268
|
transportType?: Optional<'car' | 'bicycle' | 'pedestrian'>;
|
|
266
269
|
smoothness?: Optional<number>;
|
|
267
270
|
svg?: Optional<string>;
|
|
@@ -351,7 +354,7 @@ export type JobObjectMarker = {
|
|
|
351
354
|
textAnchor?: Optional<Anchor>;
|
|
352
355
|
textLineHeight?: Optional<number>;
|
|
353
356
|
textLetterSpacing?: Optional<number>;
|
|
354
|
-
textJustify?: Optional<
|
|
357
|
+
textJustify?: Optional<JobObjectJustify>;
|
|
355
358
|
textRotation?: Optional<number>;
|
|
356
359
|
textOffset?: Optional<[number, number]>;
|
|
357
360
|
textColor?: Optional<string>;
|
package/dist/types/video.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LngLat } from './geometry';
|
|
1
2
|
export interface Keyframe {
|
|
2
3
|
time: number;
|
|
3
4
|
center: [number, number];
|
|
@@ -11,3 +12,11 @@ export interface Keyframe {
|
|
|
11
12
|
transition: 'ease' | 'linear' | 'instant';
|
|
12
13
|
hideLabels: boolean;
|
|
13
14
|
}
|
|
15
|
+
export interface CameraParams {
|
|
16
|
+
center: LngLat;
|
|
17
|
+
zoom: number;
|
|
18
|
+
bearing: number;
|
|
19
|
+
pitch: number;
|
|
20
|
+
fov: number;
|
|
21
|
+
elevation: number;
|
|
22
|
+
}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Keyframe } from '../../types/video';
|
|
3
|
-
interface CameraParams {
|
|
4
|
-
center: LngLat;
|
|
5
|
-
zoom: number;
|
|
6
|
-
bearing: number;
|
|
7
|
-
pitch: number;
|
|
8
|
-
fov: number;
|
|
9
|
-
elevation: number;
|
|
10
|
-
}
|
|
1
|
+
import { CameraParams, Keyframe } from '../../types/video';
|
|
11
2
|
/**
|
|
12
3
|
* The CameraCurve class represents a camera path of a single video. It takes a video script (array
|
|
13
4
|
* of keyframes) in its constructor. It then provides a single public method sample(time) that
|
|
@@ -36,4 +27,3 @@ export declare class CameraCurve {
|
|
|
36
27
|
private getKeyframeIndexByTime;
|
|
37
28
|
private getKeyframeValue;
|
|
38
29
|
}
|
|
39
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Keyframe } from '../../types/video';
|
|
1
|
+
import { CameraParams, Keyframe } from '../../types/video';
|
|
2
2
|
/**
|
|
3
3
|
* This function fixes the given script so that globe and bearing rotations between keyframes always
|
|
4
4
|
* happen along the shortest path. This fixes the camera unexpectedly turning the opposite direction
|
|
@@ -9,3 +9,4 @@ export declare function unwrapGlobeAndCameraRotation(script: Keyframe[]): Keyfra
|
|
|
9
9
|
export declare function zoomToAltitude(zoom: number): number;
|
|
10
10
|
export declare function getTotalDuration(script: Keyframe[]): number;
|
|
11
11
|
export declare function getPreciseFramerate(frameRate: number): number;
|
|
12
|
+
export declare function isSameCameraPosition(position1: CameraParams | undefined, position2: CameraParams | undefined): boolean;
|