@nextgis/ngw-map 3.0.1 → 3.1.1

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: 3.0.1; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 3.1.1; author: NextGIS */
2
2
  const svgPath = {
3
3
  brill: '<path d="m6 0-5 6 5 6 5-6z"/>',
4
4
  circle: '<circle cx="6" cy="6" r="6"/>',
@@ -351,6 +351,20 @@ function isArray(val) {
351
351
  function fixUrlStr(url) {
352
352
  return url.replace(/([^:]\/)\/+/g, "$1");
353
353
  }
354
+ function updateUrlParams(urlStr, params) {
355
+ const url = new URL(urlStr);
356
+ const searchParams = new URLSearchParams(url.search);
357
+ Object.entries(params).forEach(([key, value]) => {
358
+ if (value === void 0) {
359
+ searchParams.delete(key);
360
+ } else {
361
+ searchParams.set(key, value);
362
+ }
363
+ });
364
+ searchParams.set("timestamp", String((/* @__PURE__ */ new Date()).getTime()));
365
+ const newSearch = [...searchParams.entries()].map(([key, value]) => `${key}=${value}`).join("&");
366
+ return `${url.origin}${url.pathname}?${newSearch}`;
367
+ }
354
368
 
355
369
  const templateRe = /\{ *([\w_-]+) *\}/g;
356
370
  function template(str, data) {
@@ -621,7 +635,9 @@ EventEmitter.init = function() {
621
635
  this.domain = null;
622
636
  if (EventEmitter.usingDomains) {
623
637
  // if there is an active domain, then attach to it.
624
- if (domain.active) ;
638
+ if (domain.active && !(this instanceof domain.Domain)) {
639
+ this.domain = domain.active;
640
+ }
625
641
  }
626
642
 
627
643
  if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
@@ -1064,63 +1080,7 @@ function unwrapListeners(arr) {
1064
1080
  }
1065
1081
 
1066
1082
  var pkg = {
1067
- name: "@nextgis/ngw-connector",
1068
- version: "3.0.1",
1069
- _priority: 12,
1070
- description: "A lightweight HTTP client optimized for use with NextGIS Web API",
1071
- main: "index.js",
1072
- module: "lib/ngw-connector.esm-bundler.js",
1073
- unpkg: "lib/ngw-connector.global.prod.js",
1074
- jsdelivr: "lib/ngw-connector.global.prod.js",
1075
- types: "lib/index.d.ts",
1076
- dependencies: {
1077
- "@nextgis/cache": "3.0.0",
1078
- "@nextgis/cancelable-promise": "3.0.0",
1079
- "@nextgis/utils": "3.0.0",
1080
- "@types/events": "^3.0.0",
1081
- events: "*",
1082
- "form-data": "^4.0.0"
1083
- },
1084
- devDependencies: {
1085
- "@nextgis/build-tools": "3.0.0"
1086
- },
1087
- scripts: {
1088
- clean: "rimraf ./lib",
1089
- dev: "node ../build-tools/lib/build.js",
1090
- prod: "npm run dev -- --release",
1091
- lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
1092
- watch: "npm run dev -- --watch",
1093
- "gen:types": "node ./scripts/generator"
1094
- },
1095
- buildOptions: {
1096
- name: "NgwConnector",
1097
- formats: [
1098
- "esm-bundler",
1099
- "esm-browser",
1100
- "cjs",
1101
- "global"
1102
- ]
1103
- },
1104
- keywords: [
1105
- "NextGIS",
1106
- "MAP"
1107
- ],
1108
- author: "NextGIS",
1109
- files: [
1110
- "index.js",
1111
- "lib"
1112
- ],
1113
- license: "MIT",
1114
- homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
1115
- repository: {
1116
- type: "git",
1117
- url: "git://github.com/nextgis/nextgis_frontend.git"
1118
- },
1119
- engines: {
1120
- node: ">=18.20.4"
1121
- },
1122
- gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
1123
- };
1083
+ version: "3.1.1"};
1124
1084
 
1125
1085
  class AbortError extends Error {
1126
1086
  constructor(message = "AbortError") {
@@ -1322,7 +1282,7 @@ var __spreadValues$x = (a, b) => {
1322
1282
  }
1323
1283
  return a;
1324
1284
  };
1325
- var __objRest$5 = (source, exclude) => {
1285
+ var __objRest$6 = (source, exclude) => {
1326
1286
  var target = {};
1327
1287
  for (var prop in source)
1328
1288
  if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1476,7 +1436,7 @@ function request(path, options, cacheEngine) {
1476
1436
  cache,
1477
1437
  query,
1478
1438
  json
1479
- } = _a, opt = __objRest$5(_a, [
1439
+ } = _a, opt = __objRest$6(_a, [
1480
1440
  "withCredentials",
1481
1441
  "responseType",
1482
1442
  "cacheProps",
@@ -1586,7 +1546,7 @@ var __spreadValues$w = (a, b) => {
1586
1546
  return a;
1587
1547
  };
1588
1548
  var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
1589
- var __objRest$4 = (source, exclude) => {
1549
+ var __objRest$5 = (source, exclude) => {
1590
1550
  var target = {};
1591
1551
  for (var prop in source)
1592
1552
  if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1665,7 +1625,7 @@ function route(name, connector, ...rest) {
1665
1625
  for (const method of methods) {
1666
1626
  const methodResp = (requestOptions) => {
1667
1627
  var _b;
1668
- const _a = requestOptions || {}, { headers: optHeaders } = _a, restOpt = __objRest$4(_a, ["headers"]);
1628
+ const _a = requestOptions || {}, { headers: optHeaders } = _a, restOpt = __objRest$5(_a, ["headers"]);
1669
1629
  if ((_b = requestOptions == null ? void 0 : requestOptions.signal) == null ? void 0 : _b.aborted) {
1670
1630
  throw new AbortError();
1671
1631
  }
@@ -1823,7 +1783,7 @@ var __spreadValues$v = (a, b) => {
1823
1783
  return a;
1824
1784
  };
1825
1785
  var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
1826
- var __objRest$3 = (source, exclude) => {
1786
+ var __objRest$4 = (source, exclude) => {
1827
1787
  var target = {};
1828
1788
  for (var prop in source)
1829
1789
  if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -2031,7 +1991,7 @@ class NgwConnector {
2031
1991
  throw new Error("Empty `url` not allowed");
2032
1992
  }
2033
1993
  if (params) {
2034
- const _a = params, restParams = __objRest$3(_a, ["paramList"]);
1994
+ const _a = params, { paramList } = _a, restParams = __objRest$4(_a, ["paramList"]);
2035
1995
  url = template(url, restParams);
2036
1996
  }
2037
1997
  url = encodeURI(fixUrlStr(url));
@@ -2321,8 +2281,9 @@ class ResourcesControl {
2321
2281
  query: __spreadValues$u({
2322
2282
  serialization: "full"
2323
2283
  }, query)
2324
- })).then((resources) => {
2325
- if ((requestOptions == null ? void 0 : requestOptions.cache) && resources) {
2284
+ })).then((response) => {
2285
+ const resources = Array.isArray(response) ? response : response.items;
2286
+ if (requestOptions == null ? void 0 : requestOptions.cache) {
2326
2287
  for (const x of resources) {
2327
2288
  this.cache.add("resource.item", Promise.resolve(x), {
2328
2289
  id: x.resource.id
@@ -3101,7 +3062,7 @@ const operationsAliases = {
3101
3062
  return like(a, b, true);
3102
3063
  }
3103
3064
  };
3104
- function isPropertyFilter(filter) {
3065
+ function isPropertyFilter$1(filter) {
3105
3066
  const pf = filter;
3106
3067
  if (pf.length === 3 && typeof pf[0] === "string" && typeof pf[1] === "string") {
3107
3068
  return true;
@@ -3119,7 +3080,7 @@ function featureFilter(feature, filters) {
3119
3080
  function propertiesFilter(properties, filters) {
3120
3081
  const logic = typeof filters[0] === "string" ? filters[0] : "all";
3121
3082
  const filterFunction = (p) => {
3122
- if (isPropertyFilter(p)) {
3083
+ if (isPropertyFilter$1(p)) {
3123
3084
  const [field, operation, value] = p;
3124
3085
  const operationExec = operationsAliases[operation];
3125
3086
  if (operationExec) {
@@ -3272,7 +3233,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
3272
3233
  const filters_ = filters.filter((x) => Array.isArray(x));
3273
3234
  if (logic === "any") {
3274
3235
  for (const f of filters_) {
3275
- if (isPropertyFilter(f)) {
3236
+ if (isPropertyFilter$1(f)) {
3276
3237
  _queries.push(
3277
3238
  fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$q({}, opt), {
3278
3239
  paramList: [..._parentAllParams, ...paramList, createParam(f)]
@@ -3286,7 +3247,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
3286
3247
  const filters2 = [];
3287
3248
  const propertiesFilterList = [];
3288
3249
  for (const f of filters_) {
3289
- if (isPropertyFilter(f)) {
3250
+ if (isPropertyFilter$1(f)) {
3290
3251
  filters2.push(createParam(f));
3291
3252
  } else {
3292
3253
  propertiesFilterList.push(f);
@@ -5103,7 +5064,7 @@ var __spreadValues$g = (a, b) => {
5103
5064
  return a;
5104
5065
  };
5105
5066
  var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
5106
- var __objRest$2 = (source, exclude) => {
5067
+ var __objRest$3 = (source, exclude) => {
5107
5068
  var target = {};
5108
5069
  for (var prop in source)
5109
5070
  if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -5116,7 +5077,7 @@ var __objRest$2 = (source, exclude) => {
5116
5077
  return target;
5117
5078
  };
5118
5079
  function updateImageParams(params, resourceId) {
5119
- const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$2(_a, ["bbox", "width", "height", "nd"]);
5080
+ const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$3(_a, ["bbox", "width", "height", "nd"]);
5120
5081
  return __spreadProps$9(__spreadValues$g({}, rest), {
5121
5082
  resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
5122
5083
  extent: bbox,
@@ -5247,7 +5208,7 @@ var __spreadValues$f = (a, b) => {
5247
5208
  }
5248
5209
  return a;
5249
5210
  };
5250
- var __objRest$1 = (source, exclude) => {
5211
+ var __objRest$2 = (source, exclude) => {
5251
5212
  var target = {};
5252
5213
  for (var prop in source)
5253
5214
  if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -5280,11 +5241,11 @@ var __async$h = (__this, __arguments, generator) => {
5280
5241
  step((generator = generator.apply(__this, __arguments)).next());
5281
5242
  });
5282
5243
  };
5283
- const URL = "https://qms.nextgis.com";
5284
- function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
5244
+ const URL$1 = "https://qms.nextgis.com";
5245
+ function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
5285
5246
  let webMap;
5286
5247
  if ("webMap" in webMapOrOptions) {
5287
- const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$1(_a, ["webMap", "url"]);
5248
+ const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$2(_a, ["webMap", "url"]);
5288
5249
  webMap = webMap_;
5289
5250
  if (url_) {
5290
5251
  url = url_;
@@ -5296,7 +5257,7 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
5296
5257
  webMap = webMapOrOptions;
5297
5258
  }
5298
5259
  if (!url) {
5299
- url = URL;
5260
+ url = URL$1;
5300
5261
  }
5301
5262
  class QmsAdapter {
5302
5263
  constructor(map, options) {
@@ -5446,9 +5407,9 @@ function createBasemapLayerAdapter(_0) {
5446
5407
  item
5447
5408
  }) {
5448
5409
  if (item.basemap_layer) {
5449
- const qms = item.basemap_layer.qms;
5450
- const url = item.basemap_layer.url;
5451
- if (qms) {
5410
+ const basemap = item.basemap_layer;
5411
+ const { qms, url } = basemap;
5412
+ if (qms && typeof qms === "string") {
5452
5413
  const qms_ = JSON.parse(qms);
5453
5414
  const adapter = Promise.resolve(
5454
5415
  QmsKit.utils.createQmsAdapter(webMap, void 0, {
@@ -5461,10 +5422,19 @@ function createBasemapLayerAdapter(_0) {
5461
5422
  const TileAdapter = webMap.mapAdapter.layerAdapters.TILE;
5462
5423
  if (TileAdapter) {
5463
5424
  class BasemapTileAdapter extends TileAdapter {
5425
+ constructor(map, options) {
5426
+ super(map, __spreadProps$8(__spreadValues$d({}, options), { baselayer: true, order: 0 }));
5427
+ }
5464
5428
  addLayer(opt) {
5465
5429
  return __async$g(this, null, function* () {
5430
+ var _a, _b, _c;
5466
5431
  if (url) {
5467
- return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$8(__spreadValues$d({}, opt), { url }));
5432
+ return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$8(__spreadValues$d({}, opt), {
5433
+ url,
5434
+ minZoom: (_a = basemap.z_min) != null ? _a : opt.minZoom,
5435
+ maxZoom: (_b = basemap.z_max) != null ? _b : opt.maxZoom,
5436
+ attribution: (_c = basemap.copyright_text) != null ? _c : opt.attribution
5437
+ }));
5468
5438
  }
5469
5439
  });
5470
5440
  }
@@ -5925,6 +5895,134 @@ function createWebMapAdapter(_0) {
5925
5895
  });
5926
5896
  }
5927
5897
 
5898
+ function isPropertyFilter(value) {
5899
+ return Array.isArray(value) && value.length === 3 && typeof value[0] === "string" && typeof value[1] === "string";
5900
+ }
5901
+ function isPropertiesFilterGroup(value) {
5902
+ return Array.isArray(value) && !isPropertyFilter(value);
5903
+ }
5904
+ function toGetExpr(field) {
5905
+ return ["get", field];
5906
+ }
5907
+ function toConditionExpr(filter) {
5908
+ const [fieldRaw, op, value] = filter;
5909
+ const field = String(fieldRaw);
5910
+ const getExpr = toGetExpr(field);
5911
+ switch (op) {
5912
+ case "eq":
5913
+ if (value === null) {
5914
+ return ["is_null", getExpr];
5915
+ }
5916
+ return ["==", getExpr, value];
5917
+ case "ne":
5918
+ if (value === null) {
5919
+ return ["!is_null", getExpr];
5920
+ }
5921
+ return ["!=", getExpr, value];
5922
+ case "gt":
5923
+ if (typeof value !== "number" && typeof value !== "string") {
5924
+ throw new Error(
5925
+ `Operator "gt" requires number or string for "${field}"`
5926
+ );
5927
+ }
5928
+ return [">", getExpr, value];
5929
+ case "lt":
5930
+ if (typeof value !== "number" && typeof value !== "string") {
5931
+ throw new Error(
5932
+ `Operator "lt" requires number or string for "${field}"`
5933
+ );
5934
+ }
5935
+ return ["<", getExpr, value];
5936
+ case "ge":
5937
+ if (typeof value !== "number" && typeof value !== "string") {
5938
+ throw new Error(
5939
+ `Operator "ge" requires number or string for "${field}"`
5940
+ );
5941
+ }
5942
+ return [">=", getExpr, value];
5943
+ case "le":
5944
+ if (typeof value !== "number" && typeof value !== "string") {
5945
+ throw new Error(
5946
+ `Operator "le" requires number or string for "${field}"`
5947
+ );
5948
+ }
5949
+ return ["<=", getExpr, value];
5950
+ case "in":
5951
+ if (!Array.isArray(value) || !value.every((x) => typeof x === "string" || typeof x === "number")) {
5952
+ throw new Error(
5953
+ `Operator "in" requires (string | number)[] for "${field}"`
5954
+ );
5955
+ }
5956
+ if (!value.length) {
5957
+ throw new Error(
5958
+ `Operator "in" requires non-empty array for "${field}"`
5959
+ );
5960
+ }
5961
+ return ["in", getExpr, ...value];
5962
+ case "notin":
5963
+ if (!Array.isArray(value) || !value.every((x) => typeof x === "string" || typeof x === "number")) {
5964
+ throw new Error(
5965
+ `Operator "notin" requires (string | number)[] for "${field}"`
5966
+ );
5967
+ }
5968
+ if (!value.length) {
5969
+ throw new Error(
5970
+ `Operator "notin" requires non-empty array for "${field}"`
5971
+ );
5972
+ }
5973
+ return ["!in", getExpr, ...value];
5974
+ case "like":
5975
+ case "ilike":
5976
+ throw new Error(
5977
+ `Operator "${op}" is not supported by server FilterExpression`
5978
+ );
5979
+ default: {
5980
+ const exhaustive = op;
5981
+ throw new Error(`Unsupported operator: ${exhaustive}`);
5982
+ }
5983
+ }
5984
+ }
5985
+ function toGroupExpr(filters) {
5986
+ let logicalOp = "all";
5987
+ const children = [];
5988
+ for (const item of filters) {
5989
+ if (item === "all" || item === "any") {
5990
+ logicalOp = item;
5991
+ continue;
5992
+ }
5993
+ if (isPropertyFilter(item)) {
5994
+ children.push(toConditionExpr(item));
5995
+ continue;
5996
+ }
5997
+ if (isPropertiesFilterGroup(item)) {
5998
+ children.push(toGroupExpr(item));
5999
+ continue;
6000
+ }
6001
+ throw new Error("Invalid PropertiesFilter node");
6002
+ }
6003
+ return [logicalOp, ...children];
6004
+ }
6005
+ function propertiesFilterToExpression(filters) {
6006
+ if (!(filters == null ? void 0 : filters.length)) {
6007
+ return [];
6008
+ }
6009
+ return toGroupExpr(filters);
6010
+ }
6011
+ function propertiesFilterToExpressionString(filters) {
6012
+ if (!(filters == null ? void 0 : filters.length)) {
6013
+ return void 0;
6014
+ }
6015
+ return JSON.stringify(
6016
+ propertiesFilterToExpression(filters)
6017
+ );
6018
+ }
6019
+
6020
+ function createLayerFilterParam(resourceId, filter) {
6021
+ return {
6022
+ [`filter[${resourceId}]`]: propertiesFilterToExpressionString(filter)
6023
+ };
6024
+ }
6025
+
5928
6026
  var __defProp$j = Object.defineProperty;
5929
6027
  var __defProps$6 = Object.defineProperties;
5930
6028
  var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
@@ -5944,6 +6042,18 @@ var __spreadValues$b = (a, b) => {
5944
6042
  return a;
5945
6043
  };
5946
6044
  var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
6045
+ var __objRest$1 = (source, exclude) => {
6046
+ var target = {};
6047
+ for (var prop in source)
6048
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
6049
+ target[prop] = source[prop];
6050
+ if (source != null && __getOwnPropSymbols$c)
6051
+ for (var prop of __getOwnPropSymbols$c(source)) {
6052
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
6053
+ target[prop] = source[prop];
6054
+ }
6055
+ return target;
6056
+ };
5947
6057
  var __publicField$c = (obj, key, value) => __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
5948
6058
  var __async$c = (__this, __arguments, generator) => {
5949
6059
  return new Promise((resolve, reject) => {
@@ -6008,8 +6118,18 @@ function createRasterAdapter(_0) {
6008
6118
  baseUrl: connector.options.baseUrl || ""
6009
6119
  });
6010
6120
  if (opt) {
6011
- const layerAdapterOptions = __spreadProps$6(__spreadValues$b(__spreadValues$b({}, opt), layerOptions.adapterOptions), {
6012
- params: { resource: resourceId },
6121
+ const _a = layerOptions.adapterOptions || {}, { propertiesFilter } = _a, restAdapterOptions = __objRest$1(_a, ["propertiesFilter"]);
6122
+ const filterParams = createLayerFilterParam(
6123
+ resourceId,
6124
+ propertiesFilter
6125
+ );
6126
+ const layerAdapterOptions = __spreadProps$6(__spreadValues$b(__spreadValues$b({}, opt), restAdapterOptions), {
6127
+ params: __spreadValues$b({
6128
+ resource: resourceId
6129
+ }, filterParams),
6130
+ url: adapter === "TILE" && opt.url ? updateUrlParams(opt.url, __spreadValues$b({
6131
+ resource: String(resourceId)
6132
+ }, filterParams)) : opt.url,
6013
6133
  layers: opt.layers || String(resourceId),
6014
6134
  resourceId
6015
6135
  });
@@ -6022,6 +6142,15 @@ function createRasterAdapter(_0) {
6022
6142
  addLayer(addOptions) {
6023
6143
  return super.addLayer(__spreadValues$b(__spreadValues$b({}, this.options), addOptions));
6024
6144
  }
6145
+ propertiesFilter(filters) {
6146
+ return __async$c(this, null, function* () {
6147
+ var _a;
6148
+ const opt = this.options;
6149
+ const params = __spreadValues$b(__spreadValues$b({}, opt.params || {}), createLayerFilterParam(this.resourceId, filters));
6150
+ opt.params = params;
6151
+ (_a = this.updateLayer) == null ? void 0 : _a.call(this, { params });
6152
+ });
6153
+ }
6025
6154
  getIdentificationIds() {
6026
6155
  return __async$c(this, null, function* () {
6027
6156
  if (this.item) {
@@ -6517,7 +6646,8 @@ function getCompanyLogo(connector, options) {
6517
6646
  component: "pyramid"
6518
6647
  }
6519
6648
  });
6520
- if (settings && settings.company_logo && settings.company_logo.enabled) {
6649
+ const company_logo = settings && "company_logo" in settings ? settings.company_logo : void 0;
6650
+ if (company_logo && company_logo.enabled) {
6521
6651
  const anchor = document.createElement("a");
6522
6652
  anchor.style.position = "absolute";
6523
6653
  anchor.style.bottom = "0";
@@ -6552,10 +6682,10 @@ function getCompanyLogo(connector, options) {
6552
6682
  } else {
6553
6683
  return;
6554
6684
  }
6555
- if (settings.company_logo.link !== null && settings.company_logo.link.trim() !== "") {
6556
- anchor.href = settings.company_logo.link;
6685
+ if (company_logo.link !== null && company_logo.link.trim() !== "") {
6686
+ anchor.href = company_logo.link;
6557
6687
  anchor.target = "_blank";
6558
- if (settings.company_logo.link.search(/:\/\/nextgis/) !== -1) {
6688
+ if (company_logo.link.search(/:\/\/nextgis/) !== -1) {
6559
6689
  img.alt = "Get your own Web GIS at nextgis.com";
6560
6690
  }
6561
6691
  }
@@ -9983,7 +10113,7 @@ const _NgwMap = class _NgwMap extends WebMap {
9983
10113
  addNgwLayer(options) {
9984
10114
  return __async$1(this, null, function* () {
9985
10115
  yield this.onMapLoad();
9986
- const { keyname, resourceId } = options;
10116
+ const { keyname, resourceId, filters } = options;
9987
10117
  if (keyname || resourceId !== void 0) {
9988
10118
  deprecatedWarn(
9989
10119
  "set `resource` options instead of `keyname` or `resourceId`"
@@ -9997,12 +10127,15 @@ const _NgwMap = class _NgwMap extends WebMap {
9997
10127
  }
9998
10128
  if (defined(this.options.baseUrl)) {
9999
10129
  try {
10130
+ options.adapterOptions = options.adapterOptions || {};
10000
10131
  if (defined(this.options.setViewDelay)) {
10001
- options.adapterOptions = options.adapterOptions || {};
10002
10132
  if (!defined(options.adapterOptions.setViewDelay)) {
10003
10133
  options.adapterOptions.setViewDelay = this.options.setViewDelay;
10004
10134
  }
10005
10135
  }
10136
+ if (defined(filters)) {
10137
+ options.adapterOptions.propertiesFilter = filters;
10138
+ }
10006
10139
  const adapter = createNgwLayerAdapter(options, this, this.connector);
10007
10140
  const adapterOpts = __spreadValues(__spreadValues({
10008
10141
  visibility: true
@@ -10094,7 +10227,6 @@ const _NgwMap = class _NgwMap extends WebMap {
10094
10227
  const promise = fetchIdentifyGeoJson({
10095
10228
  identify,
10096
10229
  connector: this.connector,
10097
- multiple,
10098
10230
  requestOptions: { signal: abortController.signal }
10099
10231
  });
10100
10232
  if (promise && "then" in promise) {