@performant-software/geospatial 2.2.8-beta.1 → 2.2.8-beta.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.
@@ -1,2 +1,2 @@
1
- "use strict";const a=require("react"),i=require("./index.cjs15.js"),s=require("./index.cjs12.js"),o=e=>{const[n,u]=a.useState(!1),t=i.useMap();return a.useEffect(()=>{var c;((c=t==null?void 0:t.current)==null?void 0:c.getMap()).on("load",()=>u(!0))},[]),a.useEffect(()=>{if(!n)return;const r=t.current.getMap();return s.addGeoreferenceLayer(r,e.id,{manifest:e.manifest,opacity:e.opacity,url:e.url}),()=>s.removeLayer(r,e.id)},[n]),null};o.defaultProps={opacity:.5};module.exports=o;
1
+ "use strict";const a=require("react"),i=require("./index.cjs15.js"),s=require("./index.cjs12.js"),u=t=>{const[n,c]=a.useState(!1),r=i.useMap();return a.useEffect(()=>{var o;const e=(o=r==null?void 0:r.current)==null?void 0:o.getMap();e&&e.loaded()?c(!0):e&&e.on("load",()=>c(!0))},[]),a.useEffect(()=>{if(!n)return;const e=r.current.getMap();return s.addGeoreferenceLayer(e,t.id,{manifest:t.manifest,opacity:t.opacity,url:t.url}),()=>s.removeLayer(e,t.id)},[n]),null};u.defaultProps={opacity:.5};module.exports=u;
2
2
  //# sourceMappingURL=index.cjs10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs10.js","sources":["../src/components/WarpedImageLayer.js"],"sourcesContent":["// @flow\n\nimport { useEffect, useState } from 'react';\nimport { useMap } from 'react-map-gl';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n /**\n * ID of the new layer.\n */\n id: string,\n\n /**\n * (Optional) IIIF manifest content containing the image and geo-reference annotations.\n */\n manifest?: string,\n\n /**\n * (Optional) layer opacity.\n */\n opacity?: number,\n\n /**\n * (Optional) URL to the IIIF manifest.\n */\n url?: string\n};\n\nconst WarpedImageLayer = (props: Props) => {\n const [loaded, setLoaded] = useState(false);\n\n const mapRef = useMap();\n\n useEffect(() => {\n const instance = mapRef?.current?.getMap();\n instance.on('load', () => setLoaded(true));\n }, []);\n\n /**\n * Adds the WarpedMapLayer object to the map as a new layer.\n */\n useEffect(() => {\n if (!loaded) {\n return undefined;\n }\n\n const map = mapRef.current.getMap();\n\n MapUtils.addGeoreferenceLayer(map, props.id, {\n manifest: props.manifest,\n opacity: props.opacity,\n url: props.url\n });\n\n return () => MapUtils.removeLayer(map, props.id);\n }, [loaded]);\n\n return null;\n};\n\nWarpedImageLayer.defaultProps = {\n opacity: 0.5\n};\n\nexport default WarpedImageLayer;\n"],"names":["WarpedImageLayer","props","loaded","setLoaded","useState","mapRef","useMap","useEffect","_a","map","MapUtils"],"mappings":"kGA4BMA,EAAoBC,GAAiB,CACzC,KAAM,CAACC,EAAQC,CAAS,EAAIC,WAAS,EAAK,EAEpCC,EAASC,EAAAA,SAEfC,OAAAA,EAAAA,UAAU,IAAM,SACGC,EAAAH,GAAA,YAAAA,EAAQ,UAAR,YAAAG,EAAiB,UACzB,GAAG,OAAQ,IAAML,EAAU,EAAI,CAAC,CAC3C,EAAG,CAAE,CAAA,EAKLI,EAAAA,UAAU,IAAM,CACd,GAAI,CAACL,EACI,OAGH,MAAAO,EAAMJ,EAAO,QAAQ,OAAO,EAEzBK,OAAAA,EAAA,qBAAqBD,EAAKR,EAAM,GAAI,CAC3C,SAAUA,EAAM,SAChB,QAASA,EAAM,QACf,IAAKA,EAAM,GAAA,CACZ,EAEM,IAAMS,EAAS,YAAYD,EAAKR,EAAM,EAAE,CAAA,EAC9C,CAACC,CAAM,CAAC,EAEJ,IACT,EAEAF,EAAiB,aAAe,CAC9B,QAAS,EACX"}
