gis-leaflet-helper 3.2.17 → 3.2.18
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/gis-leaflet-helper.es.js +179 -175
- package/dist/gis-leaflet-helper.umd.js +4 -4
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var zl = (t, n, r) => n in t ? Fl(t, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[n] = r;
|
|
3
3
|
var Lt = (t, n, r) => zl(t, typeof n != "symbol" ? n + "" : n, r);
|
|
4
4
|
import * as Nl from "gis-common";
|
|
5
|
-
import { Color as
|
|
5
|
+
import { Color as lh, CoordsUtil as Wn, Util as Oh, DomUtil as uh, ArrayUtil as xo, StringUtil as Ul } from "gis-common";
|
|
6
6
|
var Xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7
7
|
function Zl(t) {
|
|
8
8
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
@@ -31,9 +31,9 @@ var or = { exports: {} };
|
|
|
31
31
|
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
32
32
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
33
33
|
*/
|
|
34
|
-
var
|
|
35
|
-
function
|
|
36
|
-
return
|
|
34
|
+
var ch;
|
|
35
|
+
function Ih() {
|
|
36
|
+
return ch || (ch = 1, function(t, n) {
|
|
37
37
|
(function(r, u) {
|
|
38
38
|
u(n);
|
|
39
39
|
})(Xn, function(r) {
|
|
@@ -6341,7 +6341,7 @@ function Oh() {
|
|
|
6341
6341
|
});
|
|
6342
6342
|
}(or, or.exports)), or.exports;
|
|
6343
6343
|
}
|
|
6344
|
-
var U =
|
|
6344
|
+
var U = Ih();
|
|
6345
6345
|
(function(t) {
|
|
6346
6346
|
typeof define == "function" && define.amd ? define(t) : t();
|
|
6347
6347
|
})(function() {
|
|
@@ -7313,7 +7313,7 @@ var U = Oh();
|
|
|
7313
7313
|
});
|
|
7314
7314
|
});
|
|
7315
7315
|
(() => {
|
|
7316
|
-
var
|
|
7316
|
+
var oh, hh;
|
|
7317
7317
|
var t = Object.create, n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, u = Object.getOwnPropertyNames, d = Object.getPrototypeOf, f = Object.prototype.hasOwnProperty, p = (i, s) => () => (s || i((s = { exports: {} }).exports, s), s.exports), g = (i, s, o, h) => {
|
|
7318
7318
|
if (s && typeof s == "object" || typeof s == "function") for (let c of u(s)) !f.call(i, c) && c !== o && n(i, c, { get: () => s[c], enumerable: !(h = r(s, c)) || h.enumerable });
|
|
7319
7319
|
return i;
|
|
@@ -11188,7 +11188,7 @@ var U = Oh();
|
|
|
11188
11188
|
Lt(this, "root", null);
|
|
11189
11189
|
Lt(this, "compare");
|
|
11190
11190
|
Lt(this, "validKey");
|
|
11191
|
-
Lt(this,
|
|
11191
|
+
Lt(this, oh, "[object Set]");
|
|
11192
11192
|
this.compare = o ?? this.defaultCompare(), this.validKey = h ?? ((c) => c != null && c != null);
|
|
11193
11193
|
}
|
|
11194
11194
|
delete(o) {
|
|
@@ -11310,7 +11310,7 @@ var U = Oh();
|
|
|
11310
11310
|
values() {
|
|
11311
11311
|
return this[Symbol.iterator]();
|
|
11312
11312
|
}
|
|
11313
|
-
[(
|
|
11313
|
+
[(hh = Symbol.iterator, oh = Symbol.toStringTag, hh)]() {
|
|
11314
11314
|
return new wt(this.wrap());
|
|
11315
11315
|
}
|
|
11316
11316
|
}, pt = class {
|
|
@@ -11393,7 +11393,7 @@ var U = Oh();
|
|
|
11393
11393
|
if (c.isZero()) return null;
|
|
11394
11394
|
let m = { x: o.x.minus(i.x), y: o.y.minus(i.y) }, y = Vn(m, s).div(c), A = Vn(m, h).div(c), b = i.x.plus(A.times(s.x)), P = o.x.plus(y.times(h.x)), N = i.y.plus(A.times(s.y)), G = o.y.plus(y.times(h.y)), tt = b.plus(P).div(2), it = N.plus(G).div(2);
|
|
11395
11395
|
return { x: tt, y: it };
|
|
11396
|
-
}, Xe = class
|
|
11396
|
+
}, Xe = class Rh {
|
|
11397
11397
|
constructor(s, o) {
|
|
11398
11398
|
Lt(this, "point");
|
|
11399
11399
|
Lt(this, "isLeft");
|
|
@@ -11403,7 +11403,7 @@ var U = Oh();
|
|
|
11403
11403
|
s.events === void 0 ? s.events = [this] : s.events.push(this), this.point = s, this.isLeft = o;
|
|
11404
11404
|
}
|
|
11405
11405
|
static compare(s, o) {
|
|
11406
|
-
let h =
|
|
11406
|
+
let h = Rh.comparePoints(s.point, o.point);
|
|
11407
11407
|
return h !== 0 ? h : (s.point !== o.point && s.link(o), s.isLeft !== o.isLeft ? s.isLeft ? 1 : -1 : ji.compare(s.segment, o.segment));
|
|
11408
11408
|
}
|
|
11409
11409
|
static comparePoints(s, o) {
|
|
@@ -11686,7 +11686,7 @@ var U = Oh();
|
|
|
11686
11686
|
}
|
|
11687
11687
|
return i;
|
|
11688
11688
|
}
|
|
11689
|
-
},
|
|
11689
|
+
}, th = class {
|
|
11690
11690
|
constructor(i, s) {
|
|
11691
11691
|
Lt(this, "isSubject");
|
|
11692
11692
|
Lt(this, "polys");
|
|
@@ -11794,7 +11794,7 @@ var U = Oh();
|
|
|
11794
11794
|
o = h.prevInResult(), h = o ? o.prevInResult() : null;
|
|
11795
11795
|
}
|
|
11796
11796
|
}
|
|
11797
|
-
},
|
|
11797
|
+
}, eh = class {
|
|
11798
11798
|
constructor(i) {
|
|
11799
11799
|
Lt(this, "exteriorRing");
|
|
11800
11800
|
Lt(this, "interiorRings");
|
|
@@ -11832,10 +11832,10 @@ var U = Oh();
|
|
|
11832
11832
|
let s = [];
|
|
11833
11833
|
for (let h = 0, c = i.length; h < c; h++) {
|
|
11834
11834
|
let m = i[h];
|
|
11835
|
-
if (!m.poly) if (m.isExteriorRing()) s.push(new
|
|
11835
|
+
if (!m.poly) if (m.isExteriorRing()) s.push(new eh(m));
|
|
11836
11836
|
else {
|
|
11837
11837
|
let y = m.enclosingRing();
|
|
11838
|
-
y != null && y.poly || s.push(new
|
|
11838
|
+
y != null && y.poly || s.push(new eh(y)), (o = y == null ? void 0 : y.poly) == null || o.addInterior(m);
|
|
11839
11839
|
}
|
|
11840
11840
|
}
|
|
11841
11841
|
return s;
|
|
@@ -11914,8 +11914,8 @@ var U = Oh();
|
|
|
11914
11914
|
}
|
|
11915
11915
|
run(i, s, o) {
|
|
11916
11916
|
Zs.type = i;
|
|
11917
|
-
let h = [new
|
|
11918
|
-
for (let b = 0, P = o.length; b < P; b++) h.push(new
|
|
11917
|
+
let h = [new th(s, !0)];
|
|
11918
|
+
for (let b = 0, P = o.length; b < P; b++) h.push(new th(o[b], !1));
|
|
11919
11919
|
if (Zs.numMultiPolys = h.length, Zs.type === "difference") {
|
|
11920
11920
|
let b = h[0], P = 1;
|
|
11921
11921
|
for (; P < h.length; ) Ns(h[P].bbox, b.bbox) !== null ? P++ : h.splice(P, 1);
|
|
@@ -11951,7 +11951,7 @@ var U = Oh();
|
|
|
11951
11951
|
function sr(i) {
|
|
11952
11952
|
return i.type === "Feature" ? i.geometry : i;
|
|
11953
11953
|
}
|
|
11954
|
-
function
|
|
11954
|
+
function ih(i) {
|
|
11955
11955
|
return i && i.geometry && i.geometry.coordinates ? i.geometry.coordinates : i;
|
|
11956
11956
|
}
|
|
11957
11957
|
function vl(i) {
|
|
@@ -11960,26 +11960,26 @@ var U = Oh();
|
|
|
11960
11960
|
function Ml(i) {
|
|
11961
11961
|
return nr({ type: "MultiLineString", coordinates: i });
|
|
11962
11962
|
}
|
|
11963
|
-
function
|
|
11963
|
+
function nh(i) {
|
|
11964
11964
|
return nr({ type: "Polygon", coordinates: i });
|
|
11965
11965
|
}
|
|
11966
|
-
function
|
|
11966
|
+
function sh(i) {
|
|
11967
11967
|
return nr({ type: "MultiPolygon", coordinates: i });
|
|
11968
11968
|
}
|
|
11969
11969
|
function xl(i, s) {
|
|
11970
11970
|
let o = sr(i), h = sr(s), c = yl(o.coordinates, h.coordinates);
|
|
11971
|
-
return c.length === 0 ? null : c.length === 1 ?
|
|
11971
|
+
return c.length === 0 ? null : c.length === 1 ? nh(c[0]) : sh(c);
|
|
11972
11972
|
}
|
|
11973
11973
|
function Ll(i, s) {
|
|
11974
11974
|
let o = sr(i), h = sr(s), c = Al(o.coordinates, h.coordinates);
|
|
11975
|
-
return c.length === 0 ? null : c.length === 1 ?
|
|
11975
|
+
return c.length === 0 ? null : c.length === 1 ? nh(c[0]) : sh(c);
|
|
11976
11976
|
}
|
|
11977
|
-
function
|
|
11978
|
-
return Array.isArray(i) ? 1 +
|
|
11977
|
+
function ah(i) {
|
|
11978
|
+
return Array.isArray(i) ? 1 + ah(i[0]) : -1;
|
|
11979
11979
|
}
|
|
11980
11980
|
function bl(i) {
|
|
11981
11981
|
i instanceof L.Polyline && (i = i.toGeoJSON(15));
|
|
11982
|
-
let s =
|
|
11982
|
+
let s = ih(i), o = ah(s), h = [];
|
|
11983
11983
|
return o > 1 ? s.forEach((c) => {
|
|
11984
11984
|
h.push(vl(c));
|
|
11985
11985
|
}) : h.push(i), h;
|
|
@@ -11987,7 +11987,7 @@ var U = Oh();
|
|
|
11987
11987
|
function wl(i) {
|
|
11988
11988
|
let s = [];
|
|
11989
11989
|
return i.eachLayer((o) => {
|
|
11990
|
-
s.push(
|
|
11990
|
+
s.push(ih(o.toGeoJSON(15)));
|
|
11991
11991
|
}), Ml(s);
|
|
11992
11992
|
}
|
|
11993
11993
|
ue.Cut = ue.Polygon.extend({ initialize(i) {
|
|
@@ -12189,12 +12189,12 @@ var U = Oh();
|
|
|
12189
12189
|
function kl(i, s, o, h) {
|
|
12190
12190
|
return o.unproject(s.transform(o.project(i, h)), h);
|
|
12191
12191
|
}
|
|
12192
|
-
function
|
|
12192
|
+
function rh(i, s, o) {
|
|
12193
12193
|
let h = o.getMaxZoom();
|
|
12194
12194
|
if (h === 1 / 0 && (h = o.getZoom()), L.Util.isArray(i)) {
|
|
12195
12195
|
let c = [];
|
|
12196
12196
|
return i.forEach((m) => {
|
|
12197
|
-
c.push(
|
|
12197
|
+
c.push(rh(m, s, o));
|
|
12198
12198
|
}), c;
|
|
12199
12199
|
}
|
|
12200
12200
|
return i instanceof L.LatLng ? kl(i, s, o, h) : null;
|
|
@@ -12239,7 +12239,7 @@ var U = Oh();
|
|
|
12239
12239
|
this._rotationLayer.pm._rotateOrgLatLng = qe(this._rotationLayer), this._fireRotationEnd(this._rotationLayer, i, s), this._fireRotationEnd(this._map, i, s), this._rotationLayer.pm._fireEdit(this._rotationLayer, "Rotation"), this._preventRenderingMarkers(!1), this._layerRotated = !0;
|
|
12240
12240
|
}, _rotateLayer(i, s, o, h, c) {
|
|
12241
12241
|
let m = $n(c, o);
|
|
12242
|
-
return this._matrix = h.clone().rotate(i, m).flip(),
|
|
12242
|
+
return this._matrix = h.clone().rotate(i, m).flip(), rh(s, this._matrix, c);
|
|
12243
12243
|
}, _setAngle(i) {
|
|
12244
12244
|
i = i < 0 ? i + 360 : i, this._angle = i % 360;
|
|
12245
12245
|
}, _getRotationCenter() {
|
|
@@ -13056,13 +13056,14 @@ const Hl = {
|
|
|
13056
13056
|
lng: "经度",
|
|
13057
13057
|
lat: "纬度"
|
|
13058
13058
|
}
|
|
13059
|
-
},
|
|
13059
|
+
}, Gh = U.Control.extend({
|
|
13060
13060
|
options: {
|
|
13061
13061
|
position: "bottomleft",
|
|
13062
13062
|
coordinateUnit: "decimal",
|
|
13063
13063
|
showCoordinate: !0,
|
|
13064
13064
|
showLevel: !0,
|
|
13065
|
-
showFPS: !0
|
|
13065
|
+
showFPS: !0,
|
|
13066
|
+
precision: 6
|
|
13066
13067
|
},
|
|
13067
13068
|
initialize(t) {
|
|
13068
13069
|
U.setOptions(this, t), this.lastTime = +/* @__PURE__ */ new Date(), this.frames = 0, U.Control.prototype.initialize.call(this, this.options);
|
|
@@ -13082,9 +13083,9 @@ const Hl = {
|
|
|
13082
13083
|
getCoordinate(t, n = "lng") {
|
|
13083
13084
|
switch (this.options.coordinateUnit) {
|
|
13084
13085
|
case "decimal":
|
|
13085
|
-
return t.toFixed(
|
|
13086
|
+
return t.toFixed(this.options.precision);
|
|
13086
13087
|
case "radian":
|
|
13087
|
-
return (t * Math.PI / 180).toFixed(
|
|
13088
|
+
return (t * Math.PI / 180).toFixed(this.options.precision);
|
|
13088
13089
|
case "degrees":
|
|
13089
13090
|
return this._formatDeg(t, n);
|
|
13090
13091
|
}
|
|
@@ -13103,7 +13104,7 @@ const Hl = {
|
|
|
13103
13104
|
}
|
|
13104
13105
|
requestAnimationFrame(this.calcFPS.bind(this));
|
|
13105
13106
|
}
|
|
13106
|
-
}),
|
|
13107
|
+
}), Fh = U.Control.extend({
|
|
13107
13108
|
includes: U.Evented ? U.Evented.prototype : U.Mixin.Events,
|
|
13108
13109
|
options: {
|
|
13109
13110
|
position: "bottomright",
|
|
@@ -13255,7 +13256,7 @@ const Hl = {
|
|
|
13255
13256
|
const t = { minimized: this._minimized };
|
|
13256
13257
|
this.fire(this._minimized ? "minimize" : "restore", t), this.fire("toggle", t);
|
|
13257
13258
|
}
|
|
13258
|
-
}),
|
|
13259
|
+
}), zh = L.FeatureGroup.extend({
|
|
13259
13260
|
initialize(t, n) {
|
|
13260
13261
|
this.markers = [], L.Util.setOptions(this, n);
|
|
13261
13262
|
const r = typeof this.options.cssClass == "string" ? this.options.cssClass : "vertex-marker", u = this.options.iconSize !== void 0 ? this.options.iconSize : [24, 24], d = this.options.iconAnchor !== void 0 ? this.options.iconAnchor : [12, 12], f = this.options.textFn, p = typeof this.options.firstVertex == "boolean" ? this.options.firstVertex : !0, g = typeof this.options.lastVertex == "boolean" ? this.options.lastVertex : !0;
|
|
@@ -13305,7 +13306,7 @@ class dr extends L[L.Layer ? "Layer" : "Class"] {
|
|
|
13305
13306
|
}
|
|
13306
13307
|
U.Map.addInitHook(function() {
|
|
13307
13308
|
var t, n, r;
|
|
13308
|
-
this.pm && this.pm.setLang(this.options.lang.split("_")[0]), (t = this.options.eagleMapControl) != null && t.show && (this.eagleMapControl = new
|
|
13309
|
+
this.pm && this.pm.setLang(this.options.lang.split("_")[0]), (t = this.options.eagleMapControl) != null && t.show && (this.eagleMapControl = new Fh(this.options.eagleMapControl), this.addControl(this.eagleMapControl)), (n = this.options.statusBarControl) != null && n.show && (this.statusBarControl = new Gh(this.options.statusBarControl), this.addControl(this.statusBarControl)), (r = this.options.scaleControl) != null && r.show && (this.scaleControl = new U.Control.Scale(
|
|
13309
13310
|
Object.assign(
|
|
13310
13311
|
{
|
|
13311
13312
|
position: "bottomleft",
|
|
@@ -13361,7 +13362,7 @@ U.Map.include({
|
|
|
13361
13362
|
}
|
|
13362
13363
|
});
|
|
13363
13364
|
U.Path.addInitHook(function() {
|
|
13364
|
-
this.options.color && (this.color =
|
|
13365
|
+
this.options.color && (this.color = lh.from(this.options.color)), this.options.fillColor && (this.fillColor = lh.from(this.options.fillColor));
|
|
13365
13366
|
});
|
|
13366
13367
|
U.Polyline.addInitHook(function() {
|
|
13367
13368
|
this.options.showMeasurements && this.showMeasurements();
|
|
@@ -13424,7 +13425,7 @@ U.Polyline.include({
|
|
|
13424
13425
|
createVertexMarkers: function() {
|
|
13425
13426
|
if (this._map) {
|
|
13426
13427
|
var t = this.options.vertexMarkers || {};
|
|
13427
|
-
this._vertexMarkers === void 0 && this.options.vertexMarkers && (this._vertexMarkers = new
|
|
13428
|
+
this._vertexMarkers === void 0 && this.options.vertexMarkers && (this._vertexMarkers = new zh(this, t).addTo(this._map));
|
|
13428
13429
|
}
|
|
13429
13430
|
},
|
|
13430
13431
|
destroyVertexMarkers: function() {
|
|
@@ -13639,7 +13640,7 @@ function $l(t) {
|
|
|
13639
13640
|
t("EPSG:" + (32600 + n), "+proj=utm +zone=" + n + " +datum=WGS84 +units=m"), t("EPSG:" + (32700 + n), "+proj=utm +zone=" + n + " +south +datum=WGS84 +units=m");
|
|
13640
13641
|
t.WGS84 = t["EPSG:4326"], t["EPSG:3785"] = t["EPSG:3857"], t.GOOGLE = t["EPSG:3857"], t["EPSG:900913"] = t["EPSG:3857"], t["EPSG:102113"] = t["EPSG:3857"];
|
|
13641
13642
|
}
|
|
13642
|
-
var _n = 1, mn = 2, es = 3, Wl = 4, To = 5,
|
|
13643
|
+
var _n = 1, mn = 2, es = 3, Wl = 4, To = 5, dh = 6378137, Kl = 6356752314e-3, fh = 0.0066943799901413165, Ks = 484813681109536e-20, ut = Math.PI / 2, Xl = 0.16666666666666666, Yl = 0.04722222222222222, Jl = 0.022156084656084655, dt = 1e-10, ve = 0.017453292519943295, mi = 57.29577951308232, qt = Math.PI / 4, ta = Math.PI * 2, oe = 3.14159265359, Ne = {};
|
|
13643
13644
|
Ne.greenwich = 0;
|
|
13644
13645
|
Ne.lisbon = -9.131906111111;
|
|
13645
13646
|
Ne.paris = 2.337229166667;
|
|
@@ -13675,12 +13676,12 @@ const Ql = {
|
|
|
13675
13676
|
"us-in": { to_meter: 0.025400050800101 },
|
|
13676
13677
|
"us-yd": { to_meter: 0.914401828803658 }
|
|
13677
13678
|
};
|
|
13678
|
-
var
|
|
13679
|
+
var ph = /[\s_\-\/\(\)]/g;
|
|
13679
13680
|
function $i(t, n) {
|
|
13680
13681
|
if (t[n])
|
|
13681
13682
|
return t[n];
|
|
13682
|
-
for (var r = Object.keys(t), u = n.toLowerCase().replace(
|
|
13683
|
-
if (f = r[d], p = f.toLowerCase().replace(
|
|
13683
|
+
for (var r = Object.keys(t), u = n.toLowerCase().replace(ph, ""), d = -1, f, p; ++d < r.length; )
|
|
13684
|
+
if (f = r[d], p = f.toLowerCase().replace(ph, ""), p === u)
|
|
13684
13685
|
return t[f];
|
|
13685
13686
|
}
|
|
13686
13687
|
function Do(t) {
|
|
@@ -13792,7 +13793,7 @@ function Do(t) {
|
|
|
13792
13793
|
d = r[u], u in p ? (f = p[u], typeof f == "function" ? f(d) : n[f] = d) : n[u] = d;
|
|
13793
13794
|
return typeof n.datumCode == "string" && n.datumCode !== "WGS84" && (n.datumCode = n.datumCode.toLowerCase()), n;
|
|
13794
13795
|
}
|
|
13795
|
-
class
|
|
13796
|
+
class Nh {
|
|
13796
13797
|
static getId(n) {
|
|
13797
13798
|
const r = n.find((u) => Array.isArray(u) && u[0] === "ID");
|
|
13798
13799
|
return r && r.length >= 3 ? {
|
|
@@ -13960,12 +13961,12 @@ class zh {
|
|
|
13960
13961
|
return r;
|
|
13961
13962
|
}
|
|
13962
13963
|
}
|
|
13963
|
-
class tu extends
|
|
13964
|
+
class tu extends Nh {
|
|
13964
13965
|
static convert(n, r = {}) {
|
|
13965
13966
|
return super.convert(n, r), r.coordinate_system && r.coordinate_system.subtype === "Cartesian" && delete r.coordinate_system, r.usage && delete r.usage, r;
|
|
13966
13967
|
}
|
|
13967
13968
|
}
|
|
13968
|
-
class eu extends
|
|
13969
|
+
class eu extends Nh {
|
|
13969
13970
|
static convert(n, r = {}) {
|
|
13970
13971
|
super.convert(n, r);
|
|
13971
13972
|
const u = n.find((f) => Array.isArray(f) && f[0] === "CS");
|
|
@@ -13991,7 +13992,7 @@ function su(t) {
|
|
|
13991
13992
|
const n = t.toUpperCase();
|
|
13992
13993
|
return n.includes("PROJCRS") || n.includes("GEOGCRS") || n.includes("BOUNDCRS") || n.includes("VERTCRS") || n.includes("LENGTHUNIT") || n.includes("ANGLEUNIT") || n.includes("SCALEUNIT") ? "WKT2" : (n.includes("PROJCS") || n.includes("GEOGCS") || n.includes("LOCAL_CS") || n.includes("VERT_CS") || n.includes("UNIT"), "WKT1");
|
|
13993
13994
|
}
|
|
13994
|
-
var ea = 1,
|
|
13995
|
+
var ea = 1, Uh = 2, Zh = 3, gr = 4, jh = 5, Uo = -1, au = /\s/, ru = /[A-Za-z]/, ou = /[A-Za-z84_]/, Lr = /[,\]]/, Hh = /[\d\.E\-\+]/;
|
|
13995
13996
|
function Si(t) {
|
|
13996
13997
|
if (typeof t != "string")
|
|
13997
13998
|
throw new Error("not a string");
|
|
@@ -14008,13 +14009,13 @@ Si.prototype.readCharicter = function() {
|
|
|
14008
14009
|
switch (this.state) {
|
|
14009
14010
|
case ea:
|
|
14010
14011
|
return this.neutral(t);
|
|
14011
|
-
case
|
|
14012
|
+
case Uh:
|
|
14012
14013
|
return this.keyword(t);
|
|
14013
14014
|
case gr:
|
|
14014
14015
|
return this.quoted(t);
|
|
14015
|
-
case
|
|
14016
|
+
case jh:
|
|
14016
14017
|
return this.afterquote(t);
|
|
14017
|
-
case
|
|
14018
|
+
case Zh:
|
|
14018
14019
|
return this.number(t);
|
|
14019
14020
|
case Uo:
|
|
14020
14021
|
return;
|
|
@@ -14042,7 +14043,7 @@ Si.prototype.afterItem = function(t) {
|
|
|
14042
14043
|
}
|
|
14043
14044
|
};
|
|
14044
14045
|
Si.prototype.number = function(t) {
|
|
14045
|
-
if (
|
|
14046
|
+
if (Hh.test(t)) {
|
|
14046
14047
|
this.word += t;
|
|
14047
14048
|
return;
|
|
14048
14049
|
}
|
|
@@ -14054,7 +14055,7 @@ Si.prototype.number = function(t) {
|
|
|
14054
14055
|
};
|
|
14055
14056
|
Si.prototype.quoted = function(t) {
|
|
14056
14057
|
if (t === '"') {
|
|
14057
|
-
this.state =
|
|
14058
|
+
this.state = jh;
|
|
14058
14059
|
return;
|
|
14059
14060
|
}
|
|
14060
14061
|
this.word += t;
|
|
@@ -14077,15 +14078,15 @@ Si.prototype.keyword = function(t) {
|
|
|
14077
14078
|
};
|
|
14078
14079
|
Si.prototype.neutral = function(t) {
|
|
14079
14080
|
if (ru.test(t)) {
|
|
14080
|
-
this.word = t, this.state =
|
|
14081
|
+
this.word = t, this.state = Uh;
|
|
14081
14082
|
return;
|
|
14082
14083
|
}
|
|
14083
14084
|
if (t === '"') {
|
|
14084
14085
|
this.word = "", this.state = gr;
|
|
14085
14086
|
return;
|
|
14086
14087
|
}
|
|
14087
|
-
if (
|
|
14088
|
-
this.word = t, this.state =
|
|
14088
|
+
if (Hh.test(t)) {
|
|
14089
|
+
this.word = t, this.state = Zh;
|
|
14089
14090
|
return;
|
|
14090
14091
|
}
|
|
14091
14092
|
if (Lr.test(t)) {
|
|
@@ -14193,19 +14194,19 @@ var lu = 0.017453292519943295;
|
|
|
14193
14194
|
function ai(t) {
|
|
14194
14195
|
return t * lu;
|
|
14195
14196
|
}
|
|
14196
|
-
function
|
|
14197
|
+
function qh(t) {
|
|
14197
14198
|
const n = (t.projName || "").toLowerCase().replace(/_/g, " ");
|
|
14198
14199
|
!t.long0 && t.longc && (n === "albers conic equal area" || n === "lambert azimuthal equal area") && (t.long0 = t.longc), !t.lat_ts && t.lat1 && (n === "stereographic south pole" || n === "polar stereographic (variant b)") ? (t.lat0 = ai(t.lat1 > 0 ? 90 : -90), t.lat_ts = t.lat1, delete t.lat1) : !t.lat_ts && t.lat0 && (n === "polar stereographic" || n === "polar stereographic (variant a)") && (t.lat_ts = t.lat0, t.lat0 = ai(t.lat0 > 0 ? 90 : -90), delete t.lat1);
|
|
14199
14200
|
}
|
|
14200
|
-
function
|
|
14201
|
+
function _h(t) {
|
|
14201
14202
|
let n = { units: null, to_meter: void 0 };
|
|
14202
14203
|
return typeof t == "string" ? (n.units = t.toLowerCase(), n.units === "metre" && (n.units = "meter"), n.units === "meter" && (n.to_meter = 1)) : t && t.name && (n.units = t.name.toLowerCase(), n.units === "metre" && (n.units = "meter"), n.to_meter = t.conversion_factor), n;
|
|
14203
14204
|
}
|
|
14204
|
-
function
|
|
14205
|
+
function mh(t) {
|
|
14205
14206
|
return typeof t == "object" ? t.value * t.unit.conversion_factor : t;
|
|
14206
14207
|
}
|
|
14207
|
-
function
|
|
14208
|
-
t.ellipsoid.radius ? (n.a = t.ellipsoid.radius, n.rf = 0) : (n.a =
|
|
14208
|
+
function gh(t, n) {
|
|
14209
|
+
t.ellipsoid.radius ? (n.a = t.ellipsoid.radius, n.rf = 0) : (n.a = mh(t.ellipsoid.semi_major_axis), t.ellipsoid.inverse_flattening !== void 0 ? n.rf = t.ellipsoid.inverse_flattening : t.ellipsoid.semi_major_axis !== void 0 && t.ellipsoid.semi_minor_axis !== void 0 && (n.rf = n.a / (n.a - mh(t.ellipsoid.semi_minor_axis))));
|
|
14209
14210
|
}
|
|
14210
14211
|
function yr(t, n = {}) {
|
|
14211
14212
|
return !t || typeof t != "object" ? t : t.type === "BoundCRS" ? (yr(t.source_crs, n), t.transformation && (t.transformation.method && t.transformation.method.name === "NTv2" ? n.nadgrids = t.transformation.parameters[0].value : n.datum_params = t.transformation.parameters.map((r) => r.value)), n) : (Object.keys(t).forEach((r) => {
|
|
@@ -14222,10 +14223,10 @@ function yr(t, n = {}) {
|
|
|
14222
14223
|
break;
|
|
14223
14224
|
case "datum":
|
|
14224
14225
|
case "datum_ensemble":
|
|
14225
|
-
u.ellipsoid && (n.ellps = u.ellipsoid.name,
|
|
14226
|
+
u.ellipsoid && (n.ellps = u.ellipsoid.name, gh(u, n)), u.prime_meridian && (n.from_greenwich = u.prime_meridian.longitude * Math.PI / 180);
|
|
14226
14227
|
break;
|
|
14227
14228
|
case "ellipsoid":
|
|
14228
|
-
n.ellps = u.name,
|
|
14229
|
+
n.ellps = u.name, gh(u, n);
|
|
14229
14230
|
break;
|
|
14230
14231
|
case "prime_meridian":
|
|
14231
14232
|
n.long0 = (u.longitude || 0) * Math.PI / 180;
|
|
@@ -14240,10 +14241,10 @@ function yr(t, n = {}) {
|
|
|
14240
14241
|
if (f === "south") return "s";
|
|
14241
14242
|
throw new Error(`Unknown axis direction: ${f}`);
|
|
14242
14243
|
}).join("") + "u", u.unit) {
|
|
14243
|
-
const { units: d, to_meter: f } =
|
|
14244
|
+
const { units: d, to_meter: f } = _h(u.unit);
|
|
14244
14245
|
n.units = d, n.to_meter = f;
|
|
14245
14246
|
} else if (u.axis[0] && u.axis[0].unit) {
|
|
14246
|
-
const { units: d, to_meter: f } =
|
|
14247
|
+
const { units: d, to_meter: f } = _h(u.axis[0].unit);
|
|
14247
14248
|
n.units = d, n.to_meter = f;
|
|
14248
14249
|
}
|
|
14249
14250
|
}
|
|
@@ -14264,7 +14265,7 @@ function yr(t, n = {}) {
|
|
|
14264
14265
|
yr(u, n), n.datumCode = u.id ? u.id.authority + "_" + u.id.code : u.name;
|
|
14265
14266
|
break;
|
|
14266
14267
|
}
|
|
14267
|
-
}), n.latitude_of_false_origin !== void 0 && (n.lat0 = n.latitude_of_false_origin), n.longitude_of_false_origin !== void 0 && (n.long0 = n.longitude_of_false_origin), n.latitude_of_standard_parallel !== void 0 && (n.lat0 = n.latitude_of_standard_parallel, n.lat1 = n.latitude_of_standard_parallel), n.latitude_of_1st_standard_parallel !== void 0 && (n.lat1 = n.latitude_of_1st_standard_parallel), n.latitude_of_2nd_standard_parallel !== void 0 && (n.lat2 = n.latitude_of_2nd_standard_parallel), n.latitude_of_projection_centre !== void 0 && (n.lat0 = n.latitude_of_projection_centre), n.longitude_of_projection_centre !== void 0 && (n.longc = n.longitude_of_projection_centre), n.easting_at_false_origin !== void 0 && (n.x0 = n.easting_at_false_origin), n.northing_at_false_origin !== void 0 && (n.y0 = n.northing_at_false_origin), n.latitude_of_natural_origin !== void 0 && (n.lat0 = n.latitude_of_natural_origin), n.longitude_of_natural_origin !== void 0 && (n.long0 = n.longitude_of_natural_origin), n.longitude_of_origin !== void 0 && (n.long0 = n.longitude_of_origin), n.false_easting !== void 0 && (n.x0 = n.false_easting), n.easting_at_projection_centre && (n.x0 = n.easting_at_projection_centre), n.false_northing !== void 0 && (n.y0 = n.false_northing), n.northing_at_projection_centre && (n.y0 = n.northing_at_projection_centre), n.standard_parallel_1 !== void 0 && (n.lat1 = n.standard_parallel_1), n.standard_parallel_2 !== void 0 && (n.lat2 = n.standard_parallel_2), n.scale_factor_at_natural_origin !== void 0 && (n.k0 = n.scale_factor_at_natural_origin), n.scale_factor_at_projection_centre !== void 0 && (n.k0 = n.scale_factor_at_projection_centre), n.scale_factor_on_pseudo_standard_parallel !== void 0 && (n.k0 = n.scale_factor_on_pseudo_standard_parallel), n.azimuth !== void 0 && (n.alpha = n.azimuth), n.azimuth_at_projection_centre !== void 0 && (n.alpha = n.azimuth_at_projection_centre), n.angle_from_rectified_to_skew_grid && (n.rectified_grid_angle = n.angle_from_rectified_to_skew_grid),
|
|
14268
|
+
}), n.latitude_of_false_origin !== void 0 && (n.lat0 = n.latitude_of_false_origin), n.longitude_of_false_origin !== void 0 && (n.long0 = n.longitude_of_false_origin), n.latitude_of_standard_parallel !== void 0 && (n.lat0 = n.latitude_of_standard_parallel, n.lat1 = n.latitude_of_standard_parallel), n.latitude_of_1st_standard_parallel !== void 0 && (n.lat1 = n.latitude_of_1st_standard_parallel), n.latitude_of_2nd_standard_parallel !== void 0 && (n.lat2 = n.latitude_of_2nd_standard_parallel), n.latitude_of_projection_centre !== void 0 && (n.lat0 = n.latitude_of_projection_centre), n.longitude_of_projection_centre !== void 0 && (n.longc = n.longitude_of_projection_centre), n.easting_at_false_origin !== void 0 && (n.x0 = n.easting_at_false_origin), n.northing_at_false_origin !== void 0 && (n.y0 = n.northing_at_false_origin), n.latitude_of_natural_origin !== void 0 && (n.lat0 = n.latitude_of_natural_origin), n.longitude_of_natural_origin !== void 0 && (n.long0 = n.longitude_of_natural_origin), n.longitude_of_origin !== void 0 && (n.long0 = n.longitude_of_origin), n.false_easting !== void 0 && (n.x0 = n.false_easting), n.easting_at_projection_centre && (n.x0 = n.easting_at_projection_centre), n.false_northing !== void 0 && (n.y0 = n.false_northing), n.northing_at_projection_centre && (n.y0 = n.northing_at_projection_centre), n.standard_parallel_1 !== void 0 && (n.lat1 = n.standard_parallel_1), n.standard_parallel_2 !== void 0 && (n.lat2 = n.standard_parallel_2), n.scale_factor_at_natural_origin !== void 0 && (n.k0 = n.scale_factor_at_natural_origin), n.scale_factor_at_projection_centre !== void 0 && (n.k0 = n.scale_factor_at_projection_centre), n.scale_factor_on_pseudo_standard_parallel !== void 0 && (n.k0 = n.scale_factor_on_pseudo_standard_parallel), n.azimuth !== void 0 && (n.alpha = n.azimuth), n.azimuth_at_projection_centre !== void 0 && (n.alpha = n.azimuth_at_projection_centre), n.angle_from_rectified_to_skew_grid && (n.rectified_grid_angle = n.angle_from_rectified_to_skew_grid), qh(n), n);
|
|
14268
14269
|
}
|
|
14269
14270
|
var uu = [
|
|
14270
14271
|
"PROJECTEDCRS",
|
|
@@ -14283,10 +14284,10 @@ function cu(t, n) {
|
|
|
14283
14284
|
var r = n[0], u = n[1];
|
|
14284
14285
|
!(r in t) && u in t && (t[r] = t[u], n.length === 3 && (t[r] = n[2](t[r])));
|
|
14285
14286
|
}
|
|
14286
|
-
function
|
|
14287
|
+
function Vh(t) {
|
|
14287
14288
|
for (var n = Object.keys(t), r = 0, u = n.length; r < u; ++r) {
|
|
14288
14289
|
var d = n[r];
|
|
14289
|
-
uu.indexOf(d) !== -1 && du(t[d]), typeof t[d] == "object" &&
|
|
14290
|
+
uu.indexOf(d) !== -1 && du(t[d]), typeof t[d] == "object" && Vh(t[d]);
|
|
14290
14291
|
}
|
|
14291
14292
|
}
|
|
14292
14293
|
function du(t) {
|
|
@@ -14347,7 +14348,7 @@ function du(t) {
|
|
|
14347
14348
|
["alpha", "azimuth", ai],
|
|
14348
14349
|
["srsCode", "name"]
|
|
14349
14350
|
];
|
|
14350
|
-
B.forEach(M),
|
|
14351
|
+
B.forEach(M), qh(t);
|
|
14351
14352
|
}
|
|
14352
14353
|
function Oo(t) {
|
|
14353
14354
|
if (typeof t == "object")
|
|
@@ -14359,7 +14360,7 @@ function Oo(t) {
|
|
|
14359
14360
|
return yr(f);
|
|
14360
14361
|
}
|
|
14361
14362
|
var u = r[0], d = {};
|
|
14362
|
-
return Yn(r, d),
|
|
14363
|
+
return Yn(r, d), Vh(d), d[u];
|
|
14363
14364
|
}
|
|
14364
14365
|
function De(t) {
|
|
14365
14366
|
var n = this;
|
|
@@ -14428,7 +14429,7 @@ function vu(t) {
|
|
|
14428
14429
|
return Do(t);
|
|
14429
14430
|
} else return "projName" in t ? t : Oo(t);
|
|
14430
14431
|
}
|
|
14431
|
-
function
|
|
14432
|
+
function yh(t, n) {
|
|
14432
14433
|
t = t || {};
|
|
14433
14434
|
var r, u;
|
|
14434
14435
|
if (!n)
|
|
@@ -14496,42 +14497,42 @@ const wu = {
|
|
|
14496
14497
|
};
|
|
14497
14498
|
function Cu() {
|
|
14498
14499
|
}
|
|
14499
|
-
function
|
|
14500
|
+
function Ah(t) {
|
|
14500
14501
|
return t;
|
|
14501
14502
|
}
|
|
14502
14503
|
var Eu = ["longlat", "identity"];
|
|
14503
14504
|
const Pu = {
|
|
14504
14505
|
init: Cu,
|
|
14505
|
-
forward:
|
|
14506
|
-
inverse:
|
|
14506
|
+
forward: Ah,
|
|
14507
|
+
inverse: Ah,
|
|
14507
14508
|
names: Eu
|
|
14508
14509
|
};
|
|
14509
14510
|
var ku = [wu, Pu], pn = {}, Jn = [];
|
|
14510
|
-
function
|
|
14511
|
+
function $h(t, n) {
|
|
14511
14512
|
var r = Jn.length;
|
|
14512
14513
|
return t.names ? (Jn[r] = t, t.names.forEach(function(u) {
|
|
14513
14514
|
pn[u.toLowerCase()] = r;
|
|
14514
14515
|
}), this) : (console.log(n), !0);
|
|
14515
14516
|
}
|
|
14516
|
-
function
|
|
14517
|
+
function Wh(t) {
|
|
14517
14518
|
return t.replace(/[-\(\)\s]+/g, " ").trim().replace(/ /g, "_");
|
|
14518
14519
|
}
|
|
14519
14520
|
function Su(t) {
|
|
14520
14521
|
if (!t)
|
|
14521
14522
|
return !1;
|
|
14522
14523
|
var n = t.toLowerCase();
|
|
14523
|
-
if (typeof pn[n] < "u" && Jn[pn[n]] || (n =
|
|
14524
|
+
if (typeof pn[n] < "u" && Jn[pn[n]] || (n = Wh(n), n in pn && Jn[pn[n]]))
|
|
14524
14525
|
return Jn[pn[n]];
|
|
14525
14526
|
}
|
|
14526
14527
|
function Bu() {
|
|
14527
|
-
ku.forEach(
|
|
14528
|
+
ku.forEach($h);
|
|
14528
14529
|
}
|
|
14529
14530
|
const Tu = {
|
|
14530
14531
|
start: Bu,
|
|
14531
|
-
add:
|
|
14532
|
+
add: $h,
|
|
14532
14533
|
get: Su
|
|
14533
14534
|
};
|
|
14534
|
-
var
|
|
14535
|
+
var Kh = {
|
|
14535
14536
|
MERIT: {
|
|
14536
14537
|
a: 6378137,
|
|
14537
14538
|
rf: 298.257,
|
|
@@ -14754,7 +14755,7 @@ var Wh = {
|
|
|
14754
14755
|
ellipseName: "Normal Sphere (r=6370997)"
|
|
14755
14756
|
}
|
|
14756
14757
|
};
|
|
14757
|
-
const Du =
|
|
14758
|
+
const Du = Kh.WGS84;
|
|
14758
14759
|
function Ou(t, n, r, u) {
|
|
14759
14760
|
var d = t * t, f = n * n, p = (d - f) / d, g = 0;
|
|
14760
14761
|
u ? (t *= 1 - p * (Xl + p * (Yl + p * Jl)), d = t * t, p = 0) : g = Math.sqrt(p);
|
|
@@ -14767,7 +14768,7 @@ function Ou(t, n, r, u) {
|
|
|
14767
14768
|
}
|
|
14768
14769
|
function Iu(t, n, r, u, d) {
|
|
14769
14770
|
if (!t) {
|
|
14770
|
-
var f = $i(
|
|
14771
|
+
var f = $i(Kh, u);
|
|
14771
14772
|
f || (f = Du), t = f.a, n = f.b, r = f.rf;
|
|
14772
14773
|
}
|
|
14773
14774
|
return r && !n && (n = (1 - 1 / r) * t), (r === 0 || Math.abs(t - n) < dt) && (d = !0, n = t), {
|
|
@@ -16068,7 +16069,7 @@ function zu(t, n, r) {
|
|
|
16068
16069
|
}
|
|
16069
16070
|
async function Nu(t, n) {
|
|
16070
16071
|
for (var r = [], u = await n.getImageCount(), d = u - 1; d >= 0; d--) {
|
|
16071
|
-
var f = await n.getImage(d), p = await f.readRasters(), g = p, M = [f.getWidth(), f.getHeight()], B = f.getBoundingBox().map(
|
|
16072
|
+
var f = await n.getImage(d), p = await f.readRasters(), g = p, M = [f.getWidth(), f.getHeight()], B = f.getBoundingBox().map(vh), E = [f.fileDirectory.ModelPixelScale[0], f.fileDirectory.ModelPixelScale[1]].map(vh), x = B[0] + (M[0] - 1) * E[0], C = B[3] - (M[1] - 1) * E[1], T = g[0], F = g[1], Z = [];
|
|
16072
16073
|
for (let rt = M[1] - 1; rt >= 0; rt--)
|
|
16073
16074
|
for (let ct = M[0] - 1; ct >= 0; ct--) {
|
|
16074
16075
|
var K = rt * M[0] + ct;
|
|
@@ -16106,7 +16107,7 @@ function Zu(t) {
|
|
|
16106
16107
|
isNull: !1
|
|
16107
16108
|
};
|
|
16108
16109
|
}
|
|
16109
|
-
function
|
|
16110
|
+
function vh(t) {
|
|
16110
16111
|
return t * Math.PI / 180;
|
|
16111
16112
|
}
|
|
16112
16113
|
function qi(t) {
|
|
@@ -16211,14 +16212,14 @@ function oi(t, n) {
|
|
|
16211
16212
|
p.ep2,
|
|
16212
16213
|
g
|
|
16213
16214
|
);
|
|
16214
|
-
|
|
16215
|
+
yh(this, r), yh(this, u), this.a = f.a, this.b = f.b, this.rf = f.rf, this.sphere = f.sphere, this.es = p.es, this.e = p.e, this.ep2 = p.ep2, this.datum = M, "init" in this && typeof this.init == "function" && this.init(), n(null, this);
|
|
16215
16216
|
}
|
|
16216
16217
|
oi.projections = Tu;
|
|
16217
16218
|
oi.projections.start();
|
|
16218
16219
|
function Ku(t, n) {
|
|
16219
16220
|
return t.datum_type !== n.datum_type || t.a !== n.a || Math.abs(t.es - n.es) > 5e-11 ? !1 : t.datum_type === _n ? t.datum_params[0] === n.datum_params[0] && t.datum_params[1] === n.datum_params[1] && t.datum_params[2] === n.datum_params[2] : t.datum_type === mn ? t.datum_params[0] === n.datum_params[0] && t.datum_params[1] === n.datum_params[1] && t.datum_params[2] === n.datum_params[2] && t.datum_params[3] === n.datum_params[3] && t.datum_params[4] === n.datum_params[4] && t.datum_params[5] === n.datum_params[5] && t.datum_params[6] === n.datum_params[6] : !0;
|
|
16220
16221
|
}
|
|
16221
|
-
function
|
|
16222
|
+
function Xh(t, n, r) {
|
|
16222
16223
|
var u = t.x, d = t.y, f = t.z ? t.z : 0, p, g, M, B;
|
|
16223
16224
|
if (d < -ut && d > -1.001 * ut)
|
|
16224
16225
|
d = -ut;
|
|
@@ -16236,7 +16237,7 @@ function Kh(t, n, r) {
|
|
|
16236
16237
|
z: (p * (1 - n) + f) * g
|
|
16237
16238
|
};
|
|
16238
16239
|
}
|
|
16239
|
-
function
|
|
16240
|
+
function Yh(t, n, r, u) {
|
|
16240
16241
|
var d = 1e-12, f = d * d, p = 30, g, M, B, E, x, C, T, F, Z, K, at, rt, ct, yt = t.x, mt = t.y, xt = t.z ? t.z : 0, Dt, It, zt;
|
|
16241
16242
|
if (g = Math.sqrt(yt * yt + mt * mt), M = Math.sqrt(yt * yt + mt * mt + xt * xt), g / r < d) {
|
|
16242
16243
|
if (Dt = 0, M / r < d)
|
|
@@ -16297,22 +16298,22 @@ function Ju(t, n, r) {
|
|
|
16297
16298
|
return r;
|
|
16298
16299
|
var u = t.a, d = t.es;
|
|
16299
16300
|
if (t.datum_type === es) {
|
|
16300
|
-
var f =
|
|
16301
|
+
var f = Mh(t, !1, r);
|
|
16301
16302
|
if (f !== 0)
|
|
16302
16303
|
return;
|
|
16303
|
-
u =
|
|
16304
|
+
u = dh, d = fh;
|
|
16304
16305
|
}
|
|
16305
16306
|
var p = n.a, g = n.b, M = n.es;
|
|
16306
|
-
if (n.datum_type === es && (p =
|
|
16307
|
+
if (n.datum_type === es && (p = dh, g = Kl, M = fh), d === M && u === p && !hr(t.datum_type) && !hr(n.datum_type))
|
|
16307
16308
|
return r;
|
|
16308
|
-
if (r =
|
|
16309
|
-
var B =
|
|
16309
|
+
if (r = Xh(r, d, u), hr(t.datum_type) && (r = Xu(r, t.datum_type, t.datum_params)), hr(n.datum_type) && (r = Yu(r, n.datum_type, n.datum_params)), r = Yh(r, M, p, g), n.datum_type === es) {
|
|
16310
|
+
var B = Mh(n, !0, r);
|
|
16310
16311
|
if (B !== 0)
|
|
16311
16312
|
return;
|
|
16312
16313
|
}
|
|
16313
16314
|
return r;
|
|
16314
16315
|
}
|
|
16315
|
-
function
|
|
16316
|
+
function Mh(t, n, r) {
|
|
16316
16317
|
if (t.grids === null || t.grids.length === 0)
|
|
16317
16318
|
return console.log("Grid shift grids not found"), -1;
|
|
16318
16319
|
var u = { x: -r.x, y: r.y }, d = { x: Number.NaN, y: Number.NaN }, f = [];
|
|
@@ -16342,14 +16343,14 @@ function Qu(t, n, r) {
|
|
|
16342
16343
|
return u;
|
|
16343
16344
|
var d = { x: t.x, y: t.y };
|
|
16344
16345
|
d.x -= r.ll[0], d.y -= r.ll[1], d.x = _t(d.x - Math.PI) + Math.PI;
|
|
16345
|
-
var f =
|
|
16346
|
+
var f = xh(d, r);
|
|
16346
16347
|
if (n) {
|
|
16347
16348
|
if (isNaN(f.x))
|
|
16348
16349
|
return u;
|
|
16349
16350
|
f.x = d.x - f.x, f.y = d.y - f.y;
|
|
16350
16351
|
var p = 9, g = 1e-12, M, B;
|
|
16351
16352
|
do {
|
|
16352
|
-
if (B =
|
|
16353
|
+
if (B = xh(f, r), isNaN(B.x)) {
|
|
16353
16354
|
console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");
|
|
16354
16355
|
break;
|
|
16355
16356
|
}
|
|
@@ -16362,7 +16363,7 @@ function Qu(t, n, r) {
|
|
|
16362
16363
|
isNaN(f.x) || (u.x = t.x + f.x, u.y = t.y + f.y);
|
|
16363
16364
|
return u;
|
|
16364
16365
|
}
|
|
16365
|
-
function
|
|
16366
|
+
function xh(t, n) {
|
|
16366
16367
|
var r = { x: t.x / n.del[0], y: t.y / n.del[1] }, u = { x: Math.floor(r.x), y: Math.floor(r.y) }, d = { x: r.x - 1 * u.x, y: r.y - 1 * u.y }, f = { x: Number.NaN, y: Number.NaN }, p;
|
|
16367
16368
|
if (u.x < 0 || u.x >= n.lim[0] || u.y < 0 || u.y >= n.lim[1])
|
|
16368
16369
|
return f;
|
|
@@ -16376,7 +16377,7 @@ function Mh(t, n) {
|
|
|
16376
16377
|
var E = { x: n.cvs[p][0], y: n.cvs[p][1] }, x = d.x * d.y, C = d.x * (1 - d.y), T = (1 - d.x) * (1 - d.y), F = (1 - d.x) * d.y;
|
|
16377
16378
|
return f.x = T * g.x + C * M.x + F * E.x + x * B.x, f.y = T * g.y + C * M.y + F * E.y + x * B.y, f;
|
|
16378
16379
|
}
|
|
16379
|
-
function
|
|
16380
|
+
function Lh(t, n, r) {
|
|
16380
16381
|
var u = r.x, d = r.y, f = r.z || 0, p, g, M, B = {};
|
|
16381
16382
|
for (M = 0; M < 3; M++)
|
|
16382
16383
|
if (!(n && M === 2 && r.z === void 0))
|
|
@@ -16404,7 +16405,7 @@ function xh(t, n, r) {
|
|
|
16404
16405
|
}
|
|
16405
16406
|
return B;
|
|
16406
16407
|
}
|
|
16407
|
-
function
|
|
16408
|
+
function Jh(t) {
|
|
16408
16409
|
var n = {
|
|
16409
16410
|
x: t[0],
|
|
16410
16411
|
y: t[1]
|
|
@@ -16412,9 +16413,9 @@ function Yh(t) {
|
|
|
16412
16413
|
return t.length > 2 && (n.z = t[2]), t.length > 3 && (n.m = t[3]), n;
|
|
16413
16414
|
}
|
|
16414
16415
|
function tc(t) {
|
|
16415
|
-
|
|
16416
|
+
bh(t.x), bh(t.y);
|
|
16416
16417
|
}
|
|
16417
|
-
function
|
|
16418
|
+
function bh(t) {
|
|
16418
16419
|
if (typeof Number.isFinite == "function") {
|
|
16419
16420
|
if (Number.isFinite(t))
|
|
16420
16421
|
return;
|
|
@@ -16428,14 +16429,14 @@ function ec(t, n) {
|
|
|
16428
16429
|
}
|
|
16429
16430
|
function Ar(t, n, r, u) {
|
|
16430
16431
|
var d;
|
|
16431
|
-
Array.isArray(r) ? r =
|
|
16432
|
+
Array.isArray(r) ? r = Jh(r) : r = {
|
|
16432
16433
|
x: r.x,
|
|
16433
16434
|
y: r.y,
|
|
16434
16435
|
z: r.z,
|
|
16435
16436
|
m: r.m
|
|
16436
16437
|
};
|
|
16437
16438
|
var f = r.z !== void 0;
|
|
16438
|
-
if (tc(r), t.datum && n.datum && ec(t, n) && (d = new oi("WGS84"), r = Ar(t, d, r, u), t = d), u && t.axis !== "enu" && (r =
|
|
16439
|
+
if (tc(r), t.datum && n.datum && ec(t, n) && (d = new oi("WGS84"), r = Ar(t, d, r, u), t = d), u && t.axis !== "enu" && (r = Lh(t, !1, r)), t.projName === "longlat")
|
|
16439
16440
|
r = {
|
|
16440
16441
|
x: r.x * ve,
|
|
16441
16442
|
y: r.y * ve,
|
|
@@ -16461,9 +16462,9 @@ function Ar(t, n, r, u) {
|
|
|
16461
16462
|
x: r.x / n.to_meter,
|
|
16462
16463
|
y: r.y / n.to_meter,
|
|
16463
16464
|
z: r.z || 0
|
|
16464
|
-
})), u && n.axis !== "enu" ?
|
|
16465
|
+
})), u && n.axis !== "enu" ? Lh(n, !0, r) : (r && !f && delete r.z, r);
|
|
16465
16466
|
}
|
|
16466
|
-
var
|
|
16467
|
+
var wh = oi("WGS84");
|
|
16467
16468
|
function Co(t, n, r, u) {
|
|
16468
16469
|
var d, f, p;
|
|
16469
16470
|
return Array.isArray(r) ? (d = Ar(t, n, r, u) || { x: NaN, y: NaN }, r.length > 2 ? typeof t.name < "u" && t.name === "geocent" || typeof n.name < "u" && n.name === "geocent" ? typeof d.z == "number" ? (
|
|
@@ -16496,10 +16497,10 @@ function lr(t) {
|
|
|
16496
16497
|
}
|
|
16497
16498
|
function ic(t, n, r) {
|
|
16498
16499
|
var u, d, f = !1, p;
|
|
16499
|
-
return typeof n > "u" ? (d = lr(t), u =
|
|
16500
|
+
return typeof n > "u" ? (d = lr(t), u = wh, f = !0) : (typeof /** @type {?} */
|
|
16500
16501
|
n.x < "u" || Array.isArray(n)) && (r = /** @type {T} */
|
|
16501
16502
|
/** @type {?} */
|
|
16502
|
-
n, d = lr(t), u =
|
|
16503
|
+
n, d = lr(t), u = wh, f = !0), u || (u = lr(t)), d || (d = lr(
|
|
16503
16504
|
/** @type {string | PROJJSONDefinition | proj } */
|
|
16504
16505
|
n
|
|
16505
16506
|
)), r ? Co(u, d, r) : (p = {
|
|
@@ -16523,30 +16524,30 @@ function ic(t, n, r) {
|
|
|
16523
16524
|
}
|
|
16524
16525
|
}, f && (p.oProj = d), p);
|
|
16525
16526
|
}
|
|
16526
|
-
var
|
|
16527
|
+
var Ch = 6, Qh = "AJSAJS", tl = "AFAFAF", Qn = 65, Fe = 73, Je = 79, Vs = 86, $s = 90;
|
|
16527
16528
|
const nc = {
|
|
16528
|
-
forward:
|
|
16529
|
+
forward: el,
|
|
16529
16530
|
inverse: sc,
|
|
16530
|
-
toPoint:
|
|
16531
|
+
toPoint: il
|
|
16531
16532
|
};
|
|
16532
|
-
function
|
|
16533
|
+
function el(t, n) {
|
|
16533
16534
|
return n = n || 5, oc(ac({
|
|
16534
16535
|
lat: t[1],
|
|
16535
16536
|
lon: t[0]
|
|
16536
16537
|
}), n);
|
|
16537
16538
|
}
|
|
16538
16539
|
function sc(t) {
|
|
16539
|
-
var n = jo(
|
|
16540
|
+
var n = jo(sl(t.toUpperCase()));
|
|
16540
16541
|
return n.lat && n.lon ? [n.lon, n.lat, n.lon, n.lat] : [n.left, n.bottom, n.right, n.top];
|
|
16541
16542
|
}
|
|
16542
|
-
function
|
|
16543
|
-
var n = jo(
|
|
16543
|
+
function il(t) {
|
|
16544
|
+
var n = jo(sl(t.toUpperCase()));
|
|
16544
16545
|
return n.lat && n.lon ? [n.lon, n.lat] : [(n.left + n.right) / 2, (n.top + n.bottom) / 2];
|
|
16545
16546
|
}
|
|
16546
16547
|
function Eo(t) {
|
|
16547
16548
|
return t * (Math.PI / 180);
|
|
16548
16549
|
}
|
|
16549
|
-
function
|
|
16550
|
+
function Eh(t) {
|
|
16550
16551
|
return 180 * (t / Math.PI);
|
|
16551
16552
|
}
|
|
16552
16553
|
function ac(t) {
|
|
@@ -16567,9 +16568,9 @@ function jo(t) {
|
|
|
16567
16568
|
var f = 0.9996, p = 6378137, g = 669438e-8, M, B = (1 - Math.sqrt(1 - g)) / (1 + Math.sqrt(1 - g)), E, x, C, T, F, Z, K, at, rt, ct = r - 5e5, yt = n;
|
|
16568
16569
|
u < "N" && (yt -= 1e7), K = (d - 1) * 6 - 180 + 3, M = g / (1 - g), Z = yt / f, at = Z / (p * (1 - g / 4 - 3 * g * g / 64 - 5 * g * g * g / 256)), rt = at + (3 * B / 2 - 27 * B * B * B / 32) * Math.sin(2 * at) + (21 * B * B / 16 - 55 * B * B * B * B / 32) * Math.sin(4 * at) + 151 * B * B * B / 96 * Math.sin(6 * at), E = p / Math.sqrt(1 - g * Math.sin(rt) * Math.sin(rt)), x = Math.tan(rt) * Math.tan(rt), C = M * Math.cos(rt) * Math.cos(rt), T = p * (1 - g) / Math.pow(1 - g * Math.sin(rt) * Math.sin(rt), 1.5), F = ct / (E * f);
|
|
16569
16570
|
var mt = rt - E * Math.tan(rt) / T * (F * F / 2 - (5 + 3 * x + 10 * C - 4 * C * C - 9 * M) * F * F * F * F / 24 + (61 + 90 * x + 298 * C + 45 * x * x - 252 * M - 3 * C * C) * F * F * F * F * F * F / 720);
|
|
16570
|
-
mt =
|
|
16571
|
+
mt = Eh(mt);
|
|
16571
16572
|
var xt = (F - (1 + 2 * x + C) * F * F * F / 6 + (5 - 2 * C + 28 * x - 3 * C * C + 8 * M + 24 * x * x) * F * F * F * F * F / 120) / Math.cos(rt);
|
|
16572
|
-
xt = K +
|
|
16573
|
+
xt = K + Eh(xt);
|
|
16573
16574
|
var Dt;
|
|
16574
16575
|
if (t.accuracy) {
|
|
16575
16576
|
var It = jo({
|
|
@@ -16600,20 +16601,20 @@ function oc(t, n) {
|
|
|
16600
16601
|
return t.zoneNumber + t.zoneLetter + hc(t.easting, t.northing, t.zoneNumber) + r.substr(r.length - 5, n) + u.substr(u.length - 5, n);
|
|
16601
16602
|
}
|
|
16602
16603
|
function hc(t, n, r) {
|
|
16603
|
-
var u =
|
|
16604
|
+
var u = nl(r), d = Math.floor(t / 1e5), f = Math.floor(n / 1e5) % 20;
|
|
16604
16605
|
return lc(d, f, u);
|
|
16605
16606
|
}
|
|
16606
|
-
function
|
|
16607
|
-
var n = t %
|
|
16608
|
-
return n === 0 && (n =
|
|
16607
|
+
function nl(t) {
|
|
16608
|
+
var n = t % Ch;
|
|
16609
|
+
return n === 0 && (n = Ch), n;
|
|
16609
16610
|
}
|
|
16610
16611
|
function lc(t, n, r) {
|
|
16611
|
-
var u = r - 1, d =
|
|
16612
|
+
var u = r - 1, d = Qh.charCodeAt(u), f = tl.charCodeAt(u), p = d + t - 1, g = f + n, M = !1;
|
|
16612
16613
|
p > $s && (p = p - $s + Qn - 1, M = !0), (p === Fe || d < Fe && p > Fe || (p > Fe || d < Fe) && M) && p++, (p === Je || d < Je && p > Je || (p > Je || d < Je) && M) && (p++, p === Fe && p++), p > $s && (p = p - $s + Qn - 1), g > Vs ? (g = g - Vs + Qn - 1, M = !0) : M = !1, (g === Fe || f < Fe && g > Fe || (g > Fe || f < Fe) && M) && g++, (g === Je || f < Je && g > Je || (g > Je || f < Je) && M) && (g++, g === Fe && g++), g > Vs && (g = g - Vs + Qn - 1);
|
|
16613
16614
|
var B = String.fromCharCode(p) + String.fromCharCode(g);
|
|
16614
16615
|
return B;
|
|
16615
16616
|
}
|
|
16616
|
-
function
|
|
16617
|
+
function sl(t) {
|
|
16617
16618
|
if (t && t.length === 0)
|
|
16618
16619
|
throw "MGRSPoint coverting from nothing";
|
|
16619
16620
|
for (var n = t.length, r = null, u = "", d, f = 0; !/[A-Z]/.test(d = t.charAt(f)); ) {
|
|
@@ -16628,7 +16629,7 @@ function nl(t) {
|
|
|
16628
16629
|
if (g <= "A" || g === "B" || g === "Y" || g >= "Z" || g === "I" || g === "O")
|
|
16629
16630
|
throw "MGRSPoint zone letter " + g + " not handled: " + t;
|
|
16630
16631
|
r = t.substring(f, f += 2);
|
|
16631
|
-
for (var M =
|
|
16632
|
+
for (var M = nl(p), B = uc(r.charAt(0), M), E = cc(r.charAt(1), M); E < dc(g); )
|
|
16632
16633
|
E += 2e6;
|
|
16633
16634
|
var x = n - f;
|
|
16634
16635
|
if (x % 2 !== 0)
|
|
@@ -16646,7 +16647,7 @@ northing meters` + t;
|
|
|
16646
16647
|
};
|
|
16647
16648
|
}
|
|
16648
16649
|
function uc(t, n) {
|
|
16649
|
-
for (var r =
|
|
16650
|
+
for (var r = Qh.charCodeAt(n - 1), u = 1e5, d = !1; r !== t.charCodeAt(0); ) {
|
|
16650
16651
|
if (r++, r === Fe && r++, r === Je && r++, r > $s) {
|
|
16651
16652
|
if (d)
|
|
16652
16653
|
throw "Bad character: " + t;
|
|
@@ -16659,7 +16660,7 @@ function uc(t, n) {
|
|
|
16659
16660
|
function cc(t, n) {
|
|
16660
16661
|
if (t > "V")
|
|
16661
16662
|
throw "MGRSPoint given invalid Northing " + t;
|
|
16662
|
-
for (var r =
|
|
16663
|
+
for (var r = tl.charCodeAt(n - 1), u = 0, d = !1; r !== t.charCodeAt(0); ) {
|
|
16663
16664
|
if (r++, r === Fe && r++, r === Je && r++, r > Vs) {
|
|
16664
16665
|
if (d)
|
|
16665
16666
|
throw "Bad character: " + t;
|
|
@@ -16754,15 +16755,15 @@ function ns(t, n, r) {
|
|
|
16754
16755
|
console.warn("proj4.Point will be removed in version 3, use proj4.toPoint");
|
|
16755
16756
|
}
|
|
16756
16757
|
ns.fromMGRS = function(t) {
|
|
16757
|
-
return new ns(
|
|
16758
|
+
return new ns(il(t));
|
|
16758
16759
|
};
|
|
16759
16760
|
ns.prototype.toMGRS = function(t) {
|
|
16760
|
-
return
|
|
16761
|
+
return el([this.x, this.y], t);
|
|
16761
16762
|
};
|
|
16762
|
-
var fc = 1, pc = 0.25,
|
|
16763
|
+
var fc = 1, pc = 0.25, Ph = 0.046875, kh = 0.01953125, Sh = 0.01068115234375, _c = 0.75, mc = 0.46875, gc = 0.013020833333333334, yc = 0.007120768229166667, Ac = 0.3645833333333333, vc = 0.005696614583333333, Mc = 0.3076171875;
|
|
16763
16764
|
function Ho(t) {
|
|
16764
16765
|
var n = [];
|
|
16765
|
-
n[0] = fc - t * (pc + t * (
|
|
16766
|
+
n[0] = fc - t * (pc + t * (Ph + t * (kh + t * Sh))), n[1] = t * (_c - t * (Ph + t * (kh + t * Sh)));
|
|
16766
16767
|
var r = t * t;
|
|
16767
16768
|
return n[2] = r * (mc - t * (gc + t * yc)), r *= t, n[3] = r * (Ac - t * vc), n[4] = r * t * Mc, n;
|
|
16768
16769
|
}
|
|
@@ -16825,7 +16826,7 @@ const pr = {
|
|
|
16825
16826
|
inverse: wc,
|
|
16826
16827
|
names: Cc
|
|
16827
16828
|
};
|
|
16828
|
-
function
|
|
16829
|
+
function al(t) {
|
|
16829
16830
|
var n = Math.exp(t);
|
|
16830
16831
|
return n = (n - 1 / n) / 2, n;
|
|
16831
16832
|
}
|
|
@@ -16856,8 +16857,8 @@ function Sc(t) {
|
|
|
16856
16857
|
var n = Math.exp(t);
|
|
16857
16858
|
return n = (n + 1 / n) / 2, n;
|
|
16858
16859
|
}
|
|
16859
|
-
function
|
|
16860
|
-
for (var u = Math.sin(n), d = Math.cos(n), f =
|
|
16860
|
+
function rl(t, n, r) {
|
|
16861
|
+
for (var u = Math.sin(n), d = Math.cos(n), f = al(r), p = Sc(r), g = 2 * d * p, M = -2 * u * f, B = t.length - 1, E = t[B], x = 0, C = 0, T = 0, F, Z; --B >= 0; )
|
|
16861
16862
|
F = C, Z = x, C = E, x = T, E = -F + g * C - M * x + t[B], T = -Z + M * C + g * x;
|
|
16862
16863
|
return g = u * p, M = d * f, [g * E - M * T, g * T + M * E];
|
|
16863
16864
|
}
|
|
@@ -16875,7 +16876,7 @@ function Tc(t) {
|
|
|
16875
16876
|
r = Vo(this.cbg, r);
|
|
16876
16877
|
var u = Math.sin(r), d = Math.cos(r), f = Math.sin(n), p = Math.cos(n);
|
|
16877
16878
|
r = Math.atan2(u, p * d), n = Math.atan2(f * d, ze(u, d * p)), n = Pc(Math.tan(n));
|
|
16878
|
-
var g =
|
|
16879
|
+
var g = rl(this.gtu, 2 * r, 2 * n);
|
|
16879
16880
|
r = r + g[0], n = n + g[1];
|
|
16880
16881
|
var M, B;
|
|
16881
16882
|
return Math.abs(n) <= 2.623395162778 ? (M = this.a * (this.Qn * n) + this.x0, B = this.a * (this.Qn * r + this.Zb) + this.y0) : (M = 1 / 0, B = 1 / 0), t.x = M, t.y = B, t;
|
|
@@ -16885,8 +16886,8 @@ function Dc(t) {
|
|
|
16885
16886
|
r = (r - this.Zb) / this.Qn, n = n / this.Qn;
|
|
16886
16887
|
var u, d;
|
|
16887
16888
|
if (Math.abs(n) <= 2.623395162778) {
|
|
16888
|
-
var f =
|
|
16889
|
-
r = r + f[0], n = n + f[1], n = Math.atan(
|
|
16889
|
+
var f = rl(this.utg, 2 * r, 2 * n);
|
|
16890
|
+
r = r + f[0], n = n + f[1], n = Math.atan(al(n));
|
|
16890
16891
|
var p = Math.sin(r), g = Math.cos(r), M = Math.sin(n), B = Math.cos(n);
|
|
16891
16892
|
r = Math.atan2(p * B, ze(M, B * g)), n = Math.atan2(M, B * g), u = _t(n + this.long0), d = Vo(this.cgb, r);
|
|
16892
16893
|
} else
|
|
@@ -17029,7 +17030,7 @@ const sd = {
|
|
|
17029
17030
|
var Kn = 1e-7;
|
|
17030
17031
|
function ad(t) {
|
|
17031
17032
|
var n = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_variant_A", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"], r = typeof t.projName == "object" ? Object.keys(t.projName)[0] : t.projName;
|
|
17032
|
-
return "no_uoff" in t || "no_off" in t || n.indexOf(r) !== -1 || n.indexOf(
|
|
17033
|
+
return "no_uoff" in t || "no_off" in t || n.indexOf(r) !== -1 || n.indexOf(Wh(r)) !== -1;
|
|
17033
17034
|
}
|
|
17034
17035
|
function rd() {
|
|
17035
17036
|
var t, n, r, u, d, f, p, g, M, B, E = 0, x, C = 0, T = 0, F = 0, Z = 0, K = 0, at = 0;
|
|
@@ -17435,7 +17436,7 @@ const r0 = {
|
|
|
17435
17436
|
inverse: s0,
|
|
17436
17437
|
names: a0
|
|
17437
17438
|
};
|
|
17438
|
-
var
|
|
17439
|
+
var Bh = 20;
|
|
17439
17440
|
function o0() {
|
|
17440
17441
|
this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = aa(this.es), this.e1 = ra(this.es), this.e2 = oa(this.es), this.e3 = ha(this.es), this.ml0 = this.a * Oe(this.e0, this.e1, this.e2, this.e3, this.lat0);
|
|
17441
17442
|
}
|
|
@@ -17459,7 +17460,7 @@ function l0(t) {
|
|
|
17459
17460
|
else {
|
|
17460
17461
|
p = this.lat0 + d / this.a, g = u * u / this.a / this.a + p * p, M = p;
|
|
17461
17462
|
var E;
|
|
17462
|
-
for (f =
|
|
17463
|
+
for (f = Bh; f; --f)
|
|
17463
17464
|
if (E = Math.tan(M), B = -1 * (p * (M * E + 1) - M - 0.5 * (M * M + g) * E) / ((M - p) / E - 1), M += B, Math.abs(B) <= dt) {
|
|
17464
17465
|
r = M;
|
|
17465
17466
|
break;
|
|
@@ -17471,7 +17472,7 @@ function l0(t) {
|
|
|
17471
17472
|
else {
|
|
17472
17473
|
p = (this.ml0 + d) / this.a, g = u * u / this.a / this.a + p * p, M = p;
|
|
17473
17474
|
var x, C, T, F, Z;
|
|
17474
|
-
for (f =
|
|
17475
|
+
for (f = Bh; f; --f)
|
|
17475
17476
|
if (Z = this.e * Math.sin(M), x = Math.sqrt(1 - Z * Z) * Math.tan(M), C = this.a * Oe(this.e0, this.e1, this.e2, this.e3, M), T = this.e0 - 2 * this.e1 * Math.cos(2 * M) + 4 * this.e2 * Math.cos(4 * M) - 6 * this.e3 * Math.cos(6 * M), F = C / this.a, B = (p * (x * F + 1) - F - 0.5 * x * (F * F + g)) / (this.es * Math.sin(2 * M) * (F * F + g - 2 * p * F) / (4 * x) + (p - F) * (x * T - 2 / Math.sin(2 * M)) - T), M -= B, Math.abs(B) <= dt) {
|
|
17476
17477
|
r = M;
|
|
17477
17478
|
break;
|
|
@@ -17825,7 +17826,7 @@ var zo = [
|
|
|
17825
17826
|
[0.9394, 840947e-8, -192841e-9, -42106e-10],
|
|
17826
17827
|
[0.9761, 616527e-8, -256e-6, -42106e-10],
|
|
17827
17828
|
[1, 328947e-8, -319159e-9, -42106e-10]
|
|
17828
|
-
],
|
|
17829
|
+
], ol = 0.8487, hl = 1.3523, ll = mi / 5, of = 1 / ll, ts = 18, Mr = function(t, n) {
|
|
17829
17830
|
return t[0] + n * (t[1] + n * (t[2] + n * t[3]));
|
|
17830
17831
|
}, hf = function(t, n) {
|
|
17831
17832
|
return t[1] + n * (2 * t[2] + n * 3 * t[3]);
|
|
@@ -17842,18 +17843,18 @@ function uf() {
|
|
|
17842
17843
|
this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.es = 0, this.title = this.title || "Robinson";
|
|
17843
17844
|
}
|
|
17844
17845
|
function cf(t) {
|
|
17845
|
-
var n = _t(t.x - this.long0), r = Math.abs(t.y), u = Math.floor(r *
|
|
17846
|
+
var n = _t(t.x - this.long0), r = Math.abs(t.y), u = Math.floor(r * ll);
|
|
17846
17847
|
u < 0 ? u = 0 : u >= ts && (u = ts - 1), r = mi * (r - of * u);
|
|
17847
17848
|
var d = {
|
|
17848
17849
|
x: Mr(zo[u], r) * n,
|
|
17849
17850
|
y: Mr(Ws[u], r)
|
|
17850
17851
|
};
|
|
17851
|
-
return t.y < 0 && (d.y = -d.y), d.x = d.x * this.a *
|
|
17852
|
+
return t.y < 0 && (d.y = -d.y), d.x = d.x * this.a * ol + this.x0, d.y = d.y * this.a * hl + this.y0, d;
|
|
17852
17853
|
}
|
|
17853
17854
|
function df(t) {
|
|
17854
17855
|
var n = {
|
|
17855
|
-
x: (t.x - this.x0) / (this.a *
|
|
17856
|
-
y: Math.abs(t.y - this.y0) / (this.a *
|
|
17856
|
+
x: (t.x - this.x0) / (this.a * ol),
|
|
17857
|
+
y: Math.abs(t.y - this.y0) / (this.a * hl)
|
|
17857
17858
|
};
|
|
17858
17859
|
if (n.y >= 1)
|
|
17859
17860
|
n.x /= zo[ts][0], n.y = t.y < 0 ? -ut : ut;
|
|
@@ -17884,11 +17885,11 @@ function _f() {
|
|
|
17884
17885
|
this.name = "geocent";
|
|
17885
17886
|
}
|
|
17886
17887
|
function mf(t) {
|
|
17887
|
-
var n =
|
|
17888
|
+
var n = Xh(t, this.es, this.a);
|
|
17888
17889
|
return n;
|
|
17889
17890
|
}
|
|
17890
17891
|
function gf(t) {
|
|
17891
|
-
var n =
|
|
17892
|
+
var n = Yh(t, this.es, this.a, this.b);
|
|
17892
17893
|
return n;
|
|
17893
17894
|
}
|
|
17894
17895
|
var yf = ["Geocentric", "geocentric", "geocent", "Geocent"];
|
|
@@ -18110,27 +18111,27 @@ const Uf = {
|
|
|
18110
18111
|
function Zf(t) {
|
|
18111
18112
|
t.Proj.projections.add(pr), t.Proj.projections.add(_r), t.Proj.projections.add(zc), t.Proj.projections.add(Wc), t.Proj.projections.add(Qc), t.Proj.projections.add(sd), t.Proj.projections.add(ud), t.Proj.projections.add(_d), t.Proj.projections.add(vd), t.Proj.projections.add(wd), t.Proj.projections.add(Fd), t.Proj.projections.add(Hd), t.Proj.projections.add(Kd), t.Proj.projections.add(e0), t.Proj.projections.add(r0), t.Proj.projections.add(c0), t.Proj.projections.add(m0), t.Proj.projections.add(M0), t.Proj.projections.add(E0), t.Proj.projections.add(T0), t.Proj.projections.add(G0), t.Proj.projections.add(Z0), t.Proj.projections.add(K0), t.Proj.projections.add(tf), t.Proj.projections.add(rf), t.Proj.projections.add(pf), t.Proj.projections.add(Af), t.Proj.projections.add(bf), t.Proj.projections.add(kf), t.Proj.projections.add(Of), t.Proj.projections.add(Uf);
|
|
18112
18113
|
}
|
|
18113
|
-
const
|
|
18114
|
+
const ul = Object.assign(ic, {
|
|
18114
18115
|
defaultDatum: "WGS84",
|
|
18115
18116
|
Proj: oi,
|
|
18116
18117
|
WGS84: new oi("WGS84"),
|
|
18117
18118
|
Point: ns,
|
|
18118
|
-
toPoint:
|
|
18119
|
+
toPoint: Jh,
|
|
18119
18120
|
defs: De,
|
|
18120
18121
|
nadgrid: Fu,
|
|
18121
18122
|
transform: Ar,
|
|
18122
18123
|
mgrs: nc,
|
|
18123
18124
|
version: "__VERSION__"
|
|
18124
18125
|
});
|
|
18125
|
-
Zf(
|
|
18126
|
+
Zf(ul);
|
|
18126
18127
|
const jf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18127
18128
|
__proto__: null,
|
|
18128
|
-
default:
|
|
18129
|
+
default: ul
|
|
18129
18130
|
}, Symbol.toStringTag, { value: "Module" })), Hf = /* @__PURE__ */ jl(jf);
|
|
18130
18131
|
(function(t) {
|
|
18131
18132
|
(function(n) {
|
|
18132
18133
|
var r, u;
|
|
18133
|
-
r =
|
|
18134
|
+
r = Ih(), u = Hf, t.exports = n(r, u);
|
|
18134
18135
|
})(function(n, r) {
|
|
18135
18136
|
return r.__esModule && r.default && (r = r.default), n.Proj = {}, n.Proj._isProj4Obj = function(u) {
|
|
18136
18137
|
return typeof u.inverse < "u" && typeof u.forward < "u";
|
|
@@ -18244,7 +18245,7 @@ const jf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18244
18245
|
}, n.Proj;
|
|
18245
18246
|
});
|
|
18246
18247
|
})(Vl);
|
|
18247
|
-
const
|
|
18248
|
+
const cl = new U.Proj.CRS(
|
|
18248
18249
|
"EPSG:900913",
|
|
18249
18250
|
"+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",
|
|
18250
18251
|
{
|
|
@@ -18271,7 +18272,7 @@ const ul = new U.Proj.CRS(
|
|
|
18271
18272
|
offset: [6, 6]
|
|
18272
18273
|
},
|
|
18273
18274
|
initialize(t, n, r = {}) {
|
|
18274
|
-
this._latlng = t, this._enabled = !1, this.options.id = r.id || "text_" +
|
|
18275
|
+
this._latlng = t, this._enabled = !1, this.options.id = r.id || "text_" + Oh.guid(), this.options.text = n || "", r = Object.assign(this.options, r), U.setOptions(this, r);
|
|
18275
18276
|
const { id: u, fontSize: d, color: f, fontWeight: p, background: g, fontShadowColor: M, clsName: B, offset: E } = this.options;
|
|
18276
18277
|
this.options.icon = new U.DivIcon({
|
|
18277
18278
|
html: `<span id=${u} class="leaflet-text-label" style="font-weight:${p};font-size:${d};color:${f};background:${g};text-shadow:${M} 1px 0px 2px">${n || ""}</span>`,
|
|
@@ -18322,7 +18323,7 @@ const ul = new U.Proj.CRS(
|
|
|
18322
18323
|
initialize(t, n) {
|
|
18323
18324
|
U.setOptions(this, n);
|
|
18324
18325
|
const { clsPrefix: r } = this.options;
|
|
18325
|
-
this.tempDivEle = document.createElement("div"), this.spanEl =
|
|
18326
|
+
this.tempDivEle = document.createElement("div"), this.spanEl = uh.create("span", `${r}-pulse-icon`), this.aEl = uh.create("a", `${r}-dive-icon`), this.tempDivEle.append(this.spanEl), this.spanEl.append(this.aEl), this._init(), U.Marker.prototype.initialize.call(this, t, this.options);
|
|
18326
18327
|
},
|
|
18327
18328
|
_init() {
|
|
18328
18329
|
const { color: t, iconSize: n, diveColor: r, level: u, speedTime: d, animation: f, clsPrefix: p } = this.options;
|
|
@@ -18566,7 +18567,7 @@ const ul = new U.Proj.CRS(
|
|
|
18566
18567
|
accessToken: "016b31f15f25e1365e85aec7e7b0464e"
|
|
18567
18568
|
},
|
|
18568
18569
|
initialize(t) {
|
|
18569
|
-
t =
|
|
18570
|
+
t = Oh.deleteEmptyProperty(t), U.Util.setOptions(this, t);
|
|
18570
18571
|
},
|
|
18571
18572
|
onAdd(t) {
|
|
18572
18573
|
this.map = t, this.replaceProjection(), this.tileLayers = this.getLayerGroup(), t.addLayer(this.tileLayers);
|
|
@@ -18576,7 +18577,7 @@ const ul = new U.Proj.CRS(
|
|
|
18576
18577
|
},
|
|
18577
18578
|
replaceProjection() {
|
|
18578
18579
|
const t = this.map.getCenter(), n = this.map.getZoom();
|
|
18579
|
-
this.options.provide === this.provide.BAIDU ? this.map.options.crs =
|
|
18580
|
+
this.options.provide === this.provide.BAIDU ? this.map.options.crs = cl : this.options.provide === this.provide.YANDEX ? this.map.options.crs = U.CRS.EPSG3395 : this.map.options.crs = U.CRS.EPSG3857, this._resetMapStatus(t, n);
|
|
18580
18581
|
},
|
|
18581
18582
|
_resetMapStatus(t, n) {
|
|
18582
18583
|
this.map.setView(t), this.map._resetView(t, n, !0);
|
|
@@ -18793,7 +18794,7 @@ const ul = new U.Proj.CRS(
|
|
|
18793
18794
|
return new U.Point([t.y, -t.x]);
|
|
18794
18795
|
}
|
|
18795
18796
|
});
|
|
18796
|
-
var
|
|
18797
|
+
var dl = { exports: {} };
|
|
18797
18798
|
(function(t) {
|
|
18798
18799
|
(function(n, r, u) {
|
|
18799
18800
|
t.exports ? t.exports = u() : r[n] = u();
|
|
@@ -19121,8 +19122,8 @@ var cl = { exports: {} };
|
|
|
19121
19122
|
};
|
|
19122
19123
|
return g;
|
|
19123
19124
|
});
|
|
19124
|
-
})(
|
|
19125
|
-
var Yf =
|
|
19125
|
+
})(dl);
|
|
19126
|
+
var Yf = dl.exports;
|
|
19126
19127
|
const Jf = /* @__PURE__ */ Zl(Yf);
|
|
19127
19128
|
var Yo = L.Layer.extend({
|
|
19128
19129
|
initialize: function(t) {
|
|
@@ -19487,13 +19488,16 @@ const ep = U.Draggable.extend({
|
|
|
19487
19488
|
getValue() {
|
|
19488
19489
|
return this._toValue(U.DomUtil.getPosition(this._element).y);
|
|
19489
19490
|
}
|
|
19490
|
-
}),
|
|
19491
|
+
}), Jo = U.Handler.extend({
|
|
19491
19492
|
options: {
|
|
19492
19493
|
color: "#f00",
|
|
19493
19494
|
weight: 2,
|
|
19494
19495
|
fillColor: "#ff0",
|
|
19495
19496
|
fillOpacity: 0.7,
|
|
19496
|
-
radius: 5
|
|
19497
|
+
radius: 5,
|
|
19498
|
+
continue: !1,
|
|
19499
|
+
showCloseButton: !1,
|
|
19500
|
+
showMeasurements: !1
|
|
19497
19501
|
},
|
|
19498
19502
|
PointEvents: {
|
|
19499
19503
|
_mouseMove(t) {
|
|
@@ -19564,7 +19568,7 @@ const ep = U.Draggable.extend({
|
|
|
19564
19568
|
), this.tempPoint = new U.CircleMarker([0, 0], { weight: 1, radius: 5, color: "#3388ff", fillColor: "#fff", fillOpacity: 1 }).addTo(this._map), this.tooltip = new U.Tooltip({ offset: [10, -10] }).setContent("点击开始绘制"), U.Handler.prototype.enable.call(this), this;
|
|
19565
19569
|
},
|
|
19566
19570
|
disable() {
|
|
19567
|
-
if (this._map.setCursor(), this.removeHooks(), this._map.closeTooltip(this.tooltip), this._map.removeLayer(this.tempPoint), this.options.showCloseButton && this.options.showMeasurements
|
|
19571
|
+
if (this._map.setCursor(), this.removeHooks(), this.tooltip && this._map.closeTooltip(this.tooltip), this.tempPoint && this._map.removeLayer(this.tempPoint), this.options.showCloseButton && this.options.showMeasurements) {
|
|
19568
19572
|
const t = this.geometry._measurementLayer;
|
|
19569
19573
|
let n;
|
|
19570
19574
|
this.geometry instanceof U.Path ? n = this.geometry._latlngs.flat().at(-1) : n = this.geometry._latlng;
|
|
@@ -19579,10 +19583,10 @@ const ep = U.Draggable.extend({
|
|
|
19579
19583
|
this._map.removeLayerById(r), t == null || t.clearLayers();
|
|
19580
19584
|
}).addTo(t);
|
|
19581
19585
|
}
|
|
19582
|
-
return U.Handler.prototype.disable.call(this), this;
|
|
19586
|
+
return U.Util.setOptions(this, Jo.prototype.options), U.Handler.prototype.disable.call(this), this;
|
|
19583
19587
|
}
|
|
19584
19588
|
});
|
|
19585
|
-
U.Map.addInitHook("addHandler", "drawHandler",
|
|
19589
|
+
U.Map.addInitHook("addHandler", "drawHandler", Jo);
|
|
19586
19590
|
const ki = U.Handler.extend({
|
|
19587
19591
|
_touchstart: U.Browser.msPointer ? "MSPointerDown" : U.Browser.pointer ? "pointerdown" : "touchstart",
|
|
19588
19592
|
initialize(t) {
|
|
@@ -19808,14 +19812,14 @@ const ip = {
|
|
|
19808
19812
|
this._items.length = 0, this.options.contextmenuInheritItems || this._map.contextmenu.showAllItems();
|
|
19809
19813
|
}
|
|
19810
19814
|
}
|
|
19811
|
-
},
|
|
19815
|
+
}, Th = [U.Marker, U.Path], Dh = {
|
|
19812
19816
|
contextmenu: !1,
|
|
19813
19817
|
contextmenuItems: [],
|
|
19814
19818
|
contextmenuInheritItems: !1
|
|
19815
19819
|
};
|
|
19816
|
-
for (let t = 0, n =
|
|
19817
|
-
const r =
|
|
19818
|
-
r.prototype.options ? r.mergeOptions(
|
|
19820
|
+
for (let t = 0, n = Th.length; t < n; t++) {
|
|
19821
|
+
const r = Th[t];
|
|
19822
|
+
r.prototype.options ? r.mergeOptions(Dh) : r.prototype.options = Dh, r.addInitHook(function() {
|
|
19819
19823
|
this.options.contextmenu && this._initContextMenu();
|
|
19820
19824
|
}), r.include(ip);
|
|
19821
19825
|
}
|
|
@@ -20376,7 +20380,7 @@ function gp(t) {
|
|
|
20376
20380
|
getLayers() {
|
|
20377
20381
|
return Object.values(this._layers);
|
|
20378
20382
|
}
|
|
20379
|
-
}), n.StatusBar =
|
|
20383
|
+
}), n.StatusBar = Gh, n.CRS.BaiDu = cl, n.WebMercatorTiledLayer = Kf, n.BlinkMarker = Vf, n.CanvasMarker = $f, n.HeatLayer = Yo, n.WMTS = Qf, n.WMS = _e, n.Knob = ep, n.Draw = Jo, n.ContextMenu = ki, n.KeyBoard = fl, n.EagleMap = Fh, n.LayerManager = np, n.ImageOverlay.Rotated = Xf, n.Text = qf, n.VertexMarkers = zh, n.Measurement = dr, n.FilterFeatureGroup = Wf, n.Symbol = op, n.PolylineDecorator = mp, t.L = n;
|
|
20380
20384
|
})(window);
|
|
20381
20385
|
function No() {
|
|
20382
20386
|
if (typeof globalThis < "u")
|
|
@@ -20389,26 +20393,26 @@ function No() {
|
|
|
20389
20393
|
return global;
|
|
20390
20394
|
throw new Error("未找到全局对象");
|
|
20391
20395
|
}
|
|
20392
|
-
const
|
|
20393
|
-
|
|
20396
|
+
const Qo = function(t, n = {}) {
|
|
20397
|
+
Qo.installed || (No().Gis = Nl);
|
|
20394
20398
|
};
|
|
20395
|
-
No().Vue &&
|
|
20399
|
+
No().Vue && Qo(No().Vue);
|
|
20396
20400
|
const vp = {
|
|
20397
|
-
install:
|
|
20401
|
+
install: Qo
|
|
20398
20402
|
};
|
|
20399
20403
|
export {
|
|
20400
|
-
|
|
20404
|
+
cl as BaiDuCRS,
|
|
20401
20405
|
Vf as BlinkMarker,
|
|
20402
20406
|
$f as CanvasMarker,
|
|
20403
20407
|
ki as ContextMenu,
|
|
20404
|
-
|
|
20405
|
-
|
|
20408
|
+
Jo as Draw,
|
|
20409
|
+
Fh as EagleMap,
|
|
20406
20410
|
fl as KeyBoard,
|
|
20407
20411
|
ep as Knob,
|
|
20408
20412
|
np as LayerManager,
|
|
20409
20413
|
dr as MeasureMent,
|
|
20410
|
-
|
|
20414
|
+
Gh as StatusBar,
|
|
20411
20415
|
qf as TextMarker,
|
|
20412
|
-
|
|
20416
|
+
zh as VertexMarker,
|
|
20413
20417
|
vp as default
|
|
20414
20418
|
};
|