@besovideo/bvmap-leaflet 0.0.3 → 0.0.4
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/main.js +769 -695
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ps(_, h) {
|
|
2
2
|
for (var a = 0; a < h.length; a++) {
|
|
3
|
-
const
|
|
4
|
-
if (typeof
|
|
5
|
-
for (const y in
|
|
3
|
+
const g = h[a];
|
|
4
|
+
if (typeof g != "string" && !Array.isArray(g)) {
|
|
5
|
+
for (const y in g)
|
|
6
6
|
if (y !== "default" && !(y in _)) {
|
|
7
|
-
const s = Object.getOwnPropertyDescriptor(
|
|
7
|
+
const s = Object.getOwnPropertyDescriptor(g, y);
|
|
8
8
|
s && Object.defineProperty(_, y, s.get ? s : {
|
|
9
9
|
enumerable: !0,
|
|
10
|
-
get: () =>
|
|
10
|
+
get: () => g[y]
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -15,7 +15,7 @@ function fs(_, h) {
|
|
|
15
15
|
return Object.freeze(Object.defineProperty(_, Symbol.toStringTag, { value: "Module" }));
|
|
16
16
|
}
|
|
17
17
|
var In = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
18
|
-
function
|
|
18
|
+
function ms(_) {
|
|
19
19
|
return _ && _.__esModule && Object.prototype.hasOwnProperty.call(_, "default") ? _.default : _;
|
|
20
20
|
}
|
|
21
21
|
var Pe = { exports: {} };
|
|
@@ -26,10 +26,10 @@ var Pe = { exports: {} };
|
|
|
26
26
|
var kn;
|
|
27
27
|
function An() {
|
|
28
28
|
return kn || (kn = 1, function(_, h) {
|
|
29
|
-
(function(a,
|
|
30
|
-
|
|
29
|
+
(function(a, g) {
|
|
30
|
+
g(h);
|
|
31
31
|
})(In, function(a) {
|
|
32
|
-
var
|
|
32
|
+
var g = "1.9.4";
|
|
33
33
|
function y(t) {
|
|
34
34
|
var e, i, n, r;
|
|
35
35
|
for (i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -59,7 +59,7 @@ function An() {
|
|
|
59
59
|
function f(t) {
|
|
60
60
|
return "_leaflet_id" in t || (t._leaflet_id = ++c), t._leaflet_id;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function v(t, e, i) {
|
|
63
63
|
var n, r, u, p;
|
|
64
64
|
return p = function() {
|
|
65
65
|
n = !1, r && (u.apply(i, r), r = !1);
|
|
@@ -67,11 +67,11 @@ function An() {
|
|
|
67
67
|
n ? r = arguments : (t.apply(i, arguments), setTimeout(p, e), n = !0);
|
|
68
68
|
}, u;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function P(t, e, i) {
|
|
71
71
|
var n = e[1], r = e[0], u = n - r;
|
|
72
72
|
return t === n && i ? t : ((t - r) % u + u) % u + r;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function m() {
|
|
75
75
|
return !1;
|
|
76
76
|
}
|
|
77
77
|
function o(t, e) {
|
|
@@ -116,7 +116,7 @@ function An() {
|
|
|
116
116
|
return i;
|
|
117
117
|
return -1;
|
|
118
118
|
}
|
|
119
|
-
var
|
|
119
|
+
var st = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
|
|
120
120
|
function Gt(t) {
|
|
121
121
|
return window["webkit" + t] || window["moz" + t] || window["ms" + t];
|
|
122
122
|
}
|
|
@@ -137,7 +137,7 @@ function An() {
|
|
|
137
137
|
function at(t) {
|
|
138
138
|
t && di.call(window, t);
|
|
139
139
|
}
|
|
140
|
-
var
|
|
140
|
+
var Gn = {
|
|
141
141
|
__proto__: null,
|
|
142
142
|
extend: y,
|
|
143
143
|
create: s,
|
|
@@ -146,9 +146,9 @@ function An() {
|
|
|
146
146
|
return c;
|
|
147
147
|
},
|
|
148
148
|
stamp: f,
|
|
149
|
-
throttle:
|
|
150
|
-
wrapNum:
|
|
151
|
-
falseFn:
|
|
149
|
+
throttle: v,
|
|
150
|
+
wrapNum: P,
|
|
151
|
+
falseFn: m,
|
|
152
152
|
formatNum: o,
|
|
153
153
|
trim: d,
|
|
154
154
|
splitWords: x,
|
|
@@ -157,7 +157,7 @@ function An() {
|
|
|
157
157
|
template: N,
|
|
158
158
|
isArray: H,
|
|
159
159
|
indexOf: gt,
|
|
160
|
-
emptyImageUrl:
|
|
160
|
+
emptyImageUrl: st,
|
|
161
161
|
requestFn: Me,
|
|
162
162
|
cancelFn: di,
|
|
163
163
|
requestAnimFrame: tt,
|
|
@@ -172,7 +172,7 @@ function An() {
|
|
|
172
172
|
n.constructor = e, e.prototype = n;
|
|
173
173
|
for (var r in this)
|
|
174
174
|
Object.prototype.hasOwnProperty.call(this, r) && r !== "prototype" && r !== "__super__" && (e[r] = this[r]);
|
|
175
|
-
return t.statics && y(e, t.statics), t.includes && (
|
|
175
|
+
return t.statics && y(e, t.statics), t.includes && (Un(t.includes), y.apply(null, [n].concat(t.includes))), y(n, t), delete n.statics, delete n.includes, n.options && (n.options = i.options ? s(i.options) : {}, y(n.options, t.options)), n._initHooks = [], n.callInitHooks = function() {
|
|
176
176
|
if (!this._initHooksCalled) {
|
|
177
177
|
i.callInitHooks && i.callInitHooks.call(this), this._initHooksCalled = !0;
|
|
178
178
|
for (var u = 0, p = n._initHooks.length; u < p; u++)
|
|
@@ -190,14 +190,14 @@ function An() {
|
|
|
190
190
|
};
|
|
191
191
|
return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(i), this;
|
|
192
192
|
};
|
|
193
|
-
function
|
|
193
|
+
function Un(t) {
|
|
194
194
|
if (!(typeof L > "u" || !L || !L.Mixin)) {
|
|
195
195
|
t = H(t) ? t : [t];
|
|
196
196
|
for (var e = 0; e < t.length; e++)
|
|
197
197
|
t[e] === L.Mixin.Events && console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.", new Error().stack);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
var
|
|
200
|
+
var rt = {
|
|
201
201
|
/* @method on(type: String, fn: Function, context?: Object): this
|
|
202
202
|
* Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).
|
|
203
203
|
*
|
|
@@ -258,7 +258,7 @@ function An() {
|
|
|
258
258
|
if (arguments.length === 1) {
|
|
259
259
|
if (this._firingCount)
|
|
260
260
|
for (r = 0, u = n.length; r < u; r++)
|
|
261
|
-
n[r].fn =
|
|
261
|
+
n[r].fn = m;
|
|
262
262
|
delete this._events[t];
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
@@ -269,7 +269,7 @@ function An() {
|
|
|
269
269
|
var p = this._listens(t, e, i);
|
|
270
270
|
if (p !== !1) {
|
|
271
271
|
var w = n[p];
|
|
272
|
-
this._firingCount && (w.fn =
|
|
272
|
+
this._firingCount && (w.fn = m, this._events[t] = n = n.slice()), n.splice(p, 1);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
},
|
|
@@ -290,8 +290,8 @@ function An() {
|
|
|
290
290
|
if (r) {
|
|
291
291
|
this._firingCount = this._firingCount + 1 || 1;
|
|
292
292
|
for (var u = 0, p = r.length; u < p; u++) {
|
|
293
|
-
var w = r[u],
|
|
294
|
-
w.once && this.off(t,
|
|
293
|
+
var w = r[u], k = w.fn;
|
|
294
|
+
w.once && this.off(t, k, w.ctx), k.call(w.ctx || this, n);
|
|
295
295
|
}
|
|
296
296
|
this._firingCount--;
|
|
297
297
|
}
|
|
@@ -360,8 +360,8 @@ function An() {
|
|
|
360
360
|
}, t), !0);
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
|
-
|
|
364
|
-
var Ut = vt.extend(
|
|
363
|
+
rt.addEventListener = rt.on, rt.removeEventListener = rt.clearAllEventListeners = rt.off, rt.addOneTimeEventListener = rt.once, rt.fireEvent = rt.fire, rt.hasEventListeners = rt.listens;
|
|
364
|
+
var Ut = vt.extend(rt);
|
|
365
365
|
function B(t, e, i) {
|
|
366
366
|
this.x = i ? Math.round(t) : t, this.y = i ? Math.round(e) : e;
|
|
367
367
|
}
|
|
@@ -377,7 +377,7 @@ function An() {
|
|
|
377
377
|
// @method add(otherPoint: Point): Point
|
|
378
378
|
// Returns the result of addition of the current and the given points.
|
|
379
379
|
add: function(t) {
|
|
380
|
-
return this.clone()._add(
|
|
380
|
+
return this.clone()._add(O(t));
|
|
381
381
|
},
|
|
382
382
|
_add: function(t) {
|
|
383
383
|
return this.x += t.x, this.y += t.y, this;
|
|
@@ -385,7 +385,7 @@ function An() {
|
|
|
385
385
|
// @method subtract(otherPoint: Point): Point
|
|
386
386
|
// Returns the result of subtraction of the given point from the current.
|
|
387
387
|
subtract: function(t) {
|
|
388
|
-
return this.clone()._subtract(
|
|
388
|
+
return this.clone()._subtract(O(t));
|
|
389
389
|
},
|
|
390
390
|
_subtract: function(t) {
|
|
391
391
|
return this.x -= t.x, this.y -= t.y, this;
|
|
@@ -455,19 +455,19 @@ function An() {
|
|
|
455
455
|
// @method distanceTo(otherPoint: Point): Number
|
|
456
456
|
// Returns the cartesian distance between the current and the given points.
|
|
457
457
|
distanceTo: function(t) {
|
|
458
|
-
t =
|
|
458
|
+
t = O(t);
|
|
459
459
|
var e = t.x - this.x, i = t.y - this.y;
|
|
460
460
|
return Math.sqrt(e * e + i * i);
|
|
461
461
|
},
|
|
462
462
|
// @method equals(otherPoint: Point): Boolean
|
|
463
463
|
// Returns `true` if the given point has the same coordinates.
|
|
464
464
|
equals: function(t) {
|
|
465
|
-
return t =
|
|
465
|
+
return t = O(t), t.x === this.x && t.y === this.y;
|
|
466
466
|
},
|
|
467
467
|
// @method contains(otherPoint: Point): Boolean
|
|
468
468
|
// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).
|
|
469
469
|
contains: function(t) {
|
|
470
|
-
return t =
|
|
470
|
+
return t = O(t), Math.abs(t.x) <= Math.abs(this.x) && Math.abs(t.y) <= Math.abs(this.y);
|
|
471
471
|
},
|
|
472
472
|
// @method toString(): String
|
|
473
473
|
// Returns a string representation of the point for debugging purposes.
|
|
@@ -475,7 +475,7 @@ function An() {
|
|
|
475
475
|
return "Point(" + o(this.x) + ", " + o(this.y) + ")";
|
|
476
476
|
}
|
|
477
477
|
};
|
|
478
|
-
function
|
|
478
|
+
function O(t, e, i) {
|
|
479
479
|
return t instanceof B ? t : H(t) ? new B(t[0], t[1]) : t == null ? t : typeof t == "object" && "x" in t && "y" in t ? new B(t.x, t.y) : new B(t, e, i);
|
|
480
480
|
}
|
|
481
481
|
function V(t, e) {
|
|
@@ -494,7 +494,7 @@ function An() {
|
|
|
494
494
|
if (!t)
|
|
495
495
|
return this;
|
|
496
496
|
if (t instanceof B || typeof t[0] == "number" || "x" in t)
|
|
497
|
-
e = i =
|
|
497
|
+
e = i = O(t);
|
|
498
498
|
else if (t = et(t), e = t.min, i = t.max, !e || !i)
|
|
499
499
|
return this;
|
|
500
500
|
return !this.min && !this.max ? (this.min = e.clone(), this.max = i.clone()) : (this.min.x = Math.min(e.x, this.min.x), this.max.x = Math.max(i.x, this.max.x), this.min.y = Math.min(e.y, this.min.y), this.max.y = Math.max(i.y, this.max.y)), this;
|
|
@@ -502,7 +502,7 @@ function An() {
|
|
|
502
502
|
// @method getCenter(round?: Boolean): Point
|
|
503
503
|
// Returns the center point of the bounds.
|
|
504
504
|
getCenter: function(t) {
|
|
505
|
-
return
|
|
505
|
+
return O(
|
|
506
506
|
(this.min.x + this.max.x) / 2,
|
|
507
507
|
(this.min.y + this.max.y) / 2,
|
|
508
508
|
t
|
|
@@ -511,12 +511,12 @@ function An() {
|
|
|
511
511
|
// @method getBottomLeft(): Point
|
|
512
512
|
// Returns the bottom-left point of the bounds.
|
|
513
513
|
getBottomLeft: function() {
|
|
514
|
-
return
|
|
514
|
+
return O(this.min.x, this.max.y);
|
|
515
515
|
},
|
|
516
516
|
// @method getTopRight(): Point
|
|
517
517
|
// Returns the top-right point of the bounds.
|
|
518
518
|
getTopRight: function() {
|
|
519
|
-
return
|
|
519
|
+
return O(this.max.x, this.min.y);
|
|
520
520
|
},
|
|
521
521
|
// @method getTopLeft(): Point
|
|
522
522
|
// Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)).
|
|
@@ -540,7 +540,7 @@ function An() {
|
|
|
540
540
|
// Returns `true` if the rectangle contains the given point.
|
|
541
541
|
contains: function(t) {
|
|
542
542
|
var e, i;
|
|
543
|
-
return typeof t[0] == "number" || t instanceof B ? t =
|
|
543
|
+
return typeof t[0] == "number" || t instanceof B ? t = O(t) : t = et(t), t instanceof V ? (e = t.min, i = t.max) : e = i = t, e.x >= this.min.x && i.x <= this.max.x && e.y >= this.min.y && i.y <= this.max.y;
|
|
544
544
|
},
|
|
545
545
|
// @method intersects(otherBounds: Bounds): Boolean
|
|
546
546
|
// Returns `true` if the rectangle intersects the given bounds. Two bounds
|
|
@@ -570,8 +570,8 @@ function An() {
|
|
|
570
570
|
pad: function(t) {
|
|
571
571
|
var e = this.min, i = this.max, n = Math.abs(e.x - i.x) * t, r = Math.abs(e.y - i.y) * t;
|
|
572
572
|
return et(
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
O(e.x - n, e.y - r),
|
|
574
|
+
O(i.x + n, i.y + r)
|
|
575
575
|
);
|
|
576
576
|
},
|
|
577
577
|
// @method equals(otherBounds: Bounds): Boolean
|
|
@@ -824,7 +824,7 @@ function An() {
|
|
|
824
824
|
// Returns a `LatLng` where lat and lng has been wrapped according to the
|
|
825
825
|
// CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.
|
|
826
826
|
wrapLatLng: function(t) {
|
|
827
|
-
var e = this.wrapLng ?
|
|
827
|
+
var e = this.wrapLng ? P(t.lng, this.wrapLng, !0) : t.lng, i = this.wrapLat ? P(t.lat, this.wrapLat, !0) : t.lat, n = t.alt;
|
|
828
828
|
return new G(i, e, n);
|
|
829
829
|
},
|
|
830
830
|
// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds
|
|
@@ -835,8 +835,8 @@ function An() {
|
|
|
835
835
|
var e = t.getCenter(), i = this.wrapLatLng(e), n = e.lat - i.lat, r = e.lng - i.lng;
|
|
836
836
|
if (n === 0 && r === 0)
|
|
837
837
|
return t;
|
|
838
|
-
var u = t.getSouthWest(), p = t.getNorthEast(), w = new G(u.lat - n, u.lng - r),
|
|
839
|
-
return new it(w,
|
|
838
|
+
var u = t.getSouthWest(), p = t.getNorthEast(), w = new G(u.lat - n, u.lng - r), k = new G(p.lat - n, p.lng - r);
|
|
839
|
+
return new it(w, k);
|
|
840
840
|
}
|
|
841
841
|
}, kt = y({}, yt, {
|
|
842
842
|
wrapLng: [-180, 180],
|
|
@@ -846,8 +846,8 @@ function An() {
|
|
|
846
846
|
R: 6371e3,
|
|
847
847
|
// distance between two geographical points using spherical law of cosines approximation
|
|
848
848
|
distance: function(t, e) {
|
|
849
|
-
var i = Math.PI / 180, n = t.lat * i, r = e.lat * i, u = Math.sin((e.lat - t.lat) * i / 2), p = Math.sin((e.lng - t.lng) * i / 2), w = u * u + Math.cos(n) * Math.cos(r) * p * p,
|
|
850
|
-
return this.R *
|
|
849
|
+
var i = Math.PI / 180, n = t.lat * i, r = e.lat * i, u = Math.sin((e.lat - t.lat) * i / 2), p = Math.sin((e.lng - t.lng) * i / 2), w = u * u + Math.cos(n) * Math.cos(r) * p * p, k = 2 * Math.atan2(Math.sqrt(w), Math.sqrt(1 - w));
|
|
850
|
+
return this.R * k;
|
|
851
851
|
}
|
|
852
852
|
}), fi = 6378137, Ce = {
|
|
853
853
|
R: fi,
|
|
@@ -909,22 +909,22 @@ function An() {
|
|
|
909
909
|
var t = 0.5 / (Math.PI * Ce.R);
|
|
910
910
|
return Vt(t, 0.5, -t, 0.5);
|
|
911
911
|
}()
|
|
912
|
-
}),
|
|
912
|
+
}), Vn = y({}, Te, {
|
|
913
913
|
code: "EPSG:900913"
|
|
914
914
|
});
|
|
915
915
|
function _i(t) {
|
|
916
916
|
return document.createElementNS("http://www.w3.org/2000/svg", t);
|
|
917
917
|
}
|
|
918
918
|
function pi(t, e) {
|
|
919
|
-
var i = "", n, r, u, p, w,
|
|
919
|
+
var i = "", n, r, u, p, w, k;
|
|
920
920
|
for (n = 0, u = t.length; n < u; n++) {
|
|
921
921
|
for (w = t[n], r = 0, p = w.length; r < p; r++)
|
|
922
|
-
|
|
922
|
+
k = w[r], i += (r ? "L" : "M") + k.x + " " + k.y;
|
|
923
923
|
i += e ? S.svg ? "z" : "x" : "";
|
|
924
924
|
}
|
|
925
925
|
return i || "M0 0";
|
|
926
926
|
}
|
|
927
|
-
var Ee = document.documentElement.style, oe = "ActiveXObject" in window,
|
|
927
|
+
var Ee = document.documentElement.style, oe = "ActiveXObject" in window, Wn = oe && !document.addEventListener, mi = "msLaunchUri" in navigator && !("documentMode" in document), Se = ft("webkit"), gi = ft("android"), vi = ft("android 2") || ft("android 3"), jn = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10), qn = gi && ft("Google") && jn < 537 && !("AudioNode" in window), ze = !!window.opera, yi = !mi && ft("chrome"), Li = ft("gecko") && !Se && !ze && !oe, Kn = !yi && ft("safari"), wi = ft("phantom"), xi = "OTransition" in Ee, Xn = navigator.platform.indexOf("Win") === 0, Pi = oe && "transition" in Ee, Oe = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix() && !vi, ki = "MozPerspective" in Ee, Yn = !window.L_DISABLE_3D && (Pi || Oe || ki) && !xi && !wi, Wt = typeof orientation < "u" || ft("mobile"), Jn = Wt && Se, $n = Wt && Oe, Mi = !window.PointerEvent && window.MSPointerEvent, Ci = !!(window.PointerEvent || Mi), bi = "ontouchstart" in window || !!window.TouchEvent, Qn = !window.L_NO_TOUCH && (bi || Ci), to = Wt && ze, eo = Wt && Li, io = (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1, no = function() {
|
|
928
928
|
var t = !1;
|
|
929
929
|
try {
|
|
930
930
|
var e = Object.defineProperty({}, "passive", {
|
|
@@ -932,16 +932,16 @@ function An() {
|
|
|
932
932
|
t = !0;
|
|
933
933
|
}
|
|
934
934
|
});
|
|
935
|
-
window.addEventListener("testPassiveEventSupport",
|
|
935
|
+
window.addEventListener("testPassiveEventSupport", m, e), window.removeEventListener("testPassiveEventSupport", m, e);
|
|
936
936
|
} catch {
|
|
937
937
|
}
|
|
938
938
|
return t;
|
|
939
|
-
}(),
|
|
939
|
+
}(), oo = function() {
|
|
940
940
|
return !!document.createElement("canvas").getContext;
|
|
941
|
-
}(), Be = !!(document.createElementNS && _i("svg").createSVGRect),
|
|
941
|
+
}(), Be = !!(document.createElementNS && _i("svg").createSVGRect), so = !!Be && function() {
|
|
942
942
|
var t = document.createElement("div");
|
|
943
943
|
return t.innerHTML = "<svg/>", (t.firstChild && t.firstChild.namespaceURI) === "http://www.w3.org/2000/svg";
|
|
944
|
-
}(),
|
|
944
|
+
}(), ro = !Be && function() {
|
|
945
945
|
try {
|
|
946
946
|
var t = document.createElement("div");
|
|
947
947
|
t.innerHTML = '<v:shape adj="1"/>';
|
|
@@ -950,98 +950,98 @@ function An() {
|
|
|
950
950
|
} catch {
|
|
951
951
|
return !1;
|
|
952
952
|
}
|
|
953
|
-
}(),
|
|
953
|
+
}(), ao = navigator.platform.indexOf("Mac") === 0, ho = navigator.platform.indexOf("Linux") === 0;
|
|
954
954
|
function ft(t) {
|
|
955
955
|
return navigator.userAgent.toLowerCase().indexOf(t) >= 0;
|
|
956
956
|
}
|
|
957
957
|
var S = {
|
|
958
958
|
ie: oe,
|
|
959
|
-
ielt9:
|
|
959
|
+
ielt9: Wn,
|
|
960
960
|
edge: mi,
|
|
961
961
|
webkit: Se,
|
|
962
962
|
android: gi,
|
|
963
963
|
android23: vi,
|
|
964
|
-
androidStock:
|
|
965
|
-
opera:
|
|
964
|
+
androidStock: qn,
|
|
965
|
+
opera: ze,
|
|
966
966
|
chrome: yi,
|
|
967
967
|
gecko: Li,
|
|
968
|
-
safari:
|
|
968
|
+
safari: Kn,
|
|
969
969
|
phantom: wi,
|
|
970
970
|
opera12: xi,
|
|
971
|
-
win:
|
|
971
|
+
win: Xn,
|
|
972
972
|
ie3d: Pi,
|
|
973
|
-
webkit3d:
|
|
973
|
+
webkit3d: Oe,
|
|
974
974
|
gecko3d: ki,
|
|
975
|
-
any3d:
|
|
975
|
+
any3d: Yn,
|
|
976
976
|
mobile: Wt,
|
|
977
|
-
mobileWebkit:
|
|
978
|
-
mobileWebkit3d:
|
|
977
|
+
mobileWebkit: Jn,
|
|
978
|
+
mobileWebkit3d: $n,
|
|
979
979
|
msPointer: Mi,
|
|
980
980
|
pointer: Ci,
|
|
981
|
-
touch:
|
|
981
|
+
touch: Qn,
|
|
982
982
|
touchNative: bi,
|
|
983
|
-
mobileOpera:
|
|
984
|
-
mobileGecko:
|
|
985
|
-
retina:
|
|
986
|
-
passiveEvents:
|
|
987
|
-
canvas:
|
|
983
|
+
mobileOpera: to,
|
|
984
|
+
mobileGecko: eo,
|
|
985
|
+
retina: io,
|
|
986
|
+
passiveEvents: no,
|
|
987
|
+
canvas: oo,
|
|
988
988
|
svg: Be,
|
|
989
|
-
vml:
|
|
990
|
-
inlineSvg:
|
|
991
|
-
mac:
|
|
992
|
-
linux:
|
|
993
|
-
}, Ti = S.msPointer ? "MSPointerDown" : "pointerdown", Ei = S.msPointer ? "MSPointerMove" : "pointermove", Si = S.msPointer ? "MSPointerUp" : "pointerup",
|
|
989
|
+
vml: ro,
|
|
990
|
+
inlineSvg: so,
|
|
991
|
+
mac: ao,
|
|
992
|
+
linux: ho
|
|
993
|
+
}, Ti = S.msPointer ? "MSPointerDown" : "pointerdown", Ei = S.msPointer ? "MSPointerMove" : "pointermove", Si = S.msPointer ? "MSPointerUp" : "pointerup", zi = S.msPointer ? "MSPointerCancel" : "pointercancel", De = {
|
|
994
994
|
touchstart: Ti,
|
|
995
995
|
touchmove: Ei,
|
|
996
996
|
touchend: Si,
|
|
997
|
-
touchcancel:
|
|
998
|
-
},
|
|
999
|
-
touchstart:
|
|
997
|
+
touchcancel: zi
|
|
998
|
+
}, Oi = {
|
|
999
|
+
touchstart: po,
|
|
1000
1000
|
touchmove: se,
|
|
1001
1001
|
touchend: se,
|
|
1002
1002
|
touchcancel: se
|
|
1003
|
-
},
|
|
1004
|
-
function
|
|
1005
|
-
return e === "touchstart" &&
|
|
1003
|
+
}, Ot = {}, Bi = !1;
|
|
1004
|
+
function lo(t, e, i) {
|
|
1005
|
+
return e === "touchstart" && _o(), Oi[e] ? (i = Oi[e].bind(this, i), t.addEventListener(De[e], i, !1), i) : (console.warn("wrong event specified:", e), m);
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function uo(t, e, i) {
|
|
1008
1008
|
if (!De[e]) {
|
|
1009
1009
|
console.warn("wrong event specified:", e);
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
1012
|
t.removeEventListener(De[e], i, !1);
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1014
|
+
function co(t) {
|
|
1015
|
+
Ot[t.pointerId] = t;
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
|
|
1017
|
+
function fo(t) {
|
|
1018
|
+
Ot[t.pointerId] && (Ot[t.pointerId] = t);
|
|
1019
1019
|
}
|
|
1020
1020
|
function Di(t) {
|
|
1021
|
-
delete
|
|
1021
|
+
delete Ot[t.pointerId];
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1024
|
-
Bi || (document.addEventListener(Ti,
|
|
1023
|
+
function _o() {
|
|
1024
|
+
Bi || (document.addEventListener(Ti, co, !0), document.addEventListener(Ei, fo, !0), document.addEventListener(Si, Di, !0), document.addEventListener(zi, Di, !0), Bi = !0);
|
|
1025
1025
|
}
|
|
1026
1026
|
function se(t, e) {
|
|
1027
1027
|
if (e.pointerType !== (e.MSPOINTER_TYPE_MOUSE || "mouse")) {
|
|
1028
1028
|
e.touches = [];
|
|
1029
|
-
for (var i in
|
|
1030
|
-
e.touches.push(
|
|
1029
|
+
for (var i in Ot)
|
|
1030
|
+
e.touches.push(Ot[i]);
|
|
1031
1031
|
e.changedTouches = [e], t(e);
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function po(t, e) {
|
|
1035
1035
|
e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH && J(e), se(t, e);
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function mo(t) {
|
|
1038
1038
|
var e = {}, i, n;
|
|
1039
1039
|
for (n in t)
|
|
1040
1040
|
i = t[n], e[n] = i && i.bind ? i.bind(t) : i;
|
|
1041
1041
|
return t = e, e.type = "dblclick", e.detail = 2, e.isTrusted = !1, e._simulated = !0, e;
|
|
1042
1042
|
}
|
|
1043
|
-
var
|
|
1044
|
-
function
|
|
1043
|
+
var go = 200;
|
|
1044
|
+
function vo(t, e) {
|
|
1045
1045
|
t.addEventListener("dblclick", e);
|
|
1046
1046
|
var i = 0, n;
|
|
1047
1047
|
function r(u) {
|
|
@@ -1051,13 +1051,13 @@ function An() {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
if (!(u.pointerType === "mouse" || u.sourceCapabilities && !u.sourceCapabilities.firesTouchEvents)) {
|
|
1053
1053
|
var p = Ni(u);
|
|
1054
|
-
if (!(p.some(function(
|
|
1055
|
-
return
|
|
1056
|
-
}) && !p.some(function(
|
|
1057
|
-
return
|
|
1054
|
+
if (!(p.some(function(k) {
|
|
1055
|
+
return k instanceof HTMLLabelElement && k.attributes.for;
|
|
1056
|
+
}) && !p.some(function(k) {
|
|
1057
|
+
return k instanceof HTMLInputElement || k instanceof HTMLSelectElement;
|
|
1058
1058
|
}))) {
|
|
1059
1059
|
var w = Date.now();
|
|
1060
|
-
w - i <=
|
|
1060
|
+
w - i <= go ? (n++, n === 2 && e(mo(u))) : n = 1, i = w;
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
@@ -1066,7 +1066,7 @@ function An() {
|
|
|
1066
1066
|
simDblclick: r
|
|
1067
1067
|
};
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1069
|
+
function yo(t, e) {
|
|
1070
1070
|
t.removeEventListener("dblclick", e.dblclick), t.removeEventListener("click", e.simDblclick);
|
|
1071
1071
|
}
|
|
1072
1072
|
var Ie = he(
|
|
@@ -1130,9 +1130,9 @@ function An() {
|
|
|
1130
1130
|
return t.correspondingElement && (t = t.correspondingElement), t.className.baseVal === void 0 ? t.className : t.className.baseVal;
|
|
1131
1131
|
}
|
|
1132
1132
|
function ht(t, e) {
|
|
1133
|
-
"opacity" in t.style ? t.style.opacity = e : "filter" in t.style &&
|
|
1133
|
+
"opacity" in t.style ? t.style.opacity = e : "filter" in t.style && Lo(t, e);
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function Lo(t, e) {
|
|
1136
1136
|
var i = !1, n = "DXImageTransform.Microsoft.Alpha";
|
|
1137
1137
|
try {
|
|
1138
1138
|
i = t.filters.item(n);
|
|
@@ -1207,7 +1207,7 @@ function An() {
|
|
|
1207
1207
|
boundingClientRect: e
|
|
1208
1208
|
};
|
|
1209
1209
|
}
|
|
1210
|
-
var
|
|
1210
|
+
var wo = {
|
|
1211
1211
|
__proto__: null,
|
|
1212
1212
|
TRANSFORM: Ie,
|
|
1213
1213
|
TRANSITION: jt,
|
|
@@ -1287,7 +1287,7 @@ function An() {
|
|
|
1287
1287
|
var u = function(w) {
|
|
1288
1288
|
return i.call(n || t, w || window.event);
|
|
1289
1289
|
}, p = u;
|
|
1290
|
-
!S.touchNative && S.pointer && e.indexOf("touch") === 0 ? u =
|
|
1290
|
+
!S.touchNative && S.pointer && e.indexOf("touch") === 0 ? u = lo(t, e, u) : S.touch && e === "dblclick" ? u = vo(t, u) : "addEventListener" in t ? e === "touchstart" || e === "touchmove" || e === "wheel" || e === "mousewheel" ? t.addEventListener(Ve[e] || e, u, S.passiveEvents ? { passive: !1 } : !1) : e === "mouseenter" || e === "mouseleave" ? (u = function(w) {
|
|
1291
1291
|
w = w || window.event, Ke(t, w) && p(w);
|
|
1292
1292
|
}, t.addEventListener(Ve[e], u, !1)) : t.addEventListener(e, p, !1) : t.attachEvent("on" + e, u), t[_t] = t[_t] || {}, t[_t][r] = u;
|
|
1293
1293
|
}
|
|
@@ -1296,7 +1296,7 @@ function An() {
|
|
|
1296
1296
|
var u = t[_t] && t[_t][r];
|
|
1297
1297
|
if (!u)
|
|
1298
1298
|
return this;
|
|
1299
|
-
!S.touchNative && S.pointer && e.indexOf("touch") === 0 ?
|
|
1299
|
+
!S.touchNative && S.pointer && e.indexOf("touch") === 0 ? uo(t, e, u) : S.touch && e === "dblclick" ? yo(t, u) : "removeEventListener" in t ? t.removeEventListener(Ve[e] || e, u, !1) : t.detachEvent("on" + e, u), t[_t][r] = null;
|
|
1300
1300
|
}
|
|
1301
1301
|
function Et(t) {
|
|
1302
1302
|
return t.stopPropagation ? t.stopPropagation() : t.originalEvent ? t.originalEvent._stopped = !0 : t.cancelBubble = !0, this;
|
|
@@ -1331,11 +1331,11 @@ function An() {
|
|
|
1331
1331
|
(t.clientY - n.top) / i.y - e.clientTop
|
|
1332
1332
|
);
|
|
1333
1333
|
}
|
|
1334
|
-
var
|
|
1334
|
+
var xo = S.linux && S.chrome ? window.devicePixelRatio : S.mac ? window.devicePixelRatio * 3 : window.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1;
|
|
1335
1335
|
function Hi(t) {
|
|
1336
1336
|
return S.edge ? t.wheelDeltaY / 2 : (
|
|
1337
1337
|
// Don't trust window-geometry-based delta
|
|
1338
|
-
t.deltaY && t.deltaMode === 0 ? -t.deltaY /
|
|
1338
|
+
t.deltaY && t.deltaMode === 0 ? -t.deltaY / xo : (
|
|
1339
1339
|
// Pixels
|
|
1340
1340
|
t.deltaY && t.deltaMode === 1 ? -t.deltaY * 20 : (
|
|
1341
1341
|
// Lines
|
|
@@ -1371,7 +1371,7 @@ function An() {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
return i !== t;
|
|
1373
1373
|
}
|
|
1374
|
-
var
|
|
1374
|
+
var Po = {
|
|
1375
1375
|
__proto__: null,
|
|
1376
1376
|
on: D,
|
|
1377
1377
|
off: U,
|
|
@@ -1537,15 +1537,15 @@ function An() {
|
|
|
1537
1537
|
},
|
|
1538
1538
|
_getBoundsCenterZoom: function(t, e) {
|
|
1539
1539
|
e = e || {}, t = t.getBounds ? t.getBounds() : q(t);
|
|
1540
|
-
var i =
|
|
1540
|
+
var i = O(e.paddingTopLeft || e.padding || [0, 0]), n = O(e.paddingBottomRight || e.padding || [0, 0]), r = this.getBoundsZoom(t, !1, i.add(n));
|
|
1541
1541
|
if (r = typeof e.maxZoom == "number" ? Math.min(e.maxZoom, r) : r, r === 1 / 0)
|
|
1542
1542
|
return {
|
|
1543
1543
|
center: t.getCenter(),
|
|
1544
1544
|
zoom: r
|
|
1545
1545
|
};
|
|
1546
|
-
var u = n.subtract(i).divideBy(2), p = this.project(t.getSouthWest(), r), w = this.project(t.getNorthEast(), r),
|
|
1546
|
+
var u = n.subtract(i).divideBy(2), p = this.project(t.getSouthWest(), r), w = this.project(t.getNorthEast(), r), k = this.unproject(p.add(w).divideBy(2).add(u), r);
|
|
1547
1547
|
return {
|
|
1548
|
-
center:
|
|
1548
|
+
center: k,
|
|
1549
1549
|
zoom: r
|
|
1550
1550
|
};
|
|
1551
1551
|
},
|
|
@@ -1572,7 +1572,7 @@ function An() {
|
|
|
1572
1572
|
// @method panBy(offset: Point, options?: Pan options): this
|
|
1573
1573
|
// Pans the map by a given number of pixels (animated).
|
|
1574
1574
|
panBy: function(t, e) {
|
|
1575
|
-
if (t =
|
|
1575
|
+
if (t = O(t).round(), e = e || {}, !t.x && !t.y)
|
|
1576
1576
|
return this.fire("moveend");
|
|
1577
1577
|
if (e.animate !== !0 && !this.getSize().contains(t))
|
|
1578
1578
|
return this._resetView(this.unproject(this.project(this.getCenter()).add(t)), this.getZoom()), this;
|
|
@@ -1596,10 +1596,10 @@ function An() {
|
|
|
1596
1596
|
this._stop();
|
|
1597
1597
|
var n = this.project(this.getCenter()), r = this.project(t), u = this.getSize(), p = this._zoom;
|
|
1598
1598
|
t = Z(t), e = e === void 0 ? p : e;
|
|
1599
|
-
var w = Math.max(u.x, u.y),
|
|
1599
|
+
var w = Math.max(u.x, u.y), k = w * this.getZoomScale(p, e), C = r.distanceTo(n) || 1, T = 1.42, z = T * T;
|
|
1600
1600
|
function A(X) {
|
|
1601
|
-
var xe = X ? -1 : 1,
|
|
1602
|
-
return
|
|
1601
|
+
var xe = X ? -1 : 1, ds = X ? k : w, cs = k * k - w * w + xe * z * z * C * C, fs = 2 * ds * z * C, si = cs / fs, Pn = Math.sqrt(si * si + 1) - si, _s = Pn < 1e-9 ? -18 : Math.log(Pn);
|
|
1602
|
+
return _s;
|
|
1603
1603
|
}
|
|
1604
1604
|
function Q(X) {
|
|
1605
1605
|
return (Math.exp(X) - Math.exp(-X)) / 2;
|
|
@@ -1614,17 +1614,17 @@ function An() {
|
|
|
1614
1614
|
function Ft(X) {
|
|
1615
1615
|
return w * (Y(nt) / Y(nt + T * X));
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1618
|
-
return w * (Y(nt) * ut(nt + T * X) - Q(nt)) /
|
|
1617
|
+
function as(X) {
|
|
1618
|
+
return w * (Y(nt) * ut(nt + T * X) - Q(nt)) / z;
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function hs(X) {
|
|
1621
1621
|
return 1 - Math.pow(1 - X, 1.5);
|
|
1622
1622
|
}
|
|
1623
|
-
var
|
|
1623
|
+
var ls = Date.now(), wn = (A(1) - nt) / T, us = i.duration ? 1e3 * i.duration : 1e3 * wn * 0.8;
|
|
1624
1624
|
function xn() {
|
|
1625
|
-
var X = (Date.now() -
|
|
1625
|
+
var X = (Date.now() - ls) / us, xe = hs(X) * wn;
|
|
1626
1626
|
X <= 1 ? (this._flyToFrame = tt(xn, this), this._move(
|
|
1627
|
-
this.unproject(n.add(r.subtract(n).multiplyBy(
|
|
1627
|
+
this.unproject(n.add(r.subtract(n).multiplyBy(as(xe) / C)), p),
|
|
1628
1628
|
this.getScaleZoom(w / Ft(xe), p),
|
|
1629
1629
|
{ flyTo: !0 }
|
|
1630
1630
|
)) : this._move(t, e)._moveEnd(!0);
|
|
@@ -1669,10 +1669,10 @@ function An() {
|
|
|
1669
1669
|
// the map will not be panned.
|
|
1670
1670
|
panInside: function(t, e) {
|
|
1671
1671
|
e = e || {};
|
|
1672
|
-
var i =
|
|
1672
|
+
var i = O(e.paddingTopLeft || e.padding || [0, 0]), n = O(e.paddingBottomRight || e.padding || [0, 0]), r = this.project(this.getCenter()), u = this.project(t), p = this.getPixelBounds(), w = et([p.min.add(i), p.max.subtract(n)]), k = w.getSize();
|
|
1673
1673
|
if (!w.contains(u)) {
|
|
1674
1674
|
this._enforcingBounds = !0;
|
|
1675
|
-
var C = u.subtract(w.getCenter()), T = w.extend(u).getSize().subtract(
|
|
1675
|
+
var C = u.subtract(w.getCenter()), T = w.extend(u).getSize().subtract(k);
|
|
1676
1676
|
r.x += C.x < 0 ? -T.x : T.x, r.y += C.y < 0 ? -T.y : T.y, this.panTo(this.unproject(r), e), this._enforcingBounds = !1;
|
|
1677
1677
|
}
|
|
1678
1678
|
return this;
|
|
@@ -1763,8 +1763,8 @@ function An() {
|
|
|
1763
1763
|
bounds: r,
|
|
1764
1764
|
timestamp: t.timestamp
|
|
1765
1765
|
};
|
|
1766
|
-
for (var
|
|
1767
|
-
typeof t.coords[
|
|
1766
|
+
for (var k in t.coords)
|
|
1767
|
+
typeof t.coords[k] == "number" && (w[k] = t.coords[k]);
|
|
1768
1768
|
this.fire("locationfound", w);
|
|
1769
1769
|
}
|
|
1770
1770
|
},
|
|
@@ -1838,8 +1838,8 @@ function An() {
|
|
|
1838
1838
|
// instead returns the minimum zoom level on which the map view fits into
|
|
1839
1839
|
// the given bounds in its entirety.
|
|
1840
1840
|
getBoundsZoom: function(t, e, i) {
|
|
1841
|
-
t = q(t), i =
|
|
1842
|
-
var n = this.getZoom() || 0, r = this.getMinZoom(), u = this.getMaxZoom(), p = t.getNorthWest(), w = t.getSouthEast(),
|
|
1841
|
+
t = q(t), i = O(i || [0, 0]);
|
|
1842
|
+
var n = this.getZoom() || 0, r = this.getMinZoom(), u = this.getMaxZoom(), p = t.getNorthWest(), w = t.getSouthEast(), k = this.getSize().subtract(i), C = et(this.project(w, n), this.project(p, n)).getSize(), T = S.any3d ? this.options.zoomSnap : 1, z = k.x / C.x, A = k.y / C.y, Q = e ? Math.max(z, A) : Math.min(z, A);
|
|
1843
1843
|
return n = this.getScaleZoom(Q, n), T && (n = Math.round(n / (T / 100)) * (T / 100), n = e ? Math.ceil(n / T) * T : Math.floor(n / T) * T), Math.max(r, Math.min(u, n));
|
|
1844
1844
|
},
|
|
1845
1845
|
// @method getSize(): Point
|
|
@@ -1918,13 +1918,13 @@ function An() {
|
|
|
1918
1918
|
// @method unproject(point: Point, zoom: Number): LatLng
|
|
1919
1919
|
// Inverse of [`project`](#map-project).
|
|
1920
1920
|
unproject: function(t, e) {
|
|
1921
|
-
return e = e === void 0 ? this._zoom : e, this.options.crs.pointToLatLng(
|
|
1921
|
+
return e = e === void 0 ? this._zoom : e, this.options.crs.pointToLatLng(O(t), e);
|
|
1922
1922
|
},
|
|
1923
1923
|
// @method layerPointToLatLng(point: Point): LatLng
|
|
1924
1924
|
// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),
|
|
1925
1925
|
// returns the corresponding geographical coordinate (for the current zoom level).
|
|
1926
1926
|
layerPointToLatLng: function(t) {
|
|
1927
|
-
var e =
|
|
1927
|
+
var e = O(t).add(this.getPixelOrigin());
|
|
1928
1928
|
return this.unproject(e);
|
|
1929
1929
|
},
|
|
1930
1930
|
// @method latLngToLayerPoint(latlng: LatLng): Point
|
|
@@ -1962,19 +1962,19 @@ function An() {
|
|
|
1962
1962
|
// Given a pixel coordinate relative to the map container, returns the corresponding
|
|
1963
1963
|
// pixel coordinate relative to the [origin pixel](#map-getpixelorigin).
|
|
1964
1964
|
containerPointToLayerPoint: function(t) {
|
|
1965
|
-
return
|
|
1965
|
+
return O(t).subtract(this._getMapPanePos());
|
|
1966
1966
|
},
|
|
1967
1967
|
// @method layerPointToContainerPoint(point: Point): Point
|
|
1968
1968
|
// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),
|
|
1969
1969
|
// returns the corresponding pixel coordinate relative to the map container.
|
|
1970
1970
|
layerPointToContainerPoint: function(t) {
|
|
1971
|
-
return
|
|
1971
|
+
return O(t).add(this._getMapPanePos());
|
|
1972
1972
|
},
|
|
1973
1973
|
// @method containerPointToLatLng(point: Point): LatLng
|
|
1974
1974
|
// Given a pixel coordinate relative to the map container, returns
|
|
1975
1975
|
// the corresponding geographical coordinate (for the current zoom level).
|
|
1976
1976
|
containerPointToLatLng: function(t) {
|
|
1977
|
-
var e = this.containerPointToLayerPoint(
|
|
1977
|
+
var e = this.containerPointToLayerPoint(O(t));
|
|
1978
1978
|
return this.layerPointToLatLng(e);
|
|
1979
1979
|
},
|
|
1980
1980
|
// @method latLngToContainerPoint(latlng: LatLng): Point
|
|
@@ -2118,15 +2118,15 @@ function An() {
|
|
|
2118
2118
|
}
|
|
2119
2119
|
if (r.length) {
|
|
2120
2120
|
e === "contextmenu" && J(t);
|
|
2121
|
-
var w = r[0],
|
|
2121
|
+
var w = r[0], k = {
|
|
2122
2122
|
originalEvent: t
|
|
2123
2123
|
};
|
|
2124
2124
|
if (t.type !== "keypress" && t.type !== "keydown" && t.type !== "keyup") {
|
|
2125
2125
|
var C = w.getLatLng && (!w._radius || w._radius <= 10);
|
|
2126
|
-
|
|
2126
|
+
k.containerPoint = C ? this.latLngToContainerPoint(w.getLatLng()) : this.mouseEventToContainerPoint(t), k.layerPoint = this.containerPointToLayerPoint(k.containerPoint), k.latlng = C ? w.getLatLng() : this.layerPointToLatLng(k.layerPoint);
|
|
2127
2127
|
}
|
|
2128
2128
|
for (p = 0; p < r.length; p++)
|
|
2129
|
-
if (r[p].fire(e,
|
|
2129
|
+
if (r[p].fire(e, k, !0), k.originalEvent._stopped || r[p].options.bubblingMouseEvents === !1 && gt(this._mouseEvents, e) !== -1)
|
|
2130
2130
|
return;
|
|
2131
2131
|
}
|
|
2132
2132
|
},
|
|
@@ -2262,7 +2262,7 @@ function An() {
|
|
|
2262
2262
|
this._animatingZoom && (this._mapPane && j(this._mapPane, "leaflet-zoom-anim"), this._animatingZoom = !1, this._move(this._animateToCenter, this._animateToZoom, void 0, !0), this._tempFireZoomEvent && this.fire("zoom"), delete this._tempFireZoomEvent, this.fire("move"), this._moveEnd(!0));
|
|
2263
2263
|
}
|
|
2264
2264
|
});
|
|
2265
|
-
function
|
|
2265
|
+
function ko(t, e) {
|
|
2266
2266
|
return new R(t, e);
|
|
2267
2267
|
}
|
|
2268
2268
|
var dt = vt.extend({
|
|
@@ -2508,7 +2508,7 @@ function An() {
|
|
|
2508
2508
|
U(t, "click", J), e._preventClick = !1;
|
|
2509
2509
|
});
|
|
2510
2510
|
}
|
|
2511
|
-
}),
|
|
2511
|
+
}), Mo = function(t, e, i) {
|
|
2512
2512
|
return new Ui(t, e, i);
|
|
2513
2513
|
}, Xe = dt.extend({
|
|
2514
2514
|
// @section
|
|
@@ -2573,7 +2573,7 @@ function An() {
|
|
|
2573
2573
|
}), R.addInitHook(function() {
|
|
2574
2574
|
this.options.zoomControl && (this.zoomControl = new Xe(), this.addControl(this.zoomControl));
|
|
2575
2575
|
});
|
|
2576
|
-
var
|
|
2576
|
+
var Co = function(t) {
|
|
2577
2577
|
return new Xe(t);
|
|
2578
2578
|
}, Vi = dt.extend({
|
|
2579
2579
|
// @section
|
|
@@ -2627,16 +2627,16 @@ function An() {
|
|
|
2627
2627
|
var e = Math.pow(10, (Math.floor(t) + "").length - 1), i = t / e;
|
|
2628
2628
|
return i = i >= 10 ? 10 : i >= 5 ? 5 : i >= 3 ? 3 : i >= 2 ? 2 : 1, e * i;
|
|
2629
2629
|
}
|
|
2630
|
-
}),
|
|
2630
|
+
}), bo = function(t) {
|
|
2631
2631
|
return new Vi(t);
|
|
2632
|
-
},
|
|
2632
|
+
}, To = '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>', Ye = dt.extend({
|
|
2633
2633
|
// @section
|
|
2634
2634
|
// @aka Control.Attribution options
|
|
2635
2635
|
options: {
|
|
2636
2636
|
position: "bottomright",
|
|
2637
2637
|
// @option prefix: String|false = 'Leaflet'
|
|
2638
2638
|
// The HTML text shown before the attributions. Pass `false` to disable.
|
|
2639
|
-
prefix: '<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">' + (S.inlineSvg ?
|
|
2639
|
+
prefix: '<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">' + (S.inlineSvg ? To + " " : "") + "Leaflet</a>"
|
|
2640
2640
|
},
|
|
2641
2641
|
initialize: function(t) {
|
|
2642
2642
|
M(this, t), this._attributions = {};
|
|
@@ -2685,10 +2685,10 @@ function An() {
|
|
|
2685
2685
|
}), R.addInitHook(function() {
|
|
2686
2686
|
this.options.attributionControl && new Ye().addTo(this);
|
|
2687
2687
|
});
|
|
2688
|
-
var
|
|
2688
|
+
var Eo = function(t) {
|
|
2689
2689
|
return new Ye(t);
|
|
2690
2690
|
};
|
|
2691
|
-
dt.Layers = Ui, dt.Zoom = Xe, dt.Scale = Vi, dt.Attribution = Ye, $t.layers =
|
|
2691
|
+
dt.Layers = Ui, dt.Zoom = Xe, dt.Scale = Vi, dt.Attribution = Ye, $t.layers = Mo, $t.zoom = Co, $t.scale = bo, $t.attribution = Eo;
|
|
2692
2692
|
var pt = vt.extend({
|
|
2693
2693
|
initialize: function(t) {
|
|
2694
2694
|
this._map = t;
|
|
@@ -2718,7 +2718,7 @@ function An() {
|
|
|
2718
2718
|
pt.addTo = function(t, e) {
|
|
2719
2719
|
return t.addHandler(e, this), this;
|
|
2720
2720
|
};
|
|
2721
|
-
var
|
|
2721
|
+
var So = { Events: rt }, Wi = S.touch ? "touchstart mousedown" : "mousedown", Mt = Ut.extend({
|
|
2722
2722
|
options: {
|
|
2723
2723
|
// @section
|
|
2724
2724
|
// @aka Draggable options
|
|
@@ -2784,33 +2784,33 @@ function An() {
|
|
|
2784
2784
|
}
|
|
2785
2785
|
});
|
|
2786
2786
|
function ji(t, e, i) {
|
|
2787
|
-
var n, r = [1, 4, 2, 8], u, p, w,
|
|
2787
|
+
var n, r = [1, 4, 2, 8], u, p, w, k, C, T, z, A;
|
|
2788
2788
|
for (u = 0, T = t.length; u < T; u++)
|
|
2789
|
-
t[u]._code =
|
|
2789
|
+
t[u]._code = zt(t[u], e);
|
|
2790
2790
|
for (w = 0; w < 4; w++) {
|
|
2791
|
-
for (
|
|
2792
|
-
|
|
2791
|
+
for (z = r[w], n = [], u = 0, T = t.length, p = T - 1; u < T; p = u++)
|
|
2792
|
+
k = t[u], C = t[p], k._code & z ? C._code & z || (A = de(C, k, z, e, i), A._code = zt(A, e), n.push(A)) : (C._code & z && (A = de(C, k, z, e, i), A._code = zt(A, e), n.push(A)), n.push(k));
|
|
2793
2793
|
t = n;
|
|
2794
2794
|
}
|
|
2795
2795
|
return t;
|
|
2796
2796
|
}
|
|
2797
2797
|
function qi(t, e) {
|
|
2798
|
-
var i, n, r, u, p, w,
|
|
2798
|
+
var i, n, r, u, p, w, k, C, T;
|
|
2799
2799
|
if (!t || t.length === 0)
|
|
2800
2800
|
throw new Error("latlngs not passed");
|
|
2801
2801
|
lt(t) || (console.warn("latlngs are not flat! Only the first ring will be used"), t = t[0]);
|
|
2802
|
-
var
|
|
2803
|
-
Q < 1700 && (
|
|
2802
|
+
var z = Z([0, 0]), A = q(t), Q = A.getNorthWest().distanceTo(A.getSouthWest()) * A.getNorthEast().distanceTo(A.getNorthWest());
|
|
2803
|
+
Q < 1700 && (z = Je(t));
|
|
2804
2804
|
var Y = t.length, ut = [];
|
|
2805
2805
|
for (i = 0; i < Y; i++) {
|
|
2806
2806
|
var nt = Z(t[i]);
|
|
2807
|
-
ut.push(e.project(Z([nt.lat -
|
|
2807
|
+
ut.push(e.project(Z([nt.lat - z.lat, nt.lng - z.lng])));
|
|
2808
2808
|
}
|
|
2809
|
-
for (w =
|
|
2810
|
-
r = ut[i], u = ut[n], p = r.y * u.x - u.y * r.x,
|
|
2811
|
-
w === 0 ? T = ut[0] : T = [
|
|
2812
|
-
var Ft = e.unproject(
|
|
2813
|
-
return Z([Ft.lat +
|
|
2809
|
+
for (w = k = C = 0, i = 0, n = Y - 1; i < Y; n = i++)
|
|
2810
|
+
r = ut[i], u = ut[n], p = r.y * u.x - u.y * r.x, k += (r.x + u.x) * p, C += (r.y + u.y) * p, w += p * 3;
|
|
2811
|
+
w === 0 ? T = ut[0] : T = [k / w, C / w];
|
|
2812
|
+
var Ft = e.unproject(O(T));
|
|
2813
|
+
return Z([Ft.lat + z.lat, Ft.lng + z.lng]);
|
|
2814
2814
|
}
|
|
2815
2815
|
function Je(t) {
|
|
2816
2816
|
for (var e = 0, i = 0, n = 0, r = 0; r < t.length; r++) {
|
|
@@ -2819,7 +2819,7 @@ function An() {
|
|
|
2819
2819
|
}
|
|
2820
2820
|
return Z([e / n, i / n]);
|
|
2821
2821
|
}
|
|
2822
|
-
var
|
|
2822
|
+
var zo = {
|
|
2823
2823
|
__proto__: null,
|
|
2824
2824
|
clipPolygon: ji,
|
|
2825
2825
|
polygonCenter: qi,
|
|
@@ -2829,15 +2829,15 @@ function An() {
|
|
|
2829
2829
|
if (!e || !t.length)
|
|
2830
2830
|
return t.slice();
|
|
2831
2831
|
var i = e * e;
|
|
2832
|
-
return t =
|
|
2832
|
+
return t = Do(t, i), t = Bo(t, i), t;
|
|
2833
2833
|
}
|
|
2834
2834
|
function Xi(t, e, i) {
|
|
2835
2835
|
return Math.sqrt(Qt(t, e, i, !0));
|
|
2836
2836
|
}
|
|
2837
|
-
function
|
|
2837
|
+
function Oo(t, e, i) {
|
|
2838
2838
|
return Qt(t, e, i);
|
|
2839
2839
|
}
|
|
2840
|
-
function
|
|
2840
|
+
function Bo(t, e) {
|
|
2841
2841
|
var i = t.length, n = typeof Uint8Array < "u" ? Uint8Array : Array, r = new n(i);
|
|
2842
2842
|
r[0] = r[i - 1] = 1, $e(t, r, e, 0, i - 1);
|
|
2843
2843
|
var u, p = [];
|
|
@@ -2846,42 +2846,42 @@ function An() {
|
|
|
2846
2846
|
return p;
|
|
2847
2847
|
}
|
|
2848
2848
|
function $e(t, e, i, n, r) {
|
|
2849
|
-
var u = 0, p, w,
|
|
2849
|
+
var u = 0, p, w, k;
|
|
2850
2850
|
for (w = n + 1; w <= r - 1; w++)
|
|
2851
|
-
|
|
2851
|
+
k = Qt(t[w], t[n], t[r], !0), k > u && (p = w, u = k);
|
|
2852
2852
|
u > i && (e[p] = 1, $e(t, e, i, n, p), $e(t, e, i, p, r));
|
|
2853
2853
|
}
|
|
2854
|
-
function
|
|
2854
|
+
function Do(t, e) {
|
|
2855
2855
|
for (var i = [t[0]], n = 1, r = 0, u = t.length; n < u; n++)
|
|
2856
|
-
|
|
2856
|
+
Io(t[n], t[r]) > e && (i.push(t[n]), r = n);
|
|
2857
2857
|
return r < u - 1 && i.push(t[u - 1]), i;
|
|
2858
2858
|
}
|
|
2859
2859
|
var Yi;
|
|
2860
2860
|
function Ji(t, e, i, n, r) {
|
|
2861
|
-
var u = n ? Yi :
|
|
2861
|
+
var u = n ? Yi : zt(t, i), p = zt(e, i), w, k, C;
|
|
2862
2862
|
for (Yi = p; ; ) {
|
|
2863
2863
|
if (!(u | p))
|
|
2864
2864
|
return [t, e];
|
|
2865
2865
|
if (u & p)
|
|
2866
2866
|
return !1;
|
|
2867
|
-
w = u || p,
|
|
2867
|
+
w = u || p, k = de(t, e, w, i, r), C = zt(k, i), w === u ? (t = k, u = C) : (e = k, p = C);
|
|
2868
2868
|
}
|
|
2869
2869
|
}
|
|
2870
2870
|
function de(t, e, i, n, r) {
|
|
2871
|
-
var u = e.x - t.x, p = e.y - t.y, w = n.min,
|
|
2872
|
-
return i & 8 ? (C = t.x + u * (
|
|
2871
|
+
var u = e.x - t.x, p = e.y - t.y, w = n.min, k = n.max, C, T;
|
|
2872
|
+
return i & 8 ? (C = t.x + u * (k.y - t.y) / p, T = k.y) : i & 4 ? (C = t.x + u * (w.y - t.y) / p, T = w.y) : i & 2 ? (C = k.x, T = t.y + p * (k.x - t.x) / u) : i & 1 && (C = w.x, T = t.y + p * (w.x - t.x) / u), new B(C, T, r);
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2874
|
+
function zt(t, e) {
|
|
2875
2875
|
var i = 0;
|
|
2876
2876
|
return t.x < e.min.x ? i |= 1 : t.x > e.max.x && (i |= 2), t.y < e.min.y ? i |= 4 : t.y > e.max.y && (i |= 8), i;
|
|
2877
2877
|
}
|
|
2878
|
-
function
|
|
2878
|
+
function Io(t, e) {
|
|
2879
2879
|
var i = e.x - t.x, n = e.y - t.y;
|
|
2880
2880
|
return i * i + n * n;
|
|
2881
2881
|
}
|
|
2882
2882
|
function Qt(t, e, i, n) {
|
|
2883
|
-
var r = e.x, u = e.y, p = i.x - r, w = i.y - u,
|
|
2884
|
-
return
|
|
2883
|
+
var r = e.x, u = e.y, p = i.x - r, w = i.y - u, k = p * p + w * w, C;
|
|
2884
|
+
return k > 0 && (C = ((t.x - r) * p + (t.y - u) * w) / k, C > 1 ? (r = i.x, u = i.y) : C > 0 && (r += p * C, u += w * C)), p = t.x - r, w = t.y - u, n ? p * p + w * w : new B(r, u);
|
|
2885
2885
|
}
|
|
2886
2886
|
function lt(t) {
|
|
2887
2887
|
return !H(t[0]) || typeof t[0][0] != "object" && typeof t[0][0] < "u";
|
|
@@ -2890,11 +2890,11 @@ function An() {
|
|
|
2890
2890
|
return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."), lt(t);
|
|
2891
2891
|
}
|
|
2892
2892
|
function Qi(t, e) {
|
|
2893
|
-
var i, n, r, u, p, w,
|
|
2893
|
+
var i, n, r, u, p, w, k, C;
|
|
2894
2894
|
if (!t || t.length === 0)
|
|
2895
2895
|
throw new Error("latlngs not passed");
|
|
2896
2896
|
lt(t) || (console.warn("latlngs are not flat! Only the first ring will be used"), t = t[0]);
|
|
2897
|
-
var T = Z([0, 0]),
|
|
2897
|
+
var T = Z([0, 0]), z = q(t), A = z.getNorthWest().distanceTo(z.getSouthWest()) * z.getNorthEast().distanceTo(z.getNorthWest());
|
|
2898
2898
|
A < 1700 && (T = Je(t));
|
|
2899
2899
|
var Q = t.length, Y = [];
|
|
2900
2900
|
for (i = 0; i < Q; i++) {
|
|
@@ -2908,23 +2908,23 @@ function An() {
|
|
|
2908
2908
|
else
|
|
2909
2909
|
for (i = 0, u = 0; i < Q - 1; i++)
|
|
2910
2910
|
if (p = Y[i], w = Y[i + 1], r = p.distanceTo(w), u += r, u > n) {
|
|
2911
|
-
|
|
2912
|
-
w.x -
|
|
2913
|
-
w.y -
|
|
2911
|
+
k = (u - n) / r, C = [
|
|
2912
|
+
w.x - k * (w.x - p.x),
|
|
2913
|
+
w.y - k * (w.y - p.y)
|
|
2914
2914
|
];
|
|
2915
2915
|
break;
|
|
2916
2916
|
}
|
|
2917
|
-
var nt = e.unproject(
|
|
2917
|
+
var nt = e.unproject(O(C));
|
|
2918
2918
|
return Z([nt.lat + T.lat, nt.lng + T.lng]);
|
|
2919
2919
|
}
|
|
2920
|
-
var
|
|
2920
|
+
var Ao = {
|
|
2921
2921
|
__proto__: null,
|
|
2922
2922
|
simplify: Ki,
|
|
2923
2923
|
pointToSegmentDistance: Xi,
|
|
2924
|
-
closestPointOnSegment:
|
|
2924
|
+
closestPointOnSegment: Oo,
|
|
2925
2925
|
clipSegment: Ji,
|
|
2926
2926
|
_getEdgeIntersection: de,
|
|
2927
|
-
_getBitCode:
|
|
2927
|
+
_getBitCode: zt,
|
|
2928
2928
|
_sqClosestPointOnSegment: Qt,
|
|
2929
2929
|
isFlat: lt,
|
|
2930
2930
|
_flat: $i,
|
|
@@ -2946,16 +2946,16 @@ function An() {
|
|
|
2946
2946
|
return n = -i * Math.log(Math.max(w, 1e-10)), new B(t.lng * e * i, n);
|
|
2947
2947
|
},
|
|
2948
2948
|
unproject: function(t) {
|
|
2949
|
-
for (var e = 180 / Math.PI, i = this.R, n = this.R_MINOR / i, r = Math.sqrt(1 - n * n), u = Math.exp(-t.y / i), p = Math.PI / 2 - 2 * Math.atan(u), w = 0,
|
|
2950
|
-
C = r * Math.sin(p), C = Math.pow((1 - C) / (1 + C), r / 2),
|
|
2949
|
+
for (var e = 180 / Math.PI, i = this.R, n = this.R_MINOR / i, r = Math.sqrt(1 - n * n), u = Math.exp(-t.y / i), p = Math.PI / 2 - 2 * Math.atan(u), w = 0, k = 0.1, C; w < 15 && Math.abs(k) > 1e-7; w++)
|
|
2950
|
+
C = r * Math.sin(p), C = Math.pow((1 - C) / (1 + C), r / 2), k = Math.PI / 2 - 2 * Math.atan(u * C) - p, p += k;
|
|
2951
2951
|
return new G(p * e, t.x * e / i);
|
|
2952
2952
|
}
|
|
2953
|
-
},
|
|
2953
|
+
}, Zo = {
|
|
2954
2954
|
__proto__: null,
|
|
2955
2955
|
LonLat: Qe,
|
|
2956
2956
|
Mercator: ti,
|
|
2957
2957
|
SphericalMercator: Ce
|
|
2958
|
-
},
|
|
2958
|
+
}, Ro = y({}, kt, {
|
|
2959
2959
|
code: "EPSG:3395",
|
|
2960
2960
|
projection: ti,
|
|
2961
2961
|
transformation: function() {
|
|
@@ -2966,7 +2966,7 @@ function An() {
|
|
|
2966
2966
|
code: "EPSG:4326",
|
|
2967
2967
|
projection: Qe,
|
|
2968
2968
|
transformation: Vt(1 / 180, 1, -1 / 180, 0.5)
|
|
2969
|
-
}),
|
|
2969
|
+
}), No = y({}, yt, {
|
|
2970
2970
|
projection: Qe,
|
|
2971
2971
|
transformation: Vt(1, 0, -1, 0),
|
|
2972
2972
|
scale: function(t) {
|
|
@@ -2981,7 +2981,7 @@ function An() {
|
|
|
2981
2981
|
},
|
|
2982
2982
|
infinite: !0
|
|
2983
2983
|
});
|
|
2984
|
-
yt.Earth = kt, yt.EPSG3395 =
|
|
2984
|
+
yt.Earth = kt, yt.EPSG3395 = Ro, yt.EPSG3857 = Te, yt.EPSG900913 = Vn, yt.EPSG4326 = tn, yt.Simple = No;
|
|
2985
2985
|
var ct = Ut.extend({
|
|
2986
2986
|
// Classes extending `L.Layer` will inherit the following options:
|
|
2987
2987
|
options: {
|
|
@@ -3185,7 +3185,7 @@ function An() {
|
|
|
3185
3185
|
getLayerId: function(t) {
|
|
3186
3186
|
return f(t);
|
|
3187
3187
|
}
|
|
3188
|
-
}),
|
|
3188
|
+
}), Fo = function(t, e) {
|
|
3189
3189
|
return new It(t, e);
|
|
3190
3190
|
}, Lt = It.extend({
|
|
3191
3191
|
addLayer: function(t) {
|
|
@@ -3219,7 +3219,7 @@ function An() {
|
|
|
3219
3219
|
}
|
|
3220
3220
|
return t;
|
|
3221
3221
|
}
|
|
3222
|
-
}),
|
|
3222
|
+
}), Ho = function(t, e) {
|
|
3223
3223
|
return new Lt(t, e);
|
|
3224
3224
|
}, At = vt.extend({
|
|
3225
3225
|
/* @section
|
|
@@ -3297,7 +3297,7 @@ function An() {
|
|
|
3297
3297
|
_setIconStyles: function(t, e) {
|
|
3298
3298
|
var i = this.options, n = i[e + "Size"];
|
|
3299
3299
|
typeof n == "number" && (n = [n, n]);
|
|
3300
|
-
var r =
|
|
3300
|
+
var r = O(n), u = O(e === "shadow" && i.shadowAnchor || i.iconAnchor || r && r.divideBy(2, !0));
|
|
3301
3301
|
t.className = "leaflet-marker-" + e + " " + (i.className || ""), u && (t.style.marginLeft = -u.x + "px", t.style.marginTop = -u.y + "px"), r && (t.style.width = r.x + "px", t.style.height = r.y + "px");
|
|
3302
3302
|
},
|
|
3303
3303
|
_createImg: function(t, e) {
|
|
@@ -3307,7 +3307,7 @@ function An() {
|
|
|
3307
3307
|
return S.retina && this.options[t + "RetinaUrl"] || this.options[t + "Url"];
|
|
3308
3308
|
}
|
|
3309
3309
|
});
|
|
3310
|
-
function
|
|
3310
|
+
function Go(t) {
|
|
3311
3311
|
return new At(t);
|
|
3312
3312
|
}
|
|
3313
3313
|
var te = At.extend({
|
|
@@ -3363,14 +3363,14 @@ function An() {
|
|
|
3363
3363
|
return this._draggable && this._draggable._moved;
|
|
3364
3364
|
},
|
|
3365
3365
|
_adjustPan: function(t) {
|
|
3366
|
-
var e = this._marker, i = e._map, n = this._marker.options.autoPanSpeed, r = this._marker.options.autoPanPadding, u = Tt(e._icon), p = i.getPixelBounds(), w = i.getPixelOrigin(),
|
|
3366
|
+
var e = this._marker, i = e._map, n = this._marker.options.autoPanSpeed, r = this._marker.options.autoPanPadding, u = Tt(e._icon), p = i.getPixelBounds(), w = i.getPixelOrigin(), k = et(
|
|
3367
3367
|
p.min._subtract(w).add(r),
|
|
3368
3368
|
p.max._subtract(w).subtract(r)
|
|
3369
3369
|
);
|
|
3370
|
-
if (!
|
|
3371
|
-
var C =
|
|
3372
|
-
(Math.max(
|
|
3373
|
-
(Math.max(
|
|
3370
|
+
if (!k.contains(u)) {
|
|
3371
|
+
var C = O(
|
|
3372
|
+
(Math.max(k.max.x, u.x) - k.max.x) / (p.max.x - k.max.x) - (Math.min(k.min.x, u.x) - k.min.x) / (p.min.x - k.min.x),
|
|
3373
|
+
(Math.max(k.max.y, u.y) - k.max.y) / (p.max.y - k.max.y) - (Math.min(k.min.y, u.y) - k.min.y) / (p.min.y - k.min.y)
|
|
3374
3374
|
).multiplyBy(n);
|
|
3375
3375
|
i.panBy(C, { animate: !1 }), this._draggable._newPos._add(C), this._draggable._startPos._add(C), K(e._icon, this._draggable._newPos), this._onDrag(t), this._panRequest = tt(this._adjustPan.bind(this, t));
|
|
3376
3376
|
}
|
|
@@ -3559,7 +3559,7 @@ function An() {
|
|
|
3559
3559
|
_panOnFocus: function() {
|
|
3560
3560
|
var t = this._map;
|
|
3561
3561
|
if (t) {
|
|
3562
|
-
var e = this.options.icon.options, i = e.iconSize ?
|
|
3562
|
+
var e = this.options.icon.options, i = e.iconSize ? O(e.iconSize) : O(0, 0), n = e.iconAnchor ? O(e.iconAnchor) : O(0, 0);
|
|
3563
3563
|
t.panInside(this._latlng, {
|
|
3564
3564
|
paddingTopLeft: n,
|
|
3565
3565
|
paddingBottomRight: i.subtract(n)
|
|
@@ -3573,7 +3573,7 @@ function An() {
|
|
|
3573
3573
|
return this.options.icon.options.tooltipAnchor;
|
|
3574
3574
|
}
|
|
3575
3575
|
});
|
|
3576
|
-
function
|
|
3576
|
+
function Uo(t, e) {
|
|
3577
3577
|
return new ce(t, e);
|
|
3578
3578
|
}
|
|
3579
3579
|
var Ct = ct.extend({
|
|
@@ -3720,7 +3720,7 @@ function An() {
|
|
|
3720
3720
|
return t.distanceTo(this._point) <= this._radius + this._clickTolerance();
|
|
3721
3721
|
}
|
|
3722
3722
|
});
|
|
3723
|
-
function
|
|
3723
|
+
function Vo(t, e) {
|
|
3724
3724
|
return new fe(t, e);
|
|
3725
3725
|
}
|
|
3726
3726
|
var ei = fe.extend({
|
|
@@ -3752,16 +3752,16 @@ function An() {
|
|
|
3752
3752
|
_project: function() {
|
|
3753
3753
|
var t = this._latlng.lng, e = this._latlng.lat, i = this._map, n = i.options.crs;
|
|
3754
3754
|
if (n.distance === kt.distance) {
|
|
3755
|
-
var r = Math.PI / 180, u = this._mRadius / kt.R / r, p = i.project([e + u, t]), w = i.project([e - u, t]),
|
|
3756
|
-
(isNaN(T) || T === 0) && (T = u / Math.cos(Math.PI / 180 * e)), this._point =
|
|
3755
|
+
var r = Math.PI / 180, u = this._mRadius / kt.R / r, p = i.project([e + u, t]), w = i.project([e - u, t]), k = p.add(w).divideBy(2), C = i.unproject(k).lat, T = Math.acos((Math.cos(u * r) - Math.sin(e * r) * Math.sin(C * r)) / (Math.cos(e * r) * Math.cos(C * r))) / r;
|
|
3756
|
+
(isNaN(T) || T === 0) && (T = u / Math.cos(Math.PI / 180 * e)), this._point = k.subtract(i.getPixelOrigin()), this._radius = isNaN(T) ? 0 : k.x - i.project([C, t - T]).x, this._radiusY = k.y - p.y;
|
|
3757
3757
|
} else {
|
|
3758
|
-
var
|
|
3759
|
-
this._point = i.latLngToLayerPoint(this._latlng), this._radius = this._point.x - i.latLngToLayerPoint(
|
|
3758
|
+
var z = n.unproject(n.project(this._latlng).subtract([this._mRadius, 0]));
|
|
3759
|
+
this._point = i.latLngToLayerPoint(this._latlng), this._radius = this._point.x - i.latLngToLayerPoint(z).x;
|
|
3760
3760
|
}
|
|
3761
3761
|
this._updateBounds();
|
|
3762
3762
|
}
|
|
3763
3763
|
});
|
|
3764
|
-
function
|
|
3764
|
+
function Wo(t, e, i) {
|
|
3765
3765
|
return new ei(t, e, i);
|
|
3766
3766
|
}
|
|
3767
3767
|
var wt = Ct.extend({
|
|
@@ -3798,10 +3798,10 @@ function An() {
|
|
|
3798
3798
|
// Returns the point closest to `p` on the Polyline.
|
|
3799
3799
|
closestLayerPoint: function(t) {
|
|
3800
3800
|
for (var e = 1 / 0, i = null, n = Qt, r, u, p = 0, w = this._parts.length; p < w; p++)
|
|
3801
|
-
for (var
|
|
3802
|
-
r =
|
|
3803
|
-
var
|
|
3804
|
-
|
|
3801
|
+
for (var k = this._parts[p], C = 1, T = k.length; C < T; C++) {
|
|
3802
|
+
r = k[C - 1], u = k[C];
|
|
3803
|
+
var z = n(t, r, u, !0);
|
|
3804
|
+
z < e && (e = z, i = n(t, r, u));
|
|
3805
3805
|
}
|
|
3806
3806
|
return i && (i.distance = Math.sqrt(e)), i;
|
|
3807
3807
|
},
|
|
@@ -3866,10 +3866,10 @@ function An() {
|
|
|
3866
3866
|
this._parts = this._rings;
|
|
3867
3867
|
return;
|
|
3868
3868
|
}
|
|
3869
|
-
var e = this._parts, i, n, r, u, p, w,
|
|
3869
|
+
var e = this._parts, i, n, r, u, p, w, k;
|
|
3870
3870
|
for (i = 0, r = 0, u = this._rings.length; i < u; i++)
|
|
3871
|
-
for (
|
|
3872
|
-
w = Ji(
|
|
3871
|
+
for (k = this._rings[i], n = 0, p = k.length; n < p - 1; n++)
|
|
3872
|
+
w = Ji(k[n], k[n + 1], t, n, !0), w && (e[r] = e[r] || [], e[r].push(w[0]), (w[1] !== k[n + 1] || n === p - 2) && (e[r].push(w[1]), r++));
|
|
3873
3873
|
}
|
|
3874
3874
|
},
|
|
3875
3875
|
// simplify each clipped part of the polyline for performance
|
|
@@ -3885,17 +3885,17 @@ function An() {
|
|
|
3885
3885
|
},
|
|
3886
3886
|
// Needed by the `Canvas` renderer for interactivity
|
|
3887
3887
|
_containsPoint: function(t, e) {
|
|
3888
|
-
var i, n, r, u, p, w,
|
|
3888
|
+
var i, n, r, u, p, w, k = this._clickTolerance();
|
|
3889
3889
|
if (!this._pxBounds || !this._pxBounds.contains(t))
|
|
3890
3890
|
return !1;
|
|
3891
3891
|
for (i = 0, u = this._parts.length; i < u; i++)
|
|
3892
3892
|
for (w = this._parts[i], n = 0, p = w.length, r = p - 1; n < p; r = n++)
|
|
3893
|
-
if (!(!e && n === 0) && Xi(t, w[r], w[n]) <=
|
|
3893
|
+
if (!(!e && n === 0) && Xi(t, w[r], w[n]) <= k)
|
|
3894
3894
|
return !0;
|
|
3895
3895
|
return !1;
|
|
3896
3896
|
}
|
|
3897
3897
|
});
|
|
3898
|
-
function
|
|
3898
|
+
function jo(t, e) {
|
|
3899
3899
|
return new wt(t, e);
|
|
3900
3900
|
}
|
|
3901
3901
|
wt._flat = $i;
|
|
@@ -3939,16 +3939,16 @@ function An() {
|
|
|
3939
3939
|
},
|
|
3940
3940
|
// Needed by the `Canvas` renderer for interactivity
|
|
3941
3941
|
_containsPoint: function(t) {
|
|
3942
|
-
var e = !1, i, n, r, u, p, w,
|
|
3942
|
+
var e = !1, i, n, r, u, p, w, k, C;
|
|
3943
3943
|
if (!this._pxBounds || !this._pxBounds.contains(t))
|
|
3944
3944
|
return !1;
|
|
3945
|
-
for (u = 0,
|
|
3945
|
+
for (u = 0, k = this._parts.length; u < k; u++)
|
|
3946
3946
|
for (i = this._parts[u], p = 0, C = i.length, w = C - 1; p < C; w = p++)
|
|
3947
3947
|
n = i[p], r = i[w], n.y > t.y != r.y > t.y && t.x < (r.x - n.x) * (t.y - n.y) / (r.y - n.y) + n.x && (e = !e);
|
|
3948
3948
|
return e || wt.prototype._containsPoint.call(this, t, !0);
|
|
3949
3949
|
}
|
|
3950
3950
|
});
|
|
3951
|
-
function
|
|
3951
|
+
function qo(t, e) {
|
|
3952
3952
|
return new Zt(t, e);
|
|
3953
3953
|
}
|
|
3954
3954
|
var xt = Lt.extend({
|
|
@@ -4037,7 +4037,7 @@ function An() {
|
|
|
4037
4037
|
}
|
|
4038
4038
|
});
|
|
4039
4039
|
function _e(t, e) {
|
|
4040
|
-
var i = t.type === "Feature" ? t.geometry : t, n = i ? i.coordinates : null, r = [], u = e && e.pointToLayer, p = e && e.coordsToLatLng || ii, w,
|
|
4040
|
+
var i = t.type === "Feature" ? t.geometry : t, n = i ? i.coordinates : null, r = [], u = e && e.pointToLayer, p = e && e.coordsToLatLng || ii, w, k, C, T;
|
|
4041
4041
|
if (!n && !i)
|
|
4042
4042
|
return null;
|
|
4043
4043
|
switch (i.type) {
|
|
@@ -4049,18 +4049,18 @@ function An() {
|
|
|
4049
4049
|
return new Lt(r);
|
|
4050
4050
|
case "LineString":
|
|
4051
4051
|
case "MultiLineString":
|
|
4052
|
-
return
|
|
4052
|
+
return k = pe(n, i.type === "LineString" ? 0 : 1, p), new wt(k, e);
|
|
4053
4053
|
case "Polygon":
|
|
4054
4054
|
case "MultiPolygon":
|
|
4055
|
-
return
|
|
4055
|
+
return k = pe(n, i.type === "Polygon" ? 1 : 2, p), new Zt(k, e);
|
|
4056
4056
|
case "GeometryCollection":
|
|
4057
4057
|
for (C = 0, T = i.geometries.length; C < T; C++) {
|
|
4058
|
-
var
|
|
4058
|
+
var z = _e({
|
|
4059
4059
|
geometry: i.geometries[C],
|
|
4060
4060
|
type: "Feature",
|
|
4061
4061
|
properties: t.properties
|
|
4062
4062
|
}, e);
|
|
4063
|
-
|
|
4063
|
+
z && r.push(z);
|
|
4064
4064
|
}
|
|
4065
4065
|
return new Lt(r);
|
|
4066
4066
|
case "FeatureCollection":
|
|
@@ -4166,7 +4166,7 @@ function An() {
|
|
|
4166
4166
|
function on(t, e) {
|
|
4167
4167
|
return new xt(t, e);
|
|
4168
4168
|
}
|
|
4169
|
-
var
|
|
4169
|
+
var Ko = on, ve = ct.extend({
|
|
4170
4170
|
// @section
|
|
4171
4171
|
// @aka ImageOverlay options
|
|
4172
4172
|
options: {
|
|
@@ -4256,7 +4256,7 @@ function An() {
|
|
|
4256
4256
|
},
|
|
4257
4257
|
_initImage: function() {
|
|
4258
4258
|
var t = this._url.tagName === "IMG", e = this._image = t ? this._url : F("img");
|
|
4259
|
-
if (I(e, "leaflet-image-layer"), this._zoomAnimated && I(e, "leaflet-zoom-animated"), this.options.className && I(e, this.options.className), e.onselectstart =
|
|
4259
|
+
if (I(e, "leaflet-image-layer"), this._zoomAnimated && I(e, "leaflet-zoom-animated"), this.options.className && I(e, this.options.className), e.onselectstart = m, e.onmousemove = m, e.onload = l(this.fire, this, "load"), e.onerror = l(this._overlayOnError, this, "error"), (this.options.crossOrigin || this.options.crossOrigin === "") && (e.crossOrigin = this.options.crossOrigin === !0 ? "" : this.options.crossOrigin), this.options.zIndex && this._updateZIndex(), t) {
|
|
4260
4260
|
this._url = e.src;
|
|
4261
4261
|
return;
|
|
4262
4262
|
}
|
|
@@ -4289,7 +4289,7 @@ function An() {
|
|
|
4289
4289
|
getCenter: function() {
|
|
4290
4290
|
return this._bounds.getCenter();
|
|
4291
4291
|
}
|
|
4292
|
-
}),
|
|
4292
|
+
}), Xo = function(t, e, i) {
|
|
4293
4293
|
return new ve(t, e, i);
|
|
4294
4294
|
}, sn = ve.extend({
|
|
4295
4295
|
// @section
|
|
@@ -4315,7 +4315,7 @@ function An() {
|
|
|
4315
4315
|
},
|
|
4316
4316
|
_initImage: function() {
|
|
4317
4317
|
var t = this._url.tagName === "VIDEO", e = this._image = t ? this._url : F("video");
|
|
4318
|
-
if (I(e, "leaflet-image-layer"), this._zoomAnimated && I(e, "leaflet-zoom-animated"), this.options.className && I(e, this.options.className), e.onselectstart =
|
|
4318
|
+
if (I(e, "leaflet-image-layer"), this._zoomAnimated && I(e, "leaflet-zoom-animated"), this.options.className && I(e, this.options.className), e.onselectstart = m, e.onmousemove = m, e.onloadeddata = l(this.fire, this, "load"), t) {
|
|
4319
4319
|
for (var i = e.getElementsByTagName("source"), n = [], r = 0; r < i.length; r++)
|
|
4320
4320
|
n.push(i[r].src);
|
|
4321
4321
|
this._url = i.length > 0 ? n : [e.src];
|
|
@@ -4331,19 +4331,19 @@ function An() {
|
|
|
4331
4331
|
// Returns the instance of [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement)
|
|
4332
4332
|
// used by this overlay.
|
|
4333
4333
|
});
|
|
4334
|
-
function
|
|
4334
|
+
function Yo(t, e, i) {
|
|
4335
4335
|
return new sn(t, e, i);
|
|
4336
4336
|
}
|
|
4337
4337
|
var rn = ve.extend({
|
|
4338
4338
|
_initImage: function() {
|
|
4339
4339
|
var t = this._image = this._url;
|
|
4340
|
-
I(t, "leaflet-image-layer"), this._zoomAnimated && I(t, "leaflet-zoom-animated"), this.options.className && I(t, this.options.className), t.onselectstart =
|
|
4340
|
+
I(t, "leaflet-image-layer"), this._zoomAnimated && I(t, "leaflet-zoom-animated"), this.options.className && I(t, this.options.className), t.onselectstart = m, t.onmousemove = m;
|
|
4341
4341
|
}
|
|
4342
4342
|
// @method getElement(): SVGElement
|
|
4343
4343
|
// Returns the instance of [`SVGElement`](https://developer.mozilla.org/docs/Web/API/SVGElement)
|
|
4344
4344
|
// used by this overlay.
|
|
4345
4345
|
});
|
|
4346
|
-
function
|
|
4346
|
+
function Jo(t, e, i) {
|
|
4347
4347
|
return new rn(t, e, i);
|
|
4348
4348
|
}
|
|
4349
4349
|
var mt = ct.extend({
|
|
@@ -4493,7 +4493,7 @@ function An() {
|
|
|
4493
4493
|
},
|
|
4494
4494
|
_updatePosition: function() {
|
|
4495
4495
|
if (this._map) {
|
|
4496
|
-
var t = this._map.latLngToLayerPoint(this._latlng), e =
|
|
4496
|
+
var t = this._map.latLngToLayerPoint(this._latlng), e = O(this.options.offset), i = this._getAnchor();
|
|
4497
4497
|
this._zoomAnimated ? K(this._container, t.add(i)) : e = e.add(t).add(i);
|
|
4498
4498
|
var n = this._containerBottom = -e.y, r = this._containerLeft = -Math.round(this._containerWidth / 2) + e.x;
|
|
4499
4499
|
this._container.style.bottom = n + "px", this._container.style.left = r + "px";
|
|
@@ -4622,14 +4622,14 @@ function An() {
|
|
|
4622
4622
|
}
|
|
4623
4623
|
var t = this._map, e = parseInt(qt(this._container, "marginBottom"), 10) || 0, i = this._container.offsetHeight + e, n = this._containerWidth, r = new B(this._containerLeft, -i - this._containerBottom);
|
|
4624
4624
|
r._add(Tt(this._container));
|
|
4625
|
-
var u = t.layerPointToContainerPoint(r), p =
|
|
4626
|
-
u.x + n +
|
|
4625
|
+
var u = t.layerPointToContainerPoint(r), p = O(this.options.autoPanPadding), w = O(this.options.autoPanPaddingTopLeft || p), k = O(this.options.autoPanPaddingBottomRight || p), C = t.getSize(), T = 0, z = 0;
|
|
4626
|
+
u.x + n + k.x > C.x && (T = u.x + n - C.x + k.x), u.x - T - w.x < 0 && (T = u.x - w.x), u.y + i + k.y > C.y && (z = u.y + i - C.y + k.y), u.y - z - w.y < 0 && (z = u.y - w.y), (T || z) && (this.options.keepInView && (this._autopanning = !0), t.fire("autopanstart").panBy([T, z]));
|
|
4627
4627
|
}
|
|
4628
4628
|
},
|
|
4629
4629
|
_getAnchor: function() {
|
|
4630
|
-
return
|
|
4630
|
+
return O(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);
|
|
4631
4631
|
}
|
|
4632
|
-
}),
|
|
4632
|
+
}), $o = function(t, e) {
|
|
4633
4633
|
return new ye(t, e);
|
|
4634
4634
|
};
|
|
4635
4635
|
R.mergeOptions({
|
|
@@ -4764,8 +4764,8 @@ function An() {
|
|
|
4764
4764
|
_adjustPan: function() {
|
|
4765
4765
|
},
|
|
4766
4766
|
_setPosition: function(t) {
|
|
4767
|
-
var e, i, n = this._map, r = this._container, u = n.latLngToContainerPoint(n.getCenter()), p = n.layerPointToContainerPoint(t), w = this.options.direction,
|
|
4768
|
-
w === "top" ? (e =
|
|
4767
|
+
var e, i, n = this._map, r = this._container, u = n.latLngToContainerPoint(n.getCenter()), p = n.layerPointToContainerPoint(t), w = this.options.direction, k = r.offsetWidth, C = r.offsetHeight, T = O(this.options.offset), z = this._getAnchor();
|
|
4768
|
+
w === "top" ? (e = k / 2, i = C) : w === "bottom" ? (e = k / 2, i = 0) : w === "center" ? (e = k / 2, i = C / 2) : w === "right" ? (e = 0, i = C / 2) : w === "left" ? (e = k, i = C / 2) : p.x < u.x ? (w = "right", e = 0, i = C / 2) : (w = "left", e = k + (T.x + z.x) * 2, i = C / 2), t = t.subtract(O(e, i, !0)).add(T).add(z), j(r, "leaflet-tooltip-right"), j(r, "leaflet-tooltip-left"), j(r, "leaflet-tooltip-top"), j(r, "leaflet-tooltip-bottom"), I(r, "leaflet-tooltip-" + w), K(r, t);
|
|
4769
4769
|
},
|
|
4770
4770
|
_updatePosition: function() {
|
|
4771
4771
|
var t = this._map.latLngToLayerPoint(this._latlng);
|
|
@@ -4779,9 +4779,9 @@ function An() {
|
|
|
4779
4779
|
this._setPosition(e);
|
|
4780
4780
|
},
|
|
4781
4781
|
_getAnchor: function() {
|
|
4782
|
-
return
|
|
4782
|
+
return O(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);
|
|
4783
4783
|
}
|
|
4784
|
-
}),
|
|
4784
|
+
}), Qo = function(t, e) {
|
|
4785
4785
|
return new Le(t, e);
|
|
4786
4786
|
};
|
|
4787
4787
|
R.include({
|
|
@@ -4902,7 +4902,7 @@ function An() {
|
|
|
4902
4902
|
createIcon: function(t) {
|
|
4903
4903
|
var e = t && t.tagName === "DIV" ? t : document.createElement("div"), i = this.options;
|
|
4904
4904
|
if (i.html instanceof Element ? (re(e), e.appendChild(i.html)) : e.innerHTML = i.html !== !1 ? i.html : "", i.bgPos) {
|
|
4905
|
-
var n =
|
|
4905
|
+
var n = O(i.bgPos);
|
|
4906
4906
|
e.style.backgroundPosition = -n.x + "px " + -n.y + "px";
|
|
4907
4907
|
}
|
|
4908
4908
|
return this._setIconStyles(e, "icon"), e;
|
|
@@ -4911,7 +4911,7 @@ function An() {
|
|
|
4911
4911
|
return null;
|
|
4912
4912
|
}
|
|
4913
4913
|
});
|
|
4914
|
-
function
|
|
4914
|
+
function ts(t) {
|
|
4915
4915
|
return new an(t);
|
|
4916
4916
|
}
|
|
4917
4917
|
At.Default = te;
|
|
@@ -5035,7 +5035,7 @@ function An() {
|
|
|
5035
5035
|
zoom: this._resetView,
|
|
5036
5036
|
moveend: this._onMoveEnd
|
|
5037
5037
|
};
|
|
5038
|
-
return this.options.updateWhenIdle || (this._onMove || (this._onMove =
|
|
5038
|
+
return this.options.updateWhenIdle || (this._onMove || (this._onMove = v(this._onMoveEnd, this.options.updateInterval, this)), t.move = this._onMove), this._zoomAnimated && (t.zoomanim = this._animateZoom), t;
|
|
5039
5039
|
},
|
|
5040
5040
|
// @section Extension methods
|
|
5041
5041
|
// Layers extending `GridLayer` shall reimplement the following method.
|
|
@@ -5075,7 +5075,7 @@ function An() {
|
|
|
5075
5075
|
i && !this._noPrune && this._pruneTiles(), e && (at(this._fadeFrame), this._fadeFrame = tt(this._updateOpacity, this));
|
|
5076
5076
|
}
|
|
5077
5077
|
},
|
|
5078
|
-
_onOpaqueTile:
|
|
5078
|
+
_onOpaqueTile: m,
|
|
5079
5079
|
_initContainer: function() {
|
|
5080
5080
|
this._container || (this._container = F("div", "leaflet-layer " + (this.options.className || "")), this._updateZIndex(), this.options.opacity < 1 && this._updateOpacity(), this.getPane().appendChild(this._container));
|
|
5081
5081
|
},
|
|
@@ -5085,12 +5085,12 @@ function An() {
|
|
|
5085
5085
|
for (var i in this._levels)
|
|
5086
5086
|
i = Number(i), this._levels[i].el.children.length || i === t ? (this._levels[i].el.style.zIndex = e - Math.abs(t - i), this._onUpdateLevel(i)) : (W(this._levels[i].el), this._removeTilesAtZoom(i), this._onRemoveLevel(i), delete this._levels[i]);
|
|
5087
5087
|
var n = this._levels[t], r = this._map;
|
|
5088
|
-
return n || (n = this._levels[t] = {}, n.el = F("div", "leaflet-tile-container leaflet-zoom-animated", this._container), n.el.style.zIndex = e, n.origin = r.project(r.unproject(r.getPixelOrigin()), t).round(), n.zoom = t, this._setZoomTransform(n, r.getCenter(), r.getZoom()),
|
|
5088
|
+
return n || (n = this._levels[t] = {}, n.el = F("div", "leaflet-tile-container leaflet-zoom-animated", this._container), n.el.style.zIndex = e, n.origin = r.project(r.unproject(r.getPixelOrigin()), t).round(), n.zoom = t, this._setZoomTransform(n, r.getCenter(), r.getZoom()), m(n.el.offsetWidth), this._onCreateLevel(n)), this._level = n, n;
|
|
5089
5089
|
}
|
|
5090
5090
|
},
|
|
5091
|
-
_onUpdateLevel:
|
|
5092
|
-
_onRemoveLevel:
|
|
5093
|
-
_onCreateLevel:
|
|
5091
|
+
_onUpdateLevel: m,
|
|
5092
|
+
_onRemoveLevel: m,
|
|
5093
|
+
_onCreateLevel: m,
|
|
5094
5094
|
_pruneTiles: function() {
|
|
5095
5095
|
if (this._map) {
|
|
5096
5096
|
var t, e, i = this._map.getZoom();
|
|
@@ -5125,7 +5125,7 @@ function An() {
|
|
|
5125
5125
|
_retainParent: function(t, e, i, n) {
|
|
5126
5126
|
var r = Math.floor(t / 2), u = Math.floor(e / 2), p = i - 1, w = new B(+r, +u);
|
|
5127
5127
|
w.z = +p;
|
|
5128
|
-
var
|
|
5128
|
+
var k = this._tileCoordsToKey(w), C = this._tiles[k];
|
|
5129
5129
|
return C && C.active ? (C.retain = !0, !0) : (C && C.loaded && (C.retain = !0), p > n ? this._retainParent(r, u, p, n) : !1);
|
|
5130
5130
|
},
|
|
5131
5131
|
_retainChildren: function(t, e, i, n) {
|
|
@@ -5133,11 +5133,11 @@ function An() {
|
|
|
5133
5133
|
for (var u = 2 * e; u < 2 * e + 2; u++) {
|
|
5134
5134
|
var p = new B(r, u);
|
|
5135
5135
|
p.z = i + 1;
|
|
5136
|
-
var w = this._tileCoordsToKey(p),
|
|
5137
|
-
if (
|
|
5138
|
-
|
|
5136
|
+
var w = this._tileCoordsToKey(p), k = this._tiles[w];
|
|
5137
|
+
if (k && k.active) {
|
|
5138
|
+
k.retain = !0;
|
|
5139
5139
|
continue;
|
|
5140
|
-
} else
|
|
5140
|
+
} else k && k.loaded && (k.retain = !0);
|
|
5141
5141
|
i + 1 < n && this._retainChildren(r, u, i + 1, n);
|
|
5142
5142
|
}
|
|
5143
5143
|
},
|
|
@@ -5189,7 +5189,7 @@ function An() {
|
|
|
5189
5189
|
if (e) {
|
|
5190
5190
|
var i = this._clampZoom(e.getZoom());
|
|
5191
5191
|
if (t === void 0 && (t = e.getCenter()), this._tileZoom !== void 0) {
|
|
5192
|
-
var n = this._getTiledPixelBounds(t), r = this._pxBoundsToTileRange(n), u = r.getCenter(), p = [], w = this.options.keepBuffer,
|
|
5192
|
+
var n = this._getTiledPixelBounds(t), r = this._pxBoundsToTileRange(n), u = r.getCenter(), p = [], w = this.options.keepBuffer, k = new V(
|
|
5193
5193
|
r.getBottomLeft().subtract([w, -w]),
|
|
5194
5194
|
r.getTopRight().add([w, -w])
|
|
5195
5195
|
);
|
|
@@ -5197,15 +5197,15 @@ function An() {
|
|
|
5197
5197
|
throw new Error("Attempted to load an infinite number of tiles");
|
|
5198
5198
|
for (var C in this._tiles) {
|
|
5199
5199
|
var T = this._tiles[C].coords;
|
|
5200
|
-
(T.z !== this._tileZoom || !
|
|
5200
|
+
(T.z !== this._tileZoom || !k.contains(new B(T.x, T.y))) && (this._tiles[C].current = !1);
|
|
5201
5201
|
}
|
|
5202
5202
|
if (Math.abs(i - this._tileZoom) > 1) {
|
|
5203
5203
|
this._setView(t, i);
|
|
5204
5204
|
return;
|
|
5205
5205
|
}
|
|
5206
|
-
for (var
|
|
5206
|
+
for (var z = r.min.y; z <= r.max.y; z++)
|
|
5207
5207
|
for (var A = r.min.x; A <= r.max.x; A++) {
|
|
5208
|
-
var Q = new B(A,
|
|
5208
|
+
var Q = new B(A, z);
|
|
5209
5209
|
if (Q.z = this._tileZoom, !!this._isValidTile(Q)) {
|
|
5210
5210
|
var Y = this._tiles[this._tileCoordsToKey(Q)];
|
|
5211
5211
|
Y ? Y.current = !0 : p.push(Q);
|
|
@@ -5266,7 +5266,7 @@ function An() {
|
|
|
5266
5266
|
_initTile: function(t) {
|
|
5267
5267
|
I(t, "leaflet-tile");
|
|
5268
5268
|
var e = this.getTileSize();
|
|
5269
|
-
t.style.width = e.x + "px", t.style.height = e.y + "px", t.onselectstart =
|
|
5269
|
+
t.style.width = e.x + "px", t.style.height = e.y + "px", t.onselectstart = m, t.onmousemove = m, S.ielt9 && this.options.opacity < 1 && ht(t, this.options.opacity);
|
|
5270
5270
|
},
|
|
5271
5271
|
_addTile: function(t, e) {
|
|
5272
5272
|
var i = this._getTilePos(t), n = this._tileCoordsToKey(t), r = this.createTile(this._wrapCoords(t), l(this._tileReady, this, t));
|
|
@@ -5296,8 +5296,8 @@ function An() {
|
|
|
5296
5296
|
},
|
|
5297
5297
|
_wrapCoords: function(t) {
|
|
5298
5298
|
var e = new B(
|
|
5299
|
-
this._wrapX ?
|
|
5300
|
-
this._wrapY ?
|
|
5299
|
+
this._wrapX ? P(t.x, this._wrapX) : t.x,
|
|
5300
|
+
this._wrapY ? P(t.y, this._wrapY) : t.y
|
|
5301
5301
|
);
|
|
5302
5302
|
return e.z = t.z, e;
|
|
5303
5303
|
},
|
|
@@ -5315,7 +5315,7 @@ function An() {
|
|
|
5315
5315
|
return !0;
|
|
5316
5316
|
}
|
|
5317
5317
|
});
|
|
5318
|
-
function
|
|
5318
|
+
function es(t) {
|
|
5319
5319
|
return new ee(t);
|
|
5320
5320
|
}
|
|
5321
5321
|
var Nt = ee.extend({
|
|
@@ -5419,8 +5419,8 @@ function An() {
|
|
|
5419
5419
|
_abortLoading: function() {
|
|
5420
5420
|
var t, e;
|
|
5421
5421
|
for (t in this._tiles)
|
|
5422
|
-
if (this._tiles[t].coords.z !== this._tileZoom && (e = this._tiles[t].el, e.onload =
|
|
5423
|
-
e.src =
|
|
5422
|
+
if (this._tiles[t].coords.z !== this._tileZoom && (e = this._tiles[t].el, e.onload = m, e.onerror = m, !e.complete)) {
|
|
5423
|
+
e.src = st;
|
|
5424
5424
|
var i = this._tiles[t].coords;
|
|
5425
5425
|
W(e), delete this._tiles[t], this.fire("tileabort", {
|
|
5426
5426
|
tile: e,
|
|
@@ -5431,10 +5431,10 @@ function An() {
|
|
|
5431
5431
|
_removeTile: function(t) {
|
|
5432
5432
|
var e = this._tiles[t];
|
|
5433
5433
|
if (e)
|
|
5434
|
-
return e.el.setAttribute("src",
|
|
5434
|
+
return e.el.setAttribute("src", st), ee.prototype._removeTile.call(this, t);
|
|
5435
5435
|
},
|
|
5436
5436
|
_tileReady: function(t, e, i) {
|
|
5437
|
-
if (!(!this._map || i && i.getAttribute("src") ===
|
|
5437
|
+
if (!(!this._map || i && i.getAttribute("src") === st))
|
|
5438
5438
|
return ee.prototype._tileReady.call(this, t, e, i);
|
|
5439
5439
|
}
|
|
5440
5440
|
});
|
|
@@ -5499,10 +5499,10 @@ function An() {
|
|
|
5499
5499
|
return y(this.wmsParams, t), e || this.redraw(), this;
|
|
5500
5500
|
}
|
|
5501
5501
|
});
|
|
5502
|
-
function
|
|
5502
|
+
function is(t, e) {
|
|
5503
5503
|
return new ln(t, e);
|
|
5504
5504
|
}
|
|
5505
|
-
Nt.WMS = ln, hn.wms =
|
|
5505
|
+
Nt.WMS = ln, hn.wms = is;
|
|
5506
5506
|
var Pt = ct.extend({
|
|
5507
5507
|
// @section
|
|
5508
5508
|
// @aka Renderer options
|
|
@@ -5668,14 +5668,14 @@ function An() {
|
|
|
5668
5668
|
},
|
|
5669
5669
|
_updatePoly: function(t, e) {
|
|
5670
5670
|
if (this._drawing) {
|
|
5671
|
-
var i, n, r, u, p = t._parts, w = p.length,
|
|
5671
|
+
var i, n, r, u, p = t._parts, w = p.length, k = this._ctx;
|
|
5672
5672
|
if (w) {
|
|
5673
|
-
for (
|
|
5673
|
+
for (k.beginPath(), i = 0; i < w; i++) {
|
|
5674
5674
|
for (n = 0, r = p[i].length; n < r; n++)
|
|
5675
|
-
u = p[i][n],
|
|
5676
|
-
e &&
|
|
5675
|
+
u = p[i][n], k[n ? "lineTo" : "moveTo"](u.x, u.y);
|
|
5676
|
+
e && k.closePath();
|
|
5677
5677
|
}
|
|
5678
|
-
this._fillStroke(
|
|
5678
|
+
this._fillStroke(k, t);
|
|
5679
5679
|
}
|
|
5680
5680
|
}
|
|
5681
5681
|
},
|
|
@@ -5754,7 +5754,7 @@ function An() {
|
|
|
5754
5754
|
return function(t) {
|
|
5755
5755
|
return document.createElement("<" + t + ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">');
|
|
5756
5756
|
};
|
|
5757
|
-
}(),
|
|
5757
|
+
}(), ns = {
|
|
5758
5758
|
_initContainer: function() {
|
|
5759
5759
|
this._container = F("div", "leaflet-vml-container");
|
|
5760
5760
|
},
|
|
@@ -5840,7 +5840,7 @@ function An() {
|
|
|
5840
5840
|
Dt(t._path);
|
|
5841
5841
|
}
|
|
5842
5842
|
});
|
|
5843
|
-
S.vml && ne.include(
|
|
5843
|
+
S.vml && ne.include(ns);
|
|
5844
5844
|
function cn(t) {
|
|
5845
5845
|
return S.svg || S.vml ? new ne(t) : null;
|
|
5846
5846
|
}
|
|
@@ -5881,7 +5881,7 @@ function An() {
|
|
|
5881
5881
|
];
|
|
5882
5882
|
}
|
|
5883
5883
|
});
|
|
5884
|
-
function
|
|
5884
|
+
function os(t, e) {
|
|
5885
5885
|
return new fn(t, e);
|
|
5886
5886
|
}
|
|
5887
5887
|
ne.create = we, ne.pointsToPath = pi, xt.geometryToLayer = _e, xt.coordsToLatLng = ii, xt.coordsToLatLngs = pe, xt.latLngToCoords = ni, xt.latLngsToCoords = me, xt.getFeature = Rt, xt.asFeature = ge, R.mergeOptions({
|
|
@@ -6071,10 +6071,10 @@ function An() {
|
|
|
6071
6071
|
e.fire("moveend");
|
|
6072
6072
|
else {
|
|
6073
6073
|
this._prunePositions(+/* @__PURE__ */ new Date());
|
|
6074
|
-
var r = this._lastPos.subtract(this._positions[0]), u = (this._lastTime - this._times[0]) / 1e3, p = i.easeLinearity, w = r.multiplyBy(p / u),
|
|
6074
|
+
var r = this._lastPos.subtract(this._positions[0]), u = (this._lastTime - this._times[0]) / 1e3, p = i.easeLinearity, w = r.multiplyBy(p / u), k = w.distanceTo([0, 0]), C = Math.min(i.inertiaMaxSpeed, k), T = w.multiplyBy(C / k), z = C / (i.inertiaDeceleration * p), A = T.multiplyBy(-z / 2).round();
|
|
6075
6075
|
!A.x && !A.y ? e.fire("moveend") : (A = e._limitOffset(A, e.options.maxBounds), tt(function() {
|
|
6076
6076
|
e.panBy(A, {
|
|
6077
|
-
duration:
|
|
6077
|
+
duration: z,
|
|
6078
6078
|
easeLinearity: p,
|
|
6079
6079
|
noMoveStart: !0,
|
|
6080
6080
|
animate: !0
|
|
@@ -6166,7 +6166,7 @@ function An() {
|
|
|
6166
6166
|
var e = t.keyCode, i = this._map, n;
|
|
6167
6167
|
if (e in this._panKeys) {
|
|
6168
6168
|
if (!i._panAnim || !i._panAnim._inProgress)
|
|
6169
|
-
if (n = this._panKeys[e], t.shiftKey && (n =
|
|
6169
|
+
if (n = this._panKeys[e], t.shiftKey && (n = O(n).multiplyBy(3)), i.options.maxBounds && (n = i._limitOffset(O(n), i.options.maxBounds)), i.options.worldCopyJump) {
|
|
6170
6170
|
var r = i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(n)));
|
|
6171
6171
|
i.panTo(r);
|
|
6172
6172
|
} else
|
|
@@ -6218,7 +6218,7 @@ function An() {
|
|
|
6218
6218
|
}
|
|
6219
6219
|
});
|
|
6220
6220
|
R.addInitHook("addHandler", "scrollWheelZoom", vn);
|
|
6221
|
-
var
|
|
6221
|
+
var ss = 600;
|
|
6222
6222
|
R.mergeOptions({
|
|
6223
6223
|
// @section Touch interaction options
|
|
6224
6224
|
// @option tapHold: Boolean
|
|
@@ -6241,7 +6241,7 @@ function An() {
|
|
|
6241
6241
|
var e = t.touches[0];
|
|
6242
6242
|
this._startPos = this._newPos = new B(e.clientX, e.clientY), this._holdTimeout = setTimeout(l(function() {
|
|
6243
6243
|
this._cancel(), this._isTapValid() && (D(document, "touchend", J), D(document, "touchend touchcancel", this._cancelClickPrevent), this._simulateEvent("contextmenu", e));
|
|
6244
|
-
}, this),
|
|
6244
|
+
}, this), ss), D(document, "touchend touchcancel contextmenu", this._cancel, this), D(document, "touchmove", this._onMove, this);
|
|
6245
6245
|
}
|
|
6246
6246
|
},
|
|
6247
6247
|
_cancelClickPrevent: function t() {
|
|
@@ -6325,44 +6325,44 @@ function An() {
|
|
|
6325
6325
|
this._zooming = !1, at(this._animRequest), U(document, "touchmove", this._onTouchMove, this), U(document, "touchend touchcancel", this._onTouchEnd, this), this._map.options.zoomAnimation ? this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), !0, this._map.options.zoomSnap) : this._map._resetView(this._center, this._map._limitZoom(this._zoom));
|
|
6326
6326
|
}
|
|
6327
6327
|
});
|
|
6328
|
-
R.addInitHook("addHandler", "touchZoom", Ln), R.BoxZoom = _n, R.DoubleClickZoom = pn, R.Drag = mn, R.Keyboard = gn, R.ScrollWheelZoom = vn, R.TapHold = yn, R.TouchZoom = Ln, a.Bounds = V, a.Browser = S, a.CRS = yt, a.Canvas = un, a.Circle = ei, a.CircleMarker = fe, a.Class = vt, a.Control = dt, a.DivIcon = an, a.DivOverlay = mt, a.DomEvent =
|
|
6329
|
-
var
|
|
6328
|
+
R.addInitHook("addHandler", "touchZoom", Ln), R.BoxZoom = _n, R.DoubleClickZoom = pn, R.Drag = mn, R.Keyboard = gn, R.ScrollWheelZoom = vn, R.TapHold = yn, R.TouchZoom = Ln, a.Bounds = V, a.Browser = S, a.CRS = yt, a.Canvas = un, a.Circle = ei, a.CircleMarker = fe, a.Class = vt, a.Control = dt, a.DivIcon = an, a.DivOverlay = mt, a.DomEvent = Po, a.DomUtil = wo, a.Draggable = Mt, a.Evented = Ut, a.FeatureGroup = Lt, a.GeoJSON = xt, a.GridLayer = ee, a.Handler = pt, a.Icon = At, a.ImageOverlay = ve, a.LatLng = G, a.LatLngBounds = it, a.Layer = ct, a.LayerGroup = It, a.LineUtil = Ao, a.Map = R, a.Marker = ce, a.Mixin = So, a.Path = Ct, a.Point = B, a.PolyUtil = zo, a.Polygon = Zt, a.Polyline = wt, a.Popup = ye, a.PosAnimation = Gi, a.Projection = Zo, a.Rectangle = fn, a.Renderer = Pt, a.SVG = ne, a.SVGOverlay = rn, a.TileLayer = Nt, a.Tooltip = Le, a.Transformation = be, a.Util = Gn, a.VideoOverlay = sn, a.bind = l, a.bounds = et, a.canvas = dn, a.circle = Wo, a.circleMarker = Vo, a.control = $t, a.divIcon = ts, a.extend = y, a.featureGroup = Ho, a.geoJSON = on, a.geoJson = Ko, a.gridLayer = es, a.icon = Go, a.imageOverlay = Xo, a.latLng = Z, a.latLngBounds = q, a.layerGroup = Fo, a.map = ko, a.marker = Uo, a.point = O, a.polygon = qo, a.polyline = jo, a.popup = $o, a.rectangle = os, a.setOptions = M, a.stamp = f, a.svg = cn, a.svgOverlay = Jo, a.tileLayer = hn, a.tooltip = Qo, a.transformation = Vt, a.version = g, a.videoOverlay = Yo;
|
|
6329
|
+
var rs = window.L;
|
|
6330
6330
|
a.noConflict = function() {
|
|
6331
|
-
return window.L =
|
|
6331
|
+
return window.L = rs, this;
|
|
6332
6332
|
}, window.L = a;
|
|
6333
6333
|
});
|
|
6334
6334
|
}(Pe, Pe.exports)), Pe.exports;
|
|
6335
6335
|
}
|
|
6336
6336
|
var Zn = An();
|
|
6337
|
-
const
|
|
6337
|
+
const ot = /* @__PURE__ */ ms(Zn), Hs = /* @__PURE__ */ ps({
|
|
6338
6338
|
__proto__: null,
|
|
6339
|
-
default:
|
|
6339
|
+
default: ot
|
|
6340
6340
|
}, [Zn]), Ht = {
|
|
6341
6341
|
mapType: "GaoDe"
|
|
6342
6342
|
};
|
|
6343
|
-
function
|
|
6343
|
+
function gs(_) {
|
|
6344
6344
|
const h = [];
|
|
6345
6345
|
Object.keys(_).forEach((a) => {
|
|
6346
|
-
const
|
|
6347
|
-
|
|
6346
|
+
const g = Ht[a], y = _[a];
|
|
6347
|
+
g != y && y && (Ht[a] = y, h.push(a));
|
|
6348
6348
|
}), h.forEach((a) => {
|
|
6349
|
-
Rn.filter((
|
|
6350
|
-
|
|
6349
|
+
Rn.filter((g) => g.itemType == a).forEach((g) => {
|
|
6350
|
+
g.handle(Ht[a], Ht, a);
|
|
6351
6351
|
});
|
|
6352
6352
|
});
|
|
6353
6353
|
}
|
|
6354
6354
|
const Rn = [];
|
|
6355
|
-
function
|
|
6355
|
+
function vs(_, h) {
|
|
6356
6356
|
const a = {
|
|
6357
6357
|
itemType: _,
|
|
6358
6358
|
handle: h
|
|
6359
6359
|
};
|
|
6360
6360
|
Rn.push(a);
|
|
6361
6361
|
}
|
|
6362
|
-
function
|
|
6362
|
+
function ys(_) {
|
|
6363
6363
|
return [Ht[_], Ht];
|
|
6364
6364
|
}
|
|
6365
|
-
const
|
|
6365
|
+
const Ls = {
|
|
6366
6366
|
GaoDe: {
|
|
6367
6367
|
Normal: {
|
|
6368
6368
|
Map: "//webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"
|
|
@@ -6465,32 +6465,32 @@ const vs = {
|
|
|
6465
6465
|
Subdomains: []
|
|
6466
6466
|
}
|
|
6467
6467
|
};
|
|
6468
|
-
function
|
|
6469
|
-
const
|
|
6468
|
+
function ws(_, h, a) {
|
|
6469
|
+
const g = Ls[_], y = g[h].Map, s = ot.tileLayer(
|
|
6470
6470
|
`${y.startsWith("http") ? y : "https:" + y}`,
|
|
6471
6471
|
{
|
|
6472
|
-
subdomains:
|
|
6472
|
+
subdomains: g.Subdomains,
|
|
6473
6473
|
attribution: `${_} ${h}`,
|
|
6474
6474
|
maxZoom: a.options.maxZoom
|
|
6475
6475
|
}
|
|
6476
6476
|
);
|
|
6477
6477
|
return s.addTo(a), s;
|
|
6478
6478
|
}
|
|
6479
|
-
function
|
|
6480
|
-
const [h] =
|
|
6479
|
+
function xs(_) {
|
|
6480
|
+
const [h] = ys("mapType");
|
|
6481
6481
|
let a = _({ mapType: h });
|
|
6482
|
-
|
|
6483
|
-
a.remove(), a = _({ mapType:
|
|
6482
|
+
vs("mapType", (g) => {
|
|
6483
|
+
a.remove(), a = _({ mapType: g });
|
|
6484
6484
|
});
|
|
6485
6485
|
}
|
|
6486
|
-
function
|
|
6487
|
-
|
|
6486
|
+
function Ps(_, h, a) {
|
|
6487
|
+
xs(({ mapType: g }) => {
|
|
6488
6488
|
var y;
|
|
6489
|
-
return (y = a.rightBottomTextHandle) == null || y.setText(`${
|
|
6489
|
+
return (y = a.rightBottomTextHandle) == null || y.setText(`${g}`), ws(g, _, h);
|
|
6490
6490
|
});
|
|
6491
6491
|
}
|
|
6492
|
-
function
|
|
6493
|
-
const h =
|
|
6492
|
+
function ks(_) {
|
|
6493
|
+
const h = ot.DomUtil.create("span", "", _.getContainer());
|
|
6494
6494
|
return h.style.position = "absolute", h.style.bottom = "2px", h.style.left = "5px", h.innerText = "", h.style.zIndex = "600", {
|
|
6495
6495
|
setText(a) {
|
|
6496
6496
|
h.innerText = a;
|
|
@@ -6499,10 +6499,10 @@ function xs(_) {
|
|
|
6499
6499
|
}
|
|
6500
6500
|
var Mn = { exports: {} };
|
|
6501
6501
|
(function(_, h) {
|
|
6502
|
-
(function(a,
|
|
6503
|
-
|
|
6502
|
+
(function(a, g) {
|
|
6503
|
+
g(h);
|
|
6504
6504
|
})(In, function(a) {
|
|
6505
|
-
var
|
|
6505
|
+
var g = L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|
6506
6506
|
options: {
|
|
6507
6507
|
maxClusterRadius: 80,
|
|
6508
6508
|
//A cluster will cover at most this many pixels from its center
|
|
@@ -6573,14 +6573,14 @@ var Mn = { exports: {} };
|
|
|
6573
6573
|
addLayers: function(s, l) {
|
|
6574
6574
|
if (!L.Util.isArray(s))
|
|
6575
6575
|
return this.addLayer(s);
|
|
6576
|
-
var c = this._featureGroup, f = this._nonPointGroup,
|
|
6576
|
+
var c = this._featureGroup, f = this._nonPointGroup, v = this.options.chunkedLoading, P = this.options.chunkInterval, m = this.options.chunkProgress, o = s.length, d = 0, x = !0, M;
|
|
6577
6577
|
if (this._map) {
|
|
6578
6578
|
var b = (/* @__PURE__ */ new Date()).getTime(), E = L.bind(function() {
|
|
6579
6579
|
var H = (/* @__PURE__ */ new Date()).getTime();
|
|
6580
6580
|
for (this._map && this._unspiderfy && this._unspiderfy(); d < o; d++) {
|
|
6581
|
-
if (
|
|
6581
|
+
if (v && d % 200 === 0) {
|
|
6582
6582
|
var gt = (/* @__PURE__ */ new Date()).getTime() - H;
|
|
6583
|
-
if (gt >
|
|
6583
|
+
if (gt > P)
|
|
6584
6584
|
break;
|
|
6585
6585
|
}
|
|
6586
6586
|
if (M = s[d], M instanceof L.LayerGroup) {
|
|
@@ -6592,11 +6592,11 @@ var Mn = { exports: {} };
|
|
|
6592
6592
|
continue;
|
|
6593
6593
|
}
|
|
6594
6594
|
if (!this.hasLayer(M) && (this._addLayer(M, this._maxZoom), l || this.fire("layeradd", { layer: M }), M.__parent && M.__parent.getChildCount() === 2)) {
|
|
6595
|
-
var
|
|
6595
|
+
var st = M.__parent.getAllChildMarkers(), Gt = st[0] === M ? st[1] : st[0];
|
|
6596
6596
|
c.removeLayer(Gt);
|
|
6597
6597
|
}
|
|
6598
6598
|
}
|
|
6599
|
-
|
|
6599
|
+
m && m(d, o, (/* @__PURE__ */ new Date()).getTime() - b), d === o ? (this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons(), this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds)) : setTimeout(E, this.options.chunkDelay);
|
|
6600
6600
|
}, this);
|
|
6601
6601
|
E();
|
|
6602
6602
|
} else
|
|
@@ -6615,14 +6615,14 @@ var Mn = { exports: {} };
|
|
|
6615
6615
|
},
|
|
6616
6616
|
//Takes an array of markers and removes them in bulk
|
|
6617
6617
|
removeLayers: function(s) {
|
|
6618
|
-
var l, c, f = s.length,
|
|
6618
|
+
var l, c, f = s.length, v = this._featureGroup, P = this._nonPointGroup, m = !0;
|
|
6619
6619
|
if (!this._map) {
|
|
6620
6620
|
for (l = 0; l < f; l++) {
|
|
6621
6621
|
if (c = s[l], c instanceof L.LayerGroup) {
|
|
6622
|
-
|
|
6622
|
+
m && (s = s.slice(), m = !1), this._extractNonGroupLayers(c, s), f = s.length;
|
|
6623
6623
|
continue;
|
|
6624
6624
|
}
|
|
6625
|
-
this._arraySplice(this._needsClustering, c),
|
|
6625
|
+
this._arraySplice(this._needsClustering, c), P.removeLayer(c), this.hasLayer(c) && this._needsRemoving.push({ layer: c, latlng: c._latlng }), this.fire("layerremove", { layer: c });
|
|
6626
6626
|
}
|
|
6627
6627
|
return this;
|
|
6628
6628
|
}
|
|
@@ -6639,14 +6639,14 @@ var Mn = { exports: {} };
|
|
|
6639
6639
|
}
|
|
6640
6640
|
for (l = 0; l < f; l++) {
|
|
6641
6641
|
if (c = s[l], c instanceof L.LayerGroup) {
|
|
6642
|
-
|
|
6642
|
+
m && (s = s.slice(), m = !1), this._extractNonGroupLayers(c, s), f = s.length;
|
|
6643
6643
|
continue;
|
|
6644
6644
|
}
|
|
6645
6645
|
if (!c.__parent) {
|
|
6646
|
-
|
|
6646
|
+
P.removeLayer(c), this.fire("layerremove", { layer: c });
|
|
6647
6647
|
continue;
|
|
6648
6648
|
}
|
|
6649
|
-
this._removeLayer(c, !0, !0), this.fire("layerremove", { layer: c }),
|
|
6649
|
+
this._removeLayer(c, !0, !0), this.fire("layerremove", { layer: c }), v.hasLayer(c) && (v.removeLayer(c), c.clusterShow && c.clusterShow());
|
|
6650
6650
|
}
|
|
6651
6651
|
return this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons(), this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds), this;
|
|
6652
6652
|
},
|
|
@@ -6666,14 +6666,14 @@ var Mn = { exports: {} };
|
|
|
6666
6666
|
},
|
|
6667
6667
|
//Overrides LayerGroup.eachLayer
|
|
6668
6668
|
eachLayer: function(s, l) {
|
|
6669
|
-
var c = this._needsClustering.slice(), f = this._needsRemoving,
|
|
6670
|
-
for (this._topClusterLevel && this._topClusterLevel.getAllChildMarkers(c),
|
|
6671
|
-
for (
|
|
6672
|
-
if (f[
|
|
6673
|
-
|
|
6669
|
+
var c = this._needsClustering.slice(), f = this._needsRemoving, v, P, m;
|
|
6670
|
+
for (this._topClusterLevel && this._topClusterLevel.getAllChildMarkers(c), P = c.length - 1; P >= 0; P--) {
|
|
6671
|
+
for (v = !0, m = f.length - 1; m >= 0; m--)
|
|
6672
|
+
if (f[m].layer === c[P]) {
|
|
6673
|
+
v = !1;
|
|
6674
6674
|
break;
|
|
6675
6675
|
}
|
|
6676
|
-
|
|
6676
|
+
v && s.call(l, c[P]);
|
|
6677
6677
|
}
|
|
6678
6678
|
this._nonPointGroup.eachLayer(s, l);
|
|
6679
6679
|
},
|
|
@@ -6748,7 +6748,7 @@ var Mn = { exports: {} };
|
|
|
6748
6748
|
* @private
|
|
6749
6749
|
*/
|
|
6750
6750
|
_removeFromGridUnclustered: function(s, l) {
|
|
6751
|
-
for (var c = this._map, f = this._gridUnclustered,
|
|
6751
|
+
for (var c = this._map, f = this._gridUnclustered, v = Math.floor(this._map.getMinZoom()); l >= v && f[l].removeObject(s, c.project(s.getLatLng(), l)); l--)
|
|
6752
6752
|
;
|
|
6753
6753
|
},
|
|
6754
6754
|
_childMarkerDragStart: function(s) {
|
|
@@ -6770,11 +6770,11 @@ var Mn = { exports: {} };
|
|
|
6770
6770
|
//Internal function for removing a marker from everything.
|
|
6771
6771
|
//dontUpdateMap: set to true if you will handle updating the map manually (for bulk functions)
|
|
6772
6772
|
_removeLayer: function(s, l, c) {
|
|
6773
|
-
var f = this._gridClusters,
|
|
6773
|
+
var f = this._gridClusters, v = this._gridUnclustered, P = this._featureGroup, m = this._map, o = Math.floor(this._map.getMinZoom());
|
|
6774
6774
|
l && this._removeFromGridUnclustered(s, this._maxZoom);
|
|
6775
6775
|
var d = s.__parent, x = d._markers, M;
|
|
6776
6776
|
for (this._arraySplice(x, s); d && (d._childCount--, d._boundsNeedUpdate = !0, !(d._zoom < o)); )
|
|
6777
|
-
l && d._childCount <= 1 ? (M = d._markers[0] === s ? d._markers[1] : d._markers[0], f[d._zoom].removeObject(d,
|
|
6777
|
+
l && d._childCount <= 1 ? (M = d._markers[0] === s ? d._markers[1] : d._markers[0], f[d._zoom].removeObject(d, m.project(d._cLatLng, d._zoom)), v[d._zoom].addObject(M, m.project(M.getLatLng(), d._zoom)), this._arraySplice(d.__parent._childClusters, d), d.__parent._markers.push(M), M.__parent = d.__parent, d._icon && (P.removeLayer(d), c || P.addLayer(M))) : d._iconNeedsUpdate = !0, d = d.__parent;
|
|
6778
6778
|
delete s.__parent;
|
|
6779
6779
|
},
|
|
6780
6780
|
_isOrIsParent: function(s, l) {
|
|
@@ -6804,8 +6804,8 @@ var Mn = { exports: {} };
|
|
|
6804
6804
|
return l < 10 ? c += "small" : l < 100 ? c += "medium" : c += "large", new L.DivIcon({ html: "<div><span>" + l + "</span></div>", className: "marker-cluster" + c, iconSize: new L.Point(40, 40) });
|
|
6805
6805
|
},
|
|
6806
6806
|
_bindEvents: function() {
|
|
6807
|
-
var s = this._map, l = this.options.spiderfyOnMaxZoom, c = this.options.showCoverageOnHover, f = this.options.zoomToBoundsOnClick,
|
|
6808
|
-
(l || f ||
|
|
6807
|
+
var s = this._map, l = this.options.spiderfyOnMaxZoom, c = this.options.showCoverageOnHover, f = this.options.zoomToBoundsOnClick, v = this.options.spiderfyOnEveryZoom;
|
|
6808
|
+
(l || f || v) && this.on("clusterclick clusterkeypress", this._zoomOrSpiderfy, this), c && (this.on("clustermouseover", this._showCoverage, this), this.on("clustermouseout", this._hideCoverage, this), s.on("zoomend", this._hideCoverage, this));
|
|
6809
6809
|
},
|
|
6810
6810
|
_zoomOrSpiderfy: function(s) {
|
|
6811
6811
|
var l = s.layer, c = l;
|
|
@@ -6823,8 +6823,8 @@ var Mn = { exports: {} };
|
|
|
6823
6823
|
this._shownPolygon && (this._map.removeLayer(this._shownPolygon), this._shownPolygon = null);
|
|
6824
6824
|
},
|
|
6825
6825
|
_unbindEvents: function() {
|
|
6826
|
-
var s = this.options.spiderfyOnMaxZoom, l = this.options.showCoverageOnHover, c = this.options.zoomToBoundsOnClick, f = this.options.spiderfyOnEveryZoom,
|
|
6827
|
-
(s || c || f) && this.off("clusterclick clusterkeypress", this._zoomOrSpiderfy, this), l && (this.off("clustermouseover", this._showCoverage, this), this.off("clustermouseout", this._hideCoverage, this),
|
|
6826
|
+
var s = this.options.spiderfyOnMaxZoom, l = this.options.showCoverageOnHover, c = this.options.zoomToBoundsOnClick, f = this.options.spiderfyOnEveryZoom, v = this._map;
|
|
6827
|
+
(s || c || f) && this.off("clusterclick clusterkeypress", this._zoomOrSpiderfy, this), l && (this.off("clustermouseover", this._showCoverage, this), this.off("clustermouseout", this._hideCoverage, this), v.off("zoomend", this._hideCoverage, this));
|
|
6828
6828
|
},
|
|
6829
6829
|
_zoomEnd: function() {
|
|
6830
6830
|
this._map && (this._mergeSplitClusters(), this._zoom = Math.round(this._map._zoom), this._currentShownBounds = this._getExpandedVisibleBounds());
|
|
@@ -6840,32 +6840,32 @@ var Mn = { exports: {} };
|
|
|
6840
6840
|
typeof c != "function" && (f = function() {
|
|
6841
6841
|
return c;
|
|
6842
6842
|
}), this.options.disableClusteringAtZoom !== null && (s = this.options.disableClusteringAtZoom - 1), this._maxZoom = s, this._gridClusters = {}, this._gridUnclustered = {};
|
|
6843
|
-
for (var
|
|
6844
|
-
this._gridClusters[
|
|
6843
|
+
for (var v = s; v >= l; v--)
|
|
6844
|
+
this._gridClusters[v] = new L.DistanceGrid(f(v)), this._gridUnclustered[v] = new L.DistanceGrid(f(v));
|
|
6845
6845
|
this._topClusterLevel = new this._markerCluster(this, l - 1);
|
|
6846
6846
|
},
|
|
6847
6847
|
//Zoom: Zoom to start adding at (Pass this._maxZoom to start at the bottom)
|
|
6848
6848
|
_addLayer: function(s, l) {
|
|
6849
|
-
var c = this._gridClusters, f = this._gridUnclustered,
|
|
6850
|
-
for (this.options.singleMarkerMode && this._overrideMarkerIcon(s), s.on(this._childMarkerEventHandlers, this); l >=
|
|
6851
|
-
|
|
6852
|
-
var o = c[l].getNearObject(
|
|
6849
|
+
var c = this._gridClusters, f = this._gridUnclustered, v = Math.floor(this._map.getMinZoom()), P, m;
|
|
6850
|
+
for (this.options.singleMarkerMode && this._overrideMarkerIcon(s), s.on(this._childMarkerEventHandlers, this); l >= v; l--) {
|
|
6851
|
+
P = this._map.project(s.getLatLng(), l);
|
|
6852
|
+
var o = c[l].getNearObject(P);
|
|
6853
6853
|
if (o) {
|
|
6854
6854
|
o._addChild(s), s.__parent = o;
|
|
6855
6855
|
return;
|
|
6856
6856
|
}
|
|
6857
|
-
if (o = f[l].getNearObject(
|
|
6857
|
+
if (o = f[l].getNearObject(P), o) {
|
|
6858
6858
|
var d = o.__parent;
|
|
6859
6859
|
d && this._removeLayer(o, !1);
|
|
6860
6860
|
var x = new this._markerCluster(this, l, o, s);
|
|
6861
6861
|
c[l].addObject(x, this._map.project(x._cLatLng, l)), o.__parent = x, s.__parent = x;
|
|
6862
6862
|
var M = x;
|
|
6863
|
-
for (
|
|
6864
|
-
M = new this._markerCluster(this,
|
|
6863
|
+
for (m = l - 1; m > d._zoom; m--)
|
|
6864
|
+
M = new this._markerCluster(this, m, M), c[m].addObject(M, this._map.project(o.getLatLng(), m));
|
|
6865
6865
|
d._addChild(M), this._removeFromGridUnclustered(o, l);
|
|
6866
6866
|
return;
|
|
6867
6867
|
}
|
|
6868
|
-
f[l].addObject(s,
|
|
6868
|
+
f[l].addObject(s, P);
|
|
6869
6869
|
}
|
|
6870
6870
|
this._topClusterLevel._addChild(s), s.__parent = this._topClusterLevel;
|
|
6871
6871
|
},
|
|
@@ -6934,13 +6934,13 @@ var Mn = { exports: {} };
|
|
|
6934
6934
|
* @private
|
|
6935
6935
|
*/
|
|
6936
6936
|
_extractNonGroupLayers: function(s, l) {
|
|
6937
|
-
var c = s.getLayers(), f = 0,
|
|
6937
|
+
var c = s.getLayers(), f = 0, v;
|
|
6938
6938
|
for (l = l || []; f < c.length; f++) {
|
|
6939
|
-
if (
|
|
6940
|
-
this._extractNonGroupLayers(
|
|
6939
|
+
if (v = c[f], v instanceof L.LayerGroup) {
|
|
6940
|
+
this._extractNonGroupLayers(v, l);
|
|
6941
6941
|
continue;
|
|
6942
6942
|
}
|
|
6943
|
-
l.push(
|
|
6943
|
+
l.push(v);
|
|
6944
6944
|
}
|
|
6945
6945
|
return l;
|
|
6946
6946
|
},
|
|
@@ -6985,18 +6985,18 @@ var Mn = { exports: {} };
|
|
|
6985
6985
|
this._map._mapPane.className += " leaflet-cluster-anim", this._inZoomAnimation++;
|
|
6986
6986
|
},
|
|
6987
6987
|
_animationZoomIn: function(s, l) {
|
|
6988
|
-
var c = this._getExpandedVisibleBounds(), f = this._featureGroup,
|
|
6989
|
-
this._ignoreMove = !0, this._topClusterLevel._recursively(c, s,
|
|
6990
|
-
var o =
|
|
6991
|
-
for (c.contains(o) || (o = null),
|
|
6992
|
-
x = d[
|
|
6993
|
-
}), this._forceLayout(), this._topClusterLevel._recursivelyBecomeVisible(c, l), f.eachLayer(function(
|
|
6994
|
-
!(
|
|
6995
|
-
}), this._topClusterLevel._recursively(c, s, l, function(
|
|
6996
|
-
|
|
6988
|
+
var c = this._getExpandedVisibleBounds(), f = this._featureGroup, v = Math.floor(this._map.getMinZoom()), P;
|
|
6989
|
+
this._ignoreMove = !0, this._topClusterLevel._recursively(c, s, v, function(m) {
|
|
6990
|
+
var o = m._latlng, d = m._markers, x;
|
|
6991
|
+
for (c.contains(o) || (o = null), m._isSingleParent() && s + 1 === l ? (f.removeLayer(m), m._recursivelyAddChildrenToMap(null, l, c)) : (m.clusterHide(), m._recursivelyAddChildrenToMap(o, l, c)), P = d.length - 1; P >= 0; P--)
|
|
6992
|
+
x = d[P], c.contains(x._latlng) || f.removeLayer(x);
|
|
6993
|
+
}), this._forceLayout(), this._topClusterLevel._recursivelyBecomeVisible(c, l), f.eachLayer(function(m) {
|
|
6994
|
+
!(m instanceof L.MarkerCluster) && m._icon && m.clusterShow();
|
|
6995
|
+
}), this._topClusterLevel._recursively(c, s, l, function(m) {
|
|
6996
|
+
m._recursivelyRestoreChildPositions(l);
|
|
6997
6997
|
}), this._ignoreMove = !1, this._enqueue(function() {
|
|
6998
|
-
this._topClusterLevel._recursively(c, s,
|
|
6999
|
-
f.removeLayer(
|
|
6998
|
+
this._topClusterLevel._recursively(c, s, v, function(m) {
|
|
6999
|
+
f.removeLayer(m), m.clusterShow();
|
|
7000
7000
|
}), this._animationEnd();
|
|
7001
7001
|
});
|
|
7002
7002
|
},
|
|
@@ -7012,18 +7012,18 @@ var Mn = { exports: {} };
|
|
|
7012
7012
|
},
|
|
7013
7013
|
// Private methods for animated versions.
|
|
7014
7014
|
_animationZoomOutSingle: function(s, l, c) {
|
|
7015
|
-
var f = this._getExpandedVisibleBounds(),
|
|
7016
|
-
s._recursivelyAnimateChildrenInAndAddSelfToMap(f,
|
|
7017
|
-
var
|
|
7015
|
+
var f = this._getExpandedVisibleBounds(), v = Math.floor(this._map.getMinZoom());
|
|
7016
|
+
s._recursivelyAnimateChildrenInAndAddSelfToMap(f, v, l + 1, c);
|
|
7017
|
+
var P = this;
|
|
7018
7018
|
this._forceLayout(), s._recursivelyBecomeVisible(f, c), this._enqueue(function() {
|
|
7019
7019
|
if (s._childCount === 1) {
|
|
7020
|
-
var
|
|
7021
|
-
this._ignoreMove = !0,
|
|
7020
|
+
var m = s._markers[0];
|
|
7021
|
+
this._ignoreMove = !0, m.setLatLng(m.getLatLng()), this._ignoreMove = !1, m.clusterShow && m.clusterShow();
|
|
7022
7022
|
} else
|
|
7023
|
-
s._recursively(f, c,
|
|
7024
|
-
o._recursivelyRemoveChildrenFromMap(f,
|
|
7023
|
+
s._recursively(f, c, v, function(o) {
|
|
7024
|
+
o._recursivelyRemoveChildrenFromMap(f, v, l + 1);
|
|
7025
7025
|
});
|
|
7026
|
-
|
|
7026
|
+
P._animationEnd();
|
|
7027
7027
|
});
|
|
7028
7028
|
},
|
|
7029
7029
|
_animationEnd: function() {
|
|
@@ -7061,14 +7061,14 @@ var Mn = { exports: {} };
|
|
|
7061
7061
|
},
|
|
7062
7062
|
//Zoom to the minimum of showing all of the child markers, or the extents of this cluster
|
|
7063
7063
|
zoomToBounds: function(s) {
|
|
7064
|
-
for (var l = this._childClusters.slice(), c = this._group._map, f = c.getBoundsZoom(this._bounds),
|
|
7065
|
-
|
|
7064
|
+
for (var l = this._childClusters.slice(), c = this._group._map, f = c.getBoundsZoom(this._bounds), v = this._zoom + 1, P = c.getZoom(), m; l.length > 0 && f > v; ) {
|
|
7065
|
+
v++;
|
|
7066
7066
|
var o = [];
|
|
7067
|
-
for (
|
|
7068
|
-
o = o.concat(l[
|
|
7067
|
+
for (m = 0; m < l.length; m++)
|
|
7068
|
+
o = o.concat(l[m]._childClusters);
|
|
7069
7069
|
l = o;
|
|
7070
7070
|
}
|
|
7071
|
-
f >
|
|
7071
|
+
f > v ? this._group._map.setView(this._latlng, v) : f <= P ? this._group._map.setView(this._latlng, P + 1) : this._group._map.fitBounds(this._bounds, s);
|
|
7072
7072
|
},
|
|
7073
7073
|
getBounds: function() {
|
|
7074
7074
|
var s = new L.LatLngBounds();
|
|
@@ -7106,13 +7106,13 @@ var Mn = { exports: {} };
|
|
|
7106
7106
|
s._southWest && (s._southWest.lat = 1 / 0, s._southWest.lng = 1 / 0), s._northEast && (s._northEast.lat = -1 / 0, s._northEast.lng = -1 / 0);
|
|
7107
7107
|
},
|
|
7108
7108
|
_recalculateBounds: function() {
|
|
7109
|
-
var s = this._markers, l = this._childClusters, c = 0, f = 0,
|
|
7110
|
-
if (
|
|
7111
|
-
for (this._resetBounds(),
|
|
7112
|
-
o = s[
|
|
7113
|
-
for (
|
|
7114
|
-
|
|
7115
|
-
this._latlng = this._wLatLng = new L.LatLng(c /
|
|
7109
|
+
var s = this._markers, l = this._childClusters, c = 0, f = 0, v = this._childCount, P, m, o, d;
|
|
7110
|
+
if (v !== 0) {
|
|
7111
|
+
for (this._resetBounds(), P = 0; P < s.length; P++)
|
|
7112
|
+
o = s[P]._latlng, this._bounds.extend(o), c += o.lat, f += o.lng;
|
|
7113
|
+
for (P = 0; P < l.length; P++)
|
|
7114
|
+
m = l[P], m._boundsNeedUpdate && m._recalculateBounds(), this._bounds.extend(m._bounds), o = m._wLatLng, d = m._childCount, c += o.lat * d, f += o.lng * d;
|
|
7115
|
+
this._latlng = this._wLatLng = new L.LatLng(c / v, f / v), this._boundsNeedUpdate = !1;
|
|
7116
7116
|
}
|
|
7117
7117
|
},
|
|
7118
7118
|
//Set our markers position as given and add it to the map
|
|
@@ -7125,14 +7125,14 @@ var Mn = { exports: {} };
|
|
|
7125
7125
|
this._group._map.getMinZoom(),
|
|
7126
7126
|
c - 1,
|
|
7127
7127
|
function(f) {
|
|
7128
|
-
var
|
|
7129
|
-
for (
|
|
7130
|
-
|
|
7128
|
+
var v = f._markers, P, m;
|
|
7129
|
+
for (P = v.length - 1; P >= 0; P--)
|
|
7130
|
+
m = v[P], m._icon && (m._setPos(l), m.clusterHide());
|
|
7131
7131
|
},
|
|
7132
7132
|
function(f) {
|
|
7133
|
-
var
|
|
7134
|
-
for (
|
|
7135
|
-
|
|
7133
|
+
var v = f._childClusters, P, m;
|
|
7134
|
+
for (P = v.length - 1; P >= 0; P--)
|
|
7135
|
+
m = v[P], m._icon && (m._setPos(l), m.clusterHide());
|
|
7136
7136
|
}
|
|
7137
7137
|
);
|
|
7138
7138
|
},
|
|
@@ -7141,8 +7141,8 @@ var Mn = { exports: {} };
|
|
|
7141
7141
|
s,
|
|
7142
7142
|
f,
|
|
7143
7143
|
l,
|
|
7144
|
-
function(
|
|
7145
|
-
|
|
7144
|
+
function(v) {
|
|
7145
|
+
v._recursivelyAnimateChildrenIn(s, v._group._map.latLngToLayerPoint(v.getLatLng()).round(), c), v._isSingleParent() && c - 1 === f ? (v.clusterShow(), v._recursivelyRemoveChildrenFromMap(s, l, c)) : v.clusterHide(), v._addToMap();
|
|
7146
7146
|
}
|
|
7147
7147
|
);
|
|
7148
7148
|
},
|
|
@@ -7158,9 +7158,9 @@ var Mn = { exports: {} };
|
|
|
7158
7158
|
l,
|
|
7159
7159
|
function(f) {
|
|
7160
7160
|
if (l !== f._zoom)
|
|
7161
|
-
for (var
|
|
7162
|
-
var
|
|
7163
|
-
c.contains(
|
|
7161
|
+
for (var v = f._markers.length - 1; v >= 0; v--) {
|
|
7162
|
+
var P = f._markers[v];
|
|
7163
|
+
c.contains(P._latlng) && (s && (P._backupLatlng = P.getLatLng(), P.setLatLng(s), P.clusterHide && P.clusterHide()), f._group._featureGroup.addLayer(P));
|
|
7164
7164
|
}
|
|
7165
7165
|
},
|
|
7166
7166
|
function(f) {
|
|
@@ -7177,26 +7177,26 @@ var Mn = { exports: {} };
|
|
|
7177
7177
|
for (var f = this._childClusters.length - 1; f >= 0; f--)
|
|
7178
7178
|
this._childClusters[f]._restorePosition();
|
|
7179
7179
|
else
|
|
7180
|
-
for (var
|
|
7181
|
-
this._childClusters[
|
|
7180
|
+
for (var v = this._childClusters.length - 1; v >= 0; v--)
|
|
7181
|
+
this._childClusters[v]._recursivelyRestoreChildPositions(s);
|
|
7182
7182
|
},
|
|
7183
7183
|
_restorePosition: function() {
|
|
7184
7184
|
this._backupLatlng && (this.setLatLng(this._backupLatlng), delete this._backupLatlng);
|
|
7185
7185
|
},
|
|
7186
7186
|
//exceptBounds: If set, don't remove any markers/clusters in it
|
|
7187
7187
|
_recursivelyRemoveChildrenFromMap: function(s, l, c, f) {
|
|
7188
|
-
var
|
|
7188
|
+
var v, P;
|
|
7189
7189
|
this._recursively(
|
|
7190
7190
|
s,
|
|
7191
7191
|
l - 1,
|
|
7192
7192
|
c - 1,
|
|
7193
|
-
function(
|
|
7194
|
-
for (
|
|
7195
|
-
|
|
7193
|
+
function(m) {
|
|
7194
|
+
for (P = m._markers.length - 1; P >= 0; P--)
|
|
7195
|
+
v = m._markers[P], (!f || !f.contains(v._latlng)) && (m._group._featureGroup.removeLayer(v), v.clusterShow && v.clusterShow());
|
|
7196
7196
|
},
|
|
7197
|
-
function(
|
|
7198
|
-
for (
|
|
7199
|
-
|
|
7197
|
+
function(m) {
|
|
7198
|
+
for (P = m._childClusters.length - 1; P >= 0; P--)
|
|
7199
|
+
v = m._childClusters[P], (!f || !f.contains(v._latlng)) && (m._group._featureGroup.removeLayer(v), v.clusterShow && v.clusterShow());
|
|
7200
7200
|
}
|
|
7201
7201
|
);
|
|
7202
7202
|
},
|
|
@@ -7206,11 +7206,11 @@ var Mn = { exports: {} };
|
|
|
7206
7206
|
// zoomLevelToStop: zoom level to stop running functions (inclusive)
|
|
7207
7207
|
// runAtEveryLevel: function that takes an L.MarkerCluster as an argument that should be applied on every level
|
|
7208
7208
|
// runAtBottomLevel: function that takes an L.MarkerCluster as an argument that should be applied at only the bottom level
|
|
7209
|
-
_recursively: function(s, l, c, f,
|
|
7210
|
-
var
|
|
7211
|
-
if (l <=
|
|
7212
|
-
for (o =
|
|
7213
|
-
d =
|
|
7209
|
+
_recursively: function(s, l, c, f, v) {
|
|
7210
|
+
var P = this._childClusters, m = this._zoom, o, d;
|
|
7211
|
+
if (l <= m && (f && f(this), v && m === c && v(this)), m < l || m < c)
|
|
7212
|
+
for (o = P.length - 1; o >= 0; o--)
|
|
7213
|
+
d = P[o], d._boundsNeedUpdate && d._recalculateBounds(), s.intersects(d._bounds) && d._recursively(s, l, c, f, v);
|
|
7214
7214
|
},
|
|
7215
7215
|
//Returns true if we are the parent of only one cluster and that cluster is the same as us
|
|
7216
7216
|
_isSingleParent: function() {
|
|
@@ -7229,36 +7229,36 @@ var Mn = { exports: {} };
|
|
|
7229
7229
|
this._cellSize = s, this._sqCellSize = s * s, this._grid = {}, this._objectPoint = {};
|
|
7230
7230
|
}, L.DistanceGrid.prototype = {
|
|
7231
7231
|
addObject: function(s, l) {
|
|
7232
|
-
var c = this._getCoord(l.x), f = this._getCoord(l.y),
|
|
7233
|
-
this._objectPoint[o] = l,
|
|
7232
|
+
var c = this._getCoord(l.x), f = this._getCoord(l.y), v = this._grid, P = v[f] = v[f] || {}, m = P[c] = P[c] || [], o = L.Util.stamp(s);
|
|
7233
|
+
this._objectPoint[o] = l, m.push(s);
|
|
7234
7234
|
},
|
|
7235
7235
|
updateObject: function(s, l) {
|
|
7236
7236
|
this.removeObject(s), this.addObject(s, l);
|
|
7237
7237
|
},
|
|
7238
7238
|
//Returns true if the object was found
|
|
7239
7239
|
removeObject: function(s, l) {
|
|
7240
|
-
var c = this._getCoord(l.x), f = this._getCoord(l.y),
|
|
7241
|
-
for (delete this._objectPoint[L.Util.stamp(s)], o = 0, d =
|
|
7242
|
-
if (
|
|
7243
|
-
return
|
|
7240
|
+
var c = this._getCoord(l.x), f = this._getCoord(l.y), v = this._grid, P = v[f] = v[f] || {}, m = P[c] = P[c] || [], o, d;
|
|
7241
|
+
for (delete this._objectPoint[L.Util.stamp(s)], o = 0, d = m.length; o < d; o++)
|
|
7242
|
+
if (m[o] === s)
|
|
7243
|
+
return m.splice(o, 1), d === 1 && delete P[c], !0;
|
|
7244
7244
|
},
|
|
7245
7245
|
eachObject: function(s, l) {
|
|
7246
|
-
var c, f,
|
|
7246
|
+
var c, f, v, P, m, o, d, x = this._grid;
|
|
7247
7247
|
for (c in x) {
|
|
7248
|
-
|
|
7249
|
-
for (f in
|
|
7250
|
-
for (o =
|
|
7251
|
-
d = s.call(l, o[
|
|
7248
|
+
m = x[c];
|
|
7249
|
+
for (f in m)
|
|
7250
|
+
for (o = m[f], v = 0, P = o.length; v < P; v++)
|
|
7251
|
+
d = s.call(l, o[v]), d && (v--, P--);
|
|
7252
7252
|
}
|
|
7253
7253
|
},
|
|
7254
7254
|
getNearObject: function(s) {
|
|
7255
|
-
var l = this._getCoord(s.x), c = this._getCoord(s.y), f,
|
|
7255
|
+
var l = this._getCoord(s.x), c = this._getCoord(s.y), f, v, P, m, o, d, x, M, b = this._objectPoint, E = this._sqCellSize, N = null;
|
|
7256
7256
|
for (f = c - 1; f <= c + 1; f++)
|
|
7257
|
-
if (
|
|
7258
|
-
for (
|
|
7259
|
-
if (o = v
|
|
7260
|
-
for (
|
|
7261
|
-
x = o[
|
|
7257
|
+
if (m = this._grid[f], m) {
|
|
7258
|
+
for (v = l - 1; v <= l + 1; v++)
|
|
7259
|
+
if (o = m[v], o)
|
|
7260
|
+
for (P = 0, d = o.length; P < d; P++)
|
|
7261
|
+
x = o[P], M = this._sqDist(b[L.Util.stamp(x)], s), (M < E || M <= E && N === null) && (E = M, N = x);
|
|
7262
7262
|
}
|
|
7263
7263
|
return N;
|
|
7264
7264
|
},
|
|
@@ -7290,15 +7290,15 @@ var Mn = { exports: {} };
|
|
|
7290
7290
|
* in consideration for the hull.
|
|
7291
7291
|
*/
|
|
7292
7292
|
findMostDistantPointFromBaseLine: function(s, l) {
|
|
7293
|
-
var c = 0, f = null,
|
|
7294
|
-
for (
|
|
7295
|
-
if (
|
|
7296
|
-
|
|
7293
|
+
var c = 0, f = null, v = [], P, m, o;
|
|
7294
|
+
for (P = l.length - 1; P >= 0; P--) {
|
|
7295
|
+
if (m = l[P], o = this.getDistant(m, s), o > 0)
|
|
7296
|
+
v.push(m);
|
|
7297
7297
|
else
|
|
7298
7298
|
continue;
|
|
7299
|
-
o > c && (c = o, f =
|
|
7299
|
+
o > c && (c = o, f = m);
|
|
7300
7300
|
}
|
|
7301
|
-
return { maxPoint: f, newPoints:
|
|
7301
|
+
return { maxPoint: f, newPoints: v };
|
|
7302
7302
|
},
|
|
7303
7303
|
/*
|
|
7304
7304
|
* Given a baseline, compute the convex hull of latLngs as an array
|
|
@@ -7323,12 +7323,12 @@ var Mn = { exports: {} };
|
|
|
7323
7323
|
* @returns {Array}
|
|
7324
7324
|
*/
|
|
7325
7325
|
getConvexHull: function(s) {
|
|
7326
|
-
var l = !1, c = !1, f = !1,
|
|
7326
|
+
var l = !1, c = !1, f = !1, v = !1, P = null, m = null, o = null, d = null, x = null, M = null, b;
|
|
7327
7327
|
for (b = s.length - 1; b >= 0; b--) {
|
|
7328
7328
|
var E = s[b];
|
|
7329
|
-
(l === !1 || E.lat > l) && (
|
|
7329
|
+
(l === !1 || E.lat > l) && (P = E, l = E.lat), (c === !1 || E.lat < c) && (m = E, c = E.lat), (f === !1 || E.lng > f) && (o = E, f = E.lng), (v === !1 || E.lng < v) && (d = E, v = E.lng);
|
|
7330
7330
|
}
|
|
7331
|
-
c !== l ? (M =
|
|
7331
|
+
c !== l ? (M = m, x = P) : (M = d, x = o);
|
|
7332
7332
|
var N = [].concat(
|
|
7333
7333
|
this.buildConvexHull([M, x], s),
|
|
7334
7334
|
this.buildConvexHull([x, M], s)
|
|
@@ -7357,29 +7357,29 @@ var Mn = { exports: {} };
|
|
|
7357
7357
|
// 0 -> always spiral; Infinity -> always circle
|
|
7358
7358
|
spiderfy: function() {
|
|
7359
7359
|
if (!(this._group._spiderfied === this || this._group._inZoomAnimation)) {
|
|
7360
|
-
var s = this.getAllChildMarkers(null, !0), l = this._group, c = l._map, f = c.latLngToLayerPoint(this._latlng),
|
|
7361
|
-
this._group._unspiderfy(), this._group._spiderfied = this, this._group.options.spiderfyShapePositions ?
|
|
7360
|
+
var s = this.getAllChildMarkers(null, !0), l = this._group, c = l._map, f = c.latLngToLayerPoint(this._latlng), v;
|
|
7361
|
+
this._group._unspiderfy(), this._group._spiderfied = this, this._group.options.spiderfyShapePositions ? v = this._group.options.spiderfyShapePositions(s.length, f) : s.length >= this._circleSpiralSwitchover ? v = this._generatePointsSpiral(s.length, f) : (f.y += 10, v = this._generatePointsCircle(s.length, f)), this._animationSpiderfy(s, v);
|
|
7362
7362
|
}
|
|
7363
7363
|
},
|
|
7364
7364
|
unspiderfy: function(s) {
|
|
7365
7365
|
this._group._inZoomAnimation || (this._animationUnspiderfy(s), this._group._spiderfied = null);
|
|
7366
7366
|
},
|
|
7367
7367
|
_generatePointsCircle: function(s, l) {
|
|
7368
|
-
var c = this._group.options.spiderfyDistanceMultiplier * this._circleFootSeparation * (2 + s), f = c / this._2PI,
|
|
7369
|
-
for (f = Math.max(f, 35),
|
|
7370
|
-
o = this._circleStartAngle +
|
|
7371
|
-
return
|
|
7368
|
+
var c = this._group.options.spiderfyDistanceMultiplier * this._circleFootSeparation * (2 + s), f = c / this._2PI, v = this._2PI / s, P = [], m, o;
|
|
7369
|
+
for (f = Math.max(f, 35), P.length = s, m = 0; m < s; m++)
|
|
7370
|
+
o = this._circleStartAngle + m * v, P[m] = new L.Point(l.x + f * Math.cos(o), l.y + f * Math.sin(o))._round();
|
|
7371
|
+
return P;
|
|
7372
7372
|
},
|
|
7373
7373
|
_generatePointsSpiral: function(s, l) {
|
|
7374
|
-
var c = this._group.options.spiderfyDistanceMultiplier, f = c * this._spiralLengthStart,
|
|
7374
|
+
var c = this._group.options.spiderfyDistanceMultiplier, f = c * this._spiralLengthStart, v = c * this._spiralFootSeparation, P = c * this._spiralLengthFactor * this._2PI, m = 0, o = [], d;
|
|
7375
7375
|
for (o.length = s, d = s; d >= 0; d--)
|
|
7376
|
-
d < s && (o[d] = new L.Point(l.x + f * Math.cos(
|
|
7376
|
+
d < s && (o[d] = new L.Point(l.x + f * Math.cos(m), l.y + f * Math.sin(m))._round()), m += v / f + d * 5e-4, f += P / m;
|
|
7377
7377
|
return o;
|
|
7378
7378
|
},
|
|
7379
7379
|
_noanimationUnspiderfy: function() {
|
|
7380
|
-
var s = this._group, l = s._map, c = s._featureGroup, f = this.getAllChildMarkers(null, !0),
|
|
7381
|
-
for (s._ignoreMove = !0, this.setOpacity(1),
|
|
7382
|
-
|
|
7380
|
+
var s = this._group, l = s._map, c = s._featureGroup, f = this.getAllChildMarkers(null, !0), v, P;
|
|
7381
|
+
for (s._ignoreMove = !0, this.setOpacity(1), P = f.length - 1; P >= 0; P--)
|
|
7382
|
+
v = f[P], c.removeLayer(v), v._preSpiderfyLatlng && (v.setLatLng(v._preSpiderfyLatlng), delete v._preSpiderfyLatlng), v.setZIndexOffset && v.setZIndexOffset(0), v._spiderLeg && (l.removeLayer(v._spiderLeg), delete v._spiderLeg);
|
|
7383
7383
|
s.fire("unspiderfied", {
|
|
7384
7384
|
cluster: this,
|
|
7385
7385
|
markers: f
|
|
@@ -7387,9 +7387,9 @@ var Mn = { exports: {} };
|
|
|
7387
7387
|
}
|
|
7388
7388
|
}), L.MarkerClusterNonAnimated = L.MarkerCluster.extend({
|
|
7389
7389
|
_animationSpiderfy: function(s, l) {
|
|
7390
|
-
var c = this._group, f = c._map,
|
|
7391
|
-
for (c._ignoreMove = !0,
|
|
7392
|
-
x = f.layerPointToLatLng(l[
|
|
7390
|
+
var c = this._group, f = c._map, v = c._featureGroup, P = this._group.options.spiderLegPolylineOptions, m, o, d, x;
|
|
7391
|
+
for (c._ignoreMove = !0, m = 0; m < s.length; m++)
|
|
7392
|
+
x = f.layerPointToLatLng(l[m]), o = s[m], d = new L.Polyline([this._latlng, x], P), f.addLayer(d), o._spiderLeg = d, o._preSpiderfyLatlng = o._latlng, o.setLatLng(x), o.setZIndexOffset && o.setZIndexOffset(1e6), v.addLayer(o);
|
|
7393
7393
|
this.setOpacity(0.3), c._ignoreMove = !1, c.fire("spiderfied", {
|
|
7394
7394
|
cluster: this,
|
|
7395
7395
|
markers: s
|
|
@@ -7400,11 +7400,11 @@ var Mn = { exports: {} };
|
|
|
7400
7400
|
}
|
|
7401
7401
|
}), L.MarkerCluster.include({
|
|
7402
7402
|
_animationSpiderfy: function(s, l) {
|
|
7403
|
-
var c = this, f = this._group,
|
|
7403
|
+
var c = this, f = this._group, v = f._map, P = f._featureGroup, m = this._latlng, o = v.latLngToLayerPoint(m), d = L.Path.SVG, x = L.extend({}, this._group.options.spiderLegPolylineOptions), M = x.opacity, b, E, N, H, gt, st;
|
|
7404
7404
|
for (M === void 0 && (M = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity), d ? (x.opacity = 0, x.className = (x.className || "") + " leaflet-cluster-spider-leg") : x.opacity = M, f._ignoreMove = !0, b = 0; b < s.length; b++)
|
|
7405
|
-
E = s[b],
|
|
7405
|
+
E = s[b], st = v.layerPointToLatLng(l[b]), N = new L.Polyline([m, st], x), v.addLayer(N), E._spiderLeg = N, d && (H = N._path, gt = H.getTotalLength() + 0.1, H.style.strokeDasharray = gt, H.style.strokeDashoffset = gt), E.setZIndexOffset && E.setZIndexOffset(1e6), E.clusterHide && E.clusterHide(), P.addLayer(E), E._setPos && E._setPos(o);
|
|
7406
7406
|
for (f._forceLayout(), f._animationStart(), b = s.length - 1; b >= 0; b--)
|
|
7407
|
-
|
|
7407
|
+
st = v.layerPointToLatLng(l[b]), E = s[b], E._preSpiderfyLatlng = E._latlng, E.setLatLng(st), E.clusterShow && E.clusterShow(), d && (N = E._spiderLeg, H = N._path, H.style.strokeDashoffset = 0, N.setStyle({ opacity: M }));
|
|
7408
7408
|
this.setOpacity(0.3), f._ignoreMove = !1, setTimeout(function() {
|
|
7409
7409
|
f._animationEnd(), f.fire("spiderfied", {
|
|
7410
7410
|
cluster: c,
|
|
@@ -7413,18 +7413,18 @@ var Mn = { exports: {} };
|
|
|
7413
7413
|
}, 200);
|
|
7414
7414
|
},
|
|
7415
7415
|
_animationUnspiderfy: function(s) {
|
|
7416
|
-
var l = this, c = this._group, f = c._map,
|
|
7417
|
-
for (c._ignoreMove = !0, c._animationStart(), this.setOpacity(1), x =
|
|
7418
|
-
d =
|
|
7416
|
+
var l = this, c = this._group, f = c._map, v = c._featureGroup, P = s ? f._latLngToNewLayerPoint(this._latlng, s.zoom, s.center) : f.latLngToLayerPoint(this._latlng), m = this.getAllChildMarkers(null, !0), o = L.Path.SVG, d, x, M, b, E, N;
|
|
7417
|
+
for (c._ignoreMove = !0, c._animationStart(), this.setOpacity(1), x = m.length - 1; x >= 0; x--)
|
|
7418
|
+
d = m[x], d._preSpiderfyLatlng && (d.closePopup(), d.setLatLng(d._preSpiderfyLatlng), delete d._preSpiderfyLatlng, N = !0, d._setPos && (d._setPos(P), N = !1), d.clusterHide && (d.clusterHide(), N = !1), N && v.removeLayer(d), o && (M = d._spiderLeg, b = M._path, E = b.getTotalLength() + 0.1, b.style.strokeDashoffset = E, M.setStyle({ opacity: 0 })));
|
|
7419
7419
|
c._ignoreMove = !1, setTimeout(function() {
|
|
7420
7420
|
var H = 0;
|
|
7421
|
-
for (x =
|
|
7422
|
-
d =
|
|
7423
|
-
for (x =
|
|
7424
|
-
d =
|
|
7421
|
+
for (x = m.length - 1; x >= 0; x--)
|
|
7422
|
+
d = m[x], d._spiderLeg && H++;
|
|
7423
|
+
for (x = m.length - 1; x >= 0; x--)
|
|
7424
|
+
d = m[x], d._spiderLeg && (d.clusterShow && d.clusterShow(), d.setZIndexOffset && d.setZIndexOffset(0), H > 1 && v.removeLayer(d), f.removeLayer(d._spiderLeg), delete d._spiderLeg);
|
|
7425
7425
|
c._animationEnd(), c.fire("unspiderfied", {
|
|
7426
7426
|
cluster: l,
|
|
7427
|
-
markers:
|
|
7427
|
+
markers: m
|
|
7428
7428
|
});
|
|
7429
7429
|
}, 200);
|
|
7430
7430
|
}
|
|
@@ -7507,16 +7507,16 @@ var Mn = { exports: {} };
|
|
|
7507
7507
|
var c = this.options.icon;
|
|
7508
7508
|
return L.setOptions(c, s), this.setIcon(c), l && this.__parent && this.__parent._group.refreshClusters(this), this;
|
|
7509
7509
|
}
|
|
7510
|
-
}), a.MarkerClusterGroup =
|
|
7510
|
+
}), a.MarkerClusterGroup = g, a.MarkerCluster = y, Object.defineProperty(a, "__esModule", { value: !0 });
|
|
7511
7511
|
});
|
|
7512
7512
|
})(Mn, Mn.exports);
|
|
7513
7513
|
function Cn(_, h, a) {
|
|
7514
|
-
const
|
|
7515
|
-
|
|
7514
|
+
const g = ot.marker(_, a);
|
|
7515
|
+
g.GetUserData = () => h;
|
|
7516
7516
|
const y = {};
|
|
7517
|
-
return
|
|
7517
|
+
return g.GetUserData1 = function() {
|
|
7518
7518
|
return y;
|
|
7519
|
-
},
|
|
7519
|
+
}, g;
|
|
7520
7520
|
}
|
|
7521
7521
|
function bn(_) {
|
|
7522
7522
|
return _.GetUserData();
|
|
@@ -7525,10 +7525,10 @@ function ri(_, h) {
|
|
|
7525
7525
|
const a = _.GetUserData1();
|
|
7526
7526
|
a.customMarker = h;
|
|
7527
7527
|
}
|
|
7528
|
-
function
|
|
7528
|
+
function Ms(_) {
|
|
7529
7529
|
return _.GetUserData1().customMarker;
|
|
7530
7530
|
}
|
|
7531
|
-
class
|
|
7531
|
+
class Cs {
|
|
7532
7532
|
constructor(h, a) {
|
|
7533
7533
|
this.currentMarker = null, this.popupCloseHandle = [], this.popup = L.popup({
|
|
7534
7534
|
...a,
|
|
@@ -7539,16 +7539,19 @@ class ks {
|
|
|
7539
7539
|
className: "LeafletInfoWindowContentCustom"
|
|
7540
7540
|
}), this.popup.on("popupclose", () => {
|
|
7541
7541
|
});
|
|
7542
|
-
const
|
|
7543
|
-
h.createPane(
|
|
7542
|
+
const g = "info-marker-test";
|
|
7543
|
+
h.createPane(g), this.map = h, this.oriIcon = L.divIcon({
|
|
7544
7544
|
className: "",
|
|
7545
7545
|
html: "",
|
|
7546
7546
|
iconSize: [0, 0]
|
|
7547
7547
|
}), this.marker = L.marker([0, 0], {
|
|
7548
7548
|
icon: this.oriIcon,
|
|
7549
7549
|
zIndexOffset: 600,
|
|
7550
|
-
pane:
|
|
7551
|
-
}), this.marker.bindPopup(this.popup), this.marker.addTo(h)
|
|
7550
|
+
pane: g
|
|
7551
|
+
}), this.marker.bindPopup(this.popup), this.marker.addTo(h), this.marker.on("click", (y) => {
|
|
7552
|
+
var s, l;
|
|
7553
|
+
(l = (s = y.originalEvent) == null ? void 0 : s.stopPropagation) == null || l.call(s);
|
|
7554
|
+
});
|
|
7552
7555
|
}
|
|
7553
7556
|
setOptions(h) {
|
|
7554
7557
|
h && (this.popup.options = h, this.popup.update());
|
|
@@ -7559,34 +7562,39 @@ class ks {
|
|
|
7559
7562
|
bind(h) {
|
|
7560
7563
|
const a = () => {
|
|
7561
7564
|
this.emitPopupClose();
|
|
7562
|
-
}
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
+
};
|
|
7566
|
+
let g = !0;
|
|
7567
|
+
const y = {
|
|
7568
|
+
setEnable: (l) => {
|
|
7569
|
+
g = l;
|
|
7570
|
+
}
|
|
7571
|
+
};
|
|
7572
|
+
function s(l) {
|
|
7573
|
+
y.holder = l;
|
|
7565
7574
|
}
|
|
7566
|
-
return h.on("click", () => {
|
|
7567
|
-
|
|
7575
|
+
return h.on("click", (l) => {
|
|
7576
|
+
var P, m;
|
|
7577
|
+
if ((m = (P = l.originalEvent) == null ? void 0 : P.stopPropagation) == null || m.call(P), !g || h == this.currentMarker)
|
|
7568
7578
|
return;
|
|
7569
|
-
this.currentMarker = h
|
|
7570
|
-
const s = () => {
|
|
7571
|
-
setTimeout(() => {
|
|
7572
|
-
this.marker.setIcon(h.getIcon());
|
|
7573
|
-
});
|
|
7574
|
-
};
|
|
7575
|
-
this.map.on("zoom", s), h.on("move", s);
|
|
7576
|
-
const l = () => {
|
|
7577
|
-
this.map.off("zoom", s), h.off("move", s);
|
|
7578
|
-
};
|
|
7579
|
-
this.marker.setIcon(h.getIcon()), this.marker.setLatLng(h.getLatLng()), this.marker.openPopup(), y(this.linkMarker());
|
|
7579
|
+
this.currentMarker = h;
|
|
7580
7580
|
const c = () => {
|
|
7581
|
-
|
|
7581
|
+
this.marker.setIcon(h.getIcon());
|
|
7582
|
+
};
|
|
7583
|
+
this.map.on("zoom", c), h.on("move", c);
|
|
7584
|
+
const f = () => {
|
|
7585
|
+
this.map.off("zoom", c), h.off("move", c);
|
|
7586
|
+
}, v = () => {
|
|
7587
|
+
f(), this.currentMarker = null, s(void 0), a(), h.setIcon(this.marker.getIcon()), this.marker.setIcon(this.oriIcon), this.marker.off("popupclose", v), this.marker.remove();
|
|
7582
7588
|
};
|
|
7583
|
-
this.marker.
|
|
7584
|
-
|
|
7589
|
+
this.marker.isPopupOpen() && this.marker.remove(), this.marker.addTo(this.map), this.marker.setIcon(h.getIcon()), this.marker.setLatLng(h.getLatLng()), this.marker.isPopupOpen() || setTimeout(() => {
|
|
7590
|
+
this.marker.openPopup();
|
|
7591
|
+
}), s(this.linkMarker()), this.marker.on("popupclose", v);
|
|
7592
|
+
}), y;
|
|
7585
7593
|
}
|
|
7586
7594
|
linkMarker() {
|
|
7587
7595
|
return {
|
|
7588
|
-
position: (h) => {
|
|
7589
|
-
this.marker.setLatLng(h);
|
|
7596
|
+
position: (h, a) => {
|
|
7597
|
+
this.marker.setLatLng(a), this.marker.setIcon(h.getIcon());
|
|
7590
7598
|
},
|
|
7591
7599
|
onRemove: () => {
|
|
7592
7600
|
this.marker.closePopup();
|
|
@@ -7610,57 +7618,67 @@ class ks {
|
|
|
7610
7618
|
on(h, a) {
|
|
7611
7619
|
this.popupCloseHandle.push(a);
|
|
7612
7620
|
}
|
|
7621
|
+
off(h, a) {
|
|
7622
|
+
const g = this.popupCloseHandle.findIndex((y) => y == a);
|
|
7623
|
+
g >= 0 && this.popupCloseHandle.splice(g, 1);
|
|
7624
|
+
}
|
|
7613
7625
|
}
|
|
7614
7626
|
function Tn(_, h, a) {
|
|
7615
|
-
const
|
|
7627
|
+
const g = a.infoWindow.bind(_), y = [], s = [], l = {
|
|
7616
7628
|
getUserData() {
|
|
7617
7629
|
return h.userdata;
|
|
7618
7630
|
},
|
|
7619
7631
|
emitsClick() {
|
|
7620
7632
|
_.fireEvent("click");
|
|
7621
7633
|
},
|
|
7622
|
-
setPosition(
|
|
7623
|
-
var
|
|
7624
|
-
_.setLatLng(
|
|
7634
|
+
setPosition(m) {
|
|
7635
|
+
var o;
|
|
7636
|
+
_.setLatLng(m), (o = g.holder) == null || o.position(_, m);
|
|
7625
7637
|
},
|
|
7626
|
-
onClick(
|
|
7627
|
-
const
|
|
7628
|
-
|
|
7638
|
+
onClick(m) {
|
|
7639
|
+
const o = (d) => {
|
|
7640
|
+
m(_, h);
|
|
7629
7641
|
};
|
|
7630
|
-
_.on("click",
|
|
7631
|
-
_.off("click",
|
|
7642
|
+
_.on("click", o), s.push(() => {
|
|
7643
|
+
_.off("click", o);
|
|
7632
7644
|
});
|
|
7633
7645
|
},
|
|
7634
|
-
onRemove(
|
|
7635
|
-
const
|
|
7636
|
-
|
|
7637
|
-
y.findIndex((
|
|
7646
|
+
onRemove(m) {
|
|
7647
|
+
const o = () => {
|
|
7648
|
+
m(), y.splice(
|
|
7649
|
+
y.findIndex((d) => d == o),
|
|
7638
7650
|
1
|
|
7639
7651
|
);
|
|
7640
7652
|
};
|
|
7641
|
-
y.push(
|
|
7653
|
+
y.push(o);
|
|
7642
7654
|
},
|
|
7643
7655
|
infoWindow: {
|
|
7644
7656
|
open() {
|
|
7645
7657
|
a.infoWindow.open(_, _.getLatLng());
|
|
7646
7658
|
}
|
|
7647
7659
|
},
|
|
7660
|
+
setInfoWindowEnable(m) {
|
|
7661
|
+
g.setEnable(m);
|
|
7662
|
+
},
|
|
7648
7663
|
setCenter() {
|
|
7649
7664
|
a.map.setView(_.getLatLng());
|
|
7650
7665
|
},
|
|
7651
|
-
remove(
|
|
7652
|
-
var
|
|
7653
|
-
return y.forEach((
|
|
7666
|
+
remove(m) {
|
|
7667
|
+
var o;
|
|
7668
|
+
return y.forEach((d) => d()), (o = g.holder) == null || o.onRemove(), _.remove(), _.off("click"), P(), s.forEach((d) => d()), m || a.cluster.removeLayer(_), _;
|
|
7654
7669
|
},
|
|
7655
7670
|
getLeafletMarker() {
|
|
7656
7671
|
return _;
|
|
7657
7672
|
},
|
|
7658
|
-
setIcon(
|
|
7659
|
-
_.setIcon(
|
|
7673
|
+
setIcon(m) {
|
|
7674
|
+
_.setIcon(m);
|
|
7660
7675
|
},
|
|
7661
7676
|
getEle() {
|
|
7662
7677
|
return _.getElement();
|
|
7663
7678
|
},
|
|
7679
|
+
setContent(m) {
|
|
7680
|
+
c = m, f == null || f();
|
|
7681
|
+
},
|
|
7664
7682
|
utils: {
|
|
7665
7683
|
showTrajektoria() {
|
|
7666
7684
|
a.realtimeTrackMgr.startTrajektoria(_);
|
|
@@ -7676,13 +7694,29 @@ function Tn(_, h, a) {
|
|
|
7676
7694
|
}
|
|
7677
7695
|
}
|
|
7678
7696
|
};
|
|
7697
|
+
let c = null, f;
|
|
7698
|
+
function v() {
|
|
7699
|
+
const m = () => {
|
|
7700
|
+
c && a.infoWindow.setContent(c);
|
|
7701
|
+
}, o = () => {
|
|
7702
|
+
m(), f = m;
|
|
7703
|
+
const d = () => {
|
|
7704
|
+
f = null, a.infoWindow.off("close", d);
|
|
7705
|
+
};
|
|
7706
|
+
a.infoWindow.on("close", d);
|
|
7707
|
+
};
|
|
7708
|
+
return _.on("click", o), () => {
|
|
7709
|
+
_.off("click", o);
|
|
7710
|
+
};
|
|
7711
|
+
}
|
|
7712
|
+
const P = v();
|
|
7679
7713
|
return ri(_, l), l;
|
|
7680
7714
|
}
|
|
7681
|
-
class
|
|
7715
|
+
class bs extends ot.Polyline {
|
|
7682
7716
|
constructor(h, a) {
|
|
7683
7717
|
super(h, a), this.customData = {
|
|
7684
|
-
Tooltip: new
|
|
7685
|
-
}, this.myCircleBorder =
|
|
7718
|
+
Tooltip: new ot.Tooltip()
|
|
7719
|
+
}, this.myCircleBorder = ot.circleMarker([0, 0], {
|
|
7686
7720
|
radius: 6,
|
|
7687
7721
|
color: "orange",
|
|
7688
7722
|
interactive: !1,
|
|
@@ -7702,8 +7736,8 @@ class Ms extends rt.Polyline {
|
|
|
7702
7736
|
clearPolyline() {
|
|
7703
7737
|
this.setLatLngs([]), this.szCircleMarkers.forEach((h) => h.remove()), this.szCircleMarkers.splice(0, this.szCircleMarkers.length), this.lastCircle = null;
|
|
7704
7738
|
}
|
|
7705
|
-
customAddLatLng(h, a,
|
|
7706
|
-
const y =
|
|
7739
|
+
customAddLatLng(h, a, g) {
|
|
7740
|
+
const y = ot.circleMarker(h, {
|
|
7707
7741
|
radius: 5,
|
|
7708
7742
|
fill: !0,
|
|
7709
7743
|
fillColor: "green",
|
|
@@ -7715,13 +7749,13 @@ class Ms extends rt.Polyline {
|
|
|
7715
7749
|
}), y.addEventListener("mouseout", () => {
|
|
7716
7750
|
this.myCircleBorder.remove();
|
|
7717
7751
|
}), y.addEventListener("tooltipopen", () => {
|
|
7718
|
-
this.updateTooltipDisplay(
|
|
7752
|
+
this.updateTooltipDisplay(g);
|
|
7719
7753
|
}), this.lastCircle && this.lastCircle.addTo(this._map), this.lastCircle = y, this.szCircleMarkers.push(y), super.addLatLng(h);
|
|
7720
7754
|
}
|
|
7721
7755
|
}
|
|
7722
|
-
class
|
|
7756
|
+
class Ts {
|
|
7723
7757
|
constructor(h, a) {
|
|
7724
|
-
this.bTrajektoriaing = !1, this.bTracking = !1, this.positionNeedAdd = [], this.cancelMarkerHook = null, this.map = h, this.polylineTrack = new
|
|
7758
|
+
this.bTrajektoriaing = !1, this.bTracking = !1, this.positionNeedAdd = [], this.cancelMarkerHook = null, this.map = h, this.polylineTrack = new bs([]), this.polylineTrack.addTo(h), this.marker = L.marker(a.getLatLng(), {
|
|
7725
7759
|
zIndexOffset: 600
|
|
7726
7760
|
}), this.onMarker(a), this.currentMarker = a;
|
|
7727
7761
|
}
|
|
@@ -7734,15 +7768,15 @@ class Cs {
|
|
|
7734
7768
|
), this.positionNeedAdd.splice(0, this.positionNeedAdd.length)), this.polylineTrack.customAddLatLng(h.getLatLng(), h, [])), this.marker.setLatLng(h.getLatLng()), this.bTracking && this.map.setView(this.marker.getLatLng()), this.marker.setIcon(h.getIcon());
|
|
7735
7769
|
};
|
|
7736
7770
|
this.marker.setIcon(h.getIcon()), h.on("move", a);
|
|
7737
|
-
const
|
|
7771
|
+
const g = () => {
|
|
7738
7772
|
this.marker.setIcon(h.getIcon());
|
|
7739
7773
|
};
|
|
7740
|
-
this.map.on("zoomend",
|
|
7774
|
+
this.map.on("zoomend", g);
|
|
7741
7775
|
const y = () => {
|
|
7742
7776
|
h.fireEvent("click");
|
|
7743
7777
|
};
|
|
7744
7778
|
this.marker.on("click", y), this.cancelMarkerHook = () => {
|
|
7745
|
-
this.marker.off("click", y), this.map.off("zoomend",
|
|
7779
|
+
this.marker.off("click", y), this.map.off("zoomend", g), h.off("move", a), this.cancelMarkerHook = null;
|
|
7746
7780
|
};
|
|
7747
7781
|
}
|
|
7748
7782
|
statusCheck() {
|
|
@@ -7768,7 +7802,7 @@ class Cs {
|
|
|
7768
7802
|
(h = this.cancelMarkerHook) == null || h.call(this), this.polylineTrack.remove();
|
|
7769
7803
|
}
|
|
7770
7804
|
}
|
|
7771
|
-
class
|
|
7805
|
+
class Es {
|
|
7772
7806
|
constructor(h) {
|
|
7773
7807
|
this.mapTrajektoria = /* @__PURE__ */ new Map(), this.map = h, this.tooltipContentDiv = document.createElement("div"), this.tooltip = L.tooltip({
|
|
7774
7808
|
content: this.tooltipContentDiv,
|
|
@@ -7779,7 +7813,7 @@ class bs {
|
|
|
7779
7813
|
getTrajektoria(h) {
|
|
7780
7814
|
return this.mapTrajektoria.has(h) || this.mapTrajektoria.set(
|
|
7781
7815
|
h,
|
|
7782
|
-
new
|
|
7816
|
+
new Ts(this.map, h)
|
|
7783
7817
|
), this.mapTrajektoria.get(h);
|
|
7784
7818
|
}
|
|
7785
7819
|
//轨迹
|
|
@@ -7792,8 +7826,8 @@ class bs {
|
|
|
7792
7826
|
}
|
|
7793
7827
|
//追踪
|
|
7794
7828
|
startTrack(h) {
|
|
7795
|
-
this.mapTrajektoria.forEach((
|
|
7796
|
-
|
|
7829
|
+
this.mapTrajektoria.forEach((g, y) => {
|
|
7830
|
+
g.stopTrack(), g.needDelete() && this.mapTrajektoria.delete(y);
|
|
7797
7831
|
}), this.getTrajektoria(h).startTrack();
|
|
7798
7832
|
}
|
|
7799
7833
|
stopTrack(h) {
|
|
@@ -7801,11 +7835,11 @@ class bs {
|
|
|
7801
7835
|
a == null || a.stopTrack(), a != null && a.needDelete() && this.mapTrajektoria.delete(h);
|
|
7802
7836
|
}
|
|
7803
7837
|
}
|
|
7804
|
-
class
|
|
7838
|
+
class Ss {
|
|
7805
7839
|
constructor(h) {
|
|
7806
7840
|
this.tasks = [], setInterval(() => {
|
|
7807
|
-
this.tasks.map((a) => a.task).forEach((a,
|
|
7808
|
-
|
|
7841
|
+
this.tasks.map((a) => a.task).forEach((a, g) => {
|
|
7842
|
+
g == this.tasks.length - 1, a();
|
|
7809
7843
|
}), this.tasks.map((a) => a.r).forEach((a) => a()), this.tasks.splice(0, this.tasks.length);
|
|
7810
7844
|
}, 1e3);
|
|
7811
7845
|
}
|
|
@@ -7818,8 +7852,8 @@ class Ts {
|
|
|
7818
7852
|
});
|
|
7819
7853
|
}
|
|
7820
7854
|
}
|
|
7821
|
-
function
|
|
7822
|
-
const _ =
|
|
7855
|
+
function zs() {
|
|
7856
|
+
const _ = ot.MarkerClusterGroup.prototype;
|
|
7823
7857
|
setInterval(() => {
|
|
7824
7858
|
a.size && (a.forEach((s) => {
|
|
7825
7859
|
h.bind(s)();
|
|
@@ -7829,28 +7863,28 @@ function Es() {
|
|
|
7829
7863
|
_._refreshClustersIcons = function() {
|
|
7830
7864
|
a.add(this);
|
|
7831
7865
|
};
|
|
7832
|
-
const a = /* @__PURE__ */ new Set(),
|
|
7833
|
-
|
|
7866
|
+
const a = /* @__PURE__ */ new Set(), g = ot.MarkerCluster.prototype, y = g._updateIcon;
|
|
7867
|
+
g._updateIcon = function() {
|
|
7834
7868
|
y.bind(this)();
|
|
7835
7869
|
};
|
|
7836
7870
|
}
|
|
7837
|
-
|
|
7838
|
-
class
|
|
7871
|
+
zs();
|
|
7872
|
+
class Os {
|
|
7839
7873
|
constructor(h, a) {
|
|
7840
|
-
this.clusterClickHandle = [], this.renderOptions = a, this.map = h, this.gRealtimeTrack = new
|
|
7874
|
+
this.clusterClickHandle = [], this.renderOptions = a, this.map = h, this.gRealtimeTrack = new Es(h), this.infoWindow = new Cs(h), this.markers = ot.markerClusterGroup({
|
|
7841
7875
|
animate: !1,
|
|
7842
7876
|
chunkedLoading: !0,
|
|
7843
7877
|
zoomToBoundsOnClick: !1,
|
|
7844
7878
|
animateAddingMarkers: !1,
|
|
7845
7879
|
showCoverageOnHover: !1,
|
|
7846
|
-
iconCreateFunction: a != null && a.rendeCluster ? (
|
|
7847
|
-
}), this.intervalTick = new
|
|
7880
|
+
iconCreateFunction: a != null && a.rendeCluster ? (g) => this.iconCreateFunction(g) : void 0
|
|
7881
|
+
}), this.intervalTick = new Ss(this.markers), this.markers.addTo(h), this.markers.on("clusterclick", (g) => {
|
|
7848
7882
|
var y, s, l;
|
|
7849
7883
|
if ((y = this.renderOptions) != null && y.onClusterClick || this.clusterClickHandle.length) {
|
|
7850
|
-
const c =
|
|
7851
|
-
(l = (s = this.renderOptions) == null ? void 0 : s.onClusterClick) == null || l.call(s, f, c, this.map), this.clusterClickHandle.forEach((
|
|
7884
|
+
const c = g.propagatedFrom, f = c.getAllChildMarkers().map((v) => bn(v));
|
|
7885
|
+
(l = (s = this.renderOptions) == null ? void 0 : s.onClusterClick) == null || l.call(s, f, c, this.map), this.clusterClickHandle.forEach((v) => {
|
|
7852
7886
|
try {
|
|
7853
|
-
|
|
7887
|
+
v(f, {
|
|
7854
7888
|
bindWindow: () => {
|
|
7855
7889
|
this.infoWindow.bind(c);
|
|
7856
7890
|
},
|
|
@@ -7866,39 +7900,39 @@ class Ss {
|
|
|
7866
7900
|
}
|
|
7867
7901
|
getAllClusterId(h) {
|
|
7868
7902
|
const a = this.markers._gridClusters;
|
|
7869
|
-
let
|
|
7903
|
+
let g = "";
|
|
7870
7904
|
const y = [];
|
|
7871
7905
|
return Object.entries(a).forEach(([s, { _grid: l }]) => {
|
|
7872
7906
|
Object.entries(l).filter(([, c]) => Object.entries(c).length > 0).forEach(([c, f]) => {
|
|
7873
|
-
Object.entries(f).forEach(([
|
|
7874
|
-
|
|
7875
|
-
const d = `${s}_${c}_${
|
|
7876
|
-
y.push(d), h ==
|
|
7907
|
+
Object.entries(f).forEach(([v, P]) => {
|
|
7908
|
+
P.forEach((m, o) => {
|
|
7909
|
+
const d = `${s}_${c}_${v}_${o}`;
|
|
7910
|
+
y.push(d), h == m && (g = d);
|
|
7877
7911
|
});
|
|
7878
7912
|
});
|
|
7879
7913
|
});
|
|
7880
|
-
}), [y,
|
|
7914
|
+
}), [y, g];
|
|
7881
7915
|
}
|
|
7882
7916
|
freshCurrentZoomCluster() {
|
|
7883
|
-
const h = this.markers._gridClusters, a = this.map.getZoom(),
|
|
7884
|
-
Object.keys(
|
|
7885
|
-
const l =
|
|
7917
|
+
const h = this.markers._gridClusters, a = this.map.getZoom(), g = h[a]._grid, y = [];
|
|
7918
|
+
Object.keys(g).filter((s) => Object.keys(g[s]).length > 0).forEach((s) => {
|
|
7919
|
+
const l = g[s];
|
|
7886
7920
|
Object.keys(l).forEach((c) => {
|
|
7887
|
-
l[c].map((f,
|
|
7921
|
+
l[c].map((f, v) => {
|
|
7888
7922
|
y.push(f);
|
|
7889
7923
|
});
|
|
7890
7924
|
});
|
|
7891
7925
|
}), this.markers.refreshClusters(y);
|
|
7892
7926
|
}
|
|
7893
7927
|
getCurrentZoomCluster(h) {
|
|
7894
|
-
const a = this.markers._gridClusters,
|
|
7928
|
+
const a = this.markers._gridClusters, g = h._zoom, y = a[g]._grid;
|
|
7895
7929
|
let s = "";
|
|
7896
7930
|
return Object.keys(y).filter((l) => Object.keys(y[l]).length > 0).forEach((l) => {
|
|
7897
7931
|
const c = y[l];
|
|
7898
7932
|
Object.keys(c).forEach((f) => {
|
|
7899
|
-
c[f].map((
|
|
7900
|
-
const
|
|
7901
|
-
|
|
7933
|
+
c[f].map((v, P) => {
|
|
7934
|
+
const m = l + f + "_" + P;
|
|
7935
|
+
v == h && (s = m);
|
|
7902
7936
|
});
|
|
7903
7937
|
});
|
|
7904
7938
|
}), {
|
|
@@ -7915,15 +7949,15 @@ class Ss {
|
|
|
7915
7949
|
}
|
|
7916
7950
|
off(h, a) {
|
|
7917
7951
|
if (h == "clusterclick") {
|
|
7918
|
-
const
|
|
7952
|
+
const g = this.clusterClickHandle.findIndex(
|
|
7919
7953
|
(y) => y == a
|
|
7920
7954
|
);
|
|
7921
|
-
|
|
7955
|
+
g >= 0 && this.clusterClickHandle.splice(g, 1);
|
|
7922
7956
|
}
|
|
7923
7957
|
}
|
|
7924
7958
|
iconCreateFunction(h) {
|
|
7925
|
-
var
|
|
7926
|
-
const a = (
|
|
7959
|
+
var g;
|
|
7960
|
+
const a = (g = this.renderOptions) == null ? void 0 : g.rendeCluster;
|
|
7927
7961
|
if (a) {
|
|
7928
7962
|
const y = h.getAllChildMarkers().map((l) => bn(l)), s = this.getCurrentZoomCluster(h);
|
|
7929
7963
|
return a(y, this.map, s);
|
|
@@ -7931,7 +7965,7 @@ class Ss {
|
|
|
7931
7965
|
throw "icon need";
|
|
7932
7966
|
}
|
|
7933
7967
|
addMarkers(h) {
|
|
7934
|
-
const a = [],
|
|
7968
|
+
const a = [], g = [];
|
|
7935
7969
|
for (let y = 0; y < h.length; y++) {
|
|
7936
7970
|
const s = h[y], l = Cn(
|
|
7937
7971
|
s.latlng,
|
|
@@ -7944,9 +7978,9 @@ class Ss {
|
|
|
7944
7978
|
intervalTick: this.intervalTick,
|
|
7945
7979
|
realtimeTrackMgr: this.gRealtimeTrack
|
|
7946
7980
|
});
|
|
7947
|
-
a.push(c), ri(l, c),
|
|
7981
|
+
a.push(c), ri(l, c), g.push(l);
|
|
7948
7982
|
}
|
|
7949
|
-
return this.markers.addLayers(
|
|
7983
|
+
return this.markers.addLayers(g), a;
|
|
7950
7984
|
}
|
|
7951
7985
|
removeMarkers(h) {
|
|
7952
7986
|
this.markers.removeLayers(
|
|
@@ -7958,20 +7992,20 @@ class Ss {
|
|
|
7958
7992
|
h.latlng,
|
|
7959
7993
|
h.userdata,
|
|
7960
7994
|
h.options
|
|
7961
|
-
),
|
|
7995
|
+
), g = Tn(a, h, {
|
|
7962
7996
|
infoWindow: this.infoWindow,
|
|
7963
7997
|
map: this.map,
|
|
7964
7998
|
cluster: this.markers,
|
|
7965
7999
|
intervalTick: this.intervalTick,
|
|
7966
8000
|
realtimeTrackMgr: this.gRealtimeTrack
|
|
7967
8001
|
});
|
|
7968
|
-
return ri(a,
|
|
8002
|
+
return ri(a, g), this.markers.addLayers([a], !0), g;
|
|
7969
8003
|
}
|
|
7970
8004
|
setFitview() {
|
|
7971
|
-
this.markers.getBounds().isValid() && this.map.fitBounds(this.markers.getBounds());
|
|
8005
|
+
this.markers.getBounds().isValid() && this.markers.getLayers().length > 0 && this.map.fitBounds(this.markers.getBounds());
|
|
7972
8006
|
}
|
|
7973
8007
|
getAllMarkers() {
|
|
7974
|
-
return this.markers.getLayers().map((h) =>
|
|
8008
|
+
return this.markers.getLayers().map((h) => Ms(h));
|
|
7975
8009
|
}
|
|
7976
8010
|
}
|
|
7977
8011
|
const En = L.extend({}, L.DomUtil);
|
|
@@ -7988,11 +8022,11 @@ L.extend(L.DomUtil, {
|
|
|
7988
8022
|
* @param {Number} bearing
|
|
7989
8023
|
* @param {L.Point} pivot
|
|
7990
8024
|
*/
|
|
7991
|
-
setTransform: function(_, h, a,
|
|
8025
|
+
setTransform: function(_, h, a, g, y) {
|
|
7992
8026
|
var s = h || new L.Point(0, 0);
|
|
7993
|
-
if (!
|
|
8027
|
+
if (!g)
|
|
7994
8028
|
return h = s._round(), En.setTransform.apply(this, arguments);
|
|
7995
|
-
s = s.rotateFrom(
|
|
8029
|
+
s = s.rotateFrom(g, y), _.style[L.DomUtil.TRANSFORM] = "translate3d(" + s.x + "px," + s.y + "px,0)" + (a ? " scale(" + a + ")" : "") + " rotate(" + g + "rad)";
|
|
7996
8030
|
},
|
|
7997
8031
|
/**
|
|
7998
8032
|
* Sets the position of `el` to coordinates specified by
|
|
@@ -8006,10 +8040,10 @@ L.extend(L.DomUtil, {
|
|
|
8006
8040
|
* @param {L.Point} pivot
|
|
8007
8041
|
* @param {Number} scale
|
|
8008
8042
|
*/
|
|
8009
|
-
setPosition: function(_, h, a,
|
|
8043
|
+
setPosition: function(_, h, a, g, y) {
|
|
8010
8044
|
if (!a)
|
|
8011
8045
|
return En.setPosition.apply(this, arguments);
|
|
8012
|
-
_._leaflet_pos = h, L.Browser.any3d ? L.DomUtil.setTransform(_, h, y, a,
|
|
8046
|
+
_._leaflet_pos = h, L.Browser.any3d ? L.DomUtil.setTransform(_, h, y, a, g) : (_.style.left = h.x + "px", _.style.top = h.y + "px");
|
|
8013
8047
|
},
|
|
8014
8048
|
/**
|
|
8015
8049
|
* @constant radians = degrees × π/180°
|
|
@@ -8055,10 +8089,10 @@ L.extend(L.Point.prototype, {
|
|
|
8055
8089
|
rotateFrom: function(_, h) {
|
|
8056
8090
|
if (!_)
|
|
8057
8091
|
return this;
|
|
8058
|
-
var a = Math.sin(_),
|
|
8092
|
+
var a = Math.sin(_), g = Math.cos(_), y = h.x, s = h.y, l = this.x - y, c = this.y - s;
|
|
8059
8093
|
return new L.Point(
|
|
8060
|
-
l *
|
|
8061
|
-
l * a + c *
|
|
8094
|
+
l * g - c * a + y,
|
|
8095
|
+
l * a + c * g + s
|
|
8062
8096
|
);
|
|
8063
8097
|
}
|
|
8064
8098
|
});
|
|
@@ -8084,14 +8118,14 @@ L.DivOverlay.include({
|
|
|
8084
8118
|
}
|
|
8085
8119
|
}
|
|
8086
8120
|
});
|
|
8087
|
-
const
|
|
8121
|
+
const Bs = L.extend({}, L.Popup.prototype);
|
|
8088
8122
|
L.Popup.include({
|
|
8089
8123
|
/**
|
|
8090
8124
|
* 0. update element anchor point (popupProto v1.9.3)
|
|
8091
8125
|
* 1. rotate around anchor point (subtract anchor -> rotate point -> add anchor)
|
|
8092
8126
|
*/
|
|
8093
8127
|
_animateZoom: function(_) {
|
|
8094
|
-
if (
|
|
8128
|
+
if (Bs._animateZoom.apply(this, arguments), this._map && this._map._rotate) {
|
|
8095
8129
|
var h = this._getAnchor(), a = L.DomUtil.getPosition(this._container).subtract(h);
|
|
8096
8130
|
L.DomUtil.setPosition(this._container, this._map.rotatedPointToMapPanePoint(a).add(h));
|
|
8097
8131
|
}
|
|
@@ -8107,24 +8141,24 @@ L.Popup.include({
|
|
|
8107
8141
|
this._autopanning = !1;
|
|
8108
8142
|
return;
|
|
8109
8143
|
}
|
|
8110
|
-
var _ = this._map, h = parseInt(L.DomUtil.getStyle(this._container, "marginBottom"), 10) || 0, a = this._container.offsetHeight + h,
|
|
8144
|
+
var _ = this._map, h = parseInt(L.DomUtil.getStyle(this._container, "marginBottom"), 10) || 0, a = this._container.offsetHeight + h, g = this._containerWidth, y = new L.Point(this._containerLeft, -a - this._containerBottom);
|
|
8111
8145
|
y._add(L.DomUtil.getPosition(this._container));
|
|
8112
|
-
var s = y._add(this._map._getMapPanePos()), l = L.point(this.options.autoPanPadding), c = L.point(this.options.autoPanPaddingTopLeft || l), f = L.point(this.options.autoPanPaddingBottomRight || l),
|
|
8113
|
-
s.x +
|
|
8146
|
+
var s = y._add(this._map._getMapPanePos()), l = L.point(this.options.autoPanPadding), c = L.point(this.options.autoPanPaddingTopLeft || l), f = L.point(this.options.autoPanPaddingBottomRight || l), v = _.getSize(), P = 0, m = 0;
|
|
8147
|
+
s.x + g + f.x > v.x && (P = s.x + g - v.x + f.x), s.x - P - c.x < 0 && (P = s.x - c.x), s.y + a + f.y > v.y && (m = s.y + a - v.y + f.y), s.y - m - c.y < 0 && (m = s.y - c.y), (P || m) && (this.options.keepInView && (this._autopanning = !0), _.fire("autopanstart").panBy([P, m]));
|
|
8114
8148
|
}
|
|
8115
8149
|
}
|
|
8116
8150
|
});
|
|
8117
|
-
const
|
|
8151
|
+
const zn = L.extend({}, L.Tooltip.prototype);
|
|
8118
8152
|
L.Tooltip.include({
|
|
8119
8153
|
_animateZoom: function(_) {
|
|
8120
8154
|
if (!this._map._rotate)
|
|
8121
|
-
return
|
|
8155
|
+
return zn._animateZoom.apply(this, arguments);
|
|
8122
8156
|
var h = this._map._latLngToNewLayerPoint(this._latlng, _.zoom, _.center);
|
|
8123
8157
|
h = this._map.rotatedPointToMapPanePoint(h), this._setPosition(h);
|
|
8124
8158
|
},
|
|
8125
8159
|
_updatePosition: function() {
|
|
8126
8160
|
if (!this._map._rotate)
|
|
8127
|
-
return
|
|
8161
|
+
return zn._updatePosition.apply(this, arguments);
|
|
8128
8162
|
var _ = this._map.latLngToLayerPoint(this._latlng);
|
|
8129
8163
|
_ = this._map.rotatedPointToMapPanePoint(_), this._setPosition(_);
|
|
8130
8164
|
}
|
|
@@ -8132,13 +8166,13 @@ L.Tooltip.include({
|
|
|
8132
8166
|
L.extend({}, L.Icon.prototype);
|
|
8133
8167
|
L.Icon.include({
|
|
8134
8168
|
_setIconStyles: function(_, h) {
|
|
8135
|
-
var a = this.options,
|
|
8136
|
-
typeof
|
|
8137
|
-
var y = L.point(
|
|
8169
|
+
var a = this.options, g = a[h + "Size"];
|
|
8170
|
+
typeof g == "number" && (g = [g, g]);
|
|
8171
|
+
var y = L.point(g), s = L.point(h === "shadow" && a.shadowAnchor || a.iconAnchor || y && y.divideBy(2, !0));
|
|
8138
8172
|
_.className = "leaflet-marker-" + h + " " + (a.className || ""), s && (_.style.marginLeft = -s.x + "px", _.style.marginTop = -s.y + "px", _.style[L.DomUtil.TRANSFORM + "Origin"] = s.x + "px " + s.y + "px 0px"), y && (_.style.width = y.x + "px", _.style.height = y.y + "px");
|
|
8139
8173
|
}
|
|
8140
8174
|
});
|
|
8141
|
-
const
|
|
8175
|
+
const On = L.extend({}, L.Marker.prototype);
|
|
8142
8176
|
L.Marker.mergeOptions({
|
|
8143
8177
|
/**
|
|
8144
8178
|
* Rotation of this marker in rad
|
|
@@ -8167,8 +8201,8 @@ var ai, Bn = {
|
|
|
8167
8201
|
// this._draggable.updateMapBearing(this._marker._map._bearing);
|
|
8168
8202
|
// },
|
|
8169
8203
|
_onDrag: function(_) {
|
|
8170
|
-
var h = this._marker, a = h.options.rotation || h.options.rotateWithView,
|
|
8171
|
-
!a &&
|
|
8204
|
+
var h = this._marker, a = h.options.rotation || h.options.rotateWithView, g = h._shadow, y = L.DomUtil.getPosition(h._icon);
|
|
8205
|
+
!a && g && L.DomUtil.setPosition(g, y), h._map._rotate && (y = h._map.mapPanePointToRotatedPoint(y));
|
|
8172
8206
|
var s = h._map.layerPointToLatLng(y);
|
|
8173
8207
|
h._latlng = s, _.latlng = s, _.oldLatLng = this._oldLatLng, a ? h.setLatLng(s) : h.fire("move", _), h.fire("drag", _);
|
|
8174
8208
|
},
|
|
@@ -8184,10 +8218,10 @@ L.Marker.include({
|
|
|
8184
8218
|
* @listens L.Map~rotate
|
|
8185
8219
|
*/
|
|
8186
8220
|
getEvents: function() {
|
|
8187
|
-
return L.extend(
|
|
8221
|
+
return L.extend(On.getEvents.apply(this, arguments), { rotate: this.update });
|
|
8188
8222
|
},
|
|
8189
8223
|
_initInteraction: function() {
|
|
8190
|
-
var _ =
|
|
8224
|
+
var _ = On._initInteraction.apply(this, arguments);
|
|
8191
8225
|
return this.dragging && this.dragging.enabled() && this._map && this._map._rotate && (ai = ai || Object.getPrototypeOf(this.dragging), this.dragging.disable(), Object.assign(this.dragging, {
|
|
8192
8226
|
// _onDragStart: MarkerDrag._onDragStart.bind(this.dragging),
|
|
8193
8227
|
_onDrag: Bn._onDrag.bind(this.dragging),
|
|
@@ -8266,8 +8300,8 @@ L.Renderer.include({
|
|
|
8266
8300
|
_updateTransform: function(_, h) {
|
|
8267
8301
|
if (!this._map._rotate)
|
|
8268
8302
|
return ke._updateTransform.apply(this, arguments);
|
|
8269
|
-
var a = this._map.getZoomScale(h, this._zoom),
|
|
8270
|
-
L.DomUtil.setTransform(this._container,
|
|
8303
|
+
var a = this._map.getZoomScale(h, this._zoom), g = this._map._latLngToNewLayerPoint(this._topLeft, h, _);
|
|
8304
|
+
L.DomUtil.setTransform(this._container, g, a);
|
|
8271
8305
|
},
|
|
8272
8306
|
// getEvents() {
|
|
8273
8307
|
// const events = {
|
|
@@ -8391,11 +8425,11 @@ L.Map.include({
|
|
|
8391
8425
|
mapBoundsToContainerBounds: function(_) {
|
|
8392
8426
|
if (!this._rotate && $.mapBoundsToContainerBounds)
|
|
8393
8427
|
return $.mapBoundsToContainerBounds.apply(this, arguments);
|
|
8394
|
-
const h = this.getPixelOrigin(), a = this.layerPointToContainerPoint(this.project(_.getNorthWest())._subtract(h)),
|
|
8428
|
+
const h = this.getPixelOrigin(), a = this.layerPointToContainerPoint(this.project(_.getNorthWest())._subtract(h)), g = this.layerPointToContainerPoint(this.project(_.getNorthEast())._subtract(h)), y = this.layerPointToContainerPoint(this.project(_.getSouthWest())._subtract(h)), s = this.layerPointToContainerPoint(this.project(_.getSouthEast())._subtract(h));
|
|
8395
8429
|
return L.bounds([
|
|
8396
|
-
L.point(Math.min(a.x,
|
|
8430
|
+
L.point(Math.min(a.x, g.x, s.x, y.x), Math.min(a.y, g.y, s.y, y.y)),
|
|
8397
8431
|
// [ minX, minY ]
|
|
8398
|
-
L.point(Math.max(a.x,
|
|
8432
|
+
L.point(Math.max(a.x, g.x, s.x, y.x), Math.max(a.y, g.y, s.y, y.y))
|
|
8399
8433
|
// [ maxX, maxY ]
|
|
8400
8434
|
]);
|
|
8401
8435
|
},
|
|
@@ -8449,8 +8483,8 @@ L.Map.include({
|
|
|
8449
8483
|
*/
|
|
8450
8484
|
setBearing: function(_) {
|
|
8451
8485
|
if (!(!L.Browser.any3d || !this._rotate)) {
|
|
8452
|
-
var h = L.Util.wrapNum(_, [0, 360]) * L.DomUtil.DEG_TO_RAD, a = this._getPixelCenter(),
|
|
8453
|
-
L.DomUtil.setPosition(this._rotatePane,
|
|
8486
|
+
var h = L.Util.wrapNum(_, [0, 360]) * L.DomUtil.DEG_TO_RAD, a = this._getPixelCenter(), g = this._getRotatePanePos().rotateFrom(-this._bearing, a), y = g.rotateFrom(h, a);
|
|
8487
|
+
L.DomUtil.setPosition(this._rotatePane, g, h, a), this._pivot = a, this._bearing = h, this._rotatePanePos = y, this.fire("rotate");
|
|
8454
8488
|
}
|
|
8455
8489
|
},
|
|
8456
8490
|
/**
|
|
@@ -8521,11 +8555,11 @@ L.Map.include({
|
|
|
8521
8555
|
if (!this._rotate || Math.abs(this._bearing).toFixed(1) < 0.1)
|
|
8522
8556
|
return $.panInside.apply(this, arguments);
|
|
8523
8557
|
h = h || {};
|
|
8524
|
-
const a = L.point(h.paddingTopLeft || h.padding || [0, 0]),
|
|
8558
|
+
const a = L.point(h.paddingTopLeft || h.padding || [0, 0]), g = L.point(h.paddingBottomRight || h.padding || [0, 0]), y = this._container.getBoundingClientRect(), s = this.latLngToContainerPoint(_), l = L.bounds([L.point(y), L.point(y).add(this.getSize())]), c = l.getCenter(), f = L.bounds([l.min.add(a), l.max.subtract(g)]), v = f.getSize();
|
|
8525
8559
|
if (!f.contains(s)) {
|
|
8526
8560
|
this._enforcingBounds = !0;
|
|
8527
|
-
const
|
|
8528
|
-
c.x +=
|
|
8561
|
+
const P = s.subtract(f.getCenter()), m = f.extend(s).getSize().subtract(v);
|
|
8562
|
+
c.x += P.x < 0 ? -m.x : m.x, c.y += P.y < 0 ? -m.y : m.y, this.panTo(this.containerPointToLatLng(c), h), this._enforcingBounds = !1;
|
|
8529
8563
|
}
|
|
8530
8564
|
return this;
|
|
8531
8565
|
},
|
|
@@ -8616,9 +8650,9 @@ L.Map.include({
|
|
|
8616
8650
|
if (!this._rotate || Math.abs(this._bearing).toFixed(1) < 0.1)
|
|
8617
8651
|
return $.getBoundsZoom.apply(this, arguments);
|
|
8618
8652
|
_ = L.latLngBounds(_), a = L.point(a || [0, 0]);
|
|
8619
|
-
let
|
|
8620
|
-
const y = this.getMinZoom(), s = this.getMaxZoom(), l = this.getSize().subtract(a), c = this.mapBoundsToContainerBounds(_).getSize(), f = this.options.zoomSnap,
|
|
8621
|
-
return
|
|
8653
|
+
let g = this.getZoom() || 0;
|
|
8654
|
+
const y = this.getMinZoom(), s = this.getMaxZoom(), l = this.getSize().subtract(a), c = this.mapBoundsToContainerBounds(_).getSize(), f = this.options.zoomSnap, v = l.x / c.x, P = l.y / c.y, m = h ? Math.max(v, P) : Math.min(v, P);
|
|
8655
|
+
return g = this.getScaleZoom(m, g), f && (g = Math.round(g / (f / 100)) * (f / 100), g = h ? Math.ceil(g / f) * f : Math.floor(g / f) * f), Math.max(y, Math.min(s, g));
|
|
8622
8656
|
},
|
|
8623
8657
|
/**
|
|
8624
8658
|
* Layer point of the current center
|
|
@@ -8661,12 +8695,12 @@ L.Map.include({
|
|
|
8661
8695
|
_getNewPixelBounds: function(_, h) {
|
|
8662
8696
|
if (_ = _ || this.getCenter(), h = h || this.getZoom(), !this._rotate && $._getNewPixelBounds)
|
|
8663
8697
|
return $._getNewPixelBounds.apply(this, arguments);
|
|
8664
|
-
var a = this._animatingZoom ? Math.max(this._animateToZoom, this.getZoom()) : this.getZoom(),
|
|
8698
|
+
var a = this._animatingZoom ? Math.max(this._animateToZoom, this.getZoom()) : this.getZoom(), g = this.getZoomScale(a, h), y = this.project(_, h).floor(), s = this.getSize(), l = new L.Bounds([
|
|
8665
8699
|
this.containerPointToLayerPoint([0, 0]).floor(),
|
|
8666
8700
|
this.containerPointToLayerPoint([s.x, 0]).floor(),
|
|
8667
8701
|
this.containerPointToLayerPoint([0, s.y]).floor(),
|
|
8668
8702
|
this.containerPointToLayerPoint([s.x, s.y]).floor()
|
|
8669
|
-
]).getSize().divideBy(
|
|
8703
|
+
]).getSize().divideBy(g * 2);
|
|
8670
8704
|
return new L.Bounds(y.subtract(l), y.add(l));
|
|
8671
8705
|
},
|
|
8672
8706
|
/**
|
|
@@ -8685,17 +8719,17 @@ L.Map.include({
|
|
|
8685
8719
|
_getPaddedPixelBounds: function(_) {
|
|
8686
8720
|
if (!this._rotate && $._getPaddedPixelBounds)
|
|
8687
8721
|
return $._getPaddedPixelBounds.apply(this, arguments);
|
|
8688
|
-
var h = _, a = this.getSize(),
|
|
8722
|
+
var h = _, a = this.getSize(), g = a.multiplyBy(-h), y = a.multiplyBy(1 + h);
|
|
8689
8723
|
return new L.Bounds([
|
|
8690
|
-
this.containerPointToLayerPoint([
|
|
8691
|
-
this.containerPointToLayerPoint([
|
|
8692
|
-
this.containerPointToLayerPoint([y.x,
|
|
8724
|
+
this.containerPointToLayerPoint([g.x, g.y]).floor(),
|
|
8725
|
+
this.containerPointToLayerPoint([g.x, y.y]).floor(),
|
|
8726
|
+
this.containerPointToLayerPoint([y.x, g.y]).floor(),
|
|
8693
8727
|
this.containerPointToLayerPoint([y.x, y.y]).floor()
|
|
8694
8728
|
]);
|
|
8695
8729
|
},
|
|
8696
8730
|
_handleGeolocationResponse: function(_) {
|
|
8697
8731
|
if (this._container._leaflet_id) {
|
|
8698
|
-
var h = _.coords.latitude, a = _.coords.longitude,
|
|
8732
|
+
var h = _.coords.latitude, a = _.coords.longitude, g = _.coords.heading, y = new L.LatLng(h, a), s = y.toBounds(_.coords.accuracy), l = this._locateOptions;
|
|
8699
8733
|
if (l.setView) {
|
|
8700
8734
|
var c = this.getBoundsZoom(s);
|
|
8701
8735
|
this.setView(y, l.maxZoom ? Math.min(c, l.maxZoom) : c);
|
|
@@ -8705,10 +8739,10 @@ L.Map.include({
|
|
|
8705
8739
|
bounds: s,
|
|
8706
8740
|
timestamp: _.timestamp,
|
|
8707
8741
|
/** @TODO use mapProto._handleGeolocationResponse */
|
|
8708
|
-
heading:
|
|
8742
|
+
heading: g
|
|
8709
8743
|
};
|
|
8710
|
-
for (var
|
|
8711
|
-
typeof _.coords[
|
|
8744
|
+
for (var v in _.coords)
|
|
8745
|
+
typeof _.coords[v] == "number" && (f[v] = _.coords[v]);
|
|
8712
8746
|
this.fire("locationfound", f);
|
|
8713
8747
|
}
|
|
8714
8748
|
}
|
|
@@ -8812,13 +8846,13 @@ L.Map.TouchGestures = L.Handler.extend({
|
|
|
8812
8846
|
_onTouchStart: function(_) {
|
|
8813
8847
|
var h = this._map;
|
|
8814
8848
|
if (!(!_.touches || _.touches.length !== 2 || h._animatingZoom || this._zooming || this._rotating)) {
|
|
8815
|
-
var a = h.mouseEventToContainerPoint(_.touches[0]),
|
|
8816
|
-
this._centerPoint = h.getSize()._divideBy(2), this._startLatLng = h.containerPointToLatLng(this._centerPoint), this.zoom ? (h.options.touchZoom !== "center" && (this._pinchStartLatLng = h.containerPointToLatLng(a.add(
|
|
8849
|
+
var a = h.mouseEventToContainerPoint(_.touches[0]), g = h.mouseEventToContainerPoint(_.touches[1]), y = a.subtract(g);
|
|
8850
|
+
this._centerPoint = h.getSize()._divideBy(2), this._startLatLng = h.containerPointToLatLng(this._centerPoint), this.zoom ? (h.options.touchZoom !== "center" && (this._pinchStartLatLng = h.containerPointToLatLng(a.add(g)._divideBy(2))), this._startDist = a.distanceTo(g), this._startZoom = h.getZoom(), this._zooming = !0) : this._zooming = !1, this.rotate ? (this._startTheta = Math.atan(y.x / y.y), this._startBearing = h.getBearing(), y.y < 0 && (this._startBearing += 180), this._rotating = !0) : this._rotating = !1, this._moved = !1, h._stop(), L.DomEvent.on(document, "touchmove", this._onTouchMove, this).on(document, "touchend touchcancel", this._onTouchEnd, this), L.DomEvent.preventDefault(_);
|
|
8817
8851
|
}
|
|
8818
8852
|
},
|
|
8819
8853
|
_onTouchMove: function(_) {
|
|
8820
8854
|
if (!(!_.touches || _.touches.length !== 2 || !(this._zooming || this._rotating))) {
|
|
8821
|
-
var h = this._map, a = h.mouseEventToContainerPoint(_.touches[0]),
|
|
8855
|
+
var h = this._map, a = h.mouseEventToContainerPoint(_.touches[0]), g = h.mouseEventToContainerPoint(_.touches[1]), y = a.subtract(g), s = a.distanceTo(g) / this._startDist, l;
|
|
8822
8856
|
if (this._rotating) {
|
|
8823
8857
|
var c = Math.atan(y.x / y.y), f = (c - this._startTheta) * L.DomUtil.RAD_TO_DEG;
|
|
8824
8858
|
y.y < 0 && (f += 180), f && h.setBearing(this._startBearing - f);
|
|
@@ -8828,14 +8862,14 @@ L.Map.TouchGestures = L.Handler.extend({
|
|
|
8828
8862
|
if (this._center = this._startLatLng, s === 1)
|
|
8829
8863
|
return;
|
|
8830
8864
|
} else {
|
|
8831
|
-
if (l = a._add(
|
|
8865
|
+
if (l = a._add(g)._divideBy(2)._subtract(this._centerPoint), s === 1 && l.x === 0 && l.y === 0)
|
|
8832
8866
|
return;
|
|
8833
|
-
var
|
|
8834
|
-
this._center = h.unproject(h.project(this._pinchStartLatLng).subtract(l.rotate(
|
|
8867
|
+
var v = -h.getBearing() * L.DomUtil.DEG_TO_RAD;
|
|
8868
|
+
this._center = h.unproject(h.project(this._pinchStartLatLng).subtract(l.rotate(v)));
|
|
8835
8869
|
}
|
|
8836
8870
|
this._moved || (h._moveStart(!0, !1), this._moved = !0), L.Util.cancelAnimFrame(this._animRequest);
|
|
8837
|
-
var
|
|
8838
|
-
this._animRequest = L.Util.requestAnimFrame(
|
|
8871
|
+
var P = h._move.bind(h, this._center, this._zoom, { pinch: !0, round: !1 }, void 0);
|
|
8872
|
+
this._animRequest = L.Util.requestAnimFrame(P, this, !0), L.DomEvent.preventDefault(_);
|
|
8839
8873
|
}
|
|
8840
8874
|
},
|
|
8841
8875
|
_onTouchEnd: function() {
|
|
@@ -8925,8 +8959,8 @@ L.Control.Rotate = L.Control.extend({
|
|
|
8925
8959
|
onAdd: function(_) {
|
|
8926
8960
|
var h = this._container = L.DomUtil.create("div", "leaflet-control-rotate leaflet-bar"), a = this._arrow = L.DomUtil.create("span", "leaflet-control-rotate-arrow");
|
|
8927
8961
|
a.style.backgroundImage = `url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")`, a.style.cursor = "grab", a.style.display = "block", a.style.width = "100%", a.style.height = "100%", a.style.backgroundRepeat = "no-repeat", a.style.backgroundPosition = "50%";
|
|
8928
|
-
var
|
|
8929
|
-
return
|
|
8962
|
+
var g = this._link = L.DomUtil.create("a", "leaflet-control-rotate-toggle", h);
|
|
8963
|
+
return g.appendChild(a), g.href = "#", g.title = "Rotate map", L.DomEvent.on(g, "dblclick", L.DomEvent.stopPropagation).on(g, "mousedown", this._handleMouseDown, this).on(g, "click", L.DomEvent.stop).on(g, "click", this._cycleState, this).on(g, "click", this._refocusOnMap, this), L.Browser.any3d || L.DomUtil.addClass(g, "leaflet-disabled"), this._restyle(), _.on("rotate", this._restyle, this), this._follow = !1, this._canFollow = !1, this.options.closeOnZeroBearing && _.getBearing() === 0 && (h.style.display = "none"), h;
|
|
8930
8964
|
},
|
|
8931
8965
|
onRemove: function(_) {
|
|
8932
8966
|
_.off("rotate", this._restyle, this);
|
|
@@ -8970,7 +9004,7 @@ L.Map.addInitHook(function() {
|
|
|
8970
9004
|
this.rotateControl = L.control.rotate(_), this.addControl(this.rotateControl);
|
|
8971
9005
|
}
|
|
8972
9006
|
});
|
|
8973
|
-
class
|
|
9007
|
+
class Ds extends L.Polyline {
|
|
8974
9008
|
constructor() {
|
|
8975
9009
|
super([], { interactive: !1, weight: 6 }), this.customTooltip = L.tooltip({
|
|
8976
9010
|
direction: "top"
|
|
@@ -8986,13 +9020,13 @@ class zs extends L.Polyline {
|
|
|
8986
9020
|
return super.setLatLngs(h);
|
|
8987
9021
|
}
|
|
8988
9022
|
CustomSetLatlngs(h, a) {
|
|
8989
|
-
this.customTooltip.setContent(a.tooltipEle), this.setLatLngs(h.map((
|
|
9023
|
+
this.customTooltip.setContent(a.tooltipEle), this.setLatLngs(h.map((g) => g.latlng)), this.addCircleMarkers(h, a);
|
|
8990
9024
|
}
|
|
8991
9025
|
scanPoints() {
|
|
8992
9026
|
}
|
|
8993
9027
|
addCircleMarkers(h, a) {
|
|
8994
|
-
this.szCircleMarkers = h.map((
|
|
8995
|
-
const { latlng: y, time: s } =
|
|
9028
|
+
this.szCircleMarkers = h.map((g) => {
|
|
9029
|
+
const { latlng: y, time: s } = g, l = L.circleMarker(y, {
|
|
8996
9030
|
radius: 5,
|
|
8997
9031
|
fill: !0,
|
|
8998
9032
|
fillColor: "green",
|
|
@@ -9004,7 +9038,7 @@ class zs extends L.Polyline {
|
|
|
9004
9038
|
}), l.on("mouseout", () => {
|
|
9005
9039
|
this.myCircleBorder.remove();
|
|
9006
9040
|
}), l.bindTooltip(this.customTooltip), l.on("tooltipopen", () => {
|
|
9007
|
-
a.toolTipNeedUpdate(
|
|
9041
|
+
a.toolTipNeedUpdate(g);
|
|
9008
9042
|
}), l;
|
|
9009
9043
|
});
|
|
9010
9044
|
}
|
|
@@ -9016,12 +9050,12 @@ class zs extends L.Polyline {
|
|
|
9016
9050
|
}
|
|
9017
9051
|
clearBaseline() {
|
|
9018
9052
|
var h, a;
|
|
9019
|
-
(h = this.szCircleMarkers) == null || h.forEach((
|
|
9020
|
-
|
|
9053
|
+
(h = this.szCircleMarkers) == null || h.forEach((g) => {
|
|
9054
|
+
g.remove();
|
|
9021
9055
|
}), (a = this.szCircleMarkers) == null || a.splice(0, this.szCircleMarkers.length), this.setLatLngs([]);
|
|
9022
9056
|
}
|
|
9023
9057
|
}
|
|
9024
|
-
class
|
|
9058
|
+
class Is {
|
|
9025
9059
|
constructor(h) {
|
|
9026
9060
|
this.polyine = L.polyline([], {
|
|
9027
9061
|
color: "red",
|
|
@@ -9051,21 +9085,30 @@ class Bs {
|
|
|
9051
9085
|
SetCurrentTime(h) {
|
|
9052
9086
|
var y;
|
|
9053
9087
|
this.markerCurrent.addTo(this.map), this.points && h > this.points[this.points.length - 1].time && (h = this.points[this.points.length - 1].time), this.points && this.points.length && h < this.points[0].time && (h = this.points[0].time), this.points && this.lastPointIndex && h < this.points[this.lastPointIndex - 1].time && (this.lastPointIndex = 0);
|
|
9054
|
-
const a = (y = this.points) == null ? void 0 : y.findIndex((s) => s.time >= h),
|
|
9088
|
+
const a = (y = this.points) == null ? void 0 : y.findIndex((s) => s.time >= h), g = [];
|
|
9055
9089
|
if (typeof a == "number" && this.points) {
|
|
9056
|
-
if (
|
|
9090
|
+
if (g.push(
|
|
9057
9091
|
...this.points.slice(this.lastPointIndex, a).map((s) => s.latlng)
|
|
9058
9092
|
), this.showProcess) {
|
|
9059
|
-
const s = this.points[a == 0 ? 0 : a - 1], l = this.points[a], c = this.map.wrapLatLng(s.latlng), f = this.map.wrapLatLng(l.latlng),
|
|
9060
|
-
if (
|
|
9061
|
-
const
|
|
9062
|
-
this.polyineBlack.setLatLngs([c, [
|
|
9093
|
+
const s = this.points[a == 0 ? 0 : a - 1], l = this.points[a], c = this.map.wrapLatLng(s.latlng), f = this.map.wrapLatLng(l.latlng), v = l.time - s.time == 0 ? 0 : (h - s.time) / (l.time - s.time);
|
|
9094
|
+
if (v) {
|
|
9095
|
+
const P = (f.lat - c.lat) * v + c.lat, m = (f.lng - c.lng) * v + c.lng;
|
|
9096
|
+
this.polyineBlack.setLatLngs([c, [P, m]]), this.markerCurrent.setLatLng([P, m]);
|
|
9063
9097
|
} else
|
|
9064
9098
|
this.markerCurrent.setLatLng(c), this.polyineBlack.setLatLngs([]);
|
|
9065
9099
|
}
|
|
9066
|
-
|
|
9067
|
-
this.
|
|
9068
|
-
|
|
9100
|
+
if (g.length) {
|
|
9101
|
+
if (this.showProcess || this.markerCurrent.setLatLng(g[0]), this.lastPointIndex == 0)
|
|
9102
|
+
this.polyine.setLatLngs(g);
|
|
9103
|
+
else if (g.length > 20) {
|
|
9104
|
+
const s = this.polyine.getLatLngs().concat(g);
|
|
9105
|
+
this.polyine.setLatLngs(s);
|
|
9106
|
+
} else
|
|
9107
|
+
g.forEach((s) => {
|
|
9108
|
+
this.polyine.addLatLng(s);
|
|
9109
|
+
});
|
|
9110
|
+
this.lastPointIndex = a;
|
|
9111
|
+
}
|
|
9069
9112
|
}
|
|
9070
9113
|
return this.lastPointIndex == 0 ? [0, 1] : [this.lastPointIndex - 1, this.lastPointIndex];
|
|
9071
9114
|
}
|
|
@@ -9073,21 +9116,21 @@ class Bs {
|
|
|
9073
9116
|
this.markerCurrent.remove(), this.lastPointIndex = 0, this.polyine.setLatLngs([]), this.polyineBlack.setLatLngs([]);
|
|
9074
9117
|
}
|
|
9075
9118
|
}
|
|
9076
|
-
class
|
|
9119
|
+
class As {
|
|
9077
9120
|
constructor(h) {
|
|
9078
|
-
this.baseline = new
|
|
9121
|
+
this.baseline = new Ds(), this.timeCallback = null, this._currentPoints = null, this.intervalToken = null, this.pastTimeTotal = 0, this.startTime = 0, this.bPause = !1, this.playRate = 1, this.baseline.addTo(h), this.passedLine = new Is(h), this.map = h;
|
|
9079
9122
|
}
|
|
9080
9123
|
SetPlayTimeCallback(h) {
|
|
9081
9124
|
this.timeCallback = h;
|
|
9082
9125
|
}
|
|
9083
9126
|
SetTrack(h, a) {
|
|
9084
|
-
var
|
|
9127
|
+
var g;
|
|
9085
9128
|
this.baseline.clearBaseline(), this.baseline.CustomSetLatlngs(a, {
|
|
9086
9129
|
tooltipEle: h.tooltipEle,
|
|
9087
9130
|
toolTipNeedUpdate: (y) => {
|
|
9088
9131
|
h.toolTipNeedUpdate({ id: h.id }, y);
|
|
9089
9132
|
}
|
|
9090
|
-
}), this.passedLine.SetPoints(h, a), this._currentPoints = a, this.map.fitBounds(this.baseline.getBounds()), this.passedLine.SetIconHtml(h.iconEle, h.markerTooltipEle), a.length && (this.passedLine.SetCurrentTime(a[0].time), (
|
|
9133
|
+
}), this.passedLine.SetPoints(h, a), this._currentPoints = a, this.map.fitBounds(this.baseline.getBounds()), this.passedLine.SetIconHtml(h.iconEle, h.markerTooltipEle), a.length && (this.passedLine.SetCurrentTime(a[0].time), (g = this.timeCallback) == null || g.call(this, a[0].time, 0, 1));
|
|
9091
9134
|
}
|
|
9092
9135
|
jump(h) {
|
|
9093
9136
|
var a;
|
|
@@ -9096,20 +9139,20 @@ class Ds {
|
|
|
9096
9139
|
return !1;
|
|
9097
9140
|
{
|
|
9098
9141
|
this.startTime = h, this.pastTimeTotal = 0;
|
|
9099
|
-
const [
|
|
9100
|
-
(a = this.timeCallback) == null || a.call(this, h,
|
|
9142
|
+
const [g, y] = this.passedLine.SetCurrentTime(h);
|
|
9143
|
+
(a = this.timeCallback) == null || a.call(this, h, g, y);
|
|
9101
9144
|
}
|
|
9102
9145
|
}
|
|
9103
9146
|
}
|
|
9104
9147
|
StartTrackPlay(h) {
|
|
9105
|
-
h && this._currentPoints && h < this._currentPoints[0].time && (h = this._currentPoints[0].time), this.pastTimeTotal = 0, h && (this.startTime = h), this.startTime == 0 && this._currentPoints && (this.startTime = this._currentPoints[0].time), this.startInterval();
|
|
9148
|
+
this.bPause ? this.bPause = !1 : (h && this._currentPoints && h < this._currentPoints[0].time && (h = this._currentPoints[0].time), this.pastTimeTotal = 0, h && (this.startTime = h), this.startTime == 0 && this._currentPoints && (this.startTime = this._currentPoints[0].time), this.startInterval());
|
|
9106
9149
|
}
|
|
9107
9150
|
startInterval() {
|
|
9108
9151
|
if (this._currentPoints && this.intervalToken == null) {
|
|
9109
9152
|
let h = Date.now();
|
|
9110
9153
|
this.bPause = !1;
|
|
9111
9154
|
const a = this._currentPoints[this._currentPoints.length - 1].time;
|
|
9112
|
-
let
|
|
9155
|
+
let g = 0;
|
|
9113
9156
|
this.intervalToken = setInterval(() => {
|
|
9114
9157
|
var c;
|
|
9115
9158
|
if (this.bPause) {
|
|
@@ -9119,9 +9162,9 @@ class Ds {
|
|
|
9119
9162
|
const y = Date.now(), s = (y - h) * this.playRate;
|
|
9120
9163
|
h = y, this.pastTimeTotal += s;
|
|
9121
9164
|
let l = Math.floor(this.pastTimeTotal / 1e3) + this.startTime;
|
|
9122
|
-
if (l > a && (l = a),
|
|
9123
|
-
const [f,
|
|
9124
|
-
(c = this.timeCallback) == null || c.call(this, l, f,
|
|
9165
|
+
if (l > a && (l = a), g != l) {
|
|
9166
|
+
const [f, v] = this.passedLine.SetCurrentTime(l);
|
|
9167
|
+
(c = this.timeCallback) == null || c.call(this, l, f, v), g = l;
|
|
9125
9168
|
}
|
|
9126
9169
|
}, 500);
|
|
9127
9170
|
}
|
|
@@ -9136,7 +9179,7 @@ class Ds {
|
|
|
9136
9179
|
h >= 1 && h <= 16 && Math.floor(h) == h && (this.playRate = h);
|
|
9137
9180
|
}
|
|
9138
9181
|
clear() {
|
|
9139
|
-
this.baseline.clearBaseline(), this.passedLine.clearPassedLine(), this.stoptInterval();
|
|
9182
|
+
this.baseline.clearBaseline(), this.passedLine.clearPassedLine(), this.stoptInterval(), this.bPause = !1, this.startTime = 0;
|
|
9140
9183
|
}
|
|
9141
9184
|
setFitView() {
|
|
9142
9185
|
this.map.setView(this.baseline.getCenter());
|
|
@@ -9145,10 +9188,10 @@ class Ds {
|
|
|
9145
9188
|
this.passedLine.SetMarkerFitView();
|
|
9146
9189
|
}
|
|
9147
9190
|
}
|
|
9148
|
-
var
|
|
9191
|
+
var Zs = { exports: {} };
|
|
9149
9192
|
(function(_, h) {
|
|
9150
|
-
((a,
|
|
9151
|
-
_.exports = a(An()), typeof
|
|
9193
|
+
((a, g) => {
|
|
9194
|
+
_.exports = a(An()), typeof g < "u" && g.L && a(g.L);
|
|
9152
9195
|
})((a) => {
|
|
9153
9196
|
a.Editable = a.Evented.extend({
|
|
9154
9197
|
statics: {
|
|
@@ -9758,7 +9801,7 @@ var Is = { exports: {} };
|
|
|
9758
9801
|
},
|
|
9759
9802
|
initVertexMarkers: function(o) {
|
|
9760
9803
|
if (this.enabled())
|
|
9761
|
-
if (o = o || this.getLatLngs(),
|
|
9804
|
+
if (o = o || this.getLatLngs(), m(o))
|
|
9762
9805
|
this.addVertexMarkers(o);
|
|
9763
9806
|
else
|
|
9764
9807
|
for (const d of o)
|
|
@@ -9970,7 +10013,7 @@ var Is = { exports: {} };
|
|
|
9970
10013
|
return o = o || this.feature._latlngs, !o.length || o[0] instanceof a.LatLng ? o : this.getDefaultLatLngs(o[0]);
|
|
9971
10014
|
},
|
|
9972
10015
|
ensureMulti: function() {
|
|
9973
|
-
this.feature._latlngs.length &&
|
|
10016
|
+
this.feature._latlngs.length && m(this.feature._latlngs) && (this.feature._latlngs = [this.feature._latlngs]);
|
|
9974
10017
|
},
|
|
9975
10018
|
addNewEmptyShape: function() {
|
|
9976
10019
|
if (this.feature._latlngs.length) {
|
|
@@ -9980,7 +10023,7 @@ var Is = { exports: {} };
|
|
|
9980
10023
|
return this.feature._latlngs;
|
|
9981
10024
|
},
|
|
9982
10025
|
formatShape: function(o) {
|
|
9983
|
-
if (
|
|
10026
|
+
if (m(o)) return o;
|
|
9984
10027
|
if (o[0]) return this.formatShape(o[0]);
|
|
9985
10028
|
},
|
|
9986
10029
|
// 🍂method splitShape(latlngs?: Array, index: int)
|
|
@@ -10020,10 +10063,10 @@ var Is = { exports: {} };
|
|
|
10020
10063
|
return this.feature._latlngs;
|
|
10021
10064
|
},
|
|
10022
10065
|
ensureMulti: function() {
|
|
10023
|
-
this.feature._latlngs.length &&
|
|
10066
|
+
this.feature._latlngs.length && m(this.feature._latlngs[0]) && (this.feature._latlngs = [this.feature._latlngs]);
|
|
10024
10067
|
},
|
|
10025
10068
|
ensureNotFlat: function() {
|
|
10026
|
-
(!this.feature._latlngs.length ||
|
|
10069
|
+
(!this.feature._latlngs.length || m(this.feature._latlngs)) && (this.feature._latlngs = [this.feature._latlngs]);
|
|
10027
10070
|
},
|
|
10028
10071
|
vertexCanBeDeleted: function(o) {
|
|
10029
10072
|
const d = this.feature.parentShape(o.latlngs);
|
|
@@ -10032,7 +10075,7 @@ var Is = { exports: {} };
|
|
|
10032
10075
|
getDefaultLatLngs: function() {
|
|
10033
10076
|
return this.feature._latlngs.length || this.feature._latlngs.push([]), this.feature._latlngs[0];
|
|
10034
10077
|
},
|
|
10035
|
-
formatShape: (o) =>
|
|
10078
|
+
formatShape: (o) => m(o) && (!o[0] || o[0].length !== 0) ? [o] : o
|
|
10036
10079
|
}), a.Editable.RectangleEditor = a.Editable.PathEditor.extend({
|
|
10037
10080
|
CLOSED: !0,
|
|
10038
10081
|
MIN_VERTEX: 4,
|
|
@@ -10108,7 +10151,7 @@ var Is = { exports: {} };
|
|
|
10108
10151
|
a.Editable.PathEditor.prototype.onDrag.call(this, o), this.feature.dragging.updateLatLng(this._resizeLatLng);
|
|
10109
10152
|
}
|
|
10110
10153
|
});
|
|
10111
|
-
const
|
|
10154
|
+
const g = {
|
|
10112
10155
|
createEditor: function(o) {
|
|
10113
10156
|
var M;
|
|
10114
10157
|
o = o || this._map;
|
|
@@ -10149,7 +10192,7 @@ var Is = { exports: {} };
|
|
|
10149
10192
|
shapeAt: function(o, d) {
|
|
10150
10193
|
let x = null;
|
|
10151
10194
|
if (d = d || this._latlngs, !d.length) return x;
|
|
10152
|
-
if (
|
|
10195
|
+
if (m(d) && this.isInLatLngs(o, d)) x = d;
|
|
10153
10196
|
else
|
|
10154
10197
|
for (const M of d)
|
|
10155
10198
|
if (this.isInLatLngs(o, M)) return M;
|
|
@@ -10174,7 +10217,7 @@ var Is = { exports: {} };
|
|
|
10174
10217
|
shapeAt: function(o, d) {
|
|
10175
10218
|
let x = null;
|
|
10176
10219
|
if (d = d || this._latlngs, !d.length) return x;
|
|
10177
|
-
if (
|
|
10220
|
+
if (m(d) && this.isInLatLngs(o, d) && (x = d), m(d[0]) && this.isInLatLngs(o, d[0]))
|
|
10178
10221
|
x = d;
|
|
10179
10222
|
else
|
|
10180
10223
|
for (const M of d)
|
|
@@ -10209,23 +10252,46 @@ var Is = { exports: {} };
|
|
|
10209
10252
|
var d;
|
|
10210
10253
|
return ((d = o == null ? void 0 : o.options) == null ? void 0 : d.rectangleEditorClass) || a.Editable.RectangleEditor;
|
|
10211
10254
|
}
|
|
10212
|
-
},
|
|
10255
|
+
}, v = {
|
|
10213
10256
|
getEditorClass: (o) => {
|
|
10214
10257
|
var d;
|
|
10215
10258
|
return ((d = o == null ? void 0 : o.options) == null ? void 0 : d.circleEditorClass) || a.Editable.CircleEditor;
|
|
10216
10259
|
}
|
|
10217
|
-
},
|
|
10260
|
+
}, P = function() {
|
|
10218
10261
|
this.on("add", this._onEditableAdd);
|
|
10219
|
-
},
|
|
10220
|
-
a.Polyline && (a.Polyline.include(
|
|
10262
|
+
}, m = a.LineUtil.isFlat || a.LineUtil._flat || a.Polyline._flat;
|
|
10263
|
+
a.Polyline && (a.Polyline.include(g), a.Polyline.include(y), a.Polyline.addInitHook(P)), a.Polygon && (a.Polygon.include(g), a.Polygon.include(s)), a.Marker && (a.Marker.include(g), a.Marker.include(l), a.Marker.addInitHook(P)), a.CircleMarker && (a.CircleMarker.include(g), a.CircleMarker.include(c), a.CircleMarker.addInitHook(P)), a.Rectangle && (a.Rectangle.include(g), a.Rectangle.include(f)), a.Circle && (a.Circle.include(g), a.Circle.include(v)), a.LatLng.prototype.update = function(o) {
|
|
10221
10264
|
o = a.latLng(o), this.lat = o.lat, this.lng = o.lng;
|
|
10222
10265
|
};
|
|
10223
10266
|
}, window);
|
|
10224
|
-
})(
|
|
10267
|
+
})(Zs);
|
|
10225
10268
|
const hi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAYxJREFUSEvVVUFygzAMXKUXk0cE+Al5SZOXNH1J8pOmLwHyiOAT6sgxDBiBSdNLc2EmtrXSarUiPPGrt9szMWe7ptmvfUZrL8q9W5J8yfd/AZTGZBvgnYgKBgoAlaua+dIC37m11yUWZimSwG9EZx9UYjwCAyCg6v8nuqT3+3EORAUojSk2RI5vMJ9Saz/DHnSVgegk4C3zUatGBaiTpJSALfM+t7bPXGuyA/LJhPd9tePiJIiU7y+P+J1TkQcpodA1quBmzIGJROvHnbWXkNclmXZvw8RGALUxH8Jp2jQqdUsAfRWDnk0ocvQQVXOqiA2adk6StWjcCcbrXGSoyW7FedbJ2MUjqp4FkAAZAepwMTA6Z+bruMkRr1lDUUix1uRD2jS5RlEMoE4SHg7mpMn9BAdK6MBelqkEEs8HswzaZPRjgya9Ca18ovel0Z+zCm+KmUbtnNn1/iK2/OdmJ1SFbjmw6Gpo1xotQ4FEV6aycB674dWF8xuZam+iFQwfxebgZQAnYQBLKzIE+QEAKDEsC3KscgAAAABJRU5ErkJggg==";
|
|
10226
|
-
class
|
|
10269
|
+
class Rs {
|
|
10270
|
+
constructor(h) {
|
|
10271
|
+
this.map = h, this.mutilsHandle = new Ns(
|
|
10272
|
+
this.map
|
|
10273
|
+
), this.circleHandle = new Hn(h), this.polygonHandle = new Fn(h);
|
|
10274
|
+
}
|
|
10275
|
+
clear() {
|
|
10276
|
+
this.circleHandle.clear(), this.polygonHandle.clear();
|
|
10277
|
+
}
|
|
10278
|
+
}
|
|
10279
|
+
class Ns {
|
|
10227
10280
|
constructor(h) {
|
|
10228
|
-
this.
|
|
10281
|
+
this.szClear = [], this.map = h;
|
|
10282
|
+
}
|
|
10283
|
+
addCircleHandle() {
|
|
10284
|
+
const h = new Hn(this.map);
|
|
10285
|
+
return this.szClear.push(h), h;
|
|
10286
|
+
}
|
|
10287
|
+
addPolygonHandle() {
|
|
10288
|
+
const h = new Fn(this.map);
|
|
10289
|
+
return this.szClear.push(h), h;
|
|
10290
|
+
}
|
|
10291
|
+
clear() {
|
|
10292
|
+
this.szClear.forEach((h) => {
|
|
10293
|
+
h.clear();
|
|
10294
|
+
}), this.szClear.splice(0, this.szClear.length);
|
|
10229
10295
|
}
|
|
10230
10296
|
}
|
|
10231
10297
|
function Nn(_) {
|
|
@@ -10236,7 +10302,7 @@ function Nn(_) {
|
|
|
10236
10302
|
}
|
|
10237
10303
|
};
|
|
10238
10304
|
}
|
|
10239
|
-
class
|
|
10305
|
+
class Fn {
|
|
10240
10306
|
constructor(h) {
|
|
10241
10307
|
this.polygon = null, this.latlngsCreate = [], this.offcreateHandle = null, this.map = h;
|
|
10242
10308
|
}
|
|
@@ -10246,7 +10312,7 @@ class Zs {
|
|
|
10246
10312
|
create() {
|
|
10247
10313
|
const { resume: h } = Nn(this.map);
|
|
10248
10314
|
this.safeOffMapCreateClick();
|
|
10249
|
-
const a = this.latlngsCreate,
|
|
10315
|
+
const a = this.latlngsCreate, g = (y) => {
|
|
10250
10316
|
const s = document.createElement("div"), l = document.createElement("img");
|
|
10251
10317
|
l.src = hi;
|
|
10252
10318
|
const c = document.createElement("div");
|
|
@@ -10260,8 +10326,8 @@ class Zs {
|
|
|
10260
10326
|
});
|
|
10261
10327
|
f.addTo(this.map), a.push(f);
|
|
10262
10328
|
};
|
|
10263
|
-
return this.map.on("click",
|
|
10264
|
-
this.map.off("click",
|
|
10329
|
+
return this.map.on("click", g), this.offcreateHandle = () => {
|
|
10330
|
+
this.map.off("click", g), a.forEach((y) => {
|
|
10265
10331
|
y.remove();
|
|
10266
10332
|
}), a.splice(0, a.length), h();
|
|
10267
10333
|
}, this;
|
|
@@ -10300,7 +10366,7 @@ class Zs {
|
|
|
10300
10366
|
this.offcreateHandle && (this.offcreateHandle(), this.offcreateHandle = null);
|
|
10301
10367
|
}
|
|
10302
10368
|
}
|
|
10303
|
-
class
|
|
10369
|
+
class Hn {
|
|
10304
10370
|
constructor(h) {
|
|
10305
10371
|
this.circle = null, this.offcreateHandle = null, this.centerMarker = null, this.map = h;
|
|
10306
10372
|
}
|
|
@@ -10321,8 +10387,8 @@ class Rs {
|
|
|
10321
10387
|
}
|
|
10322
10388
|
create() {
|
|
10323
10389
|
console.log(hi), this.safeOffMapCreateClick();
|
|
10324
|
-
const { resume: h } = Nn(this.map), a = (
|
|
10325
|
-
this.centerMarker ? this.centerMarker.setLatLng(
|
|
10390
|
+
const { resume: h } = Nn(this.map), a = (g) => {
|
|
10391
|
+
this.centerMarker ? this.centerMarker.setLatLng(g.latlng) : this.centerMarker = L.marker(g.latlng, {
|
|
10326
10392
|
icon: L.icon({
|
|
10327
10393
|
iconUrl: hi,
|
|
10328
10394
|
iconSize: [24, 24]
|
|
@@ -10337,7 +10403,7 @@ class Rs {
|
|
|
10337
10403
|
center: h,
|
|
10338
10404
|
radius: a
|
|
10339
10405
|
}) {
|
|
10340
|
-
this.safeOffMapCreateClick(), this.circle = L.circle(h, { radius: a }).addTo(this.map);
|
|
10406
|
+
this.safeOffMapCreateClick(), this.circle = L.circle(h, { radius: a, dashArray: [10, 10], color: "#FF33FF", fillColor: "#1791fc", opacity: 0.2, fillOpacity: 0.4, weight: 6 }).addTo(this.map);
|
|
10341
10407
|
}
|
|
10342
10408
|
enableEdit() {
|
|
10343
10409
|
var h;
|
|
@@ -10366,16 +10432,16 @@ class Rs {
|
|
|
10366
10432
|
this.safeOffMapCreateClick(), this.isExist() && (this.circle.remove(), this.circle = null);
|
|
10367
10433
|
}
|
|
10368
10434
|
}
|
|
10369
|
-
function
|
|
10370
|
-
|
|
10435
|
+
function Fs(_) {
|
|
10436
|
+
gs({
|
|
10371
10437
|
mapType: _.mapType
|
|
10372
10438
|
});
|
|
10373
10439
|
}
|
|
10374
|
-
function
|
|
10375
|
-
const h =
|
|
10440
|
+
function Gs(_) {
|
|
10441
|
+
const h = ot.map(_.container, {
|
|
10376
10442
|
attributionControl: !1,
|
|
10377
10443
|
zoomControl: !1,
|
|
10378
|
-
preferCanvas: !
|
|
10444
|
+
preferCanvas: !0,
|
|
10379
10445
|
maxZoom: 18,
|
|
10380
10446
|
minZoom: 3,
|
|
10381
10447
|
center: [51.505, -0.09],
|
|
@@ -10385,22 +10451,24 @@ function Hs(_) {
|
|
|
10385
10451
|
doubleClickZoom: !1,
|
|
10386
10452
|
..._.mapOptions,
|
|
10387
10453
|
editable: !0
|
|
10388
|
-
})
|
|
10389
|
-
|
|
10390
|
-
const
|
|
10454
|
+
});
|
|
10455
|
+
h.setMaxBounds(ot.latLngBounds([-90, 180], [90, -180]));
|
|
10456
|
+
const a = ks(h);
|
|
10457
|
+
_.tileType && Fs(_.tileType), Ps("Normal", h, { rightBottomTextHandle: a });
|
|
10458
|
+
const g = new Os(h, _.renderOptions), y = new As(h), s = new Rs(h);
|
|
10391
10459
|
return {
|
|
10392
10460
|
//map,
|
|
10393
10461
|
on(l, c) {
|
|
10394
10462
|
const f = c;
|
|
10395
|
-
l == "click" ? h.on("click", (...
|
|
10396
|
-
f(...
|
|
10463
|
+
l == "click" ? h.on("click", (...v) => {
|
|
10464
|
+
f(...v);
|
|
10397
10465
|
}) : l == "dblclick" ? h.on("dblclick", () => {
|
|
10398
10466
|
f();
|
|
10399
10467
|
}) : l == "dragstart" ? h.on("dragstart", () => {
|
|
10400
10468
|
f();
|
|
10401
10469
|
}) : l == "rightclick" ? h.on("contextmenu", () => {
|
|
10402
10470
|
f();
|
|
10403
|
-
}) : l == "clusterclick" &&
|
|
10471
|
+
}) : l == "clusterclick" && g.on("clusterclick", f);
|
|
10404
10472
|
},
|
|
10405
10473
|
utils: {
|
|
10406
10474
|
rotate(l) {
|
|
@@ -10410,41 +10478,47 @@ function Hs(_) {
|
|
|
10410
10478
|
h.getBearing();
|
|
10411
10479
|
},
|
|
10412
10480
|
getInfoWindow() {
|
|
10413
|
-
return
|
|
10481
|
+
return g.infoWindow;
|
|
10414
10482
|
},
|
|
10415
10483
|
setRightBottomText(l) {
|
|
10416
10484
|
a.setText(l);
|
|
10417
10485
|
},
|
|
10418
10486
|
SetFitview() {
|
|
10419
|
-
|
|
10487
|
+
g.setFitview();
|
|
10420
10488
|
},
|
|
10421
10489
|
SetView(l, c, f) {
|
|
10422
10490
|
h.setView(l, c, f);
|
|
10423
10491
|
},
|
|
10424
10492
|
addMarker(l) {
|
|
10425
|
-
return
|
|
10493
|
+
return g.addMarker(l);
|
|
10426
10494
|
},
|
|
10427
10495
|
addMarkers(l) {
|
|
10428
|
-
return
|
|
10496
|
+
return g.addMarkers(l);
|
|
10429
10497
|
},
|
|
10430
10498
|
remove() {
|
|
10431
10499
|
h.eachLayer((l) => l.remove()), h.remove();
|
|
10432
10500
|
},
|
|
10433
10501
|
removeMarkers(l) {
|
|
10434
|
-
|
|
10502
|
+
g.removeMarkers(l);
|
|
10435
10503
|
},
|
|
10436
10504
|
getAllMarkers() {
|
|
10437
|
-
return
|
|
10505
|
+
return g.getAllMarkers();
|
|
10438
10506
|
},
|
|
10439
10507
|
getContainer() {
|
|
10440
10508
|
return h.getContainer();
|
|
10509
|
+
},
|
|
10510
|
+
updateContainer() {
|
|
10511
|
+
window.dispatchEvent(new Event("resize"));
|
|
10512
|
+
},
|
|
10513
|
+
removeAllMarkers() {
|
|
10514
|
+
g.removeMarkers(g.getAllMarkers());
|
|
10441
10515
|
}
|
|
10442
10516
|
},
|
|
10443
10517
|
playback: y,
|
|
10444
10518
|
fenceHandle: s,
|
|
10445
10519
|
conversion: {
|
|
10446
10520
|
containerPointToLatLng(l) {
|
|
10447
|
-
const c =
|
|
10521
|
+
const c = ot.point(...l);
|
|
10448
10522
|
return h.containerPointToLatLng(c);
|
|
10449
10523
|
},
|
|
10450
10524
|
latLngToContainerPoint(l) {
|
|
@@ -10454,10 +10528,10 @@ function Hs(_) {
|
|
|
10454
10528
|
};
|
|
10455
10529
|
}
|
|
10456
10530
|
export {
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10531
|
+
Gs as CreateMap,
|
|
10532
|
+
Hs as L,
|
|
10533
|
+
Fn as LeaflePolygonEditHandle,
|
|
10534
|
+
Hn as LeafletCicleEditHandle,
|
|
10535
|
+
Fs as SwichTileType
|
|
10462
10536
|
};
|
|
10463
10537
|
//# sourceMappingURL=main.js.map
|