1
+ {"version":3,"file":"index.cjs10.js","sources":["../src/components/WarpedImageLayer.js"],"sourcesContent":["// @flow\n\nimport { useEffect, useState } from 'react';\nimport { useMap } from 'react-map-gl';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n /**\n * ID of the new layer.\n */\n id: string,\n\n /**\n * (Optional) IIIF manifest content containing the image and geo-reference annotations.\n */\n manifest?: string,\n\n /**\n * (Optional) layer opacity.\n */\n opacity?: number,\n\n /**\n * (Optional) URL to the IIIF manifest.\n */\n url?: string\n};\n\nconst WarpedImageLayer = (props: Props) => {\n const [loaded, setLoaded] = useState(false);\n\n const mapRef = useMap();\n\n /**\n * Sets the \"loaded\" attribute on the state based on the current map state.\n */\n useEffect(() => {\n const instance = mapRef?.current?.getMap();\n if (instance && instance.loaded()) {\n setLoaded(true);\n } else if (instance) {\n instance.on('load', () => setLoaded(true));\n }\n }, []);\n\n /**\n * Adds the WarpedMapLayer object to the map as a new layer.\n */\n useEffect(() => {\n if (!loaded) {\n return undefined;\n }\n\n const map = mapRef.current.getMap();\n\n MapUtils.addGeoreferenceLayer(map, props.id, {\n manifest: props.manifest,\n opacity: props.opacity,\n url: props.url\n });\n\n return () => MapUtils.removeLayer(map, props.id);\n }, [loaded]);\n\n return null;\n};\n\nWarpedImageLayer.defaultProps = {\n opacity: 0.5\n};\n\nexport default WarpedImageLayer;\n"],"names":["WarpedImageLayer","props","loaded","setLoaded","useState","mapRef","useMap","useEffect","instance","_a","map","MapUtils"],"mappings":"kGA4BMA,EAAoBC,GAAiB,CACzC,KAAM,CAACC,EAAQC,CAAS,EAAIC,WAAS,EAAK,EAEpCC,EAASC,EAAAA,SAKfC,OAAAA,EAAAA,UAAU,IAAM,OACR,MAAAC,GAAWC,EAAAJ,GAAA,YAAAA,EAAQ,UAAR,YAAAI,EAAiB,SAC9BD,GAAYA,EAAS,SACvBL,EAAU,EAAI,EACLK,GACTA,EAAS,GAAG,OAAQ,IAAML,EAAU,EAAI,CAAC,CAE7C,EAAG,CAAE,CAAA,EAKLI,EAAAA,UAAU,IAAM,CACd,GAAI,CAACL,EACI,OAGH,MAAAQ,EAAML,EAAO,QAAQ,OAAO,EAEzBM,OAAAA,EAAA,qBAAqBD,EAAKT,EAAM,GAAI,CAC3C,SAAUA,EAAM,SAChB,QAASA,EAAM,QACf,IAAKA,EAAM,GAAA,CACZ,EAEM,IAAMU,EAAS,YAAYD,EAAKT,EAAM,EAAE,CAAA,EAC9C,CAACC,CAAM,CAAC,EAEJ,IACT,EAEAF,EAAiB,aAAe,CAC9B,QAAS,EACX"}
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index.cjs234.js"),e=t("length");module.exports=e;
1
+ "use strict";const t=require("./index.cjs235.js"),e=t("length");module.exports=e;
2
2
  //# sourceMappingURL=index.cjs208.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index.cjs234.js"),e=t("byteLength");module.exports=e;
1
+ "use strict";const t=require("./index.cjs235.js"),e=t("byteLength");module.exports=e;
2
2
  //# sourceMappingURL=index.cjs209.js.map
@@ -1,2 +1,2 @@
1
- "use strict";function n(t){return function(r){return r==null?void 0:r[t]}}module.exports=n;
1
+ "use strict";const t=require("./index.cjs205.js"),e=t("Object");module.exports=e;
2
2
  //# sourceMappingURL=index.cjs234.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs234.js","sources":["../../../node_modules/underscore/modules/_shallowProperty.js"],"sourcesContent":["// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n"],"names":["shallowProperty","key","obj"],"mappings":"aACA,SAAwBA,EAAgBC,EAAK,CAC3C,OAAO,SAASC,EAAK,CACnB,OAAOA,GAAO,KAAO,OAASA,EAAID,CAAG,CAAA,CAEzC","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs234.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["tagTester"],"mappings":"kDAEeA,EAAAA,EAAU,QAAQ","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index.cjs205.js"),e=t("Object");module.exports=e;
1
+ "use strict";function n(t){return function(r){return r==null?void 0:r[t]}}module.exports=n;
2
2
  //# sourceMappingURL=index.cjs235.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs235.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["tagTester"],"mappings":"kDAEeA,EAAAA,EAAU,QAAQ","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs235.js","sources":["../../../node_modules/underscore/modules/_shallowProperty.js"],"sourcesContent":["// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n"],"names":["shallowProperty","key","obj"],"mappings":"aACA,SAAwBA,EAAgBC,EAAK,CAC3C,OAAO,SAASC,EAAK,CACnB,OAAOA,GAAO,KAAO,OAASA,EAAID,CAAG,CAAA,CAEzC","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";const A=require("./index.cjs256.js");function d(h,v,f,o){this.x=h,this.z=v,this.o=f,this.e=o,this.v=!1,this.n=this.p=null}function B(h,v,f,o,n){var x=[],s=[],l,z;if(h.forEach(function(w){if(!((g=w.length-1)<=0)){var g,u=w[0],q=w[g],t;if(A(u,q)){for(n.lineStart(),l=0;l<g;++l)n.point((u=w[l])[0],u[1]);n.lineEnd();return}x.push(t=new d(u,w,null,!0)),s.push(t.o=new d(u,null,t,!1)),x.push(t=new d(q,w,null,!1)),s.push(t.o=new d(q,null,t,!0))}}),!!x.length){for(s.sort(v),P(x),P(s),l=0,z=s.length;l<z;++l)s[l].e=f=!f;for(var k=x[0],p,E;;){for(var i=k,e=!0;i.v;)if((i=i.n)===k)return;p=i.z,n.lineStart();do{if(i.v=i.o.v=!0,i.e){if(e)for(l=0,z=p.length;l<z;++l)n.point((E=p[l])[0],E[1]);else o(i.x,i.n.x,1,n);i=i.n}else{if(e)for(p=i.p.z,l=p.length-1;l>=0;--l)n.point((E=p[l])[0],E[1]);else o(i.x,i.p.x,-1,n);i=i.p}i=i.o,p=i.z,e=!e}while(!i.v);n.lineEnd()}}}function P(h){if(v=h.length){for(var v,f=0,o=h[0],n;++f<v;)o.n=n=h[f],n.p=o,o=n;o.n=n=h[0],n.p=o}}module.exports=B;
