@nextgis/ngw-map 4.0.0-alpha.4 → 4.0.0-alpha.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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.4; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.5; author: NextGIS */
2
2
  import { getIcon } from '@nextgis/icons';
3
3
  import NgwConnector from '@nextgis/ngw-connector';
4
4
  import { NgwKit, fetchNgwLayerItem, fetchNgwLayerItems, fetchNgwLayerFeature, fetchNgwLayerFeatureCollection, fetchIdentifyItem, fetchIdentifyGeoJson, createNgwLayerAdapter, fetchNgwExtent, sendIdentifyRequest, getCompanyLogo, getIdentifyItems, createIdentifyItem } from '@nextgis/ngw-kit';
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.4; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.5; author: NextGIS */
2
2
  var NgwMap = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -1083,7 +1083,7 @@ var NgwMap = (function (exports) {
1083
1083
  }
1084
1084
 
1085
1085
  var pkg = {
1086
- version: "4.0.0-alpha.2"};
1086
+ version: "4.0.0-alpha.5"};
1087
1087
 
1088
1088
  class AbortError extends Error {
1089
1089
  constructor(message = "AbortError") {
@@ -5270,6 +5270,23 @@ var NgwMap = (function (exports) {
5270
5270
  return prepareQmsWmsLayer(service);
5271
5271
  });
5272
5272
  }
5273
+ searchServices(_0, _1) {
5274
+ return __async$i(this, arguments, function* (search, { limit = 10, offset, signal, type }) {
5275
+ const params = new URLSearchParams({
5276
+ search,
5277
+ limit: String(limit),
5278
+ type
5279
+ });
5280
+ if (offset !== void 0) {
5281
+ params.set("offset", String(offset));
5282
+ }
5283
+ const response = yield this._getJson(
5284
+ `${this.url}/api/v1/geoservices/?${params}`,
5285
+ { signal }
5286
+ );
5287
+ return response.results;
5288
+ });
5289
+ }
5273
5290
  _getJson(_0, _1) {
5274
5291
  return __async$i(this, arguments, function* (url, { signal }) {
5275
5292
  const response = yield fetch(url, {
@@ -5392,7 +5409,7 @@ var NgwMap = (function (exports) {
5392
5409
  var _a2, _b, _c;
5393
5410
  const signal = (_a2 = options.signal) != null ? _a2 : this.options.signal;
5394
5411
  const qmsId = (_c = options.qmsId) != null ? _c : (_b = this.qms) == null ? void 0 : _b.id;
5395
- if (qmsId === void 0) {
5412
+ if (typeof qmsId !== "number") {
5396
5413
  return;
5397
5414
  }
5398
5415
  try {