@jupytergis/schema 0.12.1 → 0.12.2
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/project/jgis.d.ts +1 -1
- 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/package.json +1 -1
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"
|