1
+ "use strict";const A=require("./index.cjs257.js");function d(h,v,f,o){this.x=h,this.z=v,this.o=f,this.e=o,this.v=!1,this.n=this.p=null}function B(h,v,f,o,n){var x=[],s=[],l,z;if(h.forEach(function(w){if(!((g=w.length-1)<=0)){var g,u=w[0],q=w[g],t;if(A(u,q)){for(n.lineStart(),l=0;l<g;++l)n.point((u=w[l])[0],u[1]);n.lineEnd();return}x.push(t=new d(u,w,null,!0)),s.push(t.o=new d(u,null,t,!1)),x.push(t=new d(q,w,null,!1)),s.push(t.o=new d(q,null,t,!0))}}),!!x.length){for(s.sort(v),P(x),P(s),l=0,z=s.length;l<z;++l)s[l].e=f=!f;for(var k=x[0],p,E;;){for(var i=k,e=!0;i.v;)if((i=i.n)===k)return;p=i.z,n.lineStart();do{if(i.v=i.o.v=!0,i.e){if(e)for(l=0,z=p.length;l<z;++l)n.point((E=p[l])[0],E[1]);else o(i.x,i.n.x,1,n);i=i.n}else{if(e)for(p=i.p.z,l=p.length-1;l>=0;--l)n.point((E=p[l])[0],E[1]);else o(i.x,i.p.x,-1,n);i=i.p}i=i.o,p=i.z,e=!e}while(!i.v);n.lineEnd()}}}function P(h){if(v=h.length){for(var v,f=0,o=h[0],n;++f<v;)o.n=n=h[f],n.p=o,o=n;o.n=n=h[0],n.p=o}}module.exports=B;
2
2
  //# sourceMappingURL=index.cjs244.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index.cjs239.js"),Q=require("./index.cjs238.js"),e=require("./index.cjs240.js"),j=require("./index.cjs256.js"),T=require("./index.cjs258.js");function U(d,G){var D=e.cos(d),x=D>0,J=e.abs(D)>e.epsilon;function K(n,i,o,r){Q.circleStream(r,d,G,o,n,i)}function L(n,i){return e.cos(n)*e.cos(i)>D}function M(n){var i,o,r,C,u;return{lineStart:function(){C=r=!1,u=1},point:function(s,v){var c=[s,v],a,l=L(s,v),z=x?l?0:k(s,v):l?k(s+(s<0?e.pi:-e.pi),v):0;if(!i&&(C=r=l)&&n.lineStart(),l!==r&&(a=h(i,c),(!a||j(i,a)||j(c,a))&&(c[0]+=e.epsilon,c[1]+=e.epsilon,l=L(c[0],c[1]))),l!==r)u=0,l?(n.lineStart(),a=h(c,i),n.point(a[0],a[1])):(a=h(i,c),n.point(a[0],a[1]),n.lineEnd()),i=a;else if(J&&i&&x^l){var p;!(z&o)&&(p=h(c,i,!0))&&(u=0,x?(n.lineStart(),n.point(p[0][0],p[0][1]),n.point(p[1][0],p[1][1]),n.lineEnd()):(n.point(p[1][0],p[1][1]),n.lineEnd(),n.lineStart(),n.point(p[0][0],p[0][1])))}l&&(!i||!j(i,c))&&n.point(c[0],c[1]),i=c,r=l,o=z},lineEnd:function(){r&&n.lineEnd(),i=null},clean:function(){return u|(C&&r)<<1}}}function h(n,i,o){var r=t.cartesian(n),C=t.cartesian(i),u=[1,0,0],s=t.cartesianCross(r,C),v=t.cartesianDot(s,s),c=s[0],a=v-c*c;if(!a)return!o&&n;var l=D*v/a,z=-D*c/a,p=t.cartesianCross(u,s),S=t.cartesianScale(u,l),N=t.cartesianScale(s,z);t.cartesianAddInPlace(S,N);var I=p,B=t.cartesianDot(S,I),R=t.cartesianDot(I,I),w=B*B-R*(t.cartesianDot(S,S)-1);if(!(w<0)){var y=e.sqrt(w),f=t.cartesianScale(I,(-B-y)/R);if(t.cartesianAddInPlace(f,S),f=t.spherical(f),!o)return f;var q=n[0],P=i[0],E=n[1],A=i[1],H;P<q&&(H=q,q=P,P=H);var b=P-q,g=e.abs(b-e.pi)<e.epsilon,O=g||b<e.epsilon;if(!g&&A<E&&(H=E,E=A,A=H),O?g?E+A>0^f[1]<(e.abs(f[0]-q)<e.epsilon?E:A):E<=f[1]&&f[1]<=A:b>e.pi^(q<=f[0]&&f[0]<=P)){var F=t.cartesianScale(I,(-B+y)/R);return t.cartesianAddInPlace(F,S),[f,t.spherical(F)]}}}function k(n,i){var o=x?d:e.pi-d,r=0;return n<-o?r|=1:n>o&&(r|=2),i<-o?r|=4:i>o&&(r|=8),r}return T(L,M,K,x?[0,-d]:[-e.pi,d-e.pi])}module.exports=U;
