@jupytergis/schema 0.12.1 → 0.13.0
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/lib/_interface/forms.json +90 -1
- package/lib/_interface/project/jgis.d.ts +1 -1
- package/lib/_interface/project/layers/storySegmentLayer.d.ts +49 -11
- package/lib/_interface/project/layers/vectorTileLayer.d.ts +11 -0
- package/lib/interfaces.d.ts +16 -12
- package/lib/model.d.ts +9 -0
- package/lib/model.js +13 -0
- package/lib/schema/project/jgis.json +1 -1
- package/lib/schema/project/layers/storySegmentLayer.json +43 -1
- package/lib/schema/project/layers/vectorTileLayer.json +38 -0
- package/package.json +1 -1
|
@@ -304,7 +304,6 @@
|
|
|
304
304
|
},
|
|
305
305
|
"StorySegmentLayer": {
|
|
306
306
|
"type": "object",
|
|
307
|
-
"additionalProperties": false,
|
|
308
307
|
"required": [
|
|
309
308
|
"zoom",
|
|
310
309
|
"extent",
|
|
@@ -324,9 +323,11 @@
|
|
|
324
323
|
},
|
|
325
324
|
"content": {
|
|
326
325
|
"type": "object",
|
|
326
|
+
"title": "Segment Content",
|
|
327
327
|
"additionalProperties": false,
|
|
328
328
|
"properties": {
|
|
329
329
|
"title": {
|
|
330
|
+
"title": "Segment Title",
|
|
330
331
|
"type": "string"
|
|
331
332
|
},
|
|
332
333
|
"image": {
|
|
@@ -363,6 +364,47 @@
|
|
|
363
364
|
"type",
|
|
364
365
|
"time"
|
|
365
366
|
]
|
|
367
|
+
},
|
|
368
|
+
"layerOverride": {
|
|
369
|
+
"type": "array",
|
|
370
|
+
"title": "Symbology Override",
|
|
371
|
+
"description": "Symbology overrides to apply to target layers when this story segment is active",
|
|
372
|
+
"items": {
|
|
373
|
+
"type": "object",
|
|
374
|
+
"properties": {
|
|
375
|
+
"targetLayer": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"title": "Target Layer",
|
|
378
|
+
"description": "The name of the layer to apply a symbology override to when this story segment is active",
|
|
379
|
+
"default": ""
|
|
380
|
+
},
|
|
381
|
+
"visible": {
|
|
382
|
+
"type": "boolean",
|
|
383
|
+
"title": "Visibility",
|
|
384
|
+
"default": true,
|
|
385
|
+
"description": "Override the target layer visibility while this story segment is active"
|
|
386
|
+
},
|
|
387
|
+
"opacity": {
|
|
388
|
+
"type": "number",
|
|
389
|
+
"title": "Opacity",
|
|
390
|
+
"description": "Override the target layer opacity while this story segment is active",
|
|
391
|
+
"minimum": 0,
|
|
392
|
+
"maximum": 1,
|
|
393
|
+
"multipleOf": 0.1,
|
|
394
|
+
"default": 1
|
|
395
|
+
},
|
|
396
|
+
"symbologyState": {
|
|
397
|
+
"type": "object",
|
|
398
|
+
"description": "The symbology state override (renderType, value, method, etc.)",
|
|
399
|
+
"default": {}
|
|
400
|
+
},
|
|
401
|
+
"color": {
|
|
402
|
+
"type": "object",
|
|
403
|
+
"description": "The color/style override",
|
|
404
|
+
"default": {}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
366
408
|
}
|
|
367
409
|
}
|
|
368
410
|
},
|
|
@@ -460,6 +502,53 @@
|
|
|
460
502
|
"multipleOf": 0.1,
|
|
461
503
|
"minimum": 0,
|
|
462
504
|
"maximum": 1
|
|
505
|
+
},
|
|
506
|
+
"symbologyState": {
|
|
507
|
+
"type": "object",
|
|
508
|
+
"description": "The state of the symbology panel options",
|
|
509
|
+
"required": [
|
|
510
|
+
"renderType"
|
|
511
|
+
],
|
|
512
|
+
"properties": {
|
|
513
|
+
"renderType": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"enum": [
|
|
516
|
+
"Single Symbol",
|
|
517
|
+
"Graduated",
|
|
518
|
+
"Categorized"
|
|
519
|
+
]
|
|
520
|
+
},
|
|
521
|
+
"value": {
|
|
522
|
+
"type": "string"
|
|
523
|
+
},
|
|
524
|
+
"method": {
|
|
525
|
+
"type": "string",
|
|
526
|
+
"enum": [
|
|
527
|
+
"color",
|
|
528
|
+
"radius"
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
"colorRamp": {
|
|
532
|
+
"type": "string",
|
|
533
|
+
"default": "viridis"
|
|
534
|
+
},
|
|
535
|
+
"nClasses": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"default": "9"
|
|
538
|
+
},
|
|
539
|
+
"mode": {
|
|
540
|
+
"type": "string",
|
|
541
|
+
"default": "equal interval",
|
|
542
|
+
"enum": [
|
|
543
|
+
"quantile",
|
|
544
|
+
"equal interval",
|
|
545
|
+
"jenks",
|
|
546
|
+
"pretty",
|
|
547
|
+
"logarithmic"
|
|
548
|
+
]
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"additionalProperties": false
|
|
463
552
|
}
|
|
464
553
|
}
|
|
465
554
|
},
|
|
@@ -5,23 +5,48 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
export type SegmentTitle = string;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the layer to apply a symbology override to when this story segment is active
|
|
11
|
+
*/
|
|
12
|
+
export type TargetLayer = string;
|
|
13
|
+
/**
|
|
14
|
+
* Override the target layer visibility while this story segment is active
|
|
15
|
+
*/
|
|
16
|
+
export type Visibility = boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Override the target layer opacity while this story segment is active
|
|
19
|
+
*/
|
|
20
|
+
export type Opacity = number;
|
|
21
|
+
/**
|
|
22
|
+
* Symbology overrides to apply to target layers when this story segment is active
|
|
23
|
+
*/
|
|
24
|
+
export type SymbologyOverride = {
|
|
25
|
+
targetLayer?: TargetLayer;
|
|
26
|
+
visible?: Visibility;
|
|
27
|
+
opacity?: Opacity;
|
|
28
|
+
/**
|
|
29
|
+
* The symbology state override (renderType, value, method, etc.)
|
|
30
|
+
*/
|
|
31
|
+
symbologyState?: {
|
|
32
|
+
[k: string]: any;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The color/style override
|
|
36
|
+
*/
|
|
37
|
+
color?: {
|
|
38
|
+
[k: string]: any;
|
|
39
|
+
};
|
|
40
|
+
[k: string]: any;
|
|
41
|
+
}[];
|
|
42
|
+
|
|
8
43
|
/**
|
|
9
44
|
* StorySegmentLayer
|
|
10
45
|
*/
|
|
11
46
|
export interface IStorySegmentLayer {
|
|
12
47
|
zoom: number;
|
|
13
48
|
extent: number[];
|
|
14
|
-
content?:
|
|
15
|
-
title?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Link to image for the story
|
|
18
|
-
*/
|
|
19
|
-
image?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Markdown string representing the content of the story stop
|
|
22
|
-
*/
|
|
23
|
-
markdown?: string;
|
|
24
|
-
};
|
|
49
|
+
content?: SegmentContent;
|
|
25
50
|
/**
|
|
26
51
|
* Transition configuration between to this story segment
|
|
27
52
|
*/
|
|
@@ -36,4 +61,17 @@ export interface IStorySegmentLayer {
|
|
|
36
61
|
time: number;
|
|
37
62
|
[k: string]: any;
|
|
38
63
|
};
|
|
64
|
+
layerOverride?: SymbologyOverride;
|
|
65
|
+
[k: string]: any;
|
|
66
|
+
}
|
|
67
|
+
export interface SegmentContent {
|
|
68
|
+
title?: SegmentTitle;
|
|
69
|
+
/**
|
|
70
|
+
* Link to image for the story
|
|
71
|
+
*/
|
|
72
|
+
image?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Markdown string representing the content of the story stop
|
|
75
|
+
*/
|
|
76
|
+
markdown?: string;
|
|
39
77
|
}
|
|
@@ -23,4 +23,15 @@ export interface IVectorTileLayer {
|
|
|
23
23
|
* The opacity of the the object
|
|
24
24
|
*/
|
|
25
25
|
opacity?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The state of the symbology panel options
|
|
28
|
+
*/
|
|
29
|
+
symbologyState?: {
|
|
30
|
+
renderType: "Single Symbol" | "Graduated" | "Categorized";
|
|
31
|
+
value?: string;
|
|
32
|
+
method?: "color" | "radius";
|
|
33
|
+
colorRamp?: string;
|
|
34
|
+
nClasses?: string;
|
|
35
|
+
mode?: "quantile" | "equal interval" | "jenks" | "pretty" | "logarithmic";
|
|
36
|
+
};
|
|
26
37
|
}
|
package/lib/interfaces.d.ts
CHANGED
|
@@ -9,9 +9,8 @@ import { JSONObject } from '@lumino/coreutils';
|
|
|
9
9
|
import { ISignal, Signal } from '@lumino/signaling';
|
|
10
10
|
import { SplitPanel } from '@lumino/widgets';
|
|
11
11
|
import { FeatureLike } from 'ol/Feature';
|
|
12
|
-
import { IJGISContent, IJGISLayer, IJGISLayerGroup, IJGISLayerItem, IJGISLayers, IJGISLayerTree, IJGISOptions, IJGISSource, IJGISSources, IJGISStoryMap, SourceType } from './_interface/project/jgis';
|
|
13
|
-
import { IRasterSource } from './
|
|
14
|
-
import { Modes } from './types';
|
|
12
|
+
import { IJGISContent, IJGISLayer, IJGISLayerGroup, IJGISLayerItem, IJGISLayers, IJGISLayerTree, IJGISOptions, IJGISSource, IJGISSources, IJGISStoryMap, LayerType, SourceType } from './_interface/project/jgis';
|
|
13
|
+
import { IGeoJSONSource, IGeoParquetSource, IGeoTiffSource, IHeatmapLayer, IHillshadeLayer, IImageLayer, IImageSource, IMarkerSource, IRasterDemSource, IRasterLayer, IRasterSource, IShapefileSource, IStacLayer, IStorySegmentLayer, IVectorLayer, IVectorTileLayer, IVectorTileSource, IVideoSource, IWebGlLayer, Modes } from './types';
|
|
15
14
|
export { IGeoJSONSource } from './_interface/project/sources/geoJsonSource';
|
|
16
15
|
export interface IJGISStoryMaps {
|
|
17
16
|
[k: string]: IJGISStoryMap;
|
|
@@ -232,6 +231,8 @@ export interface IJupyterGISModel extends DocumentRegistry.IModel {
|
|
|
232
231
|
storyId: string;
|
|
233
232
|
story: IJGISStoryMap | undefined;
|
|
234
233
|
};
|
|
234
|
+
getCurrentSegmentIndex(): number;
|
|
235
|
+
setCurrentSegmentIndex(index: number): void;
|
|
235
236
|
addStorySegment(): {
|
|
236
237
|
storySegmentId: string;
|
|
237
238
|
storyId: string;
|
|
@@ -290,20 +291,23 @@ export interface IJGISExternalCommandRegistry {
|
|
|
290
291
|
registerCommand(command: IJGISExternalCommand): void;
|
|
291
292
|
}
|
|
292
293
|
/**
|
|
293
|
-
* Defines the structure for entries in a
|
|
294
|
-
* Each entry consists of a name, a thumbnail URL, and source information.
|
|
295
|
-
* The source information is expected to conform to the IRasterSource interface.
|
|
294
|
+
* Defines the structure for entries in a layer gallery.
|
|
296
295
|
*
|
|
297
|
-
* @interface
|
|
296
|
+
* @interface ILayerGalleryEntry
|
|
298
297
|
*/
|
|
299
|
-
export
|
|
298
|
+
export type ILayerGalleryEntry = {
|
|
300
299
|
name: string;
|
|
301
300
|
thumbnail: string;
|
|
302
|
-
|
|
303
|
-
|
|
301
|
+
layerType: LayerType;
|
|
302
|
+
layerParameters: IHeatmapLayer | IHillshadeLayer | IImageLayer | IRasterLayer | IStacLayer | IStorySegmentLayer | IVectorLayer | IVectorTileLayer | IWebGlLayer;
|
|
303
|
+
sourceType: SourceType;
|
|
304
|
+
sourceParameters: IGeoJSONSource | IGeoParquetSource | IGeoTiffSource | IImageSource | IMarkerSource | IRasterDemSource | IRasterSource | IShapefileSource | IVectorTileSource | IVideoSource;
|
|
305
|
+
provider: string;
|
|
306
|
+
description: string;
|
|
307
|
+
};
|
|
304
308
|
export interface IJGISLayerBrowserRegistry {
|
|
305
|
-
getRegistryLayers():
|
|
306
|
-
addRegistryLayer(data:
|
|
309
|
+
getRegistryLayers(): ILayerGalleryEntry[];
|
|
310
|
+
addRegistryLayer(data: ILayerGalleryEntry): void;
|
|
307
311
|
removeRegistryLayer(name: string): void;
|
|
308
312
|
clearRegistry(): void;
|
|
309
313
|
}
|
package/lib/model.d.ts
CHANGED
|
@@ -172,6 +172,14 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
172
172
|
storyId: string;
|
|
173
173
|
story: IJGISStoryMap | undefined;
|
|
174
174
|
};
|
|
175
|
+
/**
|
|
176
|
+
* Current slide index for the selected story (0-based).
|
|
177
|
+
*/
|
|
178
|
+
getCurrentSegmentIndex(): number;
|
|
179
|
+
/**
|
|
180
|
+
* Set current slide index for the selected story.
|
|
181
|
+
*/
|
|
182
|
+
setCurrentSegmentIndex(index: number): void;
|
|
175
183
|
/**
|
|
176
184
|
* Adds a story segment from the current map view
|
|
177
185
|
* @returns Object with storySegmentId and storyMapId, or null if no extent/zoom found
|
|
@@ -256,6 +264,7 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
256
264
|
private _geolocation;
|
|
257
265
|
private _geolocationChanged;
|
|
258
266
|
private _tileFeatureCache;
|
|
267
|
+
private _currentSegmentIndex;
|
|
259
268
|
stories: Map<string, IJGISStoryMap>;
|
|
260
269
|
}
|
|
261
270
|
export declare namespace JupyterGISModel {
|
package/lib/model.js
CHANGED
|
@@ -408,6 +408,7 @@ export class JupyterGISModel {
|
|
|
408
408
|
this.sharedModel.addLayer(id, layer);
|
|
409
409
|
}
|
|
410
410
|
this._addLayerTreeItem(id, groupName, position);
|
|
411
|
+
this.syncSelected({ [id]: { type: 'layer' } }, this.getClientId().toString());
|
|
411
412
|
}
|
|
412
413
|
removeLayer(layer_id) {
|
|
413
414
|
var _a;
|
|
@@ -513,6 +514,18 @@ export class JupyterGISModel {
|
|
|
513
514
|
story: this.sharedModel.getStoryMap(storyId),
|
|
514
515
|
};
|
|
515
516
|
}
|
|
517
|
+
/**
|
|
518
|
+
* Current slide index for the selected story (0-based).
|
|
519
|
+
*/
|
|
520
|
+
getCurrentSegmentIndex() {
|
|
521
|
+
return this._currentSegmentIndex;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Set current slide index for the selected story.
|
|
525
|
+
*/
|
|
526
|
+
setCurrentSegmentIndex(index) {
|
|
527
|
+
this._currentSegmentIndex = index;
|
|
528
|
+
}
|
|
516
529
|
/**
|
|
517
530
|
* Adds a story segment from the current map view
|
|
518
531
|
* @returns Object with storySegmentId and storyMapId, or null if no extent/zoom found
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"title": "Presentation Background Color",
|
|
170
170
|
"description": "The background color of the story map"
|
|
171
171
|
},
|
|
172
|
-
"
|
|
172
|
+
"presentationTextColor": {
|
|
173
173
|
"type": "string",
|
|
174
174
|
"title": "Presentation Text Color",
|
|
175
175
|
"description": "The text color of the story map"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
"type": "object",
|
|
3
3
|
"description": "StorySegmentLayer",
|
|
4
4
|
"title": "IStorySegmentLayer",
|
|
5
|
-
"additionalProperties": false,
|
|
6
5
|
"required": ["zoom", "extent", "transition"],
|
|
7
6
|
"properties": {
|
|
8
7
|
"zoom": {
|
|
@@ -18,9 +17,11 @@
|
|
|
18
17
|
},
|
|
19
18
|
"content": {
|
|
20
19
|
"type": "object",
|
|
20
|
+
"title": "Segment Content",
|
|
21
21
|
"additionalProperties": false,
|
|
22
22
|
"properties": {
|
|
23
23
|
"title": {
|
|
24
|
+
"title": "Segment Title",
|
|
24
25
|
"type": "string"
|
|
25
26
|
},
|
|
26
27
|
"image": {
|
|
@@ -50,6 +51,47 @@
|
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
"required": ["type", "time"]
|
|
54
|
+
},
|
|
55
|
+
"layerOverride": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"title": "Symbology Override",
|
|
58
|
+
"description": "Symbology overrides to apply to target layers when this story segment is active",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"targetLayer": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"title": "Target Layer",
|
|
65
|
+
"description": "The name of the layer to apply a symbology override to when this story segment is active",
|
|
66
|
+
"default": ""
|
|
67
|
+
},
|
|
68
|
+
"visible": {
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"title": "Visibility",
|
|
71
|
+
"default": true,
|
|
72
|
+
"description": "Override the target layer visibility while this story segment is active"
|
|
73
|
+
},
|
|
74
|
+
"opacity": {
|
|
75
|
+
"type": "number",
|
|
76
|
+
"title": "Opacity",
|
|
77
|
+
"description": "Override the target layer opacity while this story segment is active",
|
|
78
|
+
"minimum": 0,
|
|
79
|
+
"maximum": 1,
|
|
80
|
+
"multipleOf": 0.1,
|
|
81
|
+
"default": 1.0
|
|
82
|
+
},
|
|
83
|
+
"symbologyState": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"description": "The symbology state override (renderType, value, method, etc.)",
|
|
86
|
+
"default": {}
|
|
87
|
+
},
|
|
88
|
+
"color": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"description": "The color/style override",
|
|
91
|
+
"default": {}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
53
95
|
}
|
|
54
96
|
}
|
|
55
97
|
}
|
|
@@ -20,6 +20,44 @@
|
|
|
20
20
|
"multipleOf": 0.1,
|
|
21
21
|
"minimum": 0,
|
|
22
22
|
"maximum": 1
|
|
23
|
+
},
|
|
24
|
+
"symbologyState": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"description": "The state of the symbology panel options",
|
|
27
|
+
"required": ["renderType"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"renderType": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"enum": ["Single Symbol", "Graduated", "Categorized"]
|
|
32
|
+
},
|
|
33
|
+
"value": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"method": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": ["color", "radius"]
|
|
39
|
+
},
|
|
40
|
+
"colorRamp": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"default": "viridis"
|
|
43
|
+
},
|
|
44
|
+
"nClasses": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"default": "9"
|
|
47
|
+
},
|
|
48
|
+
"mode": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"default": "equal interval",
|
|
51
|
+
"enum": [
|
|
52
|
+
"quantile",
|
|
53
|
+
"equal interval",
|
|
54
|
+
"jenks",
|
|
55
|
+
"pretty",
|
|
56
|
+
"logarithmic"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"additionalProperties": false
|
|
23
61
|
}
|
|
24
62
|
}
|
|
25
63
|
}
|