@jupytergis/schema 0.4.3 → 0.4.5
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/interfaces.d.ts +6 -0
- package/lib/model.d.ts +8 -1
- package/lib/model.js +13 -0
- package/package.json +1 -1
package/lib/interfaces.d.ts
CHANGED
|
@@ -128,6 +128,7 @@ export interface IJupyterGISDocChange extends DocumentChange {
|
|
|
128
128
|
export interface IJupyterGISModel extends DocumentRegistry.IModel {
|
|
129
129
|
isDisposed: boolean;
|
|
130
130
|
sharedModel: IJupyterGISDoc;
|
|
131
|
+
geolocation: JgisCoordinates;
|
|
131
132
|
localState: IJupyterGISClientState | null;
|
|
132
133
|
annotationModel?: IAnnotationModel;
|
|
133
134
|
themeChanged: Signal<IJupyterGISModel, IChangedArgs<string, string | null, string>>;
|
|
@@ -140,6 +141,9 @@ export interface IJupyterGISModel extends DocumentRegistry.IModel {
|
|
|
140
141
|
zoomToPositionSignal: ISignal<IJupyterGISModel, string>;
|
|
141
142
|
addFeatureAsMsSignal: ISignal<IJupyterGISModel, string>;
|
|
142
143
|
updateLayerSignal: ISignal<IJupyterGISModel, string>;
|
|
144
|
+
geolocationChanged: Signal<IJupyterGISModel, JgisCoordinates>;
|
|
145
|
+
flyToGeometrySignal: Signal<IJupyterGISModel, any>;
|
|
146
|
+
highlightFeatureSignal: Signal<IJupyterGISModel, any>;
|
|
143
147
|
contentsManager: Contents.IManager | undefined;
|
|
144
148
|
filePath: string;
|
|
145
149
|
getContent(): IJGISContent;
|
|
@@ -256,6 +260,7 @@ export interface IAnnotationModel {
|
|
|
256
260
|
getAnnotation(id: string): IAnnotation | undefined;
|
|
257
261
|
getAnnotationIds(): string[];
|
|
258
262
|
addAnnotation(key: string, value: IAnnotation): void;
|
|
263
|
+
updateAnnotation(id: string, updates: Partial<IAnnotation>): void;
|
|
259
264
|
removeAnnotation(key: string): void;
|
|
260
265
|
addContent(id: string, value: string): void;
|
|
261
266
|
}
|
|
@@ -272,4 +277,5 @@ export interface IAnnotation {
|
|
|
272
277
|
zoom: number;
|
|
273
278
|
contents: IAnnotationContent[];
|
|
274
279
|
parent: string;
|
|
280
|
+
open: boolean;
|
|
275
281
|
}
|
package/lib/model.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Contents } from '@jupyterlab/services';
|
|
|
5
5
|
import { PartialJSONObject } from '@lumino/coreutils';
|
|
6
6
|
import { ISignal, Signal } from '@lumino/signaling';
|
|
7
7
|
import { IJGISContent, IJGISLayer, IJGISLayerGroup, IJGISLayerTree, IJGISLayers, IJGISOptions, IJGISSource, IJGISSources } from './_interface/project/jgis';
|
|
8
|
-
import { IAnnotationModel, IDict, IJGISLayerDocChange, IJGISLayerTreeDocChange, IJGISSourceDocChange, IJupyterGISClientState, IJupyterGISDoc, IJupyterGISModel, ISelection, IUserData, IViewPortState, Pointer } from './interfaces';
|
|
8
|
+
import { IAnnotationModel, IDict, IJGISLayerDocChange, IJGISLayerTreeDocChange, IJGISSourceDocChange, IJupyterGISClientState, IJupyterGISDoc, IJupyterGISModel, ISelection, IUserData, IViewPortState, JgisCoordinates, Pointer } from './interfaces';
|
|
9
9
|
export declare class JupyterGISModel implements IJupyterGISModel {
|
|
10
10
|
constructor(options: JupyterGISModel.IOptions);
|
|
11
11
|
private _onSharedModelChanged;
|
|
@@ -46,6 +46,8 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
46
46
|
fromJSON(data: PartialJSONObject): void;
|
|
47
47
|
initialize(): void;
|
|
48
48
|
getWorker(): Worker;
|
|
49
|
+
readonly flyToGeometrySignal: Signal<this, any>;
|
|
50
|
+
readonly highlightFeatureSignal: Signal<this, any>;
|
|
49
51
|
getContent(): IJGISContent;
|
|
50
52
|
/**
|
|
51
53
|
* Getter for the contents manager.
|
|
@@ -143,6 +145,9 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
143
145
|
get addFeatureAsMsSignal(): Signal<this, string>;
|
|
144
146
|
get updateLayerSignal(): Signal<this, string>;
|
|
145
147
|
triggerLayerUpdate: (layerId: string, layer: IJGISLayer) => void;
|
|
148
|
+
get geolocation(): JgisCoordinates;
|
|
149
|
+
set geolocation(geolocation: JgisCoordinates);
|
|
150
|
+
get geolocationChanged(): Signal<this, JgisCoordinates>;
|
|
146
151
|
readonly defaultKernelName: string;
|
|
147
152
|
readonly defaultKernelLanguage: string;
|
|
148
153
|
readonly annotationModel?: IAnnotationModel;
|
|
@@ -166,6 +171,8 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
166
171
|
private _isIdentifying;
|
|
167
172
|
private _isTemporalControllerActive;
|
|
168
173
|
static worker: Worker;
|
|
174
|
+
private _geolocation;
|
|
175
|
+
private _geolocationChanged;
|
|
169
176
|
}
|
|
170
177
|
export declare namespace JupyterGISModel {
|
|
171
178
|
/**
|
package/lib/model.js
CHANGED
|
@@ -12,6 +12,8 @@ export class JupyterGISModel {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
this.collaborative = document.querySelectorAll('[data-jupyter-lite-root]')[0] === undefined;
|
|
15
|
+
this.flyToGeometrySignal = new Signal(this);
|
|
16
|
+
this.highlightFeatureSignal = new Signal(this);
|
|
15
17
|
this._onClientStateChanged = (changed) => {
|
|
16
18
|
const clients = this.sharedModel.awareness.getStates();
|
|
17
19
|
this._clientStateChanged.emit(clients);
|
|
@@ -42,6 +44,7 @@ export class JupyterGISModel {
|
|
|
42
44
|
this._updateLayerSignal = new Signal(this);
|
|
43
45
|
this._isIdentifying = false;
|
|
44
46
|
this._isTemporalControllerActive = false;
|
|
47
|
+
this._geolocationChanged = new Signal(this);
|
|
45
48
|
const { annotationModel, sharedModel } = options;
|
|
46
49
|
if (sharedModel) {
|
|
47
50
|
this._sharedModel = sharedModel;
|
|
@@ -540,6 +543,16 @@ export class JupyterGISModel {
|
|
|
540
543
|
get updateLayerSignal() {
|
|
541
544
|
return this._updateLayerSignal;
|
|
542
545
|
}
|
|
546
|
+
get geolocation() {
|
|
547
|
+
return this._geolocation;
|
|
548
|
+
}
|
|
549
|
+
set geolocation(geolocation) {
|
|
550
|
+
this._geolocation = geolocation;
|
|
551
|
+
this.geolocationChanged.emit(this.geolocation);
|
|
552
|
+
}
|
|
553
|
+
get geolocationChanged() {
|
|
554
|
+
return this._geolocationChanged;
|
|
555
|
+
}
|
|
543
556
|
}
|
|
544
557
|
(function (JupyterGISModel) {
|
|
545
558
|
/**
|