1
+ "use strict";const t=require("./index.cjs239.js"),Q=require("./index.cjs238.js"),e=require("./index.cjs240.js"),j=require("./index.cjs257.js"),T=require("./index.cjs258.js");function U(d,G){var D=e.cos(d),x=D>0,J=e.abs(D)>e.epsilon;function K(n,i,o,r){Q.circleStream(r,d,G,o,n,i)}function L(n,i){return e.cos(n)*e.cos(i)>D}function M(n){var i,o,r,C,u;return{lineStart:function(){C=r=!1,u=1},point:function(s,v){var c=[s,v],a,l=L(s,v),z=x?l?0:k(s,v):l?k(s+(s<0?e.pi:-e.pi),v):0;if(!i&&(C=r=l)&&n.lineStart(),l!==r&&(a=h(i,c),(!a||j(i,a)||j(c,a))&&(c[0]+=e.epsilon,c[1]+=e.epsilon,l=L(c[0],c[1]))),l!==r)u=0,l?(n.lineStart(),a=h(c,i),n.point(a[0],a[1])):(a=h(i,c),n.point(a[0],a[1]),n.lineEnd()),i=a;else if(J&&i&&x^l){var p;!(z&o)&&(p=h(c,i,!0))&&(u=0,x?(n.lineStart(),n.point(p[0][0],p[0][1]),n.point(p[1][0],p[1][1]),n.lineEnd()):(n.point(p[1][0],p[1][1]),n.lineEnd(),n.lineStart(),n.point(p[0][0],p[0][1])))}l&&(!i||!j(i,c))&&n.point(c[0],c[1]),i=c,r=l,o=z},lineEnd:function(){r&&n.lineEnd(),i=null},clean:function(){return u|(C&&r)<<1}}}function h(n,i,o){var r=t.cartesian(n),C=t.cartesian(i),u=[1,0,0],s=t.cartesianCross(r,C),v=t.cartesianDot(s,s),c=s[0],a=v-c*c;if(!a)return!o&&n;var l=D*v/a,z=-D*c/a,p=t.cartesianCross(u,s),S=t.cartesianScale(u,l),N=t.cartesianScale(s,z);t.cartesianAddInPlace(S,N);var I=p,B=t.cartesianDot(S,I),R=t.cartesianDot(I,I),w=B*B-R*(t.cartesianDot(S,S)-1);if(!(w<0)){var y=e.sqrt(w),f=t.cartesianScale(I,(-B-y)/R);if(t.cartesianAddInPlace(f,S),f=t.spherical(f),!o)return f;var q=n[0],P=i[0],E=n[1],A=i[1],H;P<q&&(H=q,q=P,P=H);var b=P-q,g=e.abs(b-e.pi)<e.epsilon,O=g||b<e.epsilon;if(!g&&A<E&&(H=E,E=A,A=H),O?g?E+A>0^f[1]<(e.abs(f[0]-q)<e.epsilon?E:A):E<=f[1]&&f[1]<=A:b>e.pi^(q<=f[0]&&f[0]<=P)){var F=t.cartesianScale(I,(-B+y)/R);return t.cartesianAddInPlace(F,S),[f,t.spherical(F)]}}}function k(n,i){var o=x?d:e.pi-d,r=0;return n<-o?r|=1:n>o&&(r|=2),i<-o?r|=4:i>o&&(r|=8),r}return T(L,M,K,x?[0,-d]:[-e.pi,d-e.pi])}module.exports=U;
2
2
  //# sourceMappingURL=index.cjs249.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index.cjs23.js"),e=require("./index.cjs235.js");var t=a.supportsDataView&&e(new DataView(new ArrayBuffer(8))),r=typeof Map<"u"&&e(new Map);exports.hasStringTagBug=t;exports.isIE11=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index.cjs23.js"),e=require("./index.cjs234.js");var t=a.supportsDataView&&e(new DataView(new ArrayBuffer(8))),r=typeof Map<"u"&&e(new Map);exports.hasStringTagBug=t;exports.isIE11=r;
2
2
  //# sourceMappingURL=index.cjs25.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index.cjs254.js"),s=require("./index.cjs257.js");function f(t,l,u){var e=l[1][0]-l[0][0],n=l[1][1]-l[0][1],a=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),a!=null&&t.clipExtent(null),b(u,t.stream(s));var i=s.result(),r=Math.min(e/(i[1][0]-i[0][0]),n/(i[1][1]-i[0][1])),c=+l[0][0]+(e-r*(i[1][0]+i[0][0]))/2,E=+l[0][1]+(n-r*(i[1][1]+i[0][1]))/2;return a!=null&&t.clipExtent(a),t.scale(r*150).translate([c,E])}function m(t,l,u){return f(t,[[0,0],l],u)}exports.fitExtent=f;exports.fitSize=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index.cjs254.js"),s=require("./index.cjs256.js");function f(t,l,u){var e=l[1][0]-l[0][0],n=l[1][1]-l[0][1],a=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),a!=null&&t.clipExtent(null),b(u,t.stream(s));var i=s.result(),r=Math.min(e/(i[1][0]-i[0][0]),n/(i[1][1]-i[0][1])),c=+l[0][0]+(e-r*(i[1][0]+i[0][0]))/2,E=+l[0][1]+(n-r*(i[1][1]+i[0][1]))/2;return a!=null&&t.clipExtent(a),t.scale(r*150).translate([c,E])}function m(t,l,u){return f(t,[[0,0],l],u)}exports.fitExtent=f;exports.fitSize=m;
