@opensystemslab/map 0.8.3 → 1.0.0-alpha.0

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/index.html CHANGED
@@ -41,11 +41,20 @@
41
41
 
42
42
  <body style="font-family:Inter,Helvetica,sans-serif;">
43
43
  <div style="display:flex;flex-direction:column;">
44
- <h1 style="color:red;font-size:16px;">*** This is a testing sandbox - these components are unaware of each other!
45
- ***</h1>
44
+ <h1 style="color:red;font-size:16px;">
45
+ *** This is a testing sandbox - these components are unaware of each other!***
46
+ </h1>
46
47
  <div style="margin-bottom:1em">
47
- <my-map zoom="20" maxZoom="23" id="example-map" drawMode useScaleBarStyle showScale showNorthArrow showPrint
48
- osProxyEndpoint="https://api.editor.planx.dev/proxy/ordnance-survey" ariaLabelOlFixedOverlay="Interactive example map" />
48
+ <my-map
49
+ id="example-map"
50
+ ariaLabelOlFixedOverlay="Interactive example map"
51
+ zoom="20"
52
+ maxZoom="23"
53
+ drawMode
54
+ drawMany
55
+ osCopyright="© Crown copyright and database rights 2024 OS (0)100024857"
56
+ osProxyEndpoint="https://api.editor.planx.dev/proxy/ordnance-survey"
57
+ />
49
58
  </div>
50
59
  <div style="margin-bottom:1em">
51
60
  <postcode-search hintText="Optional hint text shows up here" id="example-postcode" />
@@ -67,7 +76,6 @@
67
76
  <script>
68
77
  // --- MAP --- //
69
78
  const map = document.querySelector("my-map");
70
- map.geojsonDataCopyright = `<a href="https://www.planning.data.gov.uk/dataset/title-boundary" target="_blank">Title boundary</a> subject to Crown copyright and database rights ${new Date().getFullYear()} OS (0)100026316`;
71
79
  map.clipGeojsonData = {
72
80
  "type": "Feature",
73
81
  "geometry": {
@@ -104,9 +112,6 @@
104
112
  });
105
113
 
106
114
  // applicable when drawMode is enabled
107
- map.addEventListener("areaChange", ({ detail: area }) => {
108
- console.debug({ area });
109
- });
110
115
  map.addEventListener("geojsonChange", ({ detail: geojson }) => {
111
116
  console.debug({ geojson });
112
117
  });
@@ -13,10 +13,8 @@ function Pe(a, n) {
13
13
  }, Pe(a, n);
14
14
  }
15
15
  function zt() {
16
- if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
17
- return !1;
18
- if (typeof Proxy == "function")
19
- return !0;
16
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
17
+ if (typeof Proxy == "function") return !0;
20
18
  try {
21
19
  return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
22
20
  })), !0;
@@ -36,28 +34,22 @@ function M(a) {
36
34
  return Gt(a) || Wt(a) || Bt(a) || $t();
37
35
  }
38
36
  function Gt(a) {
39
- if (Array.isArray(a))
40
- return Fe(a);
37
+ if (Array.isArray(a)) return Fe(a);
41
38
  }
42
39
  function Wt(a) {
43
- if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null)
44
- return Array.from(a);
40
+ if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
45
41
  }
46
42
  function Bt(a, n) {
47
43
  if (a) {
48
- if (typeof a == "string")
49
- return Fe(a, n);
44
+ if (typeof a == "string") return Fe(a, n);
50
45
  var o = Object.prototype.toString.call(a).slice(8, -1);
51
- if (o === "Object" && a.constructor && (o = a.constructor.name), o === "Map" || o === "Set")
52
- return Array.from(a);
53
- if (o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))
54
- return Fe(a, n);
46
+ if (o === "Object" && a.constructor && (o = a.constructor.name), o === "Map" || o === "Set") return Array.from(a);
47
+ if (o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return Fe(a, n);
55
48
  }
56
49
  }
57
50
  function Fe(a, n) {
58
51
  (n == null || n > a.length) && (n = a.length);
59
- for (var o = 0, s = new Array(n); o < n; o++)
60
- s[o] = a[o];
52
+ for (var o = 0, s = new Array(n); o < n; o++) s[o] = a[o];
61
53
  return s;
62
54
  }
63
55
  function $t() {
@@ -338,8 +330,7 @@ function _t() {
338
330
  !(ot(e) && (f.tagNameCheck instanceof RegExp && _(f.tagNameCheck, e) || f.tagNameCheck instanceof Function && f.tagNameCheck(e)) && (f.attributeNameCheck instanceof RegExp && _(f.attributeNameCheck, t) || f.attributeNameCheck instanceof Function && f.attributeNameCheck(t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
339
331
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
340
332
  t === "is" && f.allowCustomizedBuiltInElements && (f.tagNameCheck instanceof RegExp && _(f.tagNameCheck, r) || f.tagNameCheck instanceof Function && f.tagNameCheck(r)))
341
- )
342
- return !1;
333
+ ) return !1;
343
334
  } else if (!be[t]) {
344
335
  if (!_(_e, L(r, ze, ""))) {
345
336
  if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Zt(r, "data:") === 0 && qe[e])) {