@opengis/partsmap 0.0.73 → 0.0.74

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/dist/PartsMap.js CHANGED
@@ -18215,7 +18215,7 @@ const gl = {
18215
18215
  async updateStyle(f, v = this == null ? void 0 : this.map) {
18216
18216
  const I = f.id;
18217
18217
  v.getStyle().layers.forEach(async (L) => {
18218
- L.source === I && await v.removeLayer(L.id);
18218
+ L.source === I && v.getLayer(L.id) && await v.removeLayer(L.id);
18219
18219
  }), (await qh(
18220
18220
  f.style,
18221
18221
  f.source || f.id,
@@ -18286,7 +18286,7 @@ const gl = {
18286
18286
  async removeLayer(f, v = this.map) {
18287
18287
  v.getSource(f) && (await v.getStyle().layers.forEach(async (I) => {
18288
18288
  I.source === f && await v.removeLayer(I.id);
18289
- }), await v.removeSource(f));
18289
+ }), v.getSource(f) && await v.removeSource(f));
18290
18290
  },
18291
18291
  // async setFilter(id, filter) {
18292
18292
  // const currentLayer = this.layerList.find((el) => el.id === id);
@@ -18320,7 +18320,7 @@ const gl = {
18320
18320
  async refreshLayer(f, v = this.map) {
18321
18321
  await v.getStyle().layers.forEach((I) => {
18322
18322
  I.source === f && v.removeLayer(I.id);
18323
- }), await v.removeSource(f), this.setVisible(f);
18323
+ }), v.getSource(f) && await v.removeSource(f), this.setVisible(f);
18324
18324
  }
18325
18325
  }
18326
18326
  }, Ki = (f, v) => {
@@ -20900,7 +20900,7 @@ const Jy = /* @__PURE__ */ Ki(Ny, [["render", Wy]]), Ky = {
20900
20900
  await this.addLayer({
20901
20901
  id: this.table,
20902
20902
  service: "vector",
20903
- url: `/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}&dt=${(/* @__PURE__ */ new Date()).toISOString()}&filter=${I}`,
20903
+ url: `/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}&dt=${(/* @__PURE__ */ new Date()).toISOString()}${I ? `&filter=${I}` : ""}`,
20904
20904
  layers: [
20905
20905
  {
20906
20906
  type: "fill",