2
2
  //# sourceMappingURL=index.cjs252.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("./index.cjs240.js");function n(t,e){return s.abs(t[0]-e[0])<s.epsilon&&s.abs(t[1]-e[1])<s.epsilon}module.exports=n;
1
+ "use strict";const r=require("./index.cjs255.js");var t=1/0,e=t,i=-t,u=i,f={point:s,lineStart:r,lineEnd:r,polygonStart:r,polygonEnd:r,result:function(){var n=[[t,e],[i,u]];return i=u=-(e=t=1/0),n}};function s(n,o){n<t&&(t=n),n>i&&(i=n),o<e&&(e=o),o>u&&(u=o)}module.exports=f;
2
2
  //# sourceMappingURL=index.cjs256.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs256.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":"kDAEA,SAAAA,EAAwBC,EAAGC,EAAG,CAC5B,OAAOC,EAAAA,IAAIF,EAAE,CAAC,EAAIC,EAAE,CAAC,CAAC,EAAIE,EAAAA,SAAWD,EAAAA,IAAIF,EAAE,CAAC,EAAIC,EAAE,CAAC,CAAC,EAAIE,SAC1D","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs256.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":"kDAEA,IAAIA,EAAK,IACLC,EAAKD,EACLE,EAAK,CAACF,EACNG,EAAKD,EAELE,EAAe,CACjB,MAAOC,EACP,UAAWC,EACX,QAASA,EACT,aAAcA,EACd,WAAYA,EACZ,OAAQ,UAAW,CACb,IAAAC,EAAS,CAAC,CAACP,EAAIC,CAAE,EAAG,CAACC,EAAIC,CAAE,CAAC,EAC3B,OAAAD,EAAAC,EAAK,EAAEF,EAAKD,EAAK,KACfO,CACT,CACF,EAEA,SAASF,EAAYG,EAAGC,EAAG,CACrBD,EAAIR,IAASA,EAAAQ,GACbA,EAAIN,IAASA,EAAAM,GACbC,EAAIR,IAASA,EAAAQ,GACbA,EAAIN,IAASA,EAAAM,EACnB","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("./index.cjs255.js");var t=1/0,e=t,i=-t,u=i,f={point:s,lineStart:r,lineEnd:r,polygonStart:r,polygonEnd:r,result:function(){var n=[[t,e],[i,u]];return i=u=-(e=t=1/0),n}};function s(n,o){n<t&&(t=n),n>i&&(i=n),o<e&&(e=o),o>u&&(u=o)}module.exports=f;
1
+ "use strict";const s=require("./index.cjs240.js");function n(t,e){return s.abs(t[0]-e[0])<s.epsilon&&s.abs(t[1]-e[1])<s.epsilon}module.exports=n;
2
2
  //# sourceMappingURL=index.cjs257.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs257.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":"kDAEA,IAAIA,EAAK,IACLC,EAAKD,EACLE,EAAK,CAACF,EACNG,EAAKD,EAELE,EAAe,CACjB,MAAOC,EACP,UAAWC,EACX,QAASA,EACT,aAAcA,EACd,WAAYA,EACZ,OAAQ,UAAW,CACb,IAAAC,EAAS,CAAC,CAACP,EAAIC,CAAE,EAAG,CAACC,EAAIC,CAAE,CAAC,EAC3B,OAAAD,EAAAC,EAAK,EAAEF,EAAKD,EAAK,KACfO,CACT,CACF,EAEA,SAASF,EAAYG,EAAGC,EAAG,CACrBD,EAAIR,IAASA,EAAAQ,GACbA,EAAIN,IAASA,EAAAM,GACbC,EAAIR,IAASA,EAAAQ,GACbA,EAAIN,IAASA,EAAAM,EACnB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs257.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":"kDAEA,SAAAA,EAAwBC,EAAGC,EAAG,CAC5B,OAAOC,EAAAA,IAAIF,EAAE,CAAC,EAAIC,EAAE,CAAC,CAAC,EAAIE,EAAAA,SAAWD,EAAAA,IAAIF,EAAE,CAAC,EAAIC,EAAE,CAAC,CAAC,EAAIE,SAC1D","x_google_ignoreList":[0]}
