@evergis/api 3.0.165 → 3.0.167
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/LICENSE +20 -20
- package/README.md +21 -21
- package/dist/Api.d.ts +2 -0
- package/dist/__generated__/LayersService.d.ts +13 -2
- package/dist/__generated__/ProjectsService.d.ts +2 -2
- package/dist/__generated__/SpatialReferencesService.d.ts +41 -0
- package/dist/__generated__/StatisticService.d.ts +2 -2
- package/dist/__generated__/TablesService.d.ts +2 -2
- package/dist/__generated__/WmsServerService.d.ts +2 -2
- package/dist/__generated__/data-contracts.d.ts +231 -186
- package/dist/api.cjs.development.js +103 -21
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +282 -200
- package/dist/api.esm.js.map +1 -1
- package/dist/layers/EvergisDynamicLayer.d.ts +5 -2
- package/package.json +4 -4
|
@@ -13,6 +13,7 @@ var nanoid = require('nanoid');
|
|
|
13
13
|
var DomPainter = require('@evergis/sgis/es/painters/DomPainter/DomPainter');
|
|
14
14
|
var _Map = require('@evergis/sgis/es/Map');
|
|
15
15
|
var TileLayer = require('@evergis/sgis/es/layers/TileLayer');
|
|
16
|
+
var Crs = require('@evergis/sgis/es/Crs');
|
|
16
17
|
var DynamicLayer = require('@evergis/sgis/es/layers/DynamicLayer');
|
|
17
18
|
var sgis = require('@evergis/sgis');
|
|
18
19
|
|
|
@@ -35,9 +36,6 @@ function _defineProperties(target, props) {
|
|
|
35
36
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
36
37
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
37
38
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
38
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
39
|
-
writable: false
|
|
40
|
-
});
|
|
41
39
|
return Constructor;
|
|
42
40
|
}
|
|
43
41
|
|
|
@@ -71,9 +69,6 @@ function _inherits(subClass, superClass) {
|
|
|
71
69
|
configurable: true
|
|
72
70
|
}
|
|
73
71
|
});
|
|
74
|
-
Object.defineProperty(subClass, "prototype", {
|
|
75
|
-
writable: false
|
|
76
|
-
});
|
|
77
72
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
78
73
|
}
|
|
79
74
|
|
|
@@ -132,8 +127,6 @@ function _assertThisInitialized(self) {
|
|
|
132
127
|
function _possibleConstructorReturn(self, call) {
|
|
133
128
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
134
129
|
return call;
|
|
135
|
-
} else if (call !== void 0) {
|
|
136
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
137
130
|
}
|
|
138
131
|
|
|
139
132
|
return _assertThisInitialized(self);
|
|
@@ -167,7 +160,7 @@ function _superPropBase(object, property) {
|
|
|
167
160
|
return object;
|
|
168
161
|
}
|
|
169
162
|
|
|
170
|
-
function _get() {
|
|
163
|
+
function _get(target, property, receiver) {
|
|
171
164
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
172
165
|
_get = Reflect.get;
|
|
173
166
|
} else {
|
|
@@ -178,14 +171,14 @@ function _get() {
|
|
|
178
171
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
179
172
|
|
|
180
173
|
if (desc.get) {
|
|
181
|
-
return desc.get.call(
|
|
174
|
+
return desc.get.call(receiver);
|
|
182
175
|
}
|
|
183
176
|
|
|
184
177
|
return desc.value;
|
|
185
178
|
};
|
|
186
179
|
}
|
|
187
180
|
|
|
188
|
-
return _get
|
|
181
|
+
return _get(target, property, receiver || target);
|
|
189
182
|
}
|
|
190
183
|
|
|
191
184
|
let HttpClient = /*#__PURE__*/function () {
|
|
@@ -318,6 +311,76 @@ let Service = /*#__PURE__*/_createClass(function Service(http) {
|
|
|
318
311
|
this.http = http;
|
|
319
312
|
});
|
|
320
313
|
|
|
314
|
+
/**
|
|
315
|
+
* @title Spatial Processing Core API
|
|
316
|
+
* @version 1.0.0
|
|
317
|
+
* @baseUrl /sp
|
|
318
|
+
*/
|
|
319
|
+
|
|
320
|
+
let SpatialReferencesService = /*#__PURE__*/function (_Service) {
|
|
321
|
+
_inherits(SpatialReferencesService, _Service);
|
|
322
|
+
|
|
323
|
+
var _super = /*#__PURE__*/_createSuper(SpatialReferencesService);
|
|
324
|
+
|
|
325
|
+
function SpatialReferencesService() {
|
|
326
|
+
_classCallCheck(this, SpatialReferencesService);
|
|
327
|
+
|
|
328
|
+
return _super.apply(this, arguments);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
_createClass(SpatialReferencesService, [{
|
|
332
|
+
key: "getAvailiableCs",
|
|
333
|
+
value:
|
|
334
|
+
/**
|
|
335
|
+
* No description
|
|
336
|
+
*
|
|
337
|
+
* @tags SpatialReferences
|
|
338
|
+
* @name GetAvailiableCs
|
|
339
|
+
* @operationId SpatialReferencesController_GetAvailiableCsAsync
|
|
340
|
+
* @summary Returns list of available spatial references.
|
|
341
|
+
* @request GET:/srs/list
|
|
342
|
+
* @response `200` Success
|
|
343
|
+
*/
|
|
344
|
+
function getAvailiableCs() {
|
|
345
|
+
return this.http.get("/srs/list").json();
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* No description
|
|
349
|
+
*
|
|
350
|
+
* @tags SpatialReferences
|
|
351
|
+
* @name GetProj4Representation
|
|
352
|
+
* @operationId SpatialReferencesController_GetProj4RepresentationAsync
|
|
353
|
+
* @summary Returns a WKT representation of spatial reference.
|
|
354
|
+
* @request GET:/srs/{name}/proj4
|
|
355
|
+
* @response `200` Success
|
|
356
|
+
*/
|
|
357
|
+
|
|
358
|
+
}, {
|
|
359
|
+
key: "getProj4Representation",
|
|
360
|
+
value: function getProj4Representation(name) {
|
|
361
|
+
return this.http.get("/srs/" + name + "/proj4").text();
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* No description
|
|
365
|
+
*
|
|
366
|
+
* @tags SpatialReferences
|
|
367
|
+
* @name GetWktRepresentation
|
|
368
|
+
* @operationId SpatialReferencesController_GetWktRepresentationAsync
|
|
369
|
+
* @summary Returns a WKT representation of spatial reference.
|
|
370
|
+
* @request GET:/srs/{name}/wkt
|
|
371
|
+
* @response `200` Success
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
}, {
|
|
375
|
+
key: "getWktRepresentation",
|
|
376
|
+
value: function getWktRepresentation(name) {
|
|
377
|
+
return this.http.get("/srs/" + name + "/wkt").text();
|
|
378
|
+
}
|
|
379
|
+
}]);
|
|
380
|
+
|
|
381
|
+
return SpatialReferencesService;
|
|
382
|
+
}(Service);
|
|
383
|
+
|
|
321
384
|
const _excluded = ["taskId", "layerName"];
|
|
322
385
|
/**
|
|
323
386
|
* @title Spatial Processing Core API
|
|
@@ -1297,8 +1360,8 @@ let Notification = /*#__PURE__*/function (_NotificationService) {
|
|
|
1297
1360
|
|| event.code === 4002
|
|
1298
1361
|
/* InvalidSession */
|
|
1299
1362
|
) {
|
|
1300
|
-
|
|
1301
|
-
|
|
1363
|
+
_this.connectStatus = exports.ConnectionStatus.SessionClosed;
|
|
1364
|
+
} else if (_this.reconnectTries < _this.MAX_WS_RECONNECT_TRIES) {
|
|
1302
1365
|
_this.connectStatus = exports.ConnectionStatus.Break;
|
|
1303
1366
|
_this.reconnectTries++;
|
|
1304
1367
|
|
|
@@ -1865,7 +1928,7 @@ let Scheduler = /*#__PURE__*/function (_SchedulerService) {
|
|
|
1865
1928
|
const taskProgress = await this.getTaskProgress(id);
|
|
1866
1929
|
this.resolveTaskStatus(taskProgress, resolve, reject);
|
|
1867
1930
|
|
|
1868
|
-
const taskResultCallback = async _ref => {
|
|
1931
|
+
const taskResultCallback = async (_ref) => {
|
|
1869
1932
|
let {
|
|
1870
1933
|
data
|
|
1871
1934
|
} = _ref;
|
|
@@ -2404,6 +2467,22 @@ let LayersService = /*#__PURE__*/function (_Service) {
|
|
|
2404
2467
|
*
|
|
2405
2468
|
* @tags Layers
|
|
2406
2469
|
* @name GetFeatures
|
|
2470
|
+
* @operationId LayersController_GetFeaturesQuery
|
|
2471
|
+
* @summary Returns list of the layer features.
|
|
2472
|
+
* @request POST:/layers/{name}/features/query
|
|
2473
|
+
* @response `200` Success
|
|
2474
|
+
*/
|
|
2475
|
+
|
|
2476
|
+
}, {
|
|
2477
|
+
key: "getFeaturesQuery",
|
|
2478
|
+
value: function getFeaturesQuery(name, data) {
|
|
2479
|
+
return this.http.post("/layers/" + name + "/features/query", data).json();
|
|
2480
|
+
}
|
|
2481
|
+
/**
|
|
2482
|
+
* No description
|
|
2483
|
+
*
|
|
2484
|
+
* @tags Layers
|
|
2485
|
+
* @name GetFeatures1
|
|
2407
2486
|
* @operationId LayersController_GetFeatures
|
|
2408
2487
|
* @summary Returns list of the layer features.
|
|
2409
2488
|
* @request GET:/layers/{name}/features
|
|
@@ -4181,12 +4260,12 @@ let Resources = /*#__PURE__*/function () {
|
|
|
4181
4260
|
}, {
|
|
4182
4261
|
key: "getDependentNames",
|
|
4183
4262
|
value: function getDependentNames(deps, depType) {
|
|
4184
|
-
return deps.filter(_ref => {
|
|
4263
|
+
return deps.filter((_ref) => {
|
|
4185
4264
|
let {
|
|
4186
4265
|
type
|
|
4187
4266
|
} = _ref;
|
|
4188
4267
|
return type === depType;
|
|
4189
|
-
}).map(_ref2 => {
|
|
4268
|
+
}).map((_ref2) => {
|
|
4190
4269
|
let {
|
|
4191
4270
|
name
|
|
4192
4271
|
} = _ref2;
|
|
@@ -6682,6 +6761,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
6682
6761
|
_this.feedback = new Feedback(_this.http);
|
|
6683
6762
|
_this.vectorTiles = new VectorTiles(_this.http);
|
|
6684
6763
|
_this.universalSearch = new UniversalSearchService(_this.http);
|
|
6764
|
+
_this.spatialReference = new SpatialReferencesService(_this.http);
|
|
6685
6765
|
_this.names = new Names({
|
|
6686
6766
|
account: _this.account
|
|
6687
6767
|
});
|
|
@@ -6858,7 +6938,7 @@ let EvergisTileLayer = /*#__PURE__*/function (_TileLayer) {
|
|
|
6858
6938
|
return EvergisTileLayer;
|
|
6859
6939
|
}(TileLayer.TileLayer);
|
|
6860
6940
|
|
|
6861
|
-
const _excluded$8 = ["name", "style", "condition", "dataFilterId"];
|
|
6941
|
+
const _excluded$8 = ["name", "style", "condition", "dataFilterId", "crs"];
|
|
6862
6942
|
let EvergisDynamicLayer = /*#__PURE__*/function (_DynamicLayer) {
|
|
6863
6943
|
_inherits(EvergisDynamicLayer, _DynamicLayer);
|
|
6864
6944
|
|
|
@@ -6871,7 +6951,8 @@ let EvergisDynamicLayer = /*#__PURE__*/function (_DynamicLayer) {
|
|
|
6871
6951
|
name,
|
|
6872
6952
|
style,
|
|
6873
6953
|
condition,
|
|
6874
|
-
dataFilterId
|
|
6954
|
+
dataFilterId,
|
|
6955
|
+
crs = Crs.webMercator
|
|
6875
6956
|
} = _ref,
|
|
6876
6957
|
layerProps = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
6877
6958
|
|
|
@@ -6883,6 +6964,7 @@ let EvergisDynamicLayer = /*#__PURE__*/function (_DynamicLayer) {
|
|
|
6883
6964
|
_this.styleId = style;
|
|
6884
6965
|
_this.conditionQuery = condition;
|
|
6885
6966
|
_this.filterId = dataFilterId;
|
|
6967
|
+
_this.crs = crs;
|
|
6886
6968
|
|
|
6887
6969
|
_this.subscribeRedraw();
|
|
6888
6970
|
|
|
@@ -6924,9 +7006,9 @@ let EvergisDynamicLayer = /*#__PURE__*/function (_DynamicLayer) {
|
|
|
6924
7006
|
}
|
|
6925
7007
|
}, {
|
|
6926
7008
|
key: "getUrl",
|
|
6927
|
-
value: function getUrl(bbox,
|
|
6928
|
-
let imgWidth =
|
|
6929
|
-
let imgHeight =
|
|
7009
|
+
value: function getUrl(bbox, painter) {
|
|
7010
|
+
let imgWidth = painter.width;
|
|
7011
|
+
let imgHeight = painter.height;
|
|
6930
7012
|
return this.api.layers.getLayerImage({
|
|
6931
7013
|
name: this.name,
|
|
6932
7014
|
extent: bbox.coordinates,
|