@mapcomponents/ra-geospatial 1.6.0 → 1.6.2

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/CHANGELOG.md ADDED
File without changes
File without changes
@@ -21665,6 +21665,23 @@ ${ie.shaderPreludeCode.vertexSource}`, define: ie.shaderDefine }, defaultProject
21665
21665
  }
21666
21666
  var ck = uk();
21667
21667
  class hk {
21668
+ registeredElements;
21669
+ baseLayers;
21670
+ firstSymbolLayer;
21671
+ eventHandlers;
21672
+ wrapper;
21673
+ initRegisteredElements;
21674
+ addNativeMaplibreFunctionsAndProps;
21675
+ // @ts-ignore
21676
+ map;
21677
+ // @ts-ignore
21678
+ style;
21679
+ // @ts-ignore
21680
+ styleJson;
21681
+ addSource;
21682
+ addControl;
21683
+ on;
21684
+ cleanup;
21668
21685
  constructor(t) {
21669
21686
  const n = this;
21670
21687
  this.registeredElements = {}, this.baseLayers = [], this.firstSymbolLayer = void 0, this.eventHandlers = {
@@ -27573,7 +27590,7 @@ const ty = Ge.createContext({}), pI = ({ children: e }) => {
27573
27590
  h.current = !1, a.removeMap(o), t.current && (t.current.map?.remove?.(), t.current.cancelled = !0, t.current = null);
27574
27591
  };
27575
27592
  }, []), ki(() => {
27576
- h.current || n.current && (h.current = !0, t.current = new hk({
27593
+ h.current || n.current && (h.current = !0, e?.options?.style && (f.current = JSON.stringify(e.options.style)), t.current = new hk({
27577
27594
  mapOptions: {
27578
27595
  style: "",
27579
27596
  ...e.options,
@@ -27589,7 +27606,10 @@ const ty = Ge.createContext({}), pI = ({ children: e }) => {
27589
27606
  }
27590
27607
  }));
27591
27608
  }, [e.options, e.mapId]), ki(() => {
27592
- t.current?.map && e?.options?.style && f.current !== e.options.style && (f.current = e.options.style, t.current.map.setStyle(e.options.style));
27609
+ if (t.current?.map && e?.options?.style) {
27610
+ const o = JSON.stringify(e.options.style);
27611
+ f.current !== o && (f.current = o, t.current.map.setStyle(e.options.style));
27612
+ }
27593
27613
  }, [e?.options?.style]), /* @__PURE__ */ Pr.jsx(
27594
27614
  "div",
27595
27615
  {
@@ -40773,7 +40793,7 @@ endobj\r
40773
40793
  var v = y.getContext("2d");
40774
40794
  v.fillStyle = "#fff", v.fillRect(0, 0, y.width, y.height);
40775
40795
  var S = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, P = this;
40776
- return (jn.canvg ? Promise.resolve(jn.canvg) : import("./index.es-DBcuOIG0.js")).catch(function(M) {
40796
+ return (jn.canvg ? Promise.resolve(jn.canvg) : import("./index.es-6e0FVhHF.js")).catch(function(M) {
40777
40797
  return Promise.reject(new Error("Could not load canvg: " + M));
40778
40798
  }).then(function(M) {
40779
40799
  return M.default ? M.default : M;
@@ -43909,11 +43929,9 @@ const kz = (e) => {
43909
43929
  ), h(!0));
43910
43930
  }, [n.map, e, a, v]), ki(() => {
43911
43931
  if (!n.map || !c) return;
43912
- const S = () => {
43913
- if (t.current) {
43914
- const P = t.current.getAll?.();
43915
- o(P?.features), typeof e.onChange == "function" && e.onChange(P?.features);
43916
- }
43932
+ const S = (P) => {
43933
+ let M = [];
43934
+ P && typeof P == "object" && "features" in P && P.features && (M = P.features), o(M), e.onChange && e.onChange(M);
43917
43935
  };
43918
43936
  return n.map.on("mouseup", S), n.map.on("touchend", S), () => {
43919
43937
  n.map && (n.map.map.off("mouseup", S), n.map.map.off("touchend", S));
@@ -61506,4 +61524,4 @@ export {
61506
61524
  Xc as c,
61507
61525
  Yh as g
61508
61526
  };
61509
- //# sourceMappingURL=index-BYtSitNR.js.map
61527
+ //# sourceMappingURL=index-Ch2LED6r.js.map