@@ -1,26 +1,27 @@
1
- import { useState as u, useEffect as o } from "react";
2
- import { useMap as d } from "./index.es15.js";
3
- import i from "./index.es12.js";
4
- const s = (e) => {
5
- const [r, c] = u(!1), t = d();
6
- return o(() => {
1
+ import { useState as u, useEffect as i } from "react";
2
+ import { useMap as c } from "./index.es15.js";
3
+ import d from "./index.es12.js";
4
+ const f = (t) => {
5
+ const [r, o] = u(!1), a = c();
6
+ return i(() => {
7
7
  var n;
8
- ((n = t == null ? void 0 : t.current) == null ? void 0 : n.getMap()).on("load", () => c(!0));
9
- }, []), o(() => {
8
+ const e = (n = a == null ? void 0 : a.current) == null ? void 0 : n.getMap();
9
+ e && e.loaded() ? o(!0) : e && e.on("load", () => o(!0));
10
+ }, []), i(() => {
10
11
  if (!r)
11
12
  return;
12
- const a = t.current.getMap();
13
- return i.addGeoreferenceLayer(a, e.id, {
14
- manifest: e.manifest,
15
- opacity: e.opacity,
16
- url: e.url
17
- }), () => i.removeLayer(a, e.id);
13
+ const e = a.current.getMap();
14
+ return d.addGeoreferenceLayer(e, t.id, {
15
+ manifest: t.manifest,
16
+ opacity: t.opacity,
17
+ url: t.url
18
+ }), () => d.removeLayer(e, t.id);
18
19
  }, [r]), null;
19
20
  };
20
- s.defaultProps = {
21
+ f.defaultProps = {
21
22
  opacity: 0.5
22
23
  };
23
24
  export {
24
- s as default
25
+ f as default
25
26
  };
26
27
  //# sourceMappingURL=index.es10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es10.js","sources":["../src/components/WarpedImageLayer.js"],"sourcesContent":["// @flow\n\nimport { useEffect, useState } from 'react';\nimport { useMap } from 'react-map-gl';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n /**\n * ID of the new layer.\n */\n id: string,\n\n /**\n * (Optional) IIIF manifest content containing the image and geo-reference annotations.\n */\n manifest?: string,\n\n /**\n * (Optional) layer opacity.\n */\n opacity?: number,\n\n /**\n * (Optional) URL to the IIIF manifest.\n */\n url?: string\n};\n\nconst WarpedImageLayer = (props: Props) => {\n const [loaded, setLoaded] = useState(false);\n\n const mapRef = useMap();\n\n useEffect(() => {\n const instance = mapRef?.current?.getMap();\n instance.on('load', () => setLoaded(true));\n }, []);\n\n /**\n * Adds the WarpedMapLayer object to the map as a new layer.\n */\n useEffect(() => {\n if (!loaded) {\n return undefined;\n }\n\n const map = mapRef.current.getMap();\n\n MapUtils.addGeoreferenceLayer(map, props.id, {\n manifest: props.manifest,\n opacity: props.opacity,\n url: props.url\n });\n\n return () => MapUtils.removeLayer(map, props.id);\n }, [loaded]);\n\n return null;\n};\n\nWarpedImageLayer.defaultProps = {\n opacity: 0.5\n};\n\nexport default WarpedImageLayer;\n"],"names":["WarpedImageLayer","props","loaded","setLoaded","useState","mapRef","useMap","useEffect","_a","map","MapUtils"],"mappings":";;;AA4BM,MAAAA,IAAmB,CAACC,MAAiB;AACzC,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GAEpCC,IAASC;AAEf,SAAAC,EAAU,MAAM;;AAEd,MADiBC,IAAAH,KAAA,gBAAAA,EAAQ,YAAR,gBAAAG,EAAiB,UACzB,GAAG,QAAQ,MAAML,EAAU,EAAI,CAAC;AAAA,EAC3C,GAAG,CAAE,CAAA,GAKLI,EAAU,MAAM;AACd,QAAI,CAACL;AACI;AAGH,UAAAO,IAAMJ,EAAO,QAAQ,OAAO;AAEzB,WAAAK,EAAA,qBAAqBD,GAAKR,EAAM,IAAI;AAAA,MAC3C,UAAUA,EAAM;AAAA,MAChB,SAASA,EAAM;AAAA,MACf,KAAKA,EAAM;AAAA,IAAA,CACZ,GAEM,MAAMS,EAAS,YAAYD,GAAKR,EAAM,EAAE;AAAA,EAAA,GAC9C,CAACC,CAAM,CAAC,GAEJ;AACT;AAEAF,EAAiB,eAAe;AAAA,EAC9B,SAAS;AACX;"}
1
+ {"version":3,"file":"index.es10.js","sources":["../src/components/WarpedImageLayer.js"],"sourcesContent":["// @flow\n\nimport { useEffect, useState } from 'react';\nimport { useMap } from 'react-map-gl';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n /**\n * ID of the new layer.\n */\n id: string,\n\n /**\n * (Optional) IIIF manifest content containing the image and geo-reference annotations.\n */\n manifest?: string,\n\n /**\n * (Optional) layer opacity.\n */\n opacity?: number,\n\n /**\n * (Optional) URL to the IIIF manifest.\n */\n url?: string\n};\n\nconst WarpedImageLayer = (props: Props) => {\n const [loaded, setLoaded] = useState(false);\n\n const mapRef = useMap();\n\n /**\n * Sets the \"loaded\" attribute on the state based on the current map state.\n */\n useEffect(() => {\n const instance = mapRef?.current?.getMap();\n if (instance && instance.loaded()) {\n setLoaded(true);\n } else if (instance) {\n instance.on('load', () => setLoaded(true));\n }\n }, []);\n\n /**\n * Adds the WarpedMapLayer object to the map as a new layer.\n */\n useEffect(() => {\n if (!loaded) {\n return undefined;\n }\n\n const map = mapRef.current.getMap();\n\n MapUtils.addGeoreferenceLayer(map, props.id, {\n manifest: props.manifest,\n opacity: props.opacity,\n url: props.url\n });\n\n return () => MapUtils.removeLayer(map, props.id);\n }, [loaded]);\n\n return null;\n};\n\nWarpedImageLayer.defaultProps = {\n opacity: 0.5\n};\n\nexport default WarpedImageLayer;\n"],"names":["WarpedImageLayer","props","loaded","setLoaded","useState","mapRef","useMap","useEffect","instance","_a","map","MapUtils"],"mappings":";;;AA4BM,MAAAA,IAAmB,CAACC,MAAiB;AACzC,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GAEpCC,IAASC;AAKf,SAAAC,EAAU,MAAM;;AACR,UAAAC,KAAWC,IAAAJ,KAAA,gBAAAA,EAAQ,YAAR,gBAAAI,EAAiB;AAC9B,IAAAD,KAAYA,EAAS,WACvBL,EAAU,EAAI,IACLK,KACTA,EAAS,GAAG,QAAQ,MAAML,EAAU,EAAI,CAAC;AAAA,EAE7C,GAAG,CAAE,CAAA,GAKLI,EAAU,MAAM;AACd,QAAI,CAACL;AACI;AAGH,UAAAQ,IAAML,EAAO,QAAQ,OAAO;AAEzB,WAAAM,EAAA,qBAAqBD,GAAKT,EAAM,IAAI;AAAA,MAC3C,UAAUA,EAAM;AAAA,MAChB,SAASA,EAAM;AAAA,MACf,KAAKA,EAAM;AAAA,IAAA,CACZ,GAEM,MAAMU,EAAS,YAAYD,GAAKT,EAAM,EAAE;AAAA,EAAA,GAC9C,CAACC,CAAM,CAAC,GAEJ;AACT;AAEAF,EAAiB,eAAe;AAAA,EAC9B,SAAS;AACX;"}
@@ -1,4 +1,4 @@
1
- import t from "./index.es234.js";
1
+ import t from "./index.es235.js";
2
2
  const o = t("length");
3
3
  export {
4
4
  o as default
@@ -1,4 +1,4 @@
1
- import t from "./index.es234.js";
1
+ import t from "./index.es235.js";
2
2
  const o = t("byteLength");
3
3
  export {
4
4
  o as default
@@ -1,9 +1,6 @@
1
- function t(r) {
2
- return function(n) {
3
- return n == null ? void 0 : n[r];
4
- };
5
- }
1
+ import t from "./index.es205.js";
2
+ const a = t("Object");
6
3
  export {
7
- t as default
4
+ a as default
8
5
  };
9
6
  //# sourceMappingURL=index.es234.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es234.js","sources":["../../../node_modules/underscore/modules/_shallowProperty.js"],"sourcesContent":["// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n"],"names":["shallowProperty","key","obj"],"mappings":"AACA,SAAwBA,EAAgBC,GAAK;AAC3C,SAAO,SAASC,GAAK;AACnB,WAAOA,KAAO,OAAO,SAASA,EAAID,CAAG;AAAA,EAAA;AAEzC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es234.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["hasObjectTag","tagTester"],"mappings":";AAEA,MAAeA,IAAAC,EAAU,QAAQ;","x_google_ignoreList":[0]}
@@ -1,6 +1,9 @@
1
- import t from "./index.es205.js";
2
- const a = t("Object");
1
+ function t(r) {
2
+ return function(n) {
3
+ return n == null ? void 0 : n[r];
4
+ };
5
+ }
3
6
  export {
4
- a as default
7
+ t as default
5
8
  };
6
9
  //# sourceMappingURL=index.es235.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es235.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["hasObjectTag","tagTester"],"mappings":";AAEA,MAAeA,IAAAC,EAAU,QAAQ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es235.js","sources":["../../../node_modules/underscore/modules/_shallowProperty.js"],"sourcesContent":["// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n"],"names":["shallowProperty","key","obj"],"mappings":"AACA,SAAwBA,EAAgBC,GAAK;AAC3C,SAAO,SAASC,GAAK;AACnB,WAAOA,KAAO,OAAO,SAASA,EAAID,CAAG;AAAA,EAAA;AAEzC;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import a from "./index.es256.js";
1
+ import a from "./index.es257.js";
2
2
  function g(f, v, h, o) {
3
3
  this.x = f, this.z = v, this.o = h, this.e = o, this.v = !1, this.n = this.p = null;
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import { cartesian as Q, cartesianCross as T, cartesianDot as R, cartesianScale as g, cartesianAddInPlace as y, spherical as U } from "./index.es239.js";
2
2
  import { circleStream as $ } from "./index.es238.js";
3
3
  import { pi as v, cos as F, epsilon as x, abs as G, sqrt as b } from "./index.es240.js";
4
- import J from "./index.es256.js";
4
+ import J from "./index.es257.js";
5
5
  import m from "./index.es258.js";
6
6
  function fn(S, V) {
7
7
  var A = F(S), C = A > 0, W = G(A) > x;
@@ -1,5 +1,5 @@
1
1
  import { supportsDataView as e } from "./index.es23.js";
2
- import a from "./index.es235.js";
2
+ import a from "./index.es234.js";
3
3
  var p = e && a(new DataView(new ArrayBuffer(8))), i = typeof Map < "u" && a(/* @__PURE__ */ new Map());
4
4
  export {
5
5
  p as hasStringTagBug,
@@ -1,5 +1,5 @@
1
1
  import c from "./index.es254.js";
2
- import n from "./index.es257.js";
2
+ import n from "./index.es256.js";
3
3
  function S(l, a, r) {
4
4
  var f = a[1][0] - a[0][0], m = a[1][1] - a[0][1], i = l.clipExtent && l.clipExtent();
5
5
  l.scale(150).translate([0, 0]), i != null && l.clipExtent(null), c(r, l.stream(n));
@@ -1,8 +1,19 @@
1
- import { abs as n, epsilon as r } from "./index.es240.js";
2
- function i(o, t) {
3
- return n(o[0] - t[0]) < r && n(o[1] - t[1]) < r;
1
+ import r from "./index.es255.js";
2
+ var o = 1 / 0, f = o, t = -o, a = t, d = {
3
+ point: u,
4
+ lineStart: r,
5
+ lineEnd: r,
6
+ polygonStart: r,
7
+ polygonEnd: r,
8
+ result: function() {
9
+ var n = [[o, f], [t, a]];
10
+ return t = a = -(f = o = 1 / 0), n;
11
+ }
12
+ };
13
+ function u(n, i) {
14
+ n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
4
15
  }
5
16
  export {
6
- i as default
17
+ d as default
7
18
  };
8
19
  //# sourceMappingURL=index.es256.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es256.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":";AAEA,SAAAA,EAAwBC,GAAGC,GAAG;AAC5B,SAAOC,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE,KAAWD,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE;AAC1D;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es256.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":";AAEA,IAAIA,IAAK,OACLC,IAAKD,GACLE,IAAK,CAACF,GACNG,IAAKD,GAELE,IAAe;AAAA,EACjB,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,SAASA;AAAA,EACT,cAAcA;AAAA,EACd,YAAYA;AAAA,EACZ,QAAQ,WAAW;AACb,QAAAC,IAAS,CAAC,CAACP,GAAIC,CAAE,GAAG,CAACC,GAAIC,CAAE,CAAC;AAC3B,WAAAD,IAAAC,IAAK,EAAEF,IAAKD,IAAK,QACfO;AAAA,EACT;AACF;AAEA,SAASF,EAAYG,GAAGC,GAAG;AACzB,EAAID,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM,IACbC,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM;AACnB;","x_google_ignoreList":[0]}
@@ -1,19 +1,8 @@
1
- import r from "./index.es255.js";
2
- var o = 1 / 0, f = o, t = -o, a = t, d = {
3
- point: u,
4
- lineStart: r,
5
- lineEnd: r,
6
- polygonStart: r,
7
- polygonEnd: r,
8
- result: function() {
9
- var n = [[o, f], [t, a]];
10
- return t = a = -(f = o = 1 / 0), n;
11
- }
12
- };
13
- function u(n, i) {
14
- n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
1
+ import { abs as n, epsilon as r } from "./index.es240.js";
2
+ function i(o, t) {
3
+ return n(o[0] - t[0]) < r && n(o[1] - t[1]) < r;
15
4
  }
16
5
  export {
17
- d as default
6
+ i as default
18
7
  };
19
8
  //# sourceMappingURL=index.es257.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es257.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":";AAEA,IAAIA,IAAK,OACLC,IAAKD,GACLE,IAAK,CAACF,GACNG,IAAKD,GAELE,IAAe;AAAA,EACjB,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,SAASA;AAAA,EACT,cAAcA;AAAA,EACd,YAAYA;AAAA,EACZ,QAAQ,WAAW;AACb,QAAAC,IAAS,CAAC,CAACP,GAAIC,CAAE,GAAG,CAACC,GAAIC,CAAE,CAAC;AAC3B,WAAAD,IAAAC,IAAK,EAAEF,IAAKD,IAAK,QACfO;AAAA,EACT;AACF;AAEA,SAASF,EAAYG,GAAGC,GAAG;AACzB,EAAID,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM,IACbC,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM;AACnB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es257.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":";AAEA,SAAAA,EAAwBC,GAAGC,GAAG;AAC5B,SAAOC,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE,KAAWD,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE;AAC1D;","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@performant-software/geospatial",
3
- "version": "2.2.8-beta.1",
3
+ "version": "2.2.8-beta.2",
4
4
  "description": "A package of components for all things map-related.",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.cjs.js",
@@ -31,9 +31,16 @@ const WarpedImageLayer = (props: Props) => {
31
31
 
32
32
  const mapRef = useMap();
33
33
 
34
+ /**
35
+ * Sets the "loaded" attribute on the state based on the current map state.
36
+ */
34
37
  useEffect(() => {
35
38
  const instance = mapRef?.current?.getMap();
36
- instance.on('load', () => setLoaded(true));
39
+ if (instance && instance.loaded()) {
40
+ setLoaded(true);
41
+ } else if (instance) {
42
+ instance.on('load', () => setLoaded(true));
43
+ }
37
44
  }, []);
38
45
 
39
46
  /**
@@ -31,9 +31,16 @@ const WarpedImageLayer = (props: Props) => {
31
31
 
32
32
  const mapRef = useMap();
33
33
 
34
+ /**
35
+ * Sets the "loaded" attribute on the state based on the current map state.
36
+ */
34
37
  useEffect(() => {
35
38
  const instance = mapRef?.current?.getMap();
36
- instance.on('load', () => setLoaded(true));
39
+ if (instance && instance.loaded()) {
40
+ setLoaded(true);
41
+ } else if (instance) {
42
+ instance.on('load', () => setLoaded(true));
43
+ }
37
44
  }, []);
38
45
 
39
46
  /**