@besovideo/bvmap-leaflet 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +482 -458
- package/dist/types/basemap/index.d.ts +8 -1
- package/dist/types/main.d.ts +1 -0
- package/package.json +2 -3
package/dist/main.js
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
|
+
function Jo(Z, T) {
|
|
2
|
+
for (var p = 0; p < T.length; p++) {
|
|
3
|
+
const S = T[p];
|
|
4
|
+
if (typeof S != "string" && !Array.isArray(S)) {
|
|
5
|
+
for (const C in S)
|
|
6
|
+
if (C !== "default" && !(C in Z)) {
|
|
7
|
+
const s = Object.getOwnPropertyDescriptor(S, C);
|
|
8
|
+
s && Object.defineProperty(Z, C, s.get ? s : {
|
|
9
|
+
enumerable: !0,
|
|
10
|
+
get: () => S[C]
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return Object.freeze(Object.defineProperty(Z, Symbol.toStringTag, { value: "Module" }));
|
|
16
|
+
}
|
|
1
17
|
var wn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
-
function
|
|
3
|
-
return
|
|
18
|
+
function $o(Z) {
|
|
19
|
+
return Z && Z.__esModule && Object.prototype.hasOwnProperty.call(Z, "default") ? Z.default : Z;
|
|
4
20
|
}
|
|
5
21
|
var ni = { exports: {} };
|
|
6
22
|
/* @preserve
|
|
7
23
|
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
8
24
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
9
25
|
*/
|
|
10
|
-
(function(
|
|
11
|
-
(function(p,
|
|
12
|
-
|
|
26
|
+
(function(Z, T) {
|
|
27
|
+
(function(p, S) {
|
|
28
|
+
S(T);
|
|
13
29
|
})(wn, function(p) {
|
|
14
|
-
var
|
|
15
|
-
function
|
|
30
|
+
var S = "1.9.4";
|
|
31
|
+
function C(t) {
|
|
16
32
|
var e, i, n, o;
|
|
17
33
|
for (i = 1, n = arguments.length; i < n; i++) {
|
|
18
34
|
o = arguments[i];
|
|
@@ -80,9 +96,9 @@ var ni = { exports: {} };
|
|
|
80
96
|
n.push(encodeURIComponent(i ? o.toUpperCase() : o) + "=" + encodeURIComponent(t[o]));
|
|
81
97
|
return (!e || e.indexOf("?") === -1 ? "?" : "&") + n.join("&");
|
|
82
98
|
}
|
|
83
|
-
var
|
|
99
|
+
var E = /\{ *([\w_ -]+) *\}/g;
|
|
84
100
|
function G(t, e) {
|
|
85
|
-
return t.replace(
|
|
101
|
+
return t.replace(E, function(i, n) {
|
|
86
102
|
var o = e[n];
|
|
87
103
|
if (o === void 0)
|
|
88
104
|
throw new Error("No value provided for variable " + i);
|
|
@@ -119,9 +135,9 @@ var ni = { exports: {} };
|
|
|
119
135
|
function st(t) {
|
|
120
136
|
t && ri.call(window, t);
|
|
121
137
|
}
|
|
122
|
-
var
|
|
138
|
+
var Cn = {
|
|
123
139
|
__proto__: null,
|
|
124
|
-
extend:
|
|
140
|
+
extend: C,
|
|
125
141
|
create: s,
|
|
126
142
|
bind: a,
|
|
127
143
|
get lastId() {
|
|
@@ -154,7 +170,7 @@ var ni = { exports: {} };
|
|
|
154
170
|
n.constructor = e, e.prototype = n;
|
|
155
171
|
for (var o in this)
|
|
156
172
|
Object.prototype.hasOwnProperty.call(this, o) && o !== "prototype" && o !== "__super__" && (e[o] = this[o]);
|
|
157
|
-
return t.statics &&
|
|
173
|
+
return t.statics && C(e, t.statics), t.includes && (bn(t.includes), C.apply(null, [n].concat(t.includes))), C(n, t), delete n.statics, delete n.includes, n.options && (n.options = i.options ? s(i.options) : {}, C(n.options, t.options)), n._initHooks = [], n.callInitHooks = function() {
|
|
158
174
|
if (!this._initHooksCalled) {
|
|
159
175
|
i.callInitHooks && i.callInitHooks.call(this), this._initHooksCalled = !0;
|
|
160
176
|
for (var r = 0, u = n._initHooks.length; r < u; r++)
|
|
@@ -163,16 +179,16 @@ var ni = { exports: {} };
|
|
|
163
179
|
}, e;
|
|
164
180
|
}, mt.include = function(t) {
|
|
165
181
|
var e = this.prototype.options;
|
|
166
|
-
return
|
|
182
|
+
return C(this.prototype, t), t.options && (this.prototype.options = e, this.mergeOptions(t.options)), this;
|
|
167
183
|
}, mt.mergeOptions = function(t) {
|
|
168
|
-
return
|
|
184
|
+
return C(this.prototype.options, t), this;
|
|
169
185
|
}, mt.addInitHook = function(t) {
|
|
170
186
|
var e = Array.prototype.slice.call(arguments, 1), i = typeof t == "function" ? t : function() {
|
|
171
187
|
this[t].apply(this, e);
|
|
172
188
|
};
|
|
173
189
|
return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(i), this;
|
|
174
190
|
};
|
|
175
|
-
function
|
|
191
|
+
function bn(t) {
|
|
176
192
|
if (!(typeof L > "u" || !L || !L.Mixin)) {
|
|
177
193
|
t = W(t) ? t : [t];
|
|
178
194
|
for (var e = 0; e < t.length; e++)
|
|
@@ -262,7 +278,7 @@ var ni = { exports: {} };
|
|
|
262
278
|
fire: function(t, e, i) {
|
|
263
279
|
if (!this.listens(t, i))
|
|
264
280
|
return this;
|
|
265
|
-
var n =
|
|
281
|
+
var n = C({}, e, {
|
|
266
282
|
type: t,
|
|
267
283
|
target: this,
|
|
268
284
|
sourceTarget: e && e.sourceTarget || this
|
|
@@ -336,7 +352,7 @@ var ni = { exports: {} };
|
|
|
336
352
|
},
|
|
337
353
|
_propagateEvent: function(t) {
|
|
338
354
|
for (var e in this._eventParents)
|
|
339
|
-
this._eventParents[e].fire(t.type,
|
|
355
|
+
this._eventParents[e].fire(t.type, C({
|
|
340
356
|
layer: t.target,
|
|
341
357
|
propagatedFrom: t.target
|
|
342
358
|
}, t), !0);
|
|
@@ -344,22 +360,22 @@ var ni = { exports: {} };
|
|
|
344
360
|
};
|
|
345
361
|
ot.addEventListener = ot.on, ot.removeEventListener = ot.clearAllEventListeners = ot.off, ot.addOneTimeEventListener = ot.once, ot.fireEvent = ot.fire, ot.hasEventListeners = ot.listens;
|
|
346
362
|
var Gt = mt.extend(ot);
|
|
347
|
-
function
|
|
363
|
+
function z(t, e, i) {
|
|
348
364
|
this.x = i ? Math.round(t) : t, this.y = i ? Math.round(e) : e;
|
|
349
365
|
}
|
|
350
366
|
var ai = Math.trunc || function(t) {
|
|
351
367
|
return t > 0 ? Math.floor(t) : Math.ceil(t);
|
|
352
368
|
};
|
|
353
|
-
|
|
369
|
+
z.prototype = {
|
|
354
370
|
// @method clone(): Point
|
|
355
371
|
// Returns a copy of the current point.
|
|
356
372
|
clone: function() {
|
|
357
|
-
return new
|
|
373
|
+
return new z(this.x, this.y);
|
|
358
374
|
},
|
|
359
375
|
// @method add(otherPoint: Point): Point
|
|
360
376
|
// Returns the result of addition of the current and the given points.
|
|
361
377
|
add: function(t) {
|
|
362
|
-
return this.clone()._add(
|
|
378
|
+
return this.clone()._add(k(t));
|
|
363
379
|
},
|
|
364
380
|
_add: function(t) {
|
|
365
381
|
return this.x += t.x, this.y += t.y, this;
|
|
@@ -367,7 +383,7 @@ var ni = { exports: {} };
|
|
|
367
383
|
// @method subtract(otherPoint: Point): Point
|
|
368
384
|
// Returns the result of subtraction of the given point from the current.
|
|
369
385
|
subtract: function(t) {
|
|
370
|
-
return this.clone()._subtract(
|
|
386
|
+
return this.clone()._subtract(k(t));
|
|
371
387
|
},
|
|
372
388
|
_subtract: function(t) {
|
|
373
389
|
return this.x -= t.x, this.y -= t.y, this;
|
|
@@ -394,13 +410,13 @@ var ni = { exports: {} };
|
|
|
394
410
|
// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)
|
|
395
411
|
// defined by `scale`.
|
|
396
412
|
scaleBy: function(t) {
|
|
397
|
-
return new
|
|
413
|
+
return new z(this.x * t.x, this.y * t.y);
|
|
398
414
|
},
|
|
399
415
|
// @method unscaleBy(scale: Point): Point
|
|
400
416
|
// Inverse of `scaleBy`. Divide each coordinate of the current point by
|
|
401
417
|
// each coordinate of `scale`.
|
|
402
418
|
unscaleBy: function(t) {
|
|
403
|
-
return new
|
|
419
|
+
return new z(this.x / t.x, this.y / t.y);
|
|
404
420
|
},
|
|
405
421
|
// @method round(): Point
|
|
406
422
|
// Returns a copy of the current point with rounded coordinates.
|
|
@@ -437,19 +453,19 @@ var ni = { exports: {} };
|
|
|
437
453
|
// @method distanceTo(otherPoint: Point): Number
|
|
438
454
|
// Returns the cartesian distance between the current and the given points.
|
|
439
455
|
distanceTo: function(t) {
|
|
440
|
-
t =
|
|
456
|
+
t = k(t);
|
|
441
457
|
var e = t.x - this.x, i = t.y - this.y;
|
|
442
458
|
return Math.sqrt(e * e + i * i);
|
|
443
459
|
},
|
|
444
460
|
// @method equals(otherPoint: Point): Boolean
|
|
445
461
|
// Returns `true` if the given point has the same coordinates.
|
|
446
462
|
equals: function(t) {
|
|
447
|
-
return t =
|
|
463
|
+
return t = k(t), t.x === this.x && t.y === this.y;
|
|
448
464
|
},
|
|
449
465
|
// @method contains(otherPoint: Point): Boolean
|
|
450
466
|
// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).
|
|
451
467
|
contains: function(t) {
|
|
452
|
-
return t =
|
|
468
|
+
return t = k(t), Math.abs(t.x) <= Math.abs(this.x) && Math.abs(t.y) <= Math.abs(this.y);
|
|
453
469
|
},
|
|
454
470
|
// @method toString(): String
|
|
455
471
|
// Returns a string representation of the point for debugging purposes.
|
|
@@ -457,8 +473,8 @@ var ni = { exports: {} };
|
|
|
457
473
|
return "Point(" + v(this.x) + ", " + v(this.y) + ")";
|
|
458
474
|
}
|
|
459
475
|
};
|
|
460
|
-
function
|
|
461
|
-
return t instanceof
|
|
476
|
+
function k(t, e, i) {
|
|
477
|
+
return t instanceof z ? t : W(t) ? new z(t[0], t[1]) : t == null ? t : typeof t == "object" && "x" in t && "y" in t ? new z(t.x, t.y) : new z(t, e, i);
|
|
462
478
|
}
|
|
463
479
|
function U(t, e) {
|
|
464
480
|
if (t)
|
|
@@ -475,8 +491,8 @@ var ni = { exports: {} };
|
|
|
475
491
|
var e, i;
|
|
476
492
|
if (!t)
|
|
477
493
|
return this;
|
|
478
|
-
if (t instanceof
|
|
479
|
-
e = i =
|
|
494
|
+
if (t instanceof z || typeof t[0] == "number" || "x" in t)
|
|
495
|
+
e = i = k(t);
|
|
480
496
|
else if (t = tt(t), e = t.min, i = t.max, !e || !i)
|
|
481
497
|
return this;
|
|
482
498
|
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;
|
|
@@ -484,7 +500,7 @@ var ni = { exports: {} };
|
|
|
484
500
|
// @method getCenter(round?: Boolean): Point
|
|
485
501
|
// Returns the center point of the bounds.
|
|
486
502
|
getCenter: function(t) {
|
|
487
|
-
return
|
|
503
|
+
return k(
|
|
488
504
|
(this.min.x + this.max.x) / 2,
|
|
489
505
|
(this.min.y + this.max.y) / 2,
|
|
490
506
|
t
|
|
@@ -493,12 +509,12 @@ var ni = { exports: {} };
|
|
|
493
509
|
// @method getBottomLeft(): Point
|
|
494
510
|
// Returns the bottom-left point of the bounds.
|
|
495
511
|
getBottomLeft: function() {
|
|
496
|
-
return
|
|
512
|
+
return k(this.min.x, this.max.y);
|
|
497
513
|
},
|
|
498
514
|
// @method getTopRight(): Point
|
|
499
515
|
// Returns the top-right point of the bounds.
|
|
500
516
|
getTopRight: function() {
|
|
501
|
-
return
|
|
517
|
+
return k(this.max.x, this.min.y);
|
|
502
518
|
},
|
|
503
519
|
// @method getTopLeft(): Point
|
|
504
520
|
// Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)).
|
|
@@ -522,7 +538,7 @@ var ni = { exports: {} };
|
|
|
522
538
|
// Returns `true` if the rectangle contains the given point.
|
|
523
539
|
contains: function(t) {
|
|
524
540
|
var e, i;
|
|
525
|
-
return typeof t[0] == "number" || t instanceof
|
|
541
|
+
return typeof t[0] == "number" || t instanceof z ? t = k(t) : t = tt(t), t instanceof U ? (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;
|
|
526
542
|
},
|
|
527
543
|
// @method intersects(otherBounds: Bounds): Boolean
|
|
528
544
|
// Returns `true` if the rectangle intersects the given bounds. Two bounds
|
|
@@ -552,8 +568,8 @@ var ni = { exports: {} };
|
|
|
552
568
|
pad: function(t) {
|
|
553
569
|
var e = this.min, i = this.max, n = Math.abs(e.x - i.x) * t, o = Math.abs(e.y - i.y) * t;
|
|
554
570
|
return tt(
|
|
555
|
-
|
|
556
|
-
|
|
571
|
+
k(e.x - n, e.y - o),
|
|
572
|
+
k(i.x + n, i.y + o)
|
|
557
573
|
);
|
|
558
574
|
},
|
|
559
575
|
// @method equals(otherBounds: Bounds): Boolean
|
|
@@ -715,12 +731,12 @@ var ni = { exports: {} };
|
|
|
715
731
|
// @method distanceTo(otherLatLng: LatLng): Number
|
|
716
732
|
// Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines).
|
|
717
733
|
distanceTo: function(t) {
|
|
718
|
-
return
|
|
734
|
+
return Pt.distance(this, A(t));
|
|
719
735
|
},
|
|
720
736
|
// @method wrap(): LatLng
|
|
721
737
|
// Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees.
|
|
722
738
|
wrap: function() {
|
|
723
|
-
return
|
|
739
|
+
return Pt.wrapLatLng(this);
|
|
724
740
|
},
|
|
725
741
|
// @method toBounds(sizeInMeters: Number): LatLngBounds
|
|
726
742
|
// Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`.
|
|
@@ -820,7 +836,7 @@ var ni = { exports: {} };
|
|
|
820
836
|
var r = t.getSouthWest(), u = t.getNorthEast(), c = new D(r.lat - n, r.lng - o), _ = new D(u.lat - n, u.lng - o);
|
|
821
837
|
return new et(c, _);
|
|
822
838
|
}
|
|
823
|
-
},
|
|
839
|
+
}, Pt = C({}, gt, {
|
|
824
840
|
wrapLng: [-180, 180],
|
|
825
841
|
// Mean Earth Radius, as recommended for use by
|
|
826
842
|
// the International Union of Geodesy and Geophysics,
|
|
@@ -836,7 +852,7 @@ var ni = { exports: {} };
|
|
|
836
852
|
MAX_LATITUDE: 85.0511287798,
|
|
837
853
|
project: function(t) {
|
|
838
854
|
var e = Math.PI / 180, i = this.MAX_LATITUDE, n = Math.max(Math.min(i, t.lat), -i), o = Math.sin(n * e);
|
|
839
|
-
return new
|
|
855
|
+
return new z(
|
|
840
856
|
this.R * t.lng * e,
|
|
841
857
|
this.R * Math.log((1 + o) / (1 - o)) / 2
|
|
842
858
|
);
|
|
@@ -875,7 +891,7 @@ var ni = { exports: {} };
|
|
|
875
891
|
// Returns the reverse transformation of the given point, optionally divided
|
|
876
892
|
// by the given scale. Only accepts actual `L.Point` instances, not arrays.
|
|
877
893
|
untransform: function(t, e) {
|
|
878
|
-
return e = e || 1, new
|
|
894
|
+
return e = e || 1, new z(
|
|
879
895
|
(t.x / e - this._b) / this._a,
|
|
880
896
|
(t.y / e - this._d) / this._c
|
|
881
897
|
);
|
|
@@ -884,14 +900,14 @@ var ni = { exports: {} };
|
|
|
884
900
|
function Wt(t, e, i, n) {
|
|
885
901
|
return new Ce(t, e, i, n);
|
|
886
902
|
}
|
|
887
|
-
var
|
|
903
|
+
var be = C({}, Pt, {
|
|
888
904
|
code: "EPSG:3857",
|
|
889
905
|
projection: Pe,
|
|
890
906
|
transformation: function() {
|
|
891
907
|
var t = 0.5 / (Math.PI * Pe.R);
|
|
892
908
|
return Wt(t, 0.5, -t, 0.5);
|
|
893
909
|
}()
|
|
894
|
-
}), Mn =
|
|
910
|
+
}), Mn = C({}, be, {
|
|
895
911
|
code: "EPSG:900913"
|
|
896
912
|
});
|
|
897
913
|
function ui(t) {
|
|
@@ -902,11 +918,11 @@ var ni = { exports: {} };
|
|
|
902
918
|
for (n = 0, r = t.length; n < r; n++) {
|
|
903
919
|
for (c = t[n], o = 0, u = c.length; o < u; o++)
|
|
904
920
|
_ = c[o], i += (o ? "L" : "M") + _.x + " " + _.y;
|
|
905
|
-
i += e ?
|
|
921
|
+
i += e ? b.svg ? "z" : "x" : "";
|
|
906
922
|
}
|
|
907
923
|
return i || "M0 0";
|
|
908
924
|
}
|
|
909
|
-
var
|
|
925
|
+
var Me = document.documentElement.style, ne = "ActiveXObject" in window, Tn = ne && !document.addEventListener, ci = "msLaunchUri" in navigator && !("documentMode" in document), Te = ct("webkit"), fi = ct("android"), di = ct("android 2") || ct("android 3"), Sn = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10), kn = fi && ct("Google") && Sn < 537 && !("AudioNode" in window), Se = !!window.opera, _i = !ci && ct("chrome"), pi = ct("gecko") && !Te && !Se && !ne, zn = !_i && ct("safari"), mi = ct("phantom"), gi = "OTransition" in Me, On = navigator.platform.indexOf("Win") === 0, vi = ne && "transition" in Me, ke = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix() && !di, yi = "MozPerspective" in Me, Zn = !window.L_DISABLE_3D && (vi || ke || yi) && !gi && !mi, Ut = typeof orientation < "u" || ct("mobile"), En = Ut && Te, In = Ut && ke, Li = !window.PointerEvent && window.MSPointerEvent, wi = !!(window.PointerEvent || Li), xi = "ontouchstart" in window || !!window.TouchEvent, Bn = !window.L_NO_TOUCH && (xi || wi), An = Ut && Se, Nn = Ut && pi, Rn = (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1, Dn = function() {
|
|
910
926
|
var t = !1;
|
|
911
927
|
try {
|
|
912
928
|
var e = Object.defineProperty({}, "passive", {
|
|
@@ -918,12 +934,12 @@ var ni = { exports: {} };
|
|
|
918
934
|
} catch {
|
|
919
935
|
}
|
|
920
936
|
return t;
|
|
921
|
-
}(),
|
|
937
|
+
}(), Fn = function() {
|
|
922
938
|
return !!document.createElement("canvas").getContext;
|
|
923
|
-
}(), ze = !!(document.createElementNS && ui("svg").createSVGRect),
|
|
939
|
+
}(), ze = !!(document.createElementNS && ui("svg").createSVGRect), Hn = !!ze && function() {
|
|
924
940
|
var t = document.createElement("div");
|
|
925
941
|
return t.innerHTML = "<svg/>", (t.firstChild && t.firstChild.namespaceURI) === "http://www.w3.org/2000/svg";
|
|
926
|
-
}(),
|
|
942
|
+
}(), Gn = !ze && function() {
|
|
927
943
|
try {
|
|
928
944
|
var t = document.createElement("div");
|
|
929
945
|
t.innerHTML = '<v:shape adj="1"/>';
|
|
@@ -932,78 +948,78 @@ var ni = { exports: {} };
|
|
|
932
948
|
} catch {
|
|
933
949
|
return !1;
|
|
934
950
|
}
|
|
935
|
-
}(),
|
|
951
|
+
}(), Wn = navigator.platform.indexOf("Mac") === 0, Un = navigator.platform.indexOf("Linux") === 0;
|
|
936
952
|
function ct(t) {
|
|
937
953
|
return navigator.userAgent.toLowerCase().indexOf(t) >= 0;
|
|
938
954
|
}
|
|
939
|
-
var
|
|
955
|
+
var b = {
|
|
940
956
|
ie: ne,
|
|
941
|
-
ielt9:
|
|
957
|
+
ielt9: Tn,
|
|
942
958
|
edge: ci,
|
|
943
959
|
webkit: Te,
|
|
944
960
|
android: fi,
|
|
945
961
|
android23: di,
|
|
946
962
|
androidStock: kn,
|
|
947
|
-
opera:
|
|
963
|
+
opera: Se,
|
|
948
964
|
chrome: _i,
|
|
949
965
|
gecko: pi,
|
|
950
|
-
safari:
|
|
966
|
+
safari: zn,
|
|
951
967
|
phantom: mi,
|
|
952
968
|
opera12: gi,
|
|
953
|
-
win:
|
|
969
|
+
win: On,
|
|
954
970
|
ie3d: vi,
|
|
955
|
-
webkit3d:
|
|
971
|
+
webkit3d: ke,
|
|
956
972
|
gecko3d: yi,
|
|
957
|
-
any3d:
|
|
973
|
+
any3d: Zn,
|
|
958
974
|
mobile: Ut,
|
|
959
|
-
mobileWebkit:
|
|
960
|
-
mobileWebkit3d:
|
|
975
|
+
mobileWebkit: En,
|
|
976
|
+
mobileWebkit3d: In,
|
|
961
977
|
msPointer: Li,
|
|
962
978
|
pointer: wi,
|
|
963
|
-
touch:
|
|
979
|
+
touch: Bn,
|
|
964
980
|
touchNative: xi,
|
|
965
|
-
mobileOpera:
|
|
966
|
-
mobileGecko:
|
|
967
|
-
retina:
|
|
968
|
-
passiveEvents:
|
|
969
|
-
canvas:
|
|
981
|
+
mobileOpera: An,
|
|
982
|
+
mobileGecko: Nn,
|
|
983
|
+
retina: Rn,
|
|
984
|
+
passiveEvents: Dn,
|
|
985
|
+
canvas: Fn,
|
|
970
986
|
svg: ze,
|
|
971
|
-
vml:
|
|
972
|
-
inlineSvg:
|
|
973
|
-
mac:
|
|
974
|
-
linux:
|
|
975
|
-
}, Pi =
|
|
987
|
+
vml: Gn,
|
|
988
|
+
inlineSvg: Hn,
|
|
989
|
+
mac: Wn,
|
|
990
|
+
linux: Un
|
|
991
|
+
}, Pi = b.msPointer ? "MSPointerDown" : "pointerdown", Ci = b.msPointer ? "MSPointerMove" : "pointermove", bi = b.msPointer ? "MSPointerUp" : "pointerup", Mi = b.msPointer ? "MSPointerCancel" : "pointercancel", Oe = {
|
|
976
992
|
touchstart: Pi,
|
|
977
993
|
touchmove: Ci,
|
|
978
|
-
touchend:
|
|
979
|
-
touchcancel:
|
|
994
|
+
touchend: bi,
|
|
995
|
+
touchcancel: Mi
|
|
980
996
|
}, Ti = {
|
|
981
|
-
touchstart:
|
|
997
|
+
touchstart: Xn,
|
|
982
998
|
touchmove: oe,
|
|
983
999
|
touchend: oe,
|
|
984
1000
|
touchcancel: oe
|
|
985
|
-
}, Ot = {},
|
|
986
|
-
function Un(t, e, i) {
|
|
987
|
-
return e === "touchstart" && Kn(), Ti[e] ? (i = Ti[e].bind(this, i), t.addEventListener(Oe[e], i, !1), i) : (console.warn("wrong event specified:", e), f);
|
|
988
|
-
}
|
|
1001
|
+
}, Ot = {}, Si = !1;
|
|
989
1002
|
function Vn(t, e, i) {
|
|
1003
|
+
return e === "touchstart" && Yn(), Ti[e] ? (i = Ti[e].bind(this, i), t.addEventListener(Oe[e], i, !1), i) : (console.warn("wrong event specified:", e), f);
|
|
1004
|
+
}
|
|
1005
|
+
function qn(t, e, i) {
|
|
990
1006
|
if (!Oe[e]) {
|
|
991
1007
|
console.warn("wrong event specified:", e);
|
|
992
1008
|
return;
|
|
993
1009
|
}
|
|
994
1010
|
t.removeEventListener(Oe[e], i, !1);
|
|
995
1011
|
}
|
|
996
|
-
function
|
|
1012
|
+
function jn(t) {
|
|
997
1013
|
Ot[t.pointerId] = t;
|
|
998
1014
|
}
|
|
999
|
-
function
|
|
1015
|
+
function Kn(t) {
|
|
1000
1016
|
Ot[t.pointerId] && (Ot[t.pointerId] = t);
|
|
1001
1017
|
}
|
|
1002
|
-
function
|
|
1018
|
+
function ki(t) {
|
|
1003
1019
|
delete Ot[t.pointerId];
|
|
1004
1020
|
}
|
|
1005
|
-
function
|
|
1006
|
-
|
|
1021
|
+
function Yn() {
|
|
1022
|
+
Si || (document.addEventListener(Pi, jn, !0), document.addEventListener(Ci, Kn, !0), document.addEventListener(bi, ki, !0), document.addEventListener(Mi, ki, !0), Si = !0);
|
|
1007
1023
|
}
|
|
1008
1024
|
function oe(t, e) {
|
|
1009
1025
|
if (e.pointerType !== (e.MSPOINTER_TYPE_MOUSE || "mouse")) {
|
|
@@ -1013,17 +1029,17 @@ var ni = { exports: {} };
|
|
|
1013
1029
|
e.changedTouches = [e], t(e);
|
|
1014
1030
|
}
|
|
1015
1031
|
}
|
|
1016
|
-
function
|
|
1032
|
+
function Xn(t, e) {
|
|
1017
1033
|
e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH && J(e), oe(t, e);
|
|
1018
1034
|
}
|
|
1019
|
-
function
|
|
1035
|
+
function Jn(t) {
|
|
1020
1036
|
var e = {}, i, n;
|
|
1021
1037
|
for (n in t)
|
|
1022
1038
|
i = t[n], e[n] = i && i.bind ? i.bind(t) : i;
|
|
1023
1039
|
return t = e, e.type = "dblclick", e.detail = 2, e.isTrusted = !1, e._simulated = !0, e;
|
|
1024
1040
|
}
|
|
1025
|
-
var
|
|
1026
|
-
function
|
|
1041
|
+
var $n = 200;
|
|
1042
|
+
function Qn(t, e) {
|
|
1027
1043
|
t.addEventListener("dblclick", e);
|
|
1028
1044
|
var i = 0, n;
|
|
1029
1045
|
function o(r) {
|
|
@@ -1039,7 +1055,7 @@ var ni = { exports: {} };
|
|
|
1039
1055
|
return _ instanceof HTMLInputElement || _ instanceof HTMLSelectElement;
|
|
1040
1056
|
}))) {
|
|
1041
1057
|
var c = Date.now();
|
|
1042
|
-
c - i <=
|
|
1058
|
+
c - i <= $n ? (n++, n === 2 && e(Jn(r))) : n = 1, i = c;
|
|
1043
1059
|
}
|
|
1044
1060
|
}
|
|
1045
1061
|
}
|
|
@@ -1048,7 +1064,7 @@ var ni = { exports: {} };
|
|
|
1048
1064
|
simDblclick: o
|
|
1049
1065
|
};
|
|
1050
1066
|
}
|
|
1051
|
-
function
|
|
1067
|
+
function to(t, e) {
|
|
1052
1068
|
t.removeEventListener("dblclick", e.dblclick), t.removeEventListener("click", e.simDblclick);
|
|
1053
1069
|
}
|
|
1054
1070
|
var Ze = ae(
|
|
@@ -1093,7 +1109,7 @@ var ni = { exports: {} };
|
|
|
1093
1109
|
var i = re(t);
|
|
1094
1110
|
return i.length > 0 && new RegExp("(^|\\s)" + e + "(\\s|$)").test(i);
|
|
1095
1111
|
}
|
|
1096
|
-
function
|
|
1112
|
+
function I(t, e) {
|
|
1097
1113
|
if (t.classList !== void 0)
|
|
1098
1114
|
for (var i = P(e), n = 0, o = i.length; n < o; n++)
|
|
1099
1115
|
t.classList.add(i[n]);
|
|
@@ -1112,9 +1128,9 @@ var ni = { exports: {} };
|
|
|
1112
1128
|
return t.correspondingElement && (t = t.correspondingElement), t.className.baseVal === void 0 ? t.className : t.className.baseVal;
|
|
1113
1129
|
}
|
|
1114
1130
|
function rt(t, e) {
|
|
1115
|
-
"opacity" in t.style ? t.style.opacity = e : "filter" in t.style &&
|
|
1131
|
+
"opacity" in t.style ? t.style.opacity = e : "filter" in t.style && eo(t, e);
|
|
1116
1132
|
}
|
|
1117
|
-
function
|
|
1133
|
+
function eo(t, e) {
|
|
1118
1134
|
var i = !1, n = "DXImageTransform.Microsoft.Alpha";
|
|
1119
1135
|
try {
|
|
1120
1136
|
i = t.filters.item(n);
|
|
@@ -1130,20 +1146,20 @@ var ni = { exports: {} };
|
|
|
1130
1146
|
return t[i];
|
|
1131
1147
|
return !1;
|
|
1132
1148
|
}
|
|
1133
|
-
function
|
|
1134
|
-
var n = e || new
|
|
1135
|
-
t.style[Ze] = (
|
|
1149
|
+
function Mt(t, e, i) {
|
|
1150
|
+
var n = e || new z(0, 0);
|
|
1151
|
+
t.style[Ze] = (b.ie3d ? "translate(" + n.x + "px," + n.y + "px)" : "translate3d(" + n.x + "px," + n.y + "px,0)") + (i ? " scale(" + i + ")" : "");
|
|
1136
1152
|
}
|
|
1137
1153
|
function K(t, e) {
|
|
1138
|
-
t._leaflet_pos = e,
|
|
1154
|
+
t._leaflet_pos = e, b.any3d ? Mt(t, e) : (t.style.left = e.x + "px", t.style.top = e.y + "px");
|
|
1139
1155
|
}
|
|
1140
1156
|
function Tt(t) {
|
|
1141
|
-
return t._leaflet_pos || new
|
|
1157
|
+
return t._leaflet_pos || new z(0, 0);
|
|
1142
1158
|
}
|
|
1143
1159
|
var jt, Kt, Be;
|
|
1144
1160
|
if ("onselectstart" in document)
|
|
1145
1161
|
jt = function() {
|
|
1146
|
-
|
|
1162
|
+
O(window, "selectstart", J);
|
|
1147
1163
|
}, Kt = function() {
|
|
1148
1164
|
H(window, "selectstart", J);
|
|
1149
1165
|
};
|
|
@@ -1161,7 +1177,7 @@ var ni = { exports: {} };
|
|
|
1161
1177
|
};
|
|
1162
1178
|
}
|
|
1163
1179
|
function Ae() {
|
|
1164
|
-
|
|
1180
|
+
O(window, "dragstart", J);
|
|
1165
1181
|
}
|
|
1166
1182
|
function Ne() {
|
|
1167
1183
|
H(window, "dragstart", J);
|
|
@@ -1170,7 +1186,7 @@ var ni = { exports: {} };
|
|
|
1170
1186
|
function De(t) {
|
|
1171
1187
|
for (; t.tabIndex === -1; )
|
|
1172
1188
|
t = t.parentNode;
|
|
1173
|
-
t.style && (ue(), he = t, Re = t.style.outlineStyle, t.style.outlineStyle = "none",
|
|
1189
|
+
t.style && (ue(), he = t, Re = t.style.outlineStyle, t.style.outlineStyle = "none", O(window, "keydown", ue));
|
|
1174
1190
|
}
|
|
1175
1191
|
function ue() {
|
|
1176
1192
|
he && (he.style.outlineStyle = Re, he = void 0, Re = void 0, H(window, "keydown", ue));
|
|
@@ -1189,7 +1205,7 @@ var ni = { exports: {} };
|
|
|
1189
1205
|
boundingClientRect: e
|
|
1190
1206
|
};
|
|
1191
1207
|
}
|
|
1192
|
-
var
|
|
1208
|
+
var io = {
|
|
1193
1209
|
__proto__: null,
|
|
1194
1210
|
TRANSFORM: Ze,
|
|
1195
1211
|
TRANSITION: Vt,
|
|
@@ -1202,13 +1218,13 @@ var ni = { exports: {} };
|
|
|
1202
1218
|
toFront: Zt,
|
|
1203
1219
|
toBack: Et,
|
|
1204
1220
|
hasClass: Ee,
|
|
1205
|
-
addClass:
|
|
1221
|
+
addClass: I,
|
|
1206
1222
|
removeClass: q,
|
|
1207
1223
|
setClass: Ie,
|
|
1208
1224
|
getClass: re,
|
|
1209
1225
|
setOpacity: rt,
|
|
1210
1226
|
testProp: ae,
|
|
1211
|
-
setTransform:
|
|
1227
|
+
setTransform: Mt,
|
|
1212
1228
|
setPosition: K,
|
|
1213
1229
|
getPosition: Tt,
|
|
1214
1230
|
get disableTextSelection() {
|
|
@@ -1224,7 +1240,7 @@ var ni = { exports: {} };
|
|
|
1224
1240
|
getSizedParentNode: Zi,
|
|
1225
1241
|
getScale: Fe
|
|
1226
1242
|
};
|
|
1227
|
-
function
|
|
1243
|
+
function O(t, e, i, n) {
|
|
1228
1244
|
if (e && typeof e == "object")
|
|
1229
1245
|
for (var o in e)
|
|
1230
1246
|
Ge(t, o, e[o], i);
|
|
@@ -1269,7 +1285,7 @@ var ni = { exports: {} };
|
|
|
1269
1285
|
var r = function(c) {
|
|
1270
1286
|
return i.call(n || t, c || window.event);
|
|
1271
1287
|
}, u = r;
|
|
1272
|
-
!
|
|
1288
|
+
!b.touchNative && b.pointer && e.indexOf("touch") === 0 ? r = Vn(t, e, r) : b.touch && e === "dblclick" ? r = Qn(t, r) : "addEventListener" in t ? e === "touchstart" || e === "touchmove" || e === "wheel" || e === "mousewheel" ? t.addEventListener(He[e] || e, r, b.passiveEvents ? { passive: !1 } : !1) : e === "mouseenter" || e === "mouseleave" ? (r = function(c) {
|
|
1273
1289
|
c = c || window.event, Ve(t, c) && u(c);
|
|
1274
1290
|
}, t.addEventListener(He[e], r, !1)) : t.addEventListener(e, u, !1) : t.attachEvent("on" + e, r), t[ft] = t[ft] || {}, t[ft][o] = r;
|
|
1275
1291
|
}
|
|
@@ -1278,22 +1294,22 @@ var ni = { exports: {} };
|
|
|
1278
1294
|
var r = t[ft] && t[ft][o];
|
|
1279
1295
|
if (!r)
|
|
1280
1296
|
return this;
|
|
1281
|
-
!
|
|
1297
|
+
!b.touchNative && b.pointer && e.indexOf("touch") === 0 ? qn(t, e, r) : b.touch && e === "dblclick" ? to(t, r) : "removeEventListener" in t ? t.removeEventListener(He[e] || e, r, !1) : t.detachEvent("on" + e, r), t[ft][o] = null;
|
|
1282
1298
|
}
|
|
1283
|
-
function
|
|
1299
|
+
function St(t) {
|
|
1284
1300
|
return t.stopPropagation ? t.stopPropagation() : t.originalEvent ? t.originalEvent._stopped = !0 : t.cancelBubble = !0, this;
|
|
1285
1301
|
}
|
|
1286
1302
|
function Ue(t) {
|
|
1287
|
-
return Ge(t, "wheel",
|
|
1303
|
+
return Ge(t, "wheel", St), this;
|
|
1288
1304
|
}
|
|
1289
1305
|
function Xt(t) {
|
|
1290
|
-
return
|
|
1306
|
+
return O(t, "mousedown touchstart dblclick contextmenu", St), t._leaflet_disable_click = !0, this;
|
|
1291
1307
|
}
|
|
1292
1308
|
function J(t) {
|
|
1293
1309
|
return t.preventDefault ? t.preventDefault() : t.returnValue = !1, this;
|
|
1294
1310
|
}
|
|
1295
|
-
function
|
|
1296
|
-
return J(t),
|
|
1311
|
+
function kt(t) {
|
|
1312
|
+
return J(t), St(t), this;
|
|
1297
1313
|
}
|
|
1298
1314
|
function Ii(t) {
|
|
1299
1315
|
if (t.composedPath)
|
|
@@ -1304,20 +1320,20 @@ var ni = { exports: {} };
|
|
|
1304
1320
|
}
|
|
1305
1321
|
function Bi(t, e) {
|
|
1306
1322
|
if (!e)
|
|
1307
|
-
return new
|
|
1323
|
+
return new z(t.clientX, t.clientY);
|
|
1308
1324
|
var i = Fe(e), n = i.boundingClientRect;
|
|
1309
|
-
return new
|
|
1325
|
+
return new z(
|
|
1310
1326
|
// offset.left/top values are in page scale (like clientX/Y),
|
|
1311
1327
|
// whereas clientLeft/Top (border width) values are the original values (before CSS scale applies).
|
|
1312
1328
|
(t.clientX - n.left) / i.x - e.clientLeft,
|
|
1313
1329
|
(t.clientY - n.top) / i.y - e.clientTop
|
|
1314
1330
|
);
|
|
1315
1331
|
}
|
|
1316
|
-
var
|
|
1332
|
+
var no = b.linux && b.chrome ? window.devicePixelRatio : b.mac ? window.devicePixelRatio * 3 : window.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1;
|
|
1317
1333
|
function Ai(t) {
|
|
1318
|
-
return
|
|
1334
|
+
return b.edge ? t.wheelDeltaY / 2 : (
|
|
1319
1335
|
// Don't trust window-geometry-based delta
|
|
1320
|
-
t.deltaY && t.deltaMode === 0 ? -t.deltaY /
|
|
1336
|
+
t.deltaY && t.deltaMode === 0 ? -t.deltaY / no : (
|
|
1321
1337
|
// Pixels
|
|
1322
1338
|
t.deltaY && t.deltaMode === 1 ? -t.deltaY * 20 : (
|
|
1323
1339
|
// Lines
|
|
@@ -1353,20 +1369,20 @@ var ni = { exports: {} };
|
|
|
1353
1369
|
}
|
|
1354
1370
|
return i !== t;
|
|
1355
1371
|
}
|
|
1356
|
-
var
|
|
1372
|
+
var oo = {
|
|
1357
1373
|
__proto__: null,
|
|
1358
|
-
on:
|
|
1374
|
+
on: O,
|
|
1359
1375
|
off: H,
|
|
1360
|
-
stopPropagation:
|
|
1376
|
+
stopPropagation: St,
|
|
1361
1377
|
disableScrollPropagation: Ue,
|
|
1362
1378
|
disableClickPropagation: Xt,
|
|
1363
1379
|
preventDefault: J,
|
|
1364
|
-
stop:
|
|
1380
|
+
stop: kt,
|
|
1365
1381
|
getPropagationPath: Ii,
|
|
1366
1382
|
getMousePosition: Bi,
|
|
1367
1383
|
getWheelDelta: Ai,
|
|
1368
1384
|
isExternalTarget: Ve,
|
|
1369
|
-
addListener:
|
|
1385
|
+
addListener: O,
|
|
1370
1386
|
removeListener: H
|
|
1371
1387
|
}, Ni = Gt.extend({
|
|
1372
1388
|
// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number)
|
|
@@ -1405,7 +1421,7 @@ var ni = { exports: {} };
|
|
|
1405
1421
|
// @option crs: CRS = L.CRS.EPSG3857
|
|
1406
1422
|
// The [Coordinate Reference System](#crs) to use. Don't change this if you're not
|
|
1407
1423
|
// sure what it means.
|
|
1408
|
-
crs:
|
|
1424
|
+
crs: be,
|
|
1409
1425
|
// @option center: LatLng = undefined
|
|
1410
1426
|
// Initial geographic center of the map
|
|
1411
1427
|
center: void 0,
|
|
@@ -1477,7 +1493,7 @@ var ni = { exports: {} };
|
|
|
1477
1493
|
trackResize: !0
|
|
1478
1494
|
},
|
|
1479
1495
|
initialize: function(t, e) {
|
|
1480
|
-
e = w(this, e), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._sizeChanged = !0, this._initContainer(t), this._initLayout(), this._onResize = a(this._onResize, this), this._initEvents(), e.maxBounds && this.setMaxBounds(e.maxBounds), e.zoom !== void 0 && (this._zoom = this._limitZoom(e.zoom)), e.center && e.zoom !== void 0 && this.setView(A(e.center), e.zoom, { reset: !0 }), this.callInitHooks(), this._zoomAnimated = Vt &&
|
|
1496
|
+
e = w(this, e), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._sizeChanged = !0, this._initContainer(t), this._initLayout(), this._onResize = a(this._onResize, this), this._initEvents(), e.maxBounds && this.setMaxBounds(e.maxBounds), e.zoom !== void 0 && (this._zoom = this._limitZoom(e.zoom)), e.center && e.zoom !== void 0 && this.setView(A(e.center), e.zoom, { reset: !0 }), this.callInitHooks(), this._zoomAnimated = Vt && b.any3d && !b.mobileOpera && this.options.zoomAnimation, this._zoomAnimated && (this._createAnimProxy(), O(this._proxy, zi, this._catchTransitionEnd, this)), this._addLayers(this.options.layers);
|
|
1481
1497
|
},
|
|
1482
1498
|
// @section Methods for modifying map state
|
|
1483
1499
|
// @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this
|
|
@@ -1485,7 +1501,7 @@ var ni = { exports: {} };
|
|
|
1485
1501
|
// animation options.
|
|
1486
1502
|
setView: function(t, e, i) {
|
|
1487
1503
|
if (e = e === void 0 ? this._zoom : this._limitZoom(e), t = this._limitCenter(A(t), e, this.options.maxBounds), i = i || {}, this._stop(), this._loaded && !i.reset && i !== !0) {
|
|
1488
|
-
i.animate !== void 0 && (i.zoom =
|
|
1504
|
+
i.animate !== void 0 && (i.zoom = C({ animate: i.animate }, i.zoom), i.pan = C({ animate: i.animate, duration: i.duration }, i.pan));
|
|
1489
1505
|
var n = this._zoom !== e ? this._tryAnimatedZoom && this._tryAnimatedZoom(t, e, i.zoom) : this._tryAnimatedPan(t, i.pan);
|
|
1490
1506
|
if (n)
|
|
1491
1507
|
return clearTimeout(this._sizeTimer), this;
|
|
@@ -1500,12 +1516,12 @@ var ni = { exports: {} };
|
|
|
1500
1516
|
// @method zoomIn(delta?: Number, options?: Zoom options): this
|
|
1501
1517
|
// Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).
|
|
1502
1518
|
zoomIn: function(t, e) {
|
|
1503
|
-
return t = t || (
|
|
1519
|
+
return t = t || (b.any3d ? this.options.zoomDelta : 1), this.setZoom(this._zoom + t, e);
|
|
1504
1520
|
},
|
|
1505
1521
|
// @method zoomOut(delta?: Number, options?: Zoom options): this
|
|
1506
1522
|
// Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).
|
|
1507
1523
|
zoomOut: function(t, e) {
|
|
1508
|
-
return t = t || (
|
|
1524
|
+
return t = t || (b.any3d ? this.options.zoomDelta : 1), this.setZoom(this._zoom - t, e);
|
|
1509
1525
|
},
|
|
1510
1526
|
// @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this
|
|
1511
1527
|
// Zooms the map while keeping a specified geographical point on the map
|
|
@@ -1514,12 +1530,12 @@ var ni = { exports: {} };
|
|
|
1514
1530
|
// @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this
|
|
1515
1531
|
// Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.
|
|
1516
1532
|
setZoomAround: function(t, e, i) {
|
|
1517
|
-
var n = this.getZoomScale(e), o = this.getSize().divideBy(2), r = t instanceof
|
|
1533
|
+
var n = this.getZoomScale(e), o = this.getSize().divideBy(2), r = t instanceof z ? t : this.latLngToContainerPoint(t), u = r.subtract(o).multiplyBy(1 - 1 / n), c = this.containerPointToLatLng(o.add(u));
|
|
1518
1534
|
return this.setView(c, e, { zoom: i });
|
|
1519
1535
|
},
|
|
1520
1536
|
_getBoundsCenterZoom: function(t, e) {
|
|
1521
1537
|
e = e || {}, t = t.getBounds ? t.getBounds() : j(t);
|
|
1522
|
-
var i =
|
|
1538
|
+
var i = k(e.paddingTopLeft || e.padding || [0, 0]), n = k(e.paddingBottomRight || e.padding || [0, 0]), o = this.getBoundsZoom(t, !1, i.add(n));
|
|
1523
1539
|
if (o = typeof e.maxZoom == "number" ? Math.min(e.maxZoom, o) : o, o === 1 / 0)
|
|
1524
1540
|
return {
|
|
1525
1541
|
center: t.getCenter(),
|
|
@@ -1554,7 +1570,7 @@ var ni = { exports: {} };
|
|
|
1554
1570
|
// @method panBy(offset: Point, options?: Pan options): this
|
|
1555
1571
|
// Pans the map by a given number of pixels (animated).
|
|
1556
1572
|
panBy: function(t, e) {
|
|
1557
|
-
if (t =
|
|
1573
|
+
if (t = k(t).round(), e = e || {}, !t.x && !t.y)
|
|
1558
1574
|
return this.fire("moveend");
|
|
1559
1575
|
if (e.animate !== !0 && !this.getSize().contains(t))
|
|
1560
1576
|
return this._resetView(this.unproject(this.project(this.getCenter()).add(t)), this.getZoom()), this;
|
|
@@ -1562,7 +1578,7 @@ var ni = { exports: {} };
|
|
|
1562
1578
|
step: this._onPanTransitionStep,
|
|
1563
1579
|
end: this._onPanTransitionEnd
|
|
1564
1580
|
}, this)), e.noMoveStart || this.fire("movestart"), e.animate !== !1) {
|
|
1565
|
-
|
|
1581
|
+
I(this._mapPane, "leaflet-pan-anim");
|
|
1566
1582
|
var i = this._getMapPanePos().subtract(t).round();
|
|
1567
1583
|
this._panAnim.run(this._mapPane, i, e.duration || 0.25, e.easeLinearity);
|
|
1568
1584
|
} else
|
|
@@ -1573,15 +1589,15 @@ var ni = { exports: {} };
|
|
|
1573
1589
|
// Sets the view of the map (geographical center and zoom) performing a smooth
|
|
1574
1590
|
// pan-zoom animation.
|
|
1575
1591
|
flyTo: function(t, e, i) {
|
|
1576
|
-
if (i = i || {}, i.animate === !1 || !
|
|
1592
|
+
if (i = i || {}, i.animate === !1 || !b.any3d)
|
|
1577
1593
|
return this.setView(t, e, i);
|
|
1578
1594
|
this._stop();
|
|
1579
1595
|
var n = this.project(this.getCenter()), o = this.project(t), r = this.getSize(), u = this._zoom;
|
|
1580
1596
|
t = A(t), e = e === void 0 ? u : e;
|
|
1581
|
-
var c = Math.max(r.x, r.y), _ = c * this.getZoomScale(u, e), y = o.distanceTo(n) || 1, x = 1.42,
|
|
1582
|
-
function
|
|
1583
|
-
var we = Y ? -1 : 1,
|
|
1584
|
-
return
|
|
1597
|
+
var c = Math.max(r.x, r.y), _ = c * this.getZoomScale(u, e), y = o.distanceTo(n) || 1, x = 1.42, M = x * x;
|
|
1598
|
+
function B(Y) {
|
|
1599
|
+
var we = Y ? -1 : 1, jo = Y ? _ : c, Ko = _ * _ - c * c + we * M * M * y * y, Yo = 2 * jo * M * y, ii = Ko / Yo, vn = Math.sqrt(ii * ii + 1) - ii, Xo = vn < 1e-9 ? -18 : Math.log(vn);
|
|
1600
|
+
return Xo;
|
|
1585
1601
|
}
|
|
1586
1602
|
function $(Y) {
|
|
1587
1603
|
return (Math.exp(Y) - Math.exp(-Y)) / 2;
|
|
@@ -1592,21 +1608,21 @@ var ni = { exports: {} };
|
|
|
1592
1608
|
function ht(Y) {
|
|
1593
1609
|
return $(Y) / X(Y);
|
|
1594
1610
|
}
|
|
1595
|
-
var it =
|
|
1611
|
+
var it = B(0);
|
|
1596
1612
|
function Dt(Y) {
|
|
1597
1613
|
return c * (X(it) / X(it + x * Y));
|
|
1598
1614
|
}
|
|
1599
|
-
function Go(Y) {
|
|
1600
|
-
return c * (X(it) * ht(it + x * Y) - $(it)) / b;
|
|
1601
|
-
}
|
|
1602
1615
|
function Wo(Y) {
|
|
1616
|
+
return c * (X(it) * ht(it + x * Y) - $(it)) / M;
|
|
1617
|
+
}
|
|
1618
|
+
function Uo(Y) {
|
|
1603
1619
|
return 1 - Math.pow(1 - Y, 1.5);
|
|
1604
1620
|
}
|
|
1605
|
-
var
|
|
1621
|
+
var Vo = Date.now(), mn = (B(1) - it) / x, qo = i.duration ? 1e3 * i.duration : 1e3 * mn * 0.8;
|
|
1606
1622
|
function gn() {
|
|
1607
|
-
var Y = (Date.now() -
|
|
1623
|
+
var Y = (Date.now() - Vo) / qo, we = Uo(Y) * mn;
|
|
1608
1624
|
Y <= 1 ? (this._flyToFrame = Q(gn, this), this._move(
|
|
1609
|
-
this.unproject(n.add(o.subtract(n).multiplyBy(
|
|
1625
|
+
this.unproject(n.add(o.subtract(n).multiplyBy(Wo(we) / y)), u),
|
|
1610
1626
|
this.getScaleZoom(c / Dt(we), u),
|
|
1611
1627
|
{ flyTo: !0 }
|
|
1612
1628
|
)) : this._move(t, e)._moveEnd(!0);
|
|
@@ -1651,7 +1667,7 @@ var ni = { exports: {} };
|
|
|
1651
1667
|
// the map will not be panned.
|
|
1652
1668
|
panInside: function(t, e) {
|
|
1653
1669
|
e = e || {};
|
|
1654
|
-
var i =
|
|
1670
|
+
var i = k(e.paddingTopLeft || e.padding || [0, 0]), n = k(e.paddingBottomRight || e.padding || [0, 0]), o = this.project(this.getCenter()), r = this.project(t), u = this.getPixelBounds(), c = tt([u.min.add(i), u.max.subtract(n)]), _ = c.getSize();
|
|
1655
1671
|
if (!c.contains(r)) {
|
|
1656
1672
|
this._enforcingBounds = !0;
|
|
1657
1673
|
var y = r.subtract(c.getCenter()), x = c.extend(r).getSize().subtract(_);
|
|
@@ -1674,7 +1690,7 @@ var ni = { exports: {} };
|
|
|
1674
1690
|
invalidateSize: function(t) {
|
|
1675
1691
|
if (!this._loaded)
|
|
1676
1692
|
return this;
|
|
1677
|
-
t =
|
|
1693
|
+
t = C({
|
|
1678
1694
|
animate: !1,
|
|
1679
1695
|
pan: !0
|
|
1680
1696
|
}, t === !0 ? { animate: !0 } : t);
|
|
@@ -1702,7 +1718,7 @@ var ni = { exports: {} };
|
|
|
1702
1718
|
// modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins))
|
|
1703
1719
|
// See `Locate options` for more details.
|
|
1704
1720
|
locate: function(t) {
|
|
1705
|
-
if (t = this._locateOptions =
|
|
1721
|
+
if (t = this._locateOptions = C({
|
|
1706
1722
|
timeout: 1e4,
|
|
1707
1723
|
watch: !1
|
|
1708
1724
|
// setView: false
|
|
@@ -1820,14 +1836,14 @@ var ni = { exports: {} };
|
|
|
1820
1836
|
// instead returns the minimum zoom level on which the map view fits into
|
|
1821
1837
|
// the given bounds in its entirety.
|
|
1822
1838
|
getBoundsZoom: function(t, e, i) {
|
|
1823
|
-
t = j(t), i =
|
|
1824
|
-
var n = this.getZoom() || 0, o = this.getMinZoom(), r = this.getMaxZoom(), u = t.getNorthWest(), c = t.getSouthEast(), _ = this.getSize().subtract(i), y = tt(this.project(c, n), this.project(u, n)).getSize(), x =
|
|
1839
|
+
t = j(t), i = k(i || [0, 0]);
|
|
1840
|
+
var n = this.getZoom() || 0, o = this.getMinZoom(), r = this.getMaxZoom(), u = t.getNorthWest(), c = t.getSouthEast(), _ = this.getSize().subtract(i), y = tt(this.project(c, n), this.project(u, n)).getSize(), x = b.any3d ? this.options.zoomSnap : 1, M = _.x / y.x, B = _.y / y.y, $ = e ? Math.max(M, B) : Math.min(M, B);
|
|
1825
1841
|
return n = this.getScaleZoom($, n), x && (n = Math.round(n / (x / 100)) * (x / 100), n = e ? Math.ceil(n / x) * x : Math.floor(n / x) * x), Math.max(o, Math.min(r, n));
|
|
1826
1842
|
},
|
|
1827
1843
|
// @method getSize(): Point
|
|
1828
1844
|
// Returns the current size of the map container (in pixels).
|
|
1829
1845
|
getSize: function() {
|
|
1830
|
-
return (!this._size || this._sizeChanged) && (this._size = new
|
|
1846
|
+
return (!this._size || this._sizeChanged) && (this._size = new z(
|
|
1831
1847
|
this._container.clientWidth || 0,
|
|
1832
1848
|
this._container.clientHeight || 0
|
|
1833
1849
|
), this._sizeChanged = !1), this._size.clone();
|
|
@@ -1900,13 +1916,13 @@ var ni = { exports: {} };
|
|
|
1900
1916
|
// @method unproject(point: Point, zoom: Number): LatLng
|
|
1901
1917
|
// Inverse of [`project`](#map-project).
|
|
1902
1918
|
unproject: function(t, e) {
|
|
1903
|
-
return e = e === void 0 ? this._zoom : e, this.options.crs.pointToLatLng(
|
|
1919
|
+
return e = e === void 0 ? this._zoom : e, this.options.crs.pointToLatLng(k(t), e);
|
|
1904
1920
|
},
|
|
1905
1921
|
// @method layerPointToLatLng(point: Point): LatLng
|
|
1906
1922
|
// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),
|
|
1907
1923
|
// returns the corresponding geographical coordinate (for the current zoom level).
|
|
1908
1924
|
layerPointToLatLng: function(t) {
|
|
1909
|
-
var e =
|
|
1925
|
+
var e = k(t).add(this.getPixelOrigin());
|
|
1910
1926
|
return this.unproject(e);
|
|
1911
1927
|
},
|
|
1912
1928
|
// @method latLngToLayerPoint(latlng: LatLng): Point
|
|
@@ -1944,19 +1960,19 @@ var ni = { exports: {} };
|
|
|
1944
1960
|
// Given a pixel coordinate relative to the map container, returns the corresponding
|
|
1945
1961
|
// pixel coordinate relative to the [origin pixel](#map-getpixelorigin).
|
|
1946
1962
|
containerPointToLayerPoint: function(t) {
|
|
1947
|
-
return
|
|
1963
|
+
return k(t).subtract(this._getMapPanePos());
|
|
1948
1964
|
},
|
|
1949
1965
|
// @method layerPointToContainerPoint(point: Point): Point
|
|
1950
1966
|
// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),
|
|
1951
1967
|
// returns the corresponding pixel coordinate relative to the map container.
|
|
1952
1968
|
layerPointToContainerPoint: function(t) {
|
|
1953
|
-
return
|
|
1969
|
+
return k(t).add(this._getMapPanePos());
|
|
1954
1970
|
},
|
|
1955
1971
|
// @method containerPointToLatLng(point: Point): LatLng
|
|
1956
1972
|
// Given a pixel coordinate relative to the map container, returns
|
|
1957
1973
|
// the corresponding geographical coordinate (for the current zoom level).
|
|
1958
1974
|
containerPointToLatLng: function(t) {
|
|
1959
|
-
var e = this.containerPointToLayerPoint(
|
|
1975
|
+
var e = this.containerPointToLayerPoint(k(t));
|
|
1960
1976
|
return this.layerPointToLatLng(e);
|
|
1961
1977
|
},
|
|
1962
1978
|
// @method latLngToContainerPoint(latlng: LatLng): Point
|
|
@@ -1990,22 +2006,22 @@ var ni = { exports: {} };
|
|
|
1990
2006
|
if (e._leaflet_id)
|
|
1991
2007
|
throw new Error("Map container is already initialized.");
|
|
1992
2008
|
} else throw new Error("Map container not found.");
|
|
1993
|
-
|
|
2009
|
+
O(e, "scroll", this._onScroll, this), this._containerId = l(e);
|
|
1994
2010
|
},
|
|
1995
2011
|
_initLayout: function() {
|
|
1996
2012
|
var t = this._container;
|
|
1997
|
-
this._fadeAnimated = this.options.fadeAnimation &&
|
|
2013
|
+
this._fadeAnimated = this.options.fadeAnimation && b.any3d, I(t, "leaflet-container" + (b.touch ? " leaflet-touch" : "") + (b.retina ? " leaflet-retina" : "") + (b.ielt9 ? " leaflet-oldie" : "") + (b.safari ? " leaflet-safari" : "") + (this._fadeAnimated ? " leaflet-fade-anim" : ""));
|
|
1998
2014
|
var e = qt(t, "position");
|
|
1999
2015
|
e !== "absolute" && e !== "relative" && e !== "fixed" && e !== "sticky" && (t.style.position = "relative"), this._initPanes(), this._initControlPos && this._initControlPos();
|
|
2000
2016
|
},
|
|
2001
2017
|
_initPanes: function() {
|
|
2002
2018
|
var t = this._panes = {};
|
|
2003
|
-
this._paneRenderers = {}, this._mapPane = this.createPane("mapPane", this._container), K(this._mapPane, new
|
|
2019
|
+
this._paneRenderers = {}, this._mapPane = this.createPane("mapPane", this._container), K(this._mapPane, new z(0, 0)), this.createPane("tilePane"), this.createPane("overlayPane"), this.createPane("shadowPane"), this.createPane("markerPane"), this.createPane("tooltipPane"), this.createPane("popupPane"), this.options.markerZoomAnimation || (I(t.markerPane, "leaflet-zoom-hide"), I(t.shadowPane, "leaflet-zoom-hide"));
|
|
2004
2020
|
},
|
|
2005
2021
|
// private methods that modify map state
|
|
2006
2022
|
// @section Map state change events
|
|
2007
2023
|
_resetView: function(t, e, i) {
|
|
2008
|
-
K(this._mapPane, new
|
|
2024
|
+
K(this._mapPane, new z(0, 0));
|
|
2009
2025
|
var n = !this._loaded;
|
|
2010
2026
|
this._loaded = !0, e = this._limitZoom(e), this.fire("viewprereset");
|
|
2011
2027
|
var o = this._zoom !== e;
|
|
@@ -2042,8 +2058,8 @@ var ni = { exports: {} };
|
|
|
2042
2058
|
// @section Interaction events
|
|
2043
2059
|
_initEvents: function(t) {
|
|
2044
2060
|
this._targets = {}, this._targets[l(this._container)] = this;
|
|
2045
|
-
var e = t ? H :
|
|
2046
|
-
e(this._container, "click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup", this._handleDOMEvent, this), this.options.trackResize && e(window, "resize", this._onResize, this),
|
|
2061
|
+
var e = t ? H : O;
|
|
2062
|
+
e(this._container, "click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup", this._handleDOMEvent, this), this.options.trackResize && e(window, "resize", this._onResize, this), b.any3d && this.options.transform3DLimit && (t ? this.off : this.on).call(this, "moveend", this._onMoveEnd);
|
|
2047
2063
|
},
|
|
2048
2064
|
_onResize: function() {
|
|
2049
2065
|
st(this._resizeRequest), this._resizeRequest = Q(
|
|
@@ -2089,7 +2105,7 @@ var ni = { exports: {} };
|
|
|
2089
2105
|
_mouseEvents: ["click", "dblclick", "mouseover", "mouseout", "contextmenu"],
|
|
2090
2106
|
_fireDOMEvent: function(t, e, i) {
|
|
2091
2107
|
if (t.type === "click") {
|
|
2092
|
-
var n =
|
|
2108
|
+
var n = C({}, t);
|
|
2093
2109
|
n.type = "preclick", this._fireDOMEvent(n, n.type, i);
|
|
2094
2110
|
}
|
|
2095
2111
|
var o = this._findEventTargets(t, e);
|
|
@@ -2129,7 +2145,7 @@ var ni = { exports: {} };
|
|
|
2129
2145
|
},
|
|
2130
2146
|
// private methods for getting map state
|
|
2131
2147
|
_getMapPanePos: function() {
|
|
2132
|
-
return Tt(this._mapPane) || new
|
|
2148
|
+
return Tt(this._mapPane) || new z(0, 0);
|
|
2133
2149
|
},
|
|
2134
2150
|
_moved: function() {
|
|
2135
2151
|
var t = this._getMapPanePos();
|
|
@@ -2184,13 +2200,13 @@ var ni = { exports: {} };
|
|
|
2184
2200
|
this.project(e.getNorthEast(), i),
|
|
2185
2201
|
this.project(e.getSouthWest(), i)
|
|
2186
2202
|
), o = n.min.subtract(t.min), r = n.max.subtract(t.max), u = this._rebound(o.x, -r.x), c = this._rebound(o.y, -r.y);
|
|
2187
|
-
return new
|
|
2203
|
+
return new z(u, c);
|
|
2188
2204
|
},
|
|
2189
2205
|
_rebound: function(t, e) {
|
|
2190
2206
|
return t + e > 0 ? Math.round(t - e) / 2 : Math.max(0, Math.ceil(t)) - Math.max(0, Math.floor(e));
|
|
2191
2207
|
},
|
|
2192
2208
|
_limitZoom: function(t) {
|
|
2193
|
-
var e = this.getMinZoom(), i = this.getMaxZoom(), n =
|
|
2209
|
+
var e = this.getMinZoom(), i = this.getMaxZoom(), n = b.any3d ? this.options.zoomSnap : 1;
|
|
2194
2210
|
return n && (t = Math.round(t / n) * n), Math.max(e, Math.min(i, t));
|
|
2195
2211
|
},
|
|
2196
2212
|
_onPanTransitionStep: function() {
|
|
@@ -2207,7 +2223,7 @@ var ni = { exports: {} };
|
|
|
2207
2223
|
var t = this._proxy = R("div", "leaflet-proxy leaflet-zoom-animated");
|
|
2208
2224
|
this._panes.mapPane.appendChild(t), this.on("zoomanim", function(e) {
|
|
2209
2225
|
var i = Ze, n = this._proxy.style[i];
|
|
2210
|
-
|
|
2226
|
+
Mt(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1)), n === this._proxy.style[i] && this._animatingZoom && this._onZoomTransitionEnd();
|
|
2211
2227
|
}, this), this.on("load moveend", this._animMoveEnd, this), this._on("unload", this._destroyAnimProxy, this);
|
|
2212
2228
|
},
|
|
2213
2229
|
_destroyAnimProxy: function() {
|
|
@@ -2215,7 +2231,7 @@ var ni = { exports: {} };
|
|
|
2215
2231
|
},
|
|
2216
2232
|
_animMoveEnd: function() {
|
|
2217
2233
|
var t = this.getCenter(), e = this.getZoom();
|
|
2218
|
-
|
|
2234
|
+
Mt(this._proxy, this.project(t, e), this.getZoomScale(e, 1));
|
|
2219
2235
|
},
|
|
2220
2236
|
_catchTransitionEnd: function(t) {
|
|
2221
2237
|
this._animatingZoom && t.propertyName.indexOf("transform") >= 0 && this._onZoomTransitionEnd();
|
|
@@ -2234,7 +2250,7 @@ var ni = { exports: {} };
|
|
|
2234
2250
|
}, this), !0);
|
|
2235
2251
|
},
|
|
2236
2252
|
_animateZoom: function(t, e, i, n) {
|
|
2237
|
-
this._mapPane && (i && (this._animatingZoom = !0, this._animateToCenter = t, this._animateToZoom = e,
|
|
2253
|
+
this._mapPane && (i && (this._animatingZoom = !0, this._animateToCenter = t, this._animateToZoom = e, I(this._mapPane, "leaflet-zoom-anim")), this.fire("zoomanim", {
|
|
2238
2254
|
center: t,
|
|
2239
2255
|
zoom: e,
|
|
2240
2256
|
noUpdate: n
|
|
@@ -2244,7 +2260,7 @@ var ni = { exports: {} };
|
|
|
2244
2260
|
this._animatingZoom && (this._mapPane && q(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));
|
|
2245
2261
|
}
|
|
2246
2262
|
});
|
|
2247
|
-
function
|
|
2263
|
+
function so(t, e) {
|
|
2248
2264
|
return new N(t, e);
|
|
2249
2265
|
}
|
|
2250
2266
|
var ut = mt.extend({
|
|
@@ -2284,7 +2300,7 @@ var ni = { exports: {} };
|
|
|
2284
2300
|
addTo: function(t) {
|
|
2285
2301
|
this.remove(), this._map = t;
|
|
2286
2302
|
var e = this._container = this.onAdd(t), i = this.getPosition(), n = t._controlCorners[i];
|
|
2287
|
-
return
|
|
2303
|
+
return I(e, "leaflet-control"), i.indexOf("bottom") !== -1 ? n.insertBefore(e, n.firstChild) : n.appendChild(e), this._map.on("unload", this.remove, this), this;
|
|
2288
2304
|
},
|
|
2289
2305
|
// @method remove: this
|
|
2290
2306
|
// Removes the control from the map it is currently active on.
|
|
@@ -2391,9 +2407,9 @@ var ni = { exports: {} };
|
|
|
2391
2407
|
// @method expand(): this
|
|
2392
2408
|
// Expand the control container if collapsed.
|
|
2393
2409
|
expand: function() {
|
|
2394
|
-
|
|
2410
|
+
I(this._container, "leaflet-control-layers-expanded"), this._section.style.height = null;
|
|
2395
2411
|
var t = this._map.getSize().y - (this._container.offsetTop + 50);
|
|
2396
|
-
return t < this._section.clientHeight ? (
|
|
2412
|
+
return t < this._section.clientHeight ? (I(this._section, "leaflet-control-layers-scrollbar"), this._section.style.height = t + "px") : q(this._section, "leaflet-control-layers-scrollbar"), this._checkDisabledLayers(), this;
|
|
2397
2413
|
},
|
|
2398
2414
|
// @method collapse(): this
|
|
2399
2415
|
// Collapse the control container if expanded.
|
|
@@ -2404,12 +2420,12 @@ var ni = { exports: {} };
|
|
|
2404
2420
|
var t = "leaflet-control-layers", e = this._container = R("div", t), i = this.options.collapsed;
|
|
2405
2421
|
e.setAttribute("aria-haspopup", !0), Xt(e), Ue(e);
|
|
2406
2422
|
var n = this._section = R("section", t + "-list");
|
|
2407
|
-
i && (this._map.on("click", this.collapse, this),
|
|
2423
|
+
i && (this._map.on("click", this.collapse, this), O(e, {
|
|
2408
2424
|
mouseenter: this._expandSafely,
|
|
2409
2425
|
mouseleave: this.collapse
|
|
2410
2426
|
}, this));
|
|
2411
2427
|
var o = this._layersLink = R("a", t + "-toggle", e);
|
|
2412
|
-
o.href = "#", o.title = "Layers", o.setAttribute("role", "button"),
|
|
2428
|
+
o.href = "#", o.title = "Layers", o.setAttribute("role", "button"), O(o, {
|
|
2413
2429
|
keydown: function(r) {
|
|
2414
2430
|
r.keyCode === 13 && this._expandSafely();
|
|
2415
2431
|
},
|
|
@@ -2454,7 +2470,7 @@ var ni = { exports: {} };
|
|
|
2454
2470
|
},
|
|
2455
2471
|
_addItem: function(t) {
|
|
2456
2472
|
var e = document.createElement("label"), i = this._map.hasLayer(t.layer), n;
|
|
2457
|
-
t.overlay ? (n = document.createElement("input"), n.type = "checkbox", n.className = "leaflet-control-layers-selector", n.defaultChecked = i) : n = this._createRadioElement("leaflet-base-layers_" + l(this), i), this._layerControlInputs.push(n), n.layerId = l(t.layer),
|
|
2473
|
+
t.overlay ? (n = document.createElement("input"), n.type = "checkbox", n.className = "leaflet-control-layers-selector", n.defaultChecked = i) : n = this._createRadioElement("leaflet-base-layers_" + l(this), i), this._layerControlInputs.push(n), n.layerId = l(t.layer), O(n, "click", this._onInputClick, this);
|
|
2458
2474
|
var o = document.createElement("span");
|
|
2459
2475
|
o.innerHTML = " " + t.name;
|
|
2460
2476
|
var r = document.createElement("span");
|
|
@@ -2484,13 +2500,13 @@ var ni = { exports: {} };
|
|
|
2484
2500
|
},
|
|
2485
2501
|
_expandSafely: function() {
|
|
2486
2502
|
var t = this._section;
|
|
2487
|
-
this._preventClick = !0,
|
|
2503
|
+
this._preventClick = !0, O(t, "click", J), this.expand();
|
|
2488
2504
|
var e = this;
|
|
2489
2505
|
setTimeout(function() {
|
|
2490
2506
|
H(t, "click", J), e._preventClick = !1;
|
|
2491
2507
|
});
|
|
2492
2508
|
}
|
|
2493
|
-
}),
|
|
2509
|
+
}), ro = function(t, e, i) {
|
|
2494
2510
|
return new Ri(t, e, i);
|
|
2495
2511
|
}, qe = ut.extend({
|
|
2496
2512
|
// @section
|
|
@@ -2543,11 +2559,11 @@ var ni = { exports: {} };
|
|
|
2543
2559
|
},
|
|
2544
2560
|
_createButton: function(t, e, i, n, o) {
|
|
2545
2561
|
var r = R("a", i, n);
|
|
2546
|
-
return r.innerHTML = t, r.href = "#", r.title = e, r.setAttribute("role", "button"), r.setAttribute("aria-label", e), Xt(r),
|
|
2562
|
+
return r.innerHTML = t, r.href = "#", r.title = e, r.setAttribute("role", "button"), r.setAttribute("aria-label", e), Xt(r), O(r, "click", kt), O(r, "click", o, this), O(r, "click", this._refocusOnMap, this), r;
|
|
2547
2563
|
},
|
|
2548
2564
|
_updateDisabled: function() {
|
|
2549
2565
|
var t = this._map, e = "leaflet-disabled";
|
|
2550
|
-
q(this._zoomInButton, e), q(this._zoomOutButton, e), this._zoomInButton.setAttribute("aria-disabled", "false"), this._zoomOutButton.setAttribute("aria-disabled", "false"), (this._disabled || t._zoom === t.getMinZoom()) && (
|
|
2566
|
+
q(this._zoomInButton, e), q(this._zoomOutButton, e), this._zoomInButton.setAttribute("aria-disabled", "false"), this._zoomOutButton.setAttribute("aria-disabled", "false"), (this._disabled || t._zoom === t.getMinZoom()) && (I(this._zoomOutButton, e), this._zoomOutButton.setAttribute("aria-disabled", "true")), (this._disabled || t._zoom === t.getMaxZoom()) && (I(this._zoomInButton, e), this._zoomInButton.setAttribute("aria-disabled", "true"));
|
|
2551
2567
|
}
|
|
2552
2568
|
});
|
|
2553
2569
|
N.mergeOptions({
|
|
@@ -2555,7 +2571,7 @@ var ni = { exports: {} };
|
|
|
2555
2571
|
}), N.addInitHook(function() {
|
|
2556
2572
|
this.options.zoomControl && (this.zoomControl = new qe(), this.addControl(this.zoomControl));
|
|
2557
2573
|
});
|
|
2558
|
-
var
|
|
2574
|
+
var ao = function(t) {
|
|
2559
2575
|
return new qe(t);
|
|
2560
2576
|
}, Di = ut.extend({
|
|
2561
2577
|
// @section
|
|
@@ -2609,16 +2625,16 @@ var ni = { exports: {} };
|
|
|
2609
2625
|
var e = Math.pow(10, (Math.floor(t) + "").length - 1), i = t / e;
|
|
2610
2626
|
return i = i >= 10 ? 10 : i >= 5 ? 5 : i >= 3 ? 3 : i >= 2 ? 2 : 1, e * i;
|
|
2611
2627
|
}
|
|
2612
|
-
}),
|
|
2628
|
+
}), ho = function(t) {
|
|
2613
2629
|
return new Di(t);
|
|
2614
|
-
},
|
|
2630
|
+
}, uo = '<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>', je = ut.extend({
|
|
2615
2631
|
// @section
|
|
2616
2632
|
// @aka Control.Attribution options
|
|
2617
2633
|
options: {
|
|
2618
2634
|
position: "bottomright",
|
|
2619
2635
|
// @option prefix: String|false = 'Leaflet'
|
|
2620
2636
|
// The HTML text shown before the attributions. Pass `false` to disable.
|
|
2621
|
-
prefix: '<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">' + (
|
|
2637
|
+
prefix: '<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">' + (b.inlineSvg ? uo + " " : "") + "Leaflet</a>"
|
|
2622
2638
|
},
|
|
2623
2639
|
initialize: function(t) {
|
|
2624
2640
|
w(this, t), this._attributions = {};
|
|
@@ -2667,10 +2683,10 @@ var ni = { exports: {} };
|
|
|
2667
2683
|
}), N.addInitHook(function() {
|
|
2668
2684
|
this.options.attributionControl && new je().addTo(this);
|
|
2669
2685
|
});
|
|
2670
|
-
var
|
|
2686
|
+
var lo = function(t) {
|
|
2671
2687
|
return new je(t);
|
|
2672
2688
|
};
|
|
2673
|
-
ut.Layers = Ri, ut.Zoom = qe, ut.Scale = Di, ut.Attribution = je, Jt.layers =
|
|
2689
|
+
ut.Layers = Ri, ut.Zoom = qe, ut.Scale = Di, ut.Attribution = je, Jt.layers = ro, Jt.zoom = ao, Jt.scale = ho, Jt.attribution = lo;
|
|
2674
2690
|
var dt = mt.extend({
|
|
2675
2691
|
initialize: function(t) {
|
|
2676
2692
|
this._map = t;
|
|
@@ -2700,7 +2716,7 @@ var ni = { exports: {} };
|
|
|
2700
2716
|
dt.addTo = function(t, e) {
|
|
2701
2717
|
return t.addHandler(e, this), this;
|
|
2702
2718
|
};
|
|
2703
|
-
var
|
|
2719
|
+
var co = { Events: ot }, Fi = b.touch ? "touchstart mousedown" : "mousedown", Ct = Gt.extend({
|
|
2704
2720
|
options: {
|
|
2705
2721
|
// @section
|
|
2706
2722
|
// @aka Draggable options
|
|
@@ -2717,25 +2733,25 @@ var ni = { exports: {} };
|
|
|
2717
2733
|
// @method enable()
|
|
2718
2734
|
// Enables the dragging ability
|
|
2719
2735
|
enable: function() {
|
|
2720
|
-
this._enabled || (
|
|
2736
|
+
this._enabled || (O(this._dragStartTarget, Fi, this._onDown, this), this._enabled = !0);
|
|
2721
2737
|
},
|
|
2722
2738
|
// @method disable()
|
|
2723
2739
|
// Disables the dragging ability
|
|
2724
2740
|
disable: function() {
|
|
2725
|
-
this._enabled && (
|
|
2741
|
+
this._enabled && (Ct._dragging === this && this.finishDrag(!0), H(this._dragStartTarget, Fi, this._onDown, this), this._enabled = !1, this._moved = !1);
|
|
2726
2742
|
},
|
|
2727
2743
|
_onDown: function(t) {
|
|
2728
2744
|
if (this._enabled && (this._moved = !1, !Ee(this._element, "leaflet-zoom-anim"))) {
|
|
2729
2745
|
if (t.touches && t.touches.length !== 1) {
|
|
2730
|
-
|
|
2746
|
+
Ct._dragging === this && this.finishDrag();
|
|
2731
2747
|
return;
|
|
2732
2748
|
}
|
|
2733
|
-
if (!(
|
|
2749
|
+
if (!(Ct._dragging || t.shiftKey || t.which !== 1 && t.button !== 1 && !t.touches) && (Ct._dragging = this, this._preventOutline && De(this._element), Ae(), jt(), !this._moving)) {
|
|
2734
2750
|
this.fire("down");
|
|
2735
2751
|
var e = t.touches ? t.touches[0] : t, i = Zi(this._element);
|
|
2736
|
-
this._startPoint = new
|
|
2752
|
+
this._startPoint = new z(e.clientX, e.clientY), this._startPos = Tt(this._element), this._parentScale = Fe(i);
|
|
2737
2753
|
var n = t.type === "mousedown";
|
|
2738
|
-
|
|
2754
|
+
O(document, n ? "mousemove" : "touchmove", this._onMove, this), O(document, n ? "mouseup" : "touchend touchcancel", this._onUp, this);
|
|
2739
2755
|
}
|
|
2740
2756
|
}
|
|
2741
2757
|
},
|
|
@@ -2745,8 +2761,8 @@ var ni = { exports: {} };
|
|
|
2745
2761
|
this._moved = !0;
|
|
2746
2762
|
return;
|
|
2747
2763
|
}
|
|
2748
|
-
var e = t.touches && t.touches.length === 1 ? t.touches[0] : t, i = new
|
|
2749
|
-
!i.x && !i.y || Math.abs(i.x) + Math.abs(i.y) < this.options.clickTolerance || (i.x /= this._parentScale.x, i.y /= this._parentScale.y, J(t), this._moved || (this.fire("dragstart"), this._moved = !0,
|
|
2764
|
+
var e = t.touches && t.touches.length === 1 ? t.touches[0] : t, i = new z(e.clientX, e.clientY)._subtract(this._startPoint);
|
|
2765
|
+
!i.x && !i.y || Math.abs(i.x) + Math.abs(i.y) < this.options.clickTolerance || (i.x /= this._parentScale.x, i.y /= this._parentScale.y, J(t), this._moved || (this.fire("dragstart"), this._moved = !0, I(document.body, "leaflet-dragging"), this._lastTarget = t.target || t.srcElement, window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance && (this._lastTarget = this._lastTarget.correspondingUseElement), I(this._lastTarget, "leaflet-drag-target")), this._newPos = this._startPos.add(i), this._moving = !0, this._lastEvent = t, this._updatePosition());
|
|
2750
2766
|
}
|
|
2751
2767
|
},
|
|
2752
2768
|
_updatePosition: function() {
|
|
@@ -2759,19 +2775,19 @@ var ni = { exports: {} };
|
|
|
2759
2775
|
finishDrag: function(t) {
|
|
2760
2776
|
q(document.body, "leaflet-dragging"), this._lastTarget && (q(this._lastTarget, "leaflet-drag-target"), this._lastTarget = null), H(document, "mousemove touchmove", this._onMove, this), H(document, "mouseup touchend touchcancel", this._onUp, this), Ne(), Kt();
|
|
2761
2777
|
var e = this._moved && this._moving;
|
|
2762
|
-
this._moving = !1,
|
|
2778
|
+
this._moving = !1, Ct._dragging = !1, e && this.fire("dragend", {
|
|
2763
2779
|
noInertia: t,
|
|
2764
2780
|
distance: this._newPos.distanceTo(this._startPos)
|
|
2765
2781
|
});
|
|
2766
2782
|
}
|
|
2767
2783
|
});
|
|
2768
2784
|
function Hi(t, e, i) {
|
|
2769
|
-
var n, o = [1, 4, 2, 8], r, u, c, _, y, x,
|
|
2785
|
+
var n, o = [1, 4, 2, 8], r, u, c, _, y, x, M, B;
|
|
2770
2786
|
for (r = 0, x = t.length; r < x; r++)
|
|
2771
2787
|
t[r]._code = zt(t[r], e);
|
|
2772
2788
|
for (c = 0; c < 4; c++) {
|
|
2773
|
-
for (
|
|
2774
|
-
_ = t[r], y = t[u], _._code &
|
|
2789
|
+
for (M = o[c], n = [], r = 0, x = t.length, u = x - 1; r < x; u = r++)
|
|
2790
|
+
_ = t[r], y = t[u], _._code & M ? y._code & M || (B = le(y, _, M, e, i), B._code = zt(B, e), n.push(B)) : (y._code & M && (B = le(y, _, M, e, i), B._code = zt(B, e), n.push(B)), n.push(_));
|
|
2775
2791
|
t = n;
|
|
2776
2792
|
}
|
|
2777
2793
|
return t;
|
|
@@ -2781,18 +2797,18 @@ var ni = { exports: {} };
|
|
|
2781
2797
|
if (!t || t.length === 0)
|
|
2782
2798
|
throw new Error("latlngs not passed");
|
|
2783
2799
|
at(t) || (console.warn("latlngs are not flat! Only the first ring will be used"), t = t[0]);
|
|
2784
|
-
var
|
|
2785
|
-
$ < 1700 && (
|
|
2800
|
+
var M = A([0, 0]), B = j(t), $ = B.getNorthWest().distanceTo(B.getSouthWest()) * B.getNorthEast().distanceTo(B.getNorthWest());
|
|
2801
|
+
$ < 1700 && (M = Ke(t));
|
|
2786
2802
|
var X = t.length, ht = [];
|
|
2787
2803
|
for (i = 0; i < X; i++) {
|
|
2788
2804
|
var it = A(t[i]);
|
|
2789
|
-
ht.push(e.project(A([it.lat -
|
|
2805
|
+
ht.push(e.project(A([it.lat - M.lat, it.lng - M.lng])));
|
|
2790
2806
|
}
|
|
2791
2807
|
for (c = _ = y = 0, i = 0, n = X - 1; i < X; n = i++)
|
|
2792
2808
|
o = ht[i], r = ht[n], u = o.y * r.x - r.y * o.x, _ += (o.x + r.x) * u, y += (o.y + r.y) * u, c += u * 3;
|
|
2793
2809
|
c === 0 ? x = ht[0] : x = [_ / c, y / c];
|
|
2794
|
-
var Dt = e.unproject(
|
|
2795
|
-
return A([Dt.lat +
|
|
2810
|
+
var Dt = e.unproject(k(x));
|
|
2811
|
+
return A([Dt.lat + M.lat, Dt.lng + M.lng]);
|
|
2796
2812
|
}
|
|
2797
2813
|
function Ke(t) {
|
|
2798
2814
|
for (var e = 0, i = 0, n = 0, o = 0; o < t.length; o++) {
|
|
@@ -2801,7 +2817,7 @@ var ni = { exports: {} };
|
|
|
2801
2817
|
}
|
|
2802
2818
|
return A([e / n, i / n]);
|
|
2803
2819
|
}
|
|
2804
|
-
var
|
|
2820
|
+
var fo = {
|
|
2805
2821
|
__proto__: null,
|
|
2806
2822
|
clipPolygon: Hi,
|
|
2807
2823
|
polygonCenter: Gi,
|
|
@@ -2811,15 +2827,15 @@ var ni = { exports: {} };
|
|
|
2811
2827
|
if (!e || !t.length)
|
|
2812
2828
|
return t.slice();
|
|
2813
2829
|
var i = e * e;
|
|
2814
|
-
return t =
|
|
2830
|
+
return t = mo(t, i), t = po(t, i), t;
|
|
2815
2831
|
}
|
|
2816
2832
|
function Ui(t, e, i) {
|
|
2817
2833
|
return Math.sqrt($t(t, e, i, !0));
|
|
2818
2834
|
}
|
|
2819
|
-
function
|
|
2835
|
+
function _o(t, e, i) {
|
|
2820
2836
|
return $t(t, e, i);
|
|
2821
2837
|
}
|
|
2822
|
-
function
|
|
2838
|
+
function po(t, e) {
|
|
2823
2839
|
var i = t.length, n = typeof Uint8Array < "u" ? Uint8Array : Array, o = new n(i);
|
|
2824
2840
|
o[0] = o[i - 1] = 1, Ye(t, o, e, 0, i - 1);
|
|
2825
2841
|
var r, u = [];
|
|
@@ -2833,9 +2849,9 @@ var ni = { exports: {} };
|
|
|
2833
2849
|
_ = $t(t[c], t[n], t[o], !0), _ > r && (u = c, r = _);
|
|
2834
2850
|
r > i && (e[u] = 1, Ye(t, e, i, n, u), Ye(t, e, i, u, o));
|
|
2835
2851
|
}
|
|
2836
|
-
function
|
|
2852
|
+
function mo(t, e) {
|
|
2837
2853
|
for (var i = [t[0]], n = 1, o = 0, r = t.length; n < r; n++)
|
|
2838
|
-
|
|
2854
|
+
go(t[n], t[o]) > e && (i.push(t[n]), o = n);
|
|
2839
2855
|
return o < r - 1 && i.push(t[r - 1]), i;
|
|
2840
2856
|
}
|
|
2841
2857
|
var Vi;
|
|
@@ -2851,19 +2867,19 @@ var ni = { exports: {} };
|
|
|
2851
2867
|
}
|
|
2852
2868
|
function le(t, e, i, n, o) {
|
|
2853
2869
|
var r = e.x - t.x, u = e.y - t.y, c = n.min, _ = n.max, y, x;
|
|
2854
|
-
return i & 8 ? (y = t.x + r * (_.y - t.y) / u, x = _.y) : i & 4 ? (y = t.x + r * (c.y - t.y) / u, x = c.y) : i & 2 ? (y = _.x, x = t.y + u * (_.x - t.x) / r) : i & 1 && (y = c.x, x = t.y + u * (c.x - t.x) / r), new
|
|
2870
|
+
return i & 8 ? (y = t.x + r * (_.y - t.y) / u, x = _.y) : i & 4 ? (y = t.x + r * (c.y - t.y) / u, x = c.y) : i & 2 ? (y = _.x, x = t.y + u * (_.x - t.x) / r) : i & 1 && (y = c.x, x = t.y + u * (c.x - t.x) / r), new z(y, x, o);
|
|
2855
2871
|
}
|
|
2856
2872
|
function zt(t, e) {
|
|
2857
2873
|
var i = 0;
|
|
2858
2874
|
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;
|
|
2859
2875
|
}
|
|
2860
|
-
function
|
|
2876
|
+
function go(t, e) {
|
|
2861
2877
|
var i = e.x - t.x, n = e.y - t.y;
|
|
2862
2878
|
return i * i + n * n;
|
|
2863
2879
|
}
|
|
2864
2880
|
function $t(t, e, i, n) {
|
|
2865
2881
|
var o = e.x, r = e.y, u = i.x - o, c = i.y - r, _ = u * u + c * c, y;
|
|
2866
|
-
return _ > 0 && (y = ((t.x - o) * u + (t.y - r) * c) / _, y > 1 ? (o = i.x, r = i.y) : y > 0 && (o += u * y, r += c * y)), u = t.x - o, c = t.y - r, n ? u * u + c * c : new
|
|
2882
|
+
return _ > 0 && (y = ((t.x - o) * u + (t.y - r) * c) / _, y > 1 ? (o = i.x, r = i.y) : y > 0 && (o += u * y, r += c * y)), u = t.x - o, c = t.y - r, n ? u * u + c * c : new z(o, r);
|
|
2867
2883
|
}
|
|
2868
2884
|
function at(t) {
|
|
2869
2885
|
return !W(t[0]) || typeof t[0][0] != "object" && typeof t[0][0] < "u";
|
|
@@ -2876,8 +2892,8 @@ var ni = { exports: {} };
|
|
|
2876
2892
|
if (!t || t.length === 0)
|
|
2877
2893
|
throw new Error("latlngs not passed");
|
|
2878
2894
|
at(t) || (console.warn("latlngs are not flat! Only the first ring will be used"), t = t[0]);
|
|
2879
|
-
var x = A([0, 0]),
|
|
2880
|
-
|
|
2895
|
+
var x = A([0, 0]), M = j(t), B = M.getNorthWest().distanceTo(M.getSouthWest()) * M.getNorthEast().distanceTo(M.getNorthWest());
|
|
2896
|
+
B < 1700 && (x = Ke(t));
|
|
2881
2897
|
var $ = t.length, X = [];
|
|
2882
2898
|
for (i = 0; i < $; i++) {
|
|
2883
2899
|
var ht = A(t[i]);
|
|
@@ -2896,14 +2912,14 @@ var ni = { exports: {} };
|
|
|
2896
2912
|
];
|
|
2897
2913
|
break;
|
|
2898
2914
|
}
|
|
2899
|
-
var it = e.unproject(
|
|
2915
|
+
var it = e.unproject(k(y));
|
|
2900
2916
|
return A([it.lat + x.lat, it.lng + x.lng]);
|
|
2901
2917
|
}
|
|
2902
|
-
var
|
|
2918
|
+
var vo = {
|
|
2903
2919
|
__proto__: null,
|
|
2904
2920
|
simplify: Wi,
|
|
2905
2921
|
pointToSegmentDistance: Ui,
|
|
2906
|
-
closestPointOnSegment:
|
|
2922
|
+
closestPointOnSegment: _o,
|
|
2907
2923
|
clipSegment: qi,
|
|
2908
2924
|
_getEdgeIntersection: le,
|
|
2909
2925
|
_getBitCode: zt,
|
|
@@ -2913,7 +2929,7 @@ var ni = { exports: {} };
|
|
|
2913
2929
|
polylineCenter: Ki
|
|
2914
2930
|
}, Xe = {
|
|
2915
2931
|
project: function(t) {
|
|
2916
|
-
return new
|
|
2932
|
+
return new z(t.lng, t.lat);
|
|
2917
2933
|
},
|
|
2918
2934
|
unproject: function(t) {
|
|
2919
2935
|
return new D(t.y, t.x);
|
|
@@ -2925,30 +2941,30 @@ var ni = { exports: {} };
|
|
|
2925
2941
|
bounds: new U([-2003750834279e-5, -1549657073972e-5], [2003750834279e-5, 1876465623138e-5]),
|
|
2926
2942
|
project: function(t) {
|
|
2927
2943
|
var e = Math.PI / 180, i = this.R, n = t.lat * e, o = this.R_MINOR / i, r = Math.sqrt(1 - o * o), u = r * Math.sin(n), c = Math.tan(Math.PI / 4 - n / 2) / Math.pow((1 - u) / (1 + u), r / 2);
|
|
2928
|
-
return n = -i * Math.log(Math.max(c, 1e-10)), new
|
|
2944
|
+
return n = -i * Math.log(Math.max(c, 1e-10)), new z(t.lng * e * i, n);
|
|
2929
2945
|
},
|
|
2930
2946
|
unproject: function(t) {
|
|
2931
2947
|
for (var e = 180 / Math.PI, i = this.R, n = this.R_MINOR / i, o = Math.sqrt(1 - n * n), r = Math.exp(-t.y / i), u = Math.PI / 2 - 2 * Math.atan(r), c = 0, _ = 0.1, y; c < 15 && Math.abs(_) > 1e-7; c++)
|
|
2932
2948
|
y = o * Math.sin(u), y = Math.pow((1 - y) / (1 + y), o / 2), _ = Math.PI / 2 - 2 * Math.atan(r * y) - u, u += _;
|
|
2933
2949
|
return new D(u * e, t.x * e / i);
|
|
2934
2950
|
}
|
|
2935
|
-
},
|
|
2951
|
+
}, yo = {
|
|
2936
2952
|
__proto__: null,
|
|
2937
2953
|
LonLat: Xe,
|
|
2938
2954
|
Mercator: Je,
|
|
2939
2955
|
SphericalMercator: Pe
|
|
2940
|
-
},
|
|
2956
|
+
}, Lo = C({}, Pt, {
|
|
2941
2957
|
code: "EPSG:3395",
|
|
2942
2958
|
projection: Je,
|
|
2943
2959
|
transformation: function() {
|
|
2944
2960
|
var t = 0.5 / (Math.PI * Je.R);
|
|
2945
2961
|
return Wt(t, 0.5, -t, 0.5);
|
|
2946
2962
|
}()
|
|
2947
|
-
}), Yi =
|
|
2963
|
+
}), Yi = C({}, Pt, {
|
|
2948
2964
|
code: "EPSG:4326",
|
|
2949
2965
|
projection: Xe,
|
|
2950
2966
|
transformation: Wt(1 / 180, 1, -1 / 180, 0.5)
|
|
2951
|
-
}),
|
|
2967
|
+
}), wo = C({}, gt, {
|
|
2952
2968
|
projection: Xe,
|
|
2953
2969
|
transformation: Wt(1, 0, -1, 0),
|
|
2954
2970
|
scale: function(t) {
|
|
@@ -2963,7 +2979,7 @@ var ni = { exports: {} };
|
|
|
2963
2979
|
},
|
|
2964
2980
|
infinite: !0
|
|
2965
2981
|
});
|
|
2966
|
-
gt.Earth =
|
|
2982
|
+
gt.Earth = Pt, gt.EPSG3395 = Lo, gt.EPSG3857 = be, gt.EPSG900913 = Mn, gt.EPSG4326 = Yi, gt.Simple = wo;
|
|
2967
2983
|
var lt = Gt.extend({
|
|
2968
2984
|
// Classes extending `L.Layer` will inherit the following options:
|
|
2969
2985
|
options: {
|
|
@@ -3167,7 +3183,7 @@ var ni = { exports: {} };
|
|
|
3167
3183
|
getLayerId: function(t) {
|
|
3168
3184
|
return l(t);
|
|
3169
3185
|
}
|
|
3170
|
-
}),
|
|
3186
|
+
}), xo = function(t, e) {
|
|
3171
3187
|
return new It(t, e);
|
|
3172
3188
|
}, vt = It.extend({
|
|
3173
3189
|
addLayer: function(t) {
|
|
@@ -3201,7 +3217,7 @@ var ni = { exports: {} };
|
|
|
3201
3217
|
}
|
|
3202
3218
|
return t;
|
|
3203
3219
|
}
|
|
3204
|
-
}),
|
|
3220
|
+
}), Po = function(t, e) {
|
|
3205
3221
|
return new vt(t, e);
|
|
3206
3222
|
}, Bt = mt.extend({
|
|
3207
3223
|
/* @section
|
|
@@ -3279,17 +3295,17 @@ var ni = { exports: {} };
|
|
|
3279
3295
|
_setIconStyles: function(t, e) {
|
|
3280
3296
|
var i = this.options, n = i[e + "Size"];
|
|
3281
3297
|
typeof n == "number" && (n = [n, n]);
|
|
3282
|
-
var o =
|
|
3298
|
+
var o = k(n), r = k(e === "shadow" && i.shadowAnchor || i.iconAnchor || o && o.divideBy(2, !0));
|
|
3283
3299
|
t.className = "leaflet-marker-" + e + " " + (i.className || ""), r && (t.style.marginLeft = -r.x + "px", t.style.marginTop = -r.y + "px"), o && (t.style.width = o.x + "px", t.style.height = o.y + "px");
|
|
3284
3300
|
},
|
|
3285
3301
|
_createImg: function(t, e) {
|
|
3286
3302
|
return e = e || document.createElement("img"), e.src = t, e;
|
|
3287
3303
|
},
|
|
3288
3304
|
_getIconUrl: function(t) {
|
|
3289
|
-
return
|
|
3305
|
+
return b.retina && this.options[t + "RetinaUrl"] || this.options[t + "Url"];
|
|
3290
3306
|
}
|
|
3291
3307
|
});
|
|
3292
|
-
function
|
|
3308
|
+
function Co(t) {
|
|
3293
3309
|
return new Bt(t);
|
|
3294
3310
|
}
|
|
3295
3311
|
var Qt = Bt.extend({
|
|
@@ -3326,12 +3342,12 @@ var ni = { exports: {} };
|
|
|
3326
3342
|
},
|
|
3327
3343
|
addHooks: function() {
|
|
3328
3344
|
var t = this._marker._icon;
|
|
3329
|
-
this._draggable || (this._draggable = new
|
|
3345
|
+
this._draggable || (this._draggable = new Ct(t, t, !0)), this._draggable.on({
|
|
3330
3346
|
dragstart: this._onDragStart,
|
|
3331
3347
|
predrag: this._onPreDrag,
|
|
3332
3348
|
drag: this._onDrag,
|
|
3333
3349
|
dragend: this._onDragEnd
|
|
3334
|
-
}, this).enable(),
|
|
3350
|
+
}, this).enable(), I(t, "leaflet-marker-draggable");
|
|
3335
3351
|
},
|
|
3336
3352
|
removeHooks: function() {
|
|
3337
3353
|
this._draggable.off({
|
|
@@ -3350,7 +3366,7 @@ var ni = { exports: {} };
|
|
|
3350
3366
|
u.max._subtract(c).subtract(o)
|
|
3351
3367
|
);
|
|
3352
3368
|
if (!_.contains(r)) {
|
|
3353
|
-
var y =
|
|
3369
|
+
var y = k(
|
|
3354
3370
|
(Math.max(_.max.x, r.x) - _.max.x) / (u.max.x - _.max.x) - (Math.min(_.min.x, r.x) - _.min.x) / (u.min.x - _.min.x),
|
|
3355
3371
|
(Math.max(_.max.y, r.y) - _.max.y) / (u.max.y - _.max.y) - (Math.min(_.min.y, r.y) - _.min.y) / (u.min.y - _.min.y)
|
|
3356
3372
|
).multiplyBy(n);
|
|
@@ -3491,12 +3507,12 @@ var ni = { exports: {} };
|
|
|
3491
3507
|
},
|
|
3492
3508
|
_initIcon: function() {
|
|
3493
3509
|
var t = this.options, e = "leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide"), i = t.icon.createIcon(this._icon), n = !1;
|
|
3494
|
-
i !== this._icon && (this._icon && this._removeIcon(), n = !0, t.title && (i.title = t.title), i.tagName === "IMG" && (i.alt = t.alt || "")),
|
|
3510
|
+
i !== this._icon && (this._icon && this._removeIcon(), n = !0, t.title && (i.title = t.title), i.tagName === "IMG" && (i.alt = t.alt || "")), I(i, e), t.keyboard && (i.tabIndex = "0", i.setAttribute("role", "button")), this._icon = i, t.riseOnHover && this.on({
|
|
3495
3511
|
mouseover: this._bringToFront,
|
|
3496
3512
|
mouseout: this._resetZIndex
|
|
3497
|
-
}), this.options.autoPanOnFocus &&
|
|
3513
|
+
}), this.options.autoPanOnFocus && O(i, "focus", this._panOnFocus, this);
|
|
3498
3514
|
var o = t.icon.createShadow(this._shadow), r = !1;
|
|
3499
|
-
o !== this._shadow && (this._removeShadow(), r = !0), o && (
|
|
3515
|
+
o !== this._shadow && (this._removeShadow(), r = !0), o && (I(o, e), o.alt = ""), this._shadow = o, t.opacity < 1 && this._updateOpacity(), n && this.getPane().appendChild(this._icon), this._initInteraction(), o && r && this.getPane(t.shadowPane).appendChild(this._shadow);
|
|
3500
3516
|
},
|
|
3501
3517
|
_removeIcon: function() {
|
|
3502
3518
|
this.options.riseOnHover && this.off({
|
|
@@ -3518,7 +3534,7 @@ var ni = { exports: {} };
|
|
|
3518
3534
|
this._setPos(e);
|
|
3519
3535
|
},
|
|
3520
3536
|
_initInteraction: function() {
|
|
3521
|
-
if (this.options.interactive && (
|
|
3537
|
+
if (this.options.interactive && (I(this._icon, "leaflet-interactive"), this.addInteractiveTarget(this._icon), Xi)) {
|
|
3522
3538
|
var t = this.options.draggable;
|
|
3523
3539
|
this.dragging && (t = this.dragging.enabled(), this.dragging.disable()), this.dragging = new Xi(this), t && this.dragging.enable();
|
|
3524
3540
|
}
|
|
@@ -3541,7 +3557,7 @@ var ni = { exports: {} };
|
|
|
3541
3557
|
_panOnFocus: function() {
|
|
3542
3558
|
var t = this._map;
|
|
3543
3559
|
if (t) {
|
|
3544
|
-
var e = this.options.icon.options, i = e.iconSize ?
|
|
3560
|
+
var e = this.options.icon.options, i = e.iconSize ? k(e.iconSize) : k(0, 0), n = e.iconAnchor ? k(e.iconAnchor) : k(0, 0);
|
|
3545
3561
|
t.panInside(this._latlng, {
|
|
3546
3562
|
paddingTopLeft: n,
|
|
3547
3563
|
paddingBottomRight: i.subtract(n)
|
|
@@ -3555,10 +3571,10 @@ var ni = { exports: {} };
|
|
|
3555
3571
|
return this.options.icon.options.tooltipAnchor;
|
|
3556
3572
|
}
|
|
3557
3573
|
});
|
|
3558
|
-
function
|
|
3574
|
+
function bo(t, e) {
|
|
3559
3575
|
return new ce(t, e);
|
|
3560
3576
|
}
|
|
3561
|
-
var
|
|
3577
|
+
var bt = lt.extend({
|
|
3562
3578
|
// @section
|
|
3563
3579
|
// @aka Path options
|
|
3564
3580
|
options: {
|
|
@@ -3644,7 +3660,7 @@ var ni = { exports: {} };
|
|
|
3644
3660
|
_clickTolerance: function() {
|
|
3645
3661
|
return (this.options.stroke ? this.options.weight / 2 : 0) + (this._renderer.options.tolerance || 0);
|
|
3646
3662
|
}
|
|
3647
|
-
}), fe =
|
|
3663
|
+
}), fe = bt.extend({
|
|
3648
3664
|
// @section
|
|
3649
3665
|
// @aka CircleMarker options
|
|
3650
3666
|
options: {
|
|
@@ -3679,7 +3695,7 @@ var ni = { exports: {} };
|
|
|
3679
3695
|
},
|
|
3680
3696
|
setStyle: function(t) {
|
|
3681
3697
|
var e = t && t.radius || this._radius;
|
|
3682
|
-
return
|
|
3698
|
+
return bt.prototype.setStyle.call(this, t), this.setRadius(e), this;
|
|
3683
3699
|
},
|
|
3684
3700
|
_project: function() {
|
|
3685
3701
|
this._point = this._map.latLngToLayerPoint(this._latlng), this._updateBounds();
|
|
@@ -3707,7 +3723,7 @@ var ni = { exports: {} };
|
|
|
3707
3723
|
}
|
|
3708
3724
|
var $e = fe.extend({
|
|
3709
3725
|
initialize: function(t, e, i) {
|
|
3710
|
-
if (typeof e == "number" && (e =
|
|
3726
|
+
if (typeof e == "number" && (e = C({}, i, { radius: e })), w(this, e), this._latlng = A(t), isNaN(this.options.radius))
|
|
3711
3727
|
throw new Error("Circle radius cannot be NaN");
|
|
3712
3728
|
this._mRadius = this.options.radius;
|
|
3713
3729
|
},
|
|
@@ -3730,23 +3746,23 @@ var ni = { exports: {} };
|
|
|
3730
3746
|
this._map.layerPointToLatLng(this._point.add(t))
|
|
3731
3747
|
);
|
|
3732
3748
|
},
|
|
3733
|
-
setStyle:
|
|
3749
|
+
setStyle: bt.prototype.setStyle,
|
|
3734
3750
|
_project: function() {
|
|
3735
3751
|
var t = this._latlng.lng, e = this._latlng.lat, i = this._map, n = i.options.crs;
|
|
3736
|
-
if (n.distance ===
|
|
3737
|
-
var o = Math.PI / 180, r = this._mRadius /
|
|
3752
|
+
if (n.distance === Pt.distance) {
|
|
3753
|
+
var o = Math.PI / 180, r = this._mRadius / Pt.R / o, u = i.project([e + r, t]), c = i.project([e - r, t]), _ = u.add(c).divideBy(2), y = i.unproject(_).lat, x = Math.acos((Math.cos(r * o) - Math.sin(e * o) * Math.sin(y * o)) / (Math.cos(e * o) * Math.cos(y * o))) / o;
|
|
3738
3754
|
(isNaN(x) || x === 0) && (x = r / Math.cos(Math.PI / 180 * e)), this._point = _.subtract(i.getPixelOrigin()), this._radius = isNaN(x) ? 0 : _.x - i.project([y, t - x]).x, this._radiusY = _.y - u.y;
|
|
3739
3755
|
} else {
|
|
3740
|
-
var
|
|
3741
|
-
this._point = i.latLngToLayerPoint(this._latlng), this._radius = this._point.x - i.latLngToLayerPoint(
|
|
3756
|
+
var M = n.unproject(n.project(this._latlng).subtract([this._mRadius, 0]));
|
|
3757
|
+
this._point = i.latLngToLayerPoint(this._latlng), this._radius = this._point.x - i.latLngToLayerPoint(M).x;
|
|
3742
3758
|
}
|
|
3743
3759
|
this._updateBounds();
|
|
3744
3760
|
}
|
|
3745
3761
|
});
|
|
3746
|
-
function
|
|
3762
|
+
function To(t, e, i) {
|
|
3747
3763
|
return new $e(t, e, i);
|
|
3748
3764
|
}
|
|
3749
|
-
var yt =
|
|
3765
|
+
var yt = bt.extend({
|
|
3750
3766
|
// @section
|
|
3751
3767
|
// @aka Polyline options
|
|
3752
3768
|
options: {
|
|
@@ -3782,8 +3798,8 @@ var ni = { exports: {} };
|
|
|
3782
3798
|
for (var e = 1 / 0, i = null, n = $t, o, r, u = 0, c = this._parts.length; u < c; u++)
|
|
3783
3799
|
for (var _ = this._parts[u], y = 1, x = _.length; y < x; y++) {
|
|
3784
3800
|
o = _[y - 1], r = _[y];
|
|
3785
|
-
var
|
|
3786
|
-
|
|
3801
|
+
var M = n(t, o, r, !0);
|
|
3802
|
+
M < e && (e = M, i = n(t, o, r));
|
|
3787
3803
|
}
|
|
3788
3804
|
return i && (i.distance = Math.sqrt(e)), i;
|
|
3789
3805
|
},
|
|
@@ -3823,7 +3839,7 @@ var ni = { exports: {} };
|
|
|
3823
3839
|
this._rings = [], this._projectLatlngs(this._latlngs, this._rings, t), this._bounds.isValid() && t.isValid() && (this._rawPxBounds = t, this._updateBounds());
|
|
3824
3840
|
},
|
|
3825
3841
|
_updateBounds: function() {
|
|
3826
|
-
var t = this._clickTolerance(), e = new
|
|
3842
|
+
var t = this._clickTolerance(), e = new z(t, t);
|
|
3827
3843
|
this._rawPxBounds && (this._pxBounds = new U([
|
|
3828
3844
|
this._rawPxBounds.min.subtract(e),
|
|
3829
3845
|
this._rawPxBounds.max.add(e)
|
|
@@ -3877,7 +3893,7 @@ var ni = { exports: {} };
|
|
|
3877
3893
|
return !1;
|
|
3878
3894
|
}
|
|
3879
3895
|
});
|
|
3880
|
-
function
|
|
3896
|
+
function So(t, e) {
|
|
3881
3897
|
return new yt(t, e);
|
|
3882
3898
|
}
|
|
3883
3899
|
yt._flat = ji;
|
|
@@ -3906,7 +3922,7 @@ var ni = { exports: {} };
|
|
|
3906
3922
|
return at(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];
|
|
3907
3923
|
},
|
|
3908
3924
|
_clipPoints: function() {
|
|
3909
|
-
var t = this._renderer._bounds, e = this.options.weight, i = new
|
|
3925
|
+
var t = this._renderer._bounds, e = this.options.weight, i = new z(e, e);
|
|
3910
3926
|
if (t = new U(t.min.subtract(i), t.max.add(i)), this._parts = [], !(!this._pxBounds || !this._pxBounds.intersects(t))) {
|
|
3911
3927
|
if (this.options.noClip) {
|
|
3912
3928
|
this._parts = this._rings;
|
|
@@ -4005,7 +4021,7 @@ var ni = { exports: {} };
|
|
|
4005
4021
|
// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.
|
|
4006
4022
|
// If `layer` is omitted, the style of all features in the current layer is reset.
|
|
4007
4023
|
resetStyle: function(t) {
|
|
4008
|
-
return t === void 0 ? this.eachLayer(this.resetStyle, this) : (t.options =
|
|
4024
|
+
return t === void 0 ? this.eachLayer(this.resetStyle, this) : (t.options = C({}, t.defaultOptions), this._setLayerStyle(t, this.options.style), this);
|
|
4009
4025
|
},
|
|
4010
4026
|
// @method setStyle( <Function> style ): this
|
|
4011
4027
|
// Changes styles of GeoJSON vector layers with the given style function.
|
|
@@ -4037,18 +4053,18 @@ var ni = { exports: {} };
|
|
|
4037
4053
|
return _ = _e(n, i.type === "Polygon" ? 1 : 2, u), new At(_, e);
|
|
4038
4054
|
case "GeometryCollection":
|
|
4039
4055
|
for (y = 0, x = i.geometries.length; y < x; y++) {
|
|
4040
|
-
var
|
|
4056
|
+
var M = de({
|
|
4041
4057
|
geometry: i.geometries[y],
|
|
4042
4058
|
type: "Feature",
|
|
4043
4059
|
properties: t.properties
|
|
4044
4060
|
}, e);
|
|
4045
|
-
|
|
4061
|
+
M && o.push(M);
|
|
4046
4062
|
}
|
|
4047
4063
|
return new vt(o);
|
|
4048
4064
|
case "FeatureCollection":
|
|
4049
4065
|
for (y = 0, x = i.features.length; y < x; y++) {
|
|
4050
|
-
var
|
|
4051
|
-
|
|
4066
|
+
var B = de(i.features[y], e);
|
|
4067
|
+
B && o.push(B);
|
|
4052
4068
|
}
|
|
4053
4069
|
return new vt(o);
|
|
4054
4070
|
default:
|
|
@@ -4075,7 +4091,7 @@ var ni = { exports: {} };
|
|
|
4075
4091
|
return !e && i && o.length > 0 && o.push(o[0].slice()), o;
|
|
4076
4092
|
}
|
|
4077
4093
|
function Nt(t, e) {
|
|
4078
|
-
return t.feature ?
|
|
4094
|
+
return t.feature ? C({}, t.feature, { geometry: e }) : me(e);
|
|
4079
4095
|
}
|
|
4080
4096
|
function me(t) {
|
|
4081
4097
|
return t.type === "Feature" || t.type === "FeatureCollection" ? t : {
|
|
@@ -4148,7 +4164,7 @@ var ni = { exports: {} };
|
|
|
4148
4164
|
function $i(t, e) {
|
|
4149
4165
|
return new Lt(t, e);
|
|
4150
4166
|
}
|
|
4151
|
-
var
|
|
4167
|
+
var zo = $i, ge = lt.extend({
|
|
4152
4168
|
// @section
|
|
4153
4169
|
// @aka ImageOverlay options
|
|
4154
4170
|
options: {
|
|
@@ -4180,7 +4196,7 @@ var ni = { exports: {} };
|
|
|
4180
4196
|
this._url = t, this._bounds = j(e), w(this, i);
|
|
4181
4197
|
},
|
|
4182
4198
|
onAdd: function() {
|
|
4183
|
-
this._image || (this._initImage(), this.options.opacity < 1 && this._updateOpacity()), this.options.interactive && (
|
|
4199
|
+
this._image || (this._initImage(), this.options.opacity < 1 && this._updateOpacity()), this.options.interactive && (I(this._image, "leaflet-interactive"), this.addInteractiveTarget(this._image)), this.getPane().appendChild(this._image), this._reset();
|
|
4184
4200
|
},
|
|
4185
4201
|
onRemove: function() {
|
|
4186
4202
|
V(this._image), this.options.interactive && this.removeInteractiveTarget(this._image);
|
|
@@ -4238,7 +4254,7 @@ var ni = { exports: {} };
|
|
|
4238
4254
|
},
|
|
4239
4255
|
_initImage: function() {
|
|
4240
4256
|
var t = this._url.tagName === "IMG", e = this._image = t ? this._url : R("img");
|
|
4241
|
-
if (
|
|
4257
|
+
if (I(e, "leaflet-image-layer"), this._zoomAnimated && I(e, "leaflet-zoom-animated"), this.options.className && I(e, this.options.className), e.onselectstart = f, e.onmousemove = f, e.onload = a(this.fire, this, "load"), e.onerror = a(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) {
|
|
4242
4258
|
this._url = e.src;
|
|
4243
4259
|
return;
|
|
4244
4260
|
}
|
|
@@ -4246,7 +4262,7 @@ var ni = { exports: {} };
|
|
|
4246
4262
|
},
|
|
4247
4263
|
_animateZoom: function(t) {
|
|
4248
4264
|
var e = this._map.getZoomScale(t.zoom), i = this._map._latLngBoundsToNewLayerBounds(this._bounds, t.zoom, t.center).min;
|
|
4249
|
-
|
|
4265
|
+
Mt(this._image, i, e);
|
|
4250
4266
|
},
|
|
4251
4267
|
_reset: function() {
|
|
4252
4268
|
var t = this._image, e = new U(
|
|
@@ -4271,7 +4287,7 @@ var ni = { exports: {} };
|
|
|
4271
4287
|
getCenter: function() {
|
|
4272
4288
|
return this._bounds.getCenter();
|
|
4273
4289
|
}
|
|
4274
|
-
}),
|
|
4290
|
+
}), Oo = function(t, e, i) {
|
|
4275
4291
|
return new ge(t, e, i);
|
|
4276
4292
|
}, Qi = ge.extend({
|
|
4277
4293
|
// @section
|
|
@@ -4297,7 +4313,7 @@ var ni = { exports: {} };
|
|
|
4297
4313
|
},
|
|
4298
4314
|
_initImage: function() {
|
|
4299
4315
|
var t = this._url.tagName === "VIDEO", e = this._image = t ? this._url : R("video");
|
|
4300
|
-
if (
|
|
4316
|
+
if (I(e, "leaflet-image-layer"), this._zoomAnimated && I(e, "leaflet-zoom-animated"), this.options.className && I(e, this.options.className), e.onselectstart = f, e.onmousemove = f, e.onloadeddata = a(this.fire, this, "load"), t) {
|
|
4301
4317
|
for (var i = e.getElementsByTagName("source"), n = [], o = 0; o < i.length; o++)
|
|
4302
4318
|
n.push(i[o].src);
|
|
4303
4319
|
this._url = i.length > 0 ? n : [e.src];
|
|
@@ -4313,19 +4329,19 @@ var ni = { exports: {} };
|
|
|
4313
4329
|
// Returns the instance of [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement)
|
|
4314
4330
|
// used by this overlay.
|
|
4315
4331
|
});
|
|
4316
|
-
function
|
|
4332
|
+
function Zo(t, e, i) {
|
|
4317
4333
|
return new Qi(t, e, i);
|
|
4318
4334
|
}
|
|
4319
4335
|
var tn = ge.extend({
|
|
4320
4336
|
_initImage: function() {
|
|
4321
4337
|
var t = this._image = this._url;
|
|
4322
|
-
|
|
4338
|
+
I(t, "leaflet-image-layer"), this._zoomAnimated && I(t, "leaflet-zoom-animated"), this.options.className && I(t, this.options.className), t.onselectstart = f, t.onmousemove = f;
|
|
4323
4339
|
}
|
|
4324
4340
|
// @method getElement(): SVGElement
|
|
4325
4341
|
// Returns the instance of [`SVGElement`](https://developer.mozilla.org/docs/Web/API/SVGElement)
|
|
4326
4342
|
// used by this overlay.
|
|
4327
4343
|
});
|
|
4328
|
-
function
|
|
4344
|
+
function Eo(t, e, i) {
|
|
4329
4345
|
return new tn(t, e, i);
|
|
4330
4346
|
}
|
|
4331
4347
|
var _t = lt.extend({
|
|
@@ -4373,7 +4389,7 @@ var ni = { exports: {} };
|
|
|
4373
4389
|
return this._map ? this.close() : (arguments.length ? this._source = t : t = this._source, this._prepareOpen(), this.openOn(t._map)), this;
|
|
4374
4390
|
},
|
|
4375
4391
|
onAdd: function(t) {
|
|
4376
|
-
this._zoomAnimated = t._zoomAnimated, this._container || this._initLayout(), t._fadeAnimated && rt(this._container, 0), clearTimeout(this._removeTimeout), this.getPane().appendChild(this._container), this.update(), t._fadeAnimated && rt(this._container, 1), this.bringToFront(), this.options.interactive && (
|
|
4392
|
+
this._zoomAnimated = t._zoomAnimated, this._container || this._initLayout(), t._fadeAnimated && rt(this._container, 0), clearTimeout(this._removeTimeout), this.getPane().appendChild(this._container), this.update(), t._fadeAnimated && rt(this._container, 1), this.bringToFront(), this.options.interactive && (I(this._container, "leaflet-interactive"), this.addInteractiveTarget(this._container));
|
|
4377
4393
|
},
|
|
4378
4394
|
onRemove: function(t) {
|
|
4379
4395
|
t._fadeAnimated ? (rt(this._container, 0), this._removeTimeout = setTimeout(a(V, void 0, this._container), 200)) : V(this._container), this.options.interactive && (q(this._container, "leaflet-interactive"), this.removeInteractiveTarget(this._container));
|
|
@@ -4475,7 +4491,7 @@ var ni = { exports: {} };
|
|
|
4475
4491
|
},
|
|
4476
4492
|
_updatePosition: function() {
|
|
4477
4493
|
if (this._map) {
|
|
4478
|
-
var t = this._map.latLngToLayerPoint(this._latlng), e =
|
|
4494
|
+
var t = this._map.latLngToLayerPoint(this._latlng), e = k(this.options.offset), i = this._getAnchor();
|
|
4479
4495
|
this._zoomAnimated ? K(this._container, t.add(i)) : e = e.add(t).add(i);
|
|
4480
4496
|
var n = this._containerBottom = -e.y, o = this._containerLeft = -Math.round(this._containerWidth / 2) + e.x;
|
|
4481
4497
|
this._container.style.bottom = n + "px", this._container.style.left = o + "px";
|
|
@@ -4563,10 +4579,10 @@ var ni = { exports: {} };
|
|
|
4563
4579
|
return t = arguments.length ? t : this._source._map, !t.hasLayer(this) && t._popup && t._popup.options.autoClose && t.removeLayer(t._popup), t._popup = this, _t.prototype.openOn.call(this, t);
|
|
4564
4580
|
},
|
|
4565
4581
|
onAdd: function(t) {
|
|
4566
|
-
_t.prototype.onAdd.call(this, t), t.fire("popupopen", { popup: this }), this._source && (this._source.fire("popupopen", { popup: this }, !0), this._source instanceof
|
|
4582
|
+
_t.prototype.onAdd.call(this, t), t.fire("popupopen", { popup: this }), this._source && (this._source.fire("popupopen", { popup: this }, !0), this._source instanceof bt || this._source.on("preclick", St));
|
|
4567
4583
|
},
|
|
4568
4584
|
onRemove: function(t) {
|
|
4569
|
-
_t.prototype.onRemove.call(this, t), t.fire("popupclose", { popup: this }), this._source && (this._source.fire("popupclose", { popup: this }, !0), this._source instanceof
|
|
4585
|
+
_t.prototype.onRemove.call(this, t), t.fire("popupclose", { popup: this }), this._source && (this._source.fire("popupclose", { popup: this }, !0), this._source instanceof bt || this._source.off("preclick", St));
|
|
4570
4586
|
},
|
|
4571
4587
|
getEvents: function() {
|
|
4572
4588
|
var t = _t.prototype.getEvents.call(this);
|
|
@@ -4577,9 +4593,9 @@ var ni = { exports: {} };
|
|
|
4577
4593
|
"div",
|
|
4578
4594
|
t + " " + (this.options.className || "") + " leaflet-zoom-animated"
|
|
4579
4595
|
), i = this._wrapper = R("div", t + "-content-wrapper", e);
|
|
4580
|
-
if (this._contentNode = R("div", t + "-content", i), Xt(e), Ue(this._contentNode),
|
|
4596
|
+
if (this._contentNode = R("div", t + "-content", i), Xt(e), Ue(this._contentNode), O(e, "contextmenu", St), this._tipContainer = R("div", t + "-tip-container", e), this._tip = R("div", t + "-tip", this._tipContainer), this.options.closeButton) {
|
|
4581
4597
|
var n = this._closeButton = R("a", t + "-close-button", e);
|
|
4582
|
-
n.setAttribute("role", "button"), n.setAttribute("aria-label", "Close popup"), n.href = "#close", n.innerHTML = '<span aria-hidden="true">×</span>',
|
|
4598
|
+
n.setAttribute("role", "button"), n.setAttribute("aria-label", "Close popup"), n.href = "#close", n.innerHTML = '<span aria-hidden="true">×</span>', O(n, "click", function(o) {
|
|
4583
4599
|
J(o), this.close();
|
|
4584
4600
|
}, this);
|
|
4585
4601
|
}
|
|
@@ -4590,7 +4606,7 @@ var ni = { exports: {} };
|
|
|
4590
4606
|
var i = t.offsetWidth;
|
|
4591
4607
|
i = Math.min(i, this.options.maxWidth), i = Math.max(i, this.options.minWidth), e.width = i + 1 + "px", e.whiteSpace = "", e.height = "";
|
|
4592
4608
|
var n = t.offsetHeight, o = this.options.maxHeight, r = "leaflet-popup-scrolled";
|
|
4593
|
-
o && n > o ? (e.height = o + "px",
|
|
4609
|
+
o && n > o ? (e.height = o + "px", I(t, r)) : q(t, r), this._containerWidth = this._container.offsetWidth;
|
|
4594
4610
|
},
|
|
4595
4611
|
_animateZoom: function(t) {
|
|
4596
4612
|
var e = this._map._latLngToNewLayerPoint(this._latlng, t.zoom, t.center), i = this._getAnchor();
|
|
@@ -4602,16 +4618,16 @@ var ni = { exports: {} };
|
|
|
4602
4618
|
this._autopanning = !1;
|
|
4603
4619
|
return;
|
|
4604
4620
|
}
|
|
4605
|
-
var t = this._map, e = parseInt(qt(this._container, "marginBottom"), 10) || 0, i = this._container.offsetHeight + e, n = this._containerWidth, o = new
|
|
4621
|
+
var t = this._map, e = parseInt(qt(this._container, "marginBottom"), 10) || 0, i = this._container.offsetHeight + e, n = this._containerWidth, o = new z(this._containerLeft, -i - this._containerBottom);
|
|
4606
4622
|
o._add(Tt(this._container));
|
|
4607
|
-
var r = t.layerPointToContainerPoint(o), u =
|
|
4608
|
-
r.x + n + _.x > y.x && (x = r.x + n - y.x + _.x), r.x - x - c.x < 0 && (x = r.x - c.x), r.y + i + _.y > y.y && (
|
|
4623
|
+
var r = t.layerPointToContainerPoint(o), u = k(this.options.autoPanPadding), c = k(this.options.autoPanPaddingTopLeft || u), _ = k(this.options.autoPanPaddingBottomRight || u), y = t.getSize(), x = 0, M = 0;
|
|
4624
|
+
r.x + n + _.x > y.x && (x = r.x + n - y.x + _.x), r.x - x - c.x < 0 && (x = r.x - c.x), r.y + i + _.y > y.y && (M = r.y + i - y.y + _.y), r.y - M - c.y < 0 && (M = r.y - c.y), (x || M) && (this.options.keepInView && (this._autopanning = !0), t.fire("autopanstart").panBy([x, M]));
|
|
4609
4625
|
}
|
|
4610
4626
|
},
|
|
4611
4627
|
_getAnchor: function() {
|
|
4612
|
-
return
|
|
4628
|
+
return k(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);
|
|
4613
4629
|
}
|
|
4614
|
-
}),
|
|
4630
|
+
}), Io = function(t, e) {
|
|
4615
4631
|
return new ve(t, e);
|
|
4616
4632
|
};
|
|
4617
4633
|
N.mergeOptions({
|
|
@@ -4685,9 +4701,9 @@ var ni = { exports: {} };
|
|
|
4685
4701
|
},
|
|
4686
4702
|
_openPopup: function(t) {
|
|
4687
4703
|
if (!(!this._popup || !this._map)) {
|
|
4688
|
-
|
|
4704
|
+
kt(t);
|
|
4689
4705
|
var e = t.layer || t.target;
|
|
4690
|
-
if (this._popup._source === e && !(e instanceof
|
|
4706
|
+
if (this._popup._source === e && !(e instanceof bt)) {
|
|
4691
4707
|
this._map.hasLayer(this._popup) ? this.closePopup() : this.openPopup(t.latlng);
|
|
4692
4708
|
return;
|
|
4693
4709
|
}
|
|
@@ -4746,8 +4762,8 @@ var ni = { exports: {} };
|
|
|
4746
4762
|
_adjustPan: function() {
|
|
4747
4763
|
},
|
|
4748
4764
|
_setPosition: function(t) {
|
|
4749
|
-
var e, i, n = this._map, o = this._container, r = n.latLngToContainerPoint(n.getCenter()), u = n.layerPointToContainerPoint(t), c = this.options.direction, _ = o.offsetWidth, y = o.offsetHeight, x =
|
|
4750
|
-
c === "top" ? (e = _ / 2, i = y) : c === "bottom" ? (e = _ / 2, i = 0) : c === "center" ? (e = _ / 2, i = y / 2) : c === "right" ? (e = 0, i = y / 2) : c === "left" ? (e = _, i = y / 2) : u.x < r.x ? (c = "right", e = 0, i = y / 2) : (c = "left", e = _ + (x.x +
|
|
4765
|
+
var e, i, n = this._map, o = this._container, r = n.latLngToContainerPoint(n.getCenter()), u = n.layerPointToContainerPoint(t), c = this.options.direction, _ = o.offsetWidth, y = o.offsetHeight, x = k(this.options.offset), M = this._getAnchor();
|
|
4766
|
+
c === "top" ? (e = _ / 2, i = y) : c === "bottom" ? (e = _ / 2, i = 0) : c === "center" ? (e = _ / 2, i = y / 2) : c === "right" ? (e = 0, i = y / 2) : c === "left" ? (e = _, i = y / 2) : u.x < r.x ? (c = "right", e = 0, i = y / 2) : (c = "left", e = _ + (x.x + M.x) * 2, i = y / 2), t = t.subtract(k(e, i, !0)).add(x).add(M), q(o, "leaflet-tooltip-right"), q(o, "leaflet-tooltip-left"), q(o, "leaflet-tooltip-top"), q(o, "leaflet-tooltip-bottom"), I(o, "leaflet-tooltip-" + c), K(o, t);
|
|
4751
4767
|
},
|
|
4752
4768
|
_updatePosition: function() {
|
|
4753
4769
|
var t = this._map.latLngToLayerPoint(this._latlng);
|
|
@@ -4761,9 +4777,9 @@ var ni = { exports: {} };
|
|
|
4761
4777
|
this._setPosition(e);
|
|
4762
4778
|
},
|
|
4763
4779
|
_getAnchor: function() {
|
|
4764
|
-
return
|
|
4780
|
+
return k(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);
|
|
4765
4781
|
}
|
|
4766
|
-
}),
|
|
4782
|
+
}), Bo = function(t, e) {
|
|
4767
4783
|
return new ye(t, e);
|
|
4768
4784
|
};
|
|
4769
4785
|
N.include({
|
|
@@ -4838,9 +4854,9 @@ var ni = { exports: {} };
|
|
|
4838
4854
|
},
|
|
4839
4855
|
_addFocusListenersOnLayer: function(t) {
|
|
4840
4856
|
var e = typeof t.getElement == "function" && t.getElement();
|
|
4841
|
-
e && (
|
|
4857
|
+
e && (O(e, "focus", function() {
|
|
4842
4858
|
this._tooltip._source = t, this.openTooltip();
|
|
4843
|
-
}, this),
|
|
4859
|
+
}, this), O(e, "blur", this.closeTooltip, this));
|
|
4844
4860
|
},
|
|
4845
4861
|
_setAriaDescribedByOnLayer: function(t) {
|
|
4846
4862
|
var e = typeof t.getElement == "function" && t.getElement();
|
|
@@ -4884,7 +4900,7 @@ var ni = { exports: {} };
|
|
|
4884
4900
|
createIcon: function(t) {
|
|
4885
4901
|
var e = t && t.tagName === "DIV" ? t : document.createElement("div"), i = this.options;
|
|
4886
4902
|
if (i.html instanceof Element ? (se(e), e.appendChild(i.html)) : e.innerHTML = i.html !== !1 ? i.html : "", i.bgPos) {
|
|
4887
|
-
var n =
|
|
4903
|
+
var n = k(i.bgPos);
|
|
4888
4904
|
e.style.backgroundPosition = -n.x + "px " + -n.y + "px";
|
|
4889
4905
|
}
|
|
4890
4906
|
return this._setIconStyles(e, "icon"), e;
|
|
@@ -4893,7 +4909,7 @@ var ni = { exports: {} };
|
|
|
4893
4909
|
return null;
|
|
4894
4910
|
}
|
|
4895
4911
|
});
|
|
4896
|
-
function
|
|
4912
|
+
function Ao(t) {
|
|
4897
4913
|
return new en(t);
|
|
4898
4914
|
}
|
|
4899
4915
|
Bt.Default = Qt;
|
|
@@ -4912,7 +4928,7 @@ var ni = { exports: {} };
|
|
|
4912
4928
|
// `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.
|
|
4913
4929
|
// `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the
|
|
4914
4930
|
// [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.
|
|
4915
|
-
updateWhenIdle:
|
|
4931
|
+
updateWhenIdle: b.mobile,
|
|
4916
4932
|
// @option updateWhenZooming: Boolean = true
|
|
4917
4933
|
// By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends.
|
|
4918
4934
|
updateWhenZooming: !0,
|
|
@@ -5033,7 +5049,7 @@ var ni = { exports: {} };
|
|
|
5033
5049
|
// Normalizes the [tileSize option](#gridlayer-tilesize) into a point. Used by the `createTile()` method.
|
|
5034
5050
|
getTileSize: function() {
|
|
5035
5051
|
var t = this.options.tileSize;
|
|
5036
|
-
return t instanceof
|
|
5052
|
+
return t instanceof z ? t : new z(t, t);
|
|
5037
5053
|
},
|
|
5038
5054
|
_updateZIndex: function() {
|
|
5039
5055
|
this._container && this.options.zIndex !== void 0 && this.options.zIndex !== null && (this._container.style.zIndex = this.options.zIndex);
|
|
@@ -5044,7 +5060,7 @@ var ni = { exports: {} };
|
|
|
5044
5060
|
isFinite(i) && (this.options.zIndex = i + t(-1, 1), this._updateZIndex());
|
|
5045
5061
|
},
|
|
5046
5062
|
_updateOpacity: function() {
|
|
5047
|
-
if (this._map && !
|
|
5063
|
+
if (this._map && !b.ielt9) {
|
|
5048
5064
|
rt(this._container, this.options.opacity);
|
|
5049
5065
|
var t = +/* @__PURE__ */ new Date(), e = !1, i = !1;
|
|
5050
5066
|
for (var n in this._tiles) {
|
|
@@ -5105,7 +5121,7 @@ var ni = { exports: {} };
|
|
|
5105
5121
|
this._removeAllTiles(), this._tileZoom = void 0;
|
|
5106
5122
|
},
|
|
5107
5123
|
_retainParent: function(t, e, i, n) {
|
|
5108
|
-
var o = Math.floor(t / 2), r = Math.floor(e / 2), u = i - 1, c = new
|
|
5124
|
+
var o = Math.floor(t / 2), r = Math.floor(e / 2), u = i - 1, c = new z(+o, +r);
|
|
5109
5125
|
c.z = +u;
|
|
5110
5126
|
var _ = this._tileCoordsToKey(c), y = this._tiles[_];
|
|
5111
5127
|
return y && y.active ? (y.retain = !0, !0) : (y && y.loaded && (y.retain = !0), u > n ? this._retainParent(o, r, u, n) : !1);
|
|
@@ -5113,7 +5129,7 @@ var ni = { exports: {} };
|
|
|
5113
5129
|
_retainChildren: function(t, e, i, n) {
|
|
5114
5130
|
for (var o = 2 * t; o < 2 * t + 2; o++)
|
|
5115
5131
|
for (var r = 2 * e; r < 2 * e + 2; r++) {
|
|
5116
|
-
var u = new
|
|
5132
|
+
var u = new z(o, r);
|
|
5117
5133
|
u.z = i + 1;
|
|
5118
5134
|
var c = this._tileCoordsToKey(u), _ = this._tiles[c];
|
|
5119
5135
|
if (_ && _.active) {
|
|
@@ -5146,7 +5162,7 @@ var ni = { exports: {} };
|
|
|
5146
5162
|
},
|
|
5147
5163
|
_setZoomTransform: function(t, e, i) {
|
|
5148
5164
|
var n = this._map.getZoomScale(i, t.zoom), o = t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e, i)).round();
|
|
5149
|
-
|
|
5165
|
+
b.any3d ? Mt(t.el, o, n) : K(t.el, o);
|
|
5150
5166
|
},
|
|
5151
5167
|
_resetGrid: function() {
|
|
5152
5168
|
var t = this._map, e = t.options.crs, i = this._tileSize = this.getTileSize(), n = this._tileZoom, o = this._map.getPixelWorldBounds(this._tileZoom);
|
|
@@ -5179,15 +5195,15 @@ var ni = { exports: {} };
|
|
|
5179
5195
|
throw new Error("Attempted to load an infinite number of tiles");
|
|
5180
5196
|
for (var y in this._tiles) {
|
|
5181
5197
|
var x = this._tiles[y].coords;
|
|
5182
|
-
(x.z !== this._tileZoom || !_.contains(new
|
|
5198
|
+
(x.z !== this._tileZoom || !_.contains(new z(x.x, x.y))) && (this._tiles[y].current = !1);
|
|
5183
5199
|
}
|
|
5184
5200
|
if (Math.abs(i - this._tileZoom) > 1) {
|
|
5185
5201
|
this._setView(t, i);
|
|
5186
5202
|
return;
|
|
5187
5203
|
}
|
|
5188
|
-
for (var
|
|
5189
|
-
for (var
|
|
5190
|
-
var $ = new
|
|
5204
|
+
for (var M = o.min.y; M <= o.max.y; M++)
|
|
5205
|
+
for (var B = o.min.x; B <= o.max.x; B++) {
|
|
5206
|
+
var $ = new z(B, M);
|
|
5191
5207
|
if ($.z = this._tileZoom, !!this._isValidTile($)) {
|
|
5192
5208
|
var X = this._tiles[this._tileCoordsToKey($)];
|
|
5193
5209
|
X ? X.current = !0 : u.push($);
|
|
@@ -5198,8 +5214,8 @@ var ni = { exports: {} };
|
|
|
5198
5214
|
}), u.length !== 0) {
|
|
5199
5215
|
this._loading || (this._loading = !0, this.fire("loading"));
|
|
5200
5216
|
var ht = document.createDocumentFragment();
|
|
5201
|
-
for (
|
|
5202
|
-
this._addTile(u[
|
|
5217
|
+
for (B = 0; B < u.length; B++)
|
|
5218
|
+
this._addTile(u[B], ht);
|
|
5203
5219
|
this._level.el.appendChild(ht);
|
|
5204
5220
|
}
|
|
5205
5221
|
}
|
|
@@ -5235,7 +5251,7 @@ var ni = { exports: {} };
|
|
|
5235
5251
|
},
|
|
5236
5252
|
// converts tile cache key to coordinates
|
|
5237
5253
|
_keyToTileCoords: function(t) {
|
|
5238
|
-
var e = t.split(":"), i = new
|
|
5254
|
+
var e = t.split(":"), i = new z(+e[0], +e[1]);
|
|
5239
5255
|
return i.z = +e[2], i;
|
|
5240
5256
|
},
|
|
5241
5257
|
_removeTile: function(t) {
|
|
@@ -5246,9 +5262,9 @@ var ni = { exports: {} };
|
|
|
5246
5262
|
}));
|
|
5247
5263
|
},
|
|
5248
5264
|
_initTile: function(t) {
|
|
5249
|
-
|
|
5265
|
+
I(t, "leaflet-tile");
|
|
5250
5266
|
var e = this.getTileSize();
|
|
5251
|
-
t.style.width = e.x + "px", t.style.height = e.y + "px", t.onselectstart = f, t.onmousemove = f,
|
|
5267
|
+
t.style.width = e.x + "px", t.style.height = e.y + "px", t.onselectstart = f, t.onmousemove = f, b.ielt9 && this.options.opacity < 1 && rt(t, this.options.opacity);
|
|
5252
5268
|
},
|
|
5253
5269
|
_addTile: function(t, e) {
|
|
5254
5270
|
var i = this._getTilePos(t), n = this._tileCoordsToKey(t), o = this.createTile(this._wrapCoords(t), a(this._tileReady, this, t));
|
|
@@ -5268,16 +5284,16 @@ var ni = { exports: {} };
|
|
|
5268
5284
|
coords: t
|
|
5269
5285
|
});
|
|
5270
5286
|
var n = this._tileCoordsToKey(t);
|
|
5271
|
-
i = this._tiles[n], i && (i.loaded = +/* @__PURE__ */ new Date(), this._map._fadeAnimated ? (rt(i.el, 0), st(this._fadeFrame), this._fadeFrame = Q(this._updateOpacity, this)) : (i.active = !0, this._pruneTiles()), e || (
|
|
5287
|
+
i = this._tiles[n], i && (i.loaded = +/* @__PURE__ */ new Date(), this._map._fadeAnimated ? (rt(i.el, 0), st(this._fadeFrame), this._fadeFrame = Q(this._updateOpacity, this)) : (i.active = !0, this._pruneTiles()), e || (I(i.el, "leaflet-tile-loaded"), this.fire("tileload", {
|
|
5272
5288
|
tile: i.el,
|
|
5273
5289
|
coords: t
|
|
5274
|
-
})), this._noTilesToLoad() && (this._loading = !1, this.fire("load"),
|
|
5290
|
+
})), this._noTilesToLoad() && (this._loading = !1, this.fire("load"), b.ielt9 || !this._map._fadeAnimated ? Q(this._pruneTiles, this) : setTimeout(a(this._pruneTiles, this), 250)));
|
|
5275
5291
|
},
|
|
5276
5292
|
_getTilePos: function(t) {
|
|
5277
5293
|
return t.scaleBy(this.getTileSize()).subtract(this._level.origin);
|
|
5278
5294
|
},
|
|
5279
5295
|
_wrapCoords: function(t) {
|
|
5280
|
-
var e = new
|
|
5296
|
+
var e = new z(
|
|
5281
5297
|
this._wrapX ? m(t.x, this._wrapX) : t.x,
|
|
5282
5298
|
this._wrapY ? m(t.y, this._wrapY) : t.y
|
|
5283
5299
|
);
|
|
@@ -5297,7 +5313,7 @@ var ni = { exports: {} };
|
|
|
5297
5313
|
return !0;
|
|
5298
5314
|
}
|
|
5299
5315
|
});
|
|
5300
|
-
function
|
|
5316
|
+
function No(t) {
|
|
5301
5317
|
return new te(t);
|
|
5302
5318
|
}
|
|
5303
5319
|
var Rt = te.extend({
|
|
@@ -5342,7 +5358,7 @@ var ni = { exports: {} };
|
|
|
5342
5358
|
referrerPolicy: !1
|
|
5343
5359
|
},
|
|
5344
5360
|
initialize: function(t, e) {
|
|
5345
|
-
this._url = t, e = w(this, e), e.detectRetina &&
|
|
5361
|
+
this._url = t, e = w(this, e), e.detectRetina && b.retina && e.maxZoom > 0 ? (e.tileSize = Math.floor(e.tileSize / 2), e.zoomReverse ? (e.zoomOffset--, e.minZoom = Math.min(e.maxZoom, e.minZoom + 1)) : (e.zoomOffset++, e.maxZoom = Math.max(e.minZoom, e.maxZoom - 1)), e.minZoom = Math.max(0, e.minZoom)) : e.zoomReverse ? e.minZoom = Math.min(e.maxZoom, e.minZoom) : e.maxZoom = Math.max(e.minZoom, e.maxZoom), typeof e.subdomains == "string" && (e.subdomains = e.subdomains.split("")), this.on("tileunload", this._onTileRemove);
|
|
5346
5362
|
},
|
|
5347
5363
|
// @method setUrl(url: String, noRedraw?: Boolean): this
|
|
5348
5364
|
// Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`).
|
|
@@ -5357,7 +5373,7 @@ var ni = { exports: {} };
|
|
|
5357
5373
|
// callback is called when the tile has been loaded.
|
|
5358
5374
|
createTile: function(t, e) {
|
|
5359
5375
|
var i = document.createElement("img");
|
|
5360
|
-
return
|
|
5376
|
+
return O(i, "load", a(this._tileOnLoad, this, e, i)), O(i, "error", a(this._tileOnError, this, e, i)), (this.options.crossOrigin || this.options.crossOrigin === "") && (i.crossOrigin = this.options.crossOrigin === !0 ? "" : this.options.crossOrigin), typeof this.options.referrerPolicy == "string" && (i.referrerPolicy = this.options.referrerPolicy), i.alt = "", i.src = this.getTileUrl(t), i;
|
|
5361
5377
|
},
|
|
5362
5378
|
// @section Extension methods
|
|
5363
5379
|
// @uninheritable
|
|
@@ -5367,7 +5383,7 @@ var ni = { exports: {} };
|
|
|
5367
5383
|
// Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes.
|
|
5368
5384
|
getTileUrl: function(t) {
|
|
5369
5385
|
var e = {
|
|
5370
|
-
r:
|
|
5386
|
+
r: b.retina ? "@2x" : "",
|
|
5371
5387
|
s: this._getSubdomain(t),
|
|
5372
5388
|
x: t.x,
|
|
5373
5389
|
y: t.y,
|
|
@@ -5377,10 +5393,10 @@ var ni = { exports: {} };
|
|
|
5377
5393
|
var i = this._globalTileRange.max.y - t.y;
|
|
5378
5394
|
this.options.tms && (e.y = i), e["-y"] = i;
|
|
5379
5395
|
}
|
|
5380
|
-
return G(this._url,
|
|
5396
|
+
return G(this._url, C(e, this.options));
|
|
5381
5397
|
},
|
|
5382
5398
|
_tileOnLoad: function(t, e) {
|
|
5383
|
-
|
|
5399
|
+
b.ielt9 ? setTimeout(a(t, this, null, e), 0) : t(null, e);
|
|
5384
5400
|
},
|
|
5385
5401
|
_tileOnError: function(t, e, i) {
|
|
5386
5402
|
var n = this.options.errorTileUrl;
|
|
@@ -5459,11 +5475,11 @@ var ni = { exports: {} };
|
|
|
5459
5475
|
},
|
|
5460
5476
|
initialize: function(t, e) {
|
|
5461
5477
|
this._url = t;
|
|
5462
|
-
var i =
|
|
5478
|
+
var i = C({}, this.defaultWmsParams);
|
|
5463
5479
|
for (var n in e)
|
|
5464
5480
|
n in this.options || (i[n] = e[n]);
|
|
5465
5481
|
e = w(this, e);
|
|
5466
|
-
var o = e.detectRetina &&
|
|
5482
|
+
var o = e.detectRetina && b.retina ? 2 : 1, r = this.getTileSize();
|
|
5467
5483
|
i.width = r.x * o, i.height = r.y * o, this.wmsParams = i;
|
|
5468
5484
|
},
|
|
5469
5485
|
onAdd: function(t) {
|
|
@@ -5478,13 +5494,13 @@ var ni = { exports: {} };
|
|
|
5478
5494
|
// @method setParams(params: Object, noRedraw?: Boolean): this
|
|
5479
5495
|
// Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true).
|
|
5480
5496
|
setParams: function(t, e) {
|
|
5481
|
-
return
|
|
5497
|
+
return C(this.wmsParams, t), e || this.redraw(), this;
|
|
5482
5498
|
}
|
|
5483
5499
|
});
|
|
5484
|
-
function
|
|
5500
|
+
function Ro(t, e) {
|
|
5485
5501
|
return new on(t, e);
|
|
5486
5502
|
}
|
|
5487
|
-
Rt.WMS = on, nn.wms =
|
|
5503
|
+
Rt.WMS = on, nn.wms = Ro;
|
|
5488
5504
|
var wt = lt.extend({
|
|
5489
5505
|
// @section
|
|
5490
5506
|
// @aka Renderer options
|
|
@@ -5498,7 +5514,7 @@ var ni = { exports: {} };
|
|
|
5498
5514
|
w(this, t), l(this), this._layers = this._layers || {};
|
|
5499
5515
|
},
|
|
5500
5516
|
onAdd: function() {
|
|
5501
|
-
this._container || (this._initContainer(),
|
|
5517
|
+
this._container || (this._initContainer(), I(this._container, "leaflet-zoom-animated")), this.getPane().appendChild(this._container), this._update(), this.on("update", this._updatePaths, this);
|
|
5502
5518
|
},
|
|
5503
5519
|
onRemove: function() {
|
|
5504
5520
|
this.off("update", this._updatePaths, this), this._destroyContainer();
|
|
@@ -5520,7 +5536,7 @@ var ni = { exports: {} };
|
|
|
5520
5536
|
},
|
|
5521
5537
|
_updateTransform: function(t, e) {
|
|
5522
5538
|
var i = this._map.getZoomScale(e, this._zoom), n = this._map.getSize().multiplyBy(0.5 + this.options.padding), o = this._map.project(this._center, e), r = n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t, e));
|
|
5523
|
-
|
|
5539
|
+
b.any3d ? Mt(this._container, r, i) : K(this._container, r);
|
|
5524
5540
|
},
|
|
5525
5541
|
_reset: function() {
|
|
5526
5542
|
this._update(), this._updateTransform(this._center, this._zoom);
|
|
@@ -5559,7 +5575,7 @@ var ni = { exports: {} };
|
|
|
5559
5575
|
},
|
|
5560
5576
|
_initContainer: function() {
|
|
5561
5577
|
var t = this._container = document.createElement("canvas");
|
|
5562
|
-
|
|
5578
|
+
O(t, "mousemove", this._onMouseMove, this), O(t, "click dblclick mousedown mouseup contextmenu", this._onClick, this), O(t, "mouseout", this._handleMouseOut, this), t._leaflet_disable_events = !0, this._ctx = t.getContext("2d");
|
|
5563
5579
|
},
|
|
5564
5580
|
_destroyContainer: function() {
|
|
5565
5581
|
st(this._redrawRequest), delete this._ctx, V(this._container), H(this._container), delete this._container;
|
|
@@ -5576,8 +5592,8 @@ var ni = { exports: {} };
|
|
|
5576
5592
|
_update: function() {
|
|
5577
5593
|
if (!(this._map._animatingZoom && this._bounds)) {
|
|
5578
5594
|
wt.prototype._update.call(this);
|
|
5579
|
-
var t = this._bounds, e = this._container, i = t.getSize(), n =
|
|
5580
|
-
K(e, t.min), e.width = n * i.x, e.height = n * i.y, e.style.width = i.x + "px", e.style.height = i.y + "px",
|
|
5595
|
+
var t = this._bounds, e = this._container, i = t.getSize(), n = b.retina ? 2 : 1;
|
|
5596
|
+
K(e, t.min), e.width = n * i.x, e.height = n * i.y, e.style.width = i.x + "px", e.style.height = i.y + "px", b.retina && this._ctx.scale(2, 2), this._ctx.translate(-t.min.x, -t.min.y), this.fire("update");
|
|
5581
5597
|
}
|
|
5582
5598
|
},
|
|
5583
5599
|
_reset: function() {
|
|
@@ -5692,7 +5708,7 @@ var ni = { exports: {} };
|
|
|
5692
5708
|
if (!this._mouseHoverThrottled) {
|
|
5693
5709
|
for (var i, n, o = this._drawFirst; o; o = o.next)
|
|
5694
5710
|
i = o.layer, i.options.interactive && i._containsPoint(e) && (n = i);
|
|
5695
|
-
n !== this._hoveredLayer && (this._handleMouseOut(t), n && (
|
|
5711
|
+
n !== this._hoveredLayer && (this._handleMouseOut(t), n && (I(this._container, "leaflet-interactive"), this._fireEvent([n], t, "mouseover"), this._hoveredLayer = n)), this._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : !1, t), this._mouseHoverThrottled = !0, setTimeout(a(function() {
|
|
5696
5712
|
this._mouseHoverThrottled = !1;
|
|
5697
5713
|
}, this), 32);
|
|
5698
5714
|
}
|
|
@@ -5724,7 +5740,7 @@ var ni = { exports: {} };
|
|
|
5724
5740
|
}
|
|
5725
5741
|
});
|
|
5726
5742
|
function rn(t) {
|
|
5727
|
-
return
|
|
5743
|
+
return b.canvas ? new sn(t) : null;
|
|
5728
5744
|
}
|
|
5729
5745
|
var ee = function() {
|
|
5730
5746
|
try {
|
|
@@ -5736,7 +5752,7 @@ var ni = { exports: {} };
|
|
|
5736
5752
|
return function(t) {
|
|
5737
5753
|
return document.createElement("<" + t + ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">');
|
|
5738
5754
|
};
|
|
5739
|
-
}(),
|
|
5755
|
+
}(), Do = {
|
|
5740
5756
|
_initContainer: function() {
|
|
5741
5757
|
this._container = R("div", "leaflet-vml-container");
|
|
5742
5758
|
},
|
|
@@ -5745,7 +5761,7 @@ var ni = { exports: {} };
|
|
|
5745
5761
|
},
|
|
5746
5762
|
_initPath: function(t) {
|
|
5747
5763
|
var e = t._container = ee("shape");
|
|
5748
|
-
|
|
5764
|
+
I(e, "leaflet-vml-shape " + (this.options.className || "")), e.coordsize = "1 1", t._path = ee("path"), e.appendChild(t._path), this._updateStyle(t), this._layers[l(t)] = t;
|
|
5749
5765
|
},
|
|
5750
5766
|
_addPath: function(t) {
|
|
5751
5767
|
var e = t._container;
|
|
@@ -5772,7 +5788,7 @@ var ni = { exports: {} };
|
|
|
5772
5788
|
_bringToBack: function(t) {
|
|
5773
5789
|
Et(t._container);
|
|
5774
5790
|
}
|
|
5775
|
-
}, Le =
|
|
5791
|
+
}, Le = b.vml ? ee : ui, ie = wt.extend({
|
|
5776
5792
|
_initContainer: function() {
|
|
5777
5793
|
this._container = Le("svg"), this._container.setAttribute("pointer-events", "none"), this._rootGroup = Le("g"), this._container.appendChild(this._rootGroup);
|
|
5778
5794
|
},
|
|
@@ -5789,7 +5805,7 @@ var ni = { exports: {} };
|
|
|
5789
5805
|
// methods below are called by vector layers implementations
|
|
5790
5806
|
_initPath: function(t) {
|
|
5791
5807
|
var e = t._path = Le("path");
|
|
5792
|
-
t.options.className &&
|
|
5808
|
+
t.options.className && I(e, t.options.className), t.options.interactive && I(e, "leaflet-interactive"), this._updateStyle(t), this._layers[l(t)] = t;
|
|
5793
5809
|
},
|
|
5794
5810
|
_addPath: function(t) {
|
|
5795
5811
|
this._rootGroup || this._initContainer(), this._rootGroup.appendChild(t._path), t.addInteractiveTarget(t._path);
|
|
@@ -5822,9 +5838,9 @@ var ni = { exports: {} };
|
|
|
5822
5838
|
Et(t._path);
|
|
5823
5839
|
}
|
|
5824
5840
|
});
|
|
5825
|
-
|
|
5841
|
+
b.vml && ie.include(Do);
|
|
5826
5842
|
function an(t) {
|
|
5827
|
-
return
|
|
5843
|
+
return b.svg || b.vml ? new ie(t) : null;
|
|
5828
5844
|
}
|
|
5829
5845
|
N.include({
|
|
5830
5846
|
// @namespace Map; @method getRenderer(layer: Path): Renderer
|
|
@@ -5863,7 +5879,7 @@ var ni = { exports: {} };
|
|
|
5863
5879
|
];
|
|
5864
5880
|
}
|
|
5865
5881
|
});
|
|
5866
|
-
function
|
|
5882
|
+
function Fo(t, e) {
|
|
5867
5883
|
return new hn(t, e);
|
|
5868
5884
|
}
|
|
5869
5885
|
ie.create = Le, ie.pointsToPath = li, Lt.geometryToLayer = de, Lt.coordsToLatLng = Qe, Lt.coordsToLatLngs = _e, Lt.latLngToCoords = ti, Lt.latLngsToCoords = pe, Lt.getFeature = Nt, Lt.asFeature = me, N.mergeOptions({
|
|
@@ -5877,7 +5893,7 @@ var ni = { exports: {} };
|
|
|
5877
5893
|
this._map = t, this._container = t._container, this._pane = t._panes.overlayPane, this._resetStateTimeout = 0, t.on("unload", this._destroy, this);
|
|
5878
5894
|
},
|
|
5879
5895
|
addHooks: function() {
|
|
5880
|
-
|
|
5896
|
+
O(this._container, "mousedown", this._onMouseDown, this);
|
|
5881
5897
|
},
|
|
5882
5898
|
removeHooks: function() {
|
|
5883
5899
|
H(this._container, "mousedown", this._onMouseDown, this);
|
|
@@ -5897,21 +5913,21 @@ var ni = { exports: {} };
|
|
|
5897
5913
|
_onMouseDown: function(t) {
|
|
5898
5914
|
if (!t.shiftKey || t.which !== 1 && t.button !== 1)
|
|
5899
5915
|
return !1;
|
|
5900
|
-
this._clearDeferredResetState(), this._resetState(), jt(), Ae(), this._startPoint = this._map.mouseEventToContainerPoint(t),
|
|
5901
|
-
contextmenu:
|
|
5916
|
+
this._clearDeferredResetState(), this._resetState(), jt(), Ae(), this._startPoint = this._map.mouseEventToContainerPoint(t), O(document, {
|
|
5917
|
+
contextmenu: kt,
|
|
5902
5918
|
mousemove: this._onMouseMove,
|
|
5903
5919
|
mouseup: this._onMouseUp,
|
|
5904
5920
|
keydown: this._onKeyDown
|
|
5905
5921
|
}, this);
|
|
5906
5922
|
},
|
|
5907
5923
|
_onMouseMove: function(t) {
|
|
5908
|
-
this._moved || (this._moved = !0, this._box = R("div", "leaflet-zoom-box", this._container),
|
|
5924
|
+
this._moved || (this._moved = !0, this._box = R("div", "leaflet-zoom-box", this._container), I(this._container, "leaflet-crosshair"), this._map.fire("boxzoomstart")), this._point = this._map.mouseEventToContainerPoint(t);
|
|
5909
5925
|
var e = new U(this._point, this._startPoint), i = e.getSize();
|
|
5910
5926
|
K(this._box, e.min), this._box.style.width = i.x + "px", this._box.style.height = i.y + "px";
|
|
5911
5927
|
},
|
|
5912
5928
|
_finish: function() {
|
|
5913
5929
|
this._moved && (V(this._box), q(this._container, "leaflet-crosshair")), Kt(), Ne(), H(document, {
|
|
5914
|
-
contextmenu:
|
|
5930
|
+
contextmenu: kt,
|
|
5915
5931
|
mousemove: this._onMouseMove,
|
|
5916
5932
|
mouseup: this._onMouseUp,
|
|
5917
5933
|
keydown: this._onKeyDown
|
|
@@ -5990,13 +6006,13 @@ var ni = { exports: {} };
|
|
|
5990
6006
|
addHooks: function() {
|
|
5991
6007
|
if (!this._draggable) {
|
|
5992
6008
|
var t = this._map;
|
|
5993
|
-
this._draggable = new
|
|
6009
|
+
this._draggable = new Ct(t._mapPane, t._container), this._draggable.on({
|
|
5994
6010
|
dragstart: this._onDragStart,
|
|
5995
6011
|
drag: this._onDrag,
|
|
5996
6012
|
dragend: this._onDragEnd
|
|
5997
6013
|
}, this), this._draggable.on("predrag", this._onPreDragLimit, this), t.options.worldCopyJump && (this._draggable.on("predrag", this._onPreDragWrap, this), t.on("zoomend", this._onZoomEnd, this), t.whenReady(this._onZoomEnd, this));
|
|
5998
6014
|
}
|
|
5999
|
-
|
|
6015
|
+
I(this._map._container, "leaflet-grab leaflet-touch-drag"), this._draggable.enable(), this._positions = [], this._times = [];
|
|
6000
6016
|
},
|
|
6001
6017
|
removeHooks: function() {
|
|
6002
6018
|
q(this._map._container, "leaflet-grab"), q(this._map._container, "leaflet-touch-drag"), this._draggable.disable();
|
|
@@ -6053,10 +6069,10 @@ var ni = { exports: {} };
|
|
|
6053
6069
|
e.fire("moveend");
|
|
6054
6070
|
else {
|
|
6055
6071
|
this._prunePositions(+/* @__PURE__ */ new Date());
|
|
6056
|
-
var o = this._lastPos.subtract(this._positions[0]), r = (this._lastTime - this._times[0]) / 1e3, u = i.easeLinearity, c = o.multiplyBy(u / r), _ = c.distanceTo([0, 0]), y = Math.min(i.inertiaMaxSpeed, _), x = c.multiplyBy(y / _),
|
|
6057
|
-
!
|
|
6058
|
-
e.panBy(
|
|
6059
|
-
duration:
|
|
6072
|
+
var o = this._lastPos.subtract(this._positions[0]), r = (this._lastTime - this._times[0]) / 1e3, u = i.easeLinearity, c = o.multiplyBy(u / r), _ = c.distanceTo([0, 0]), y = Math.min(i.inertiaMaxSpeed, _), x = c.multiplyBy(y / _), M = y / (i.inertiaDeceleration * u), B = x.multiplyBy(-M / 2).round();
|
|
6073
|
+
!B.x && !B.y ? e.fire("moveend") : (B = e._limitOffset(B, e.options.maxBounds), Q(function() {
|
|
6074
|
+
e.panBy(B, {
|
|
6075
|
+
duration: M,
|
|
6060
6076
|
easeLinearity: u,
|
|
6061
6077
|
noMoveStart: !0,
|
|
6062
6078
|
animate: !0
|
|
@@ -6088,7 +6104,7 @@ var ni = { exports: {} };
|
|
|
6088
6104
|
},
|
|
6089
6105
|
addHooks: function() {
|
|
6090
6106
|
var t = this._map._container;
|
|
6091
|
-
t.tabIndex <= 0 && (t.tabIndex = "0"),
|
|
6107
|
+
t.tabIndex <= 0 && (t.tabIndex = "0"), O(t, {
|
|
6092
6108
|
focus: this._onFocus,
|
|
6093
6109
|
blur: this._onBlur,
|
|
6094
6110
|
mousedown: this._onMouseDown
|
|
@@ -6138,7 +6154,7 @@ var ni = { exports: {} };
|
|
|
6138
6154
|
e[i.zoomOut[n]] = -t;
|
|
6139
6155
|
},
|
|
6140
6156
|
_addHooks: function() {
|
|
6141
|
-
|
|
6157
|
+
O(document, "keydown", this._onKeyDown, this);
|
|
6142
6158
|
},
|
|
6143
6159
|
_removeHooks: function() {
|
|
6144
6160
|
H(document, "keydown", this._onKeyDown, this);
|
|
@@ -6148,7 +6164,7 @@ var ni = { exports: {} };
|
|
|
6148
6164
|
var e = t.keyCode, i = this._map, n;
|
|
6149
6165
|
if (e in this._panKeys) {
|
|
6150
6166
|
if (!i._panAnim || !i._panAnim._inProgress)
|
|
6151
|
-
if (n = this._panKeys[e], t.shiftKey && (n =
|
|
6167
|
+
if (n = this._panKeys[e], t.shiftKey && (n = k(n).multiplyBy(3)), i.options.maxBounds && (n = i._limitOffset(k(n), i.options.maxBounds)), i.options.worldCopyJump) {
|
|
6152
6168
|
var o = i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(n)));
|
|
6153
6169
|
i.panTo(o);
|
|
6154
6170
|
} else
|
|
@@ -6159,7 +6175,7 @@ var ni = { exports: {} };
|
|
|
6159
6175
|
i.closePopup();
|
|
6160
6176
|
else
|
|
6161
6177
|
return;
|
|
6162
|
-
|
|
6178
|
+
kt(t);
|
|
6163
6179
|
}
|
|
6164
6180
|
}
|
|
6165
6181
|
});
|
|
@@ -6181,7 +6197,7 @@ var ni = { exports: {} };
|
|
|
6181
6197
|
});
|
|
6182
6198
|
var dn = dt.extend({
|
|
6183
6199
|
addHooks: function() {
|
|
6184
|
-
|
|
6200
|
+
O(this._map._container, "wheel", this._onWheelScroll, this), this._delta = 0;
|
|
6185
6201
|
},
|
|
6186
6202
|
removeHooks: function() {
|
|
6187
6203
|
H(this._map._container, "wheel", this._onWheelScroll, this);
|
|
@@ -6190,7 +6206,7 @@ var ni = { exports: {} };
|
|
|
6190
6206
|
var e = Ai(t), i = this._map.options.wheelDebounceTime;
|
|
6191
6207
|
this._delta += e, this._lastMousePos = this._map.mouseEventToContainerPoint(t), this._startTime || (this._startTime = +/* @__PURE__ */ new Date());
|
|
6192
6208
|
var n = Math.max(i - (+/* @__PURE__ */ new Date() - this._startTime), 0);
|
|
6193
|
-
clearTimeout(this._timer), this._timer = setTimeout(a(this._performZoom, this), n),
|
|
6209
|
+
clearTimeout(this._timer), this._timer = setTimeout(a(this._performZoom, this), n), kt(t);
|
|
6194
6210
|
},
|
|
6195
6211
|
_performZoom: function() {
|
|
6196
6212
|
var t = this._map, e = t.getZoom(), i = this._map.options.zoomSnap || 0;
|
|
@@ -6200,12 +6216,12 @@ var ni = { exports: {} };
|
|
|
6200
6216
|
}
|
|
6201
6217
|
});
|
|
6202
6218
|
N.addInitHook("addHandler", "scrollWheelZoom", dn);
|
|
6203
|
-
var
|
|
6219
|
+
var Ho = 600;
|
|
6204
6220
|
N.mergeOptions({
|
|
6205
6221
|
// @section Touch interaction options
|
|
6206
6222
|
// @option tapHold: Boolean
|
|
6207
6223
|
// Enables simulation of `contextmenu` event, default is `true` for mobile Safari.
|
|
6208
|
-
tapHold:
|
|
6224
|
+
tapHold: b.touchNative && b.safari && b.mobile,
|
|
6209
6225
|
// @option tapTolerance: Number = 15
|
|
6210
6226
|
// The max number of pixels a user can shift his finger during touch
|
|
6211
6227
|
// for it to be considered a valid tap.
|
|
@@ -6213,7 +6229,7 @@ var ni = { exports: {} };
|
|
|
6213
6229
|
});
|
|
6214
6230
|
var _n = dt.extend({
|
|
6215
6231
|
addHooks: function() {
|
|
6216
|
-
|
|
6232
|
+
O(this._map._container, "touchstart", this._onDown, this);
|
|
6217
6233
|
},
|
|
6218
6234
|
removeHooks: function() {
|
|
6219
6235
|
H(this._map._container, "touchstart", this._onDown, this);
|
|
@@ -6221,9 +6237,9 @@ var ni = { exports: {} };
|
|
|
6221
6237
|
_onDown: function(t) {
|
|
6222
6238
|
if (clearTimeout(this._holdTimeout), t.touches.length === 1) {
|
|
6223
6239
|
var e = t.touches[0];
|
|
6224
|
-
this._startPos = this._newPos = new
|
|
6225
|
-
this._cancel(), this._isTapValid() && (
|
|
6226
|
-
}, this),
|
|
6240
|
+
this._startPos = this._newPos = new z(e.clientX, e.clientY), this._holdTimeout = setTimeout(a(function() {
|
|
6241
|
+
this._cancel(), this._isTapValid() && (O(document, "touchend", J), O(document, "touchend touchcancel", this._cancelClickPrevent), this._simulateEvent("contextmenu", e));
|
|
6242
|
+
}, this), Ho), O(document, "touchend touchcancel contextmenu", this._cancel, this), O(document, "touchmove", this._onMove, this);
|
|
6227
6243
|
}
|
|
6228
6244
|
},
|
|
6229
6245
|
_cancelClickPrevent: function t() {
|
|
@@ -6234,7 +6250,7 @@ var ni = { exports: {} };
|
|
|
6234
6250
|
},
|
|
6235
6251
|
_onMove: function(t) {
|
|
6236
6252
|
var e = t.touches[0];
|
|
6237
|
-
this._newPos = new
|
|
6253
|
+
this._newPos = new z(e.clientX, e.clientY);
|
|
6238
6254
|
},
|
|
6239
6255
|
_isTapValid: function() {
|
|
6240
6256
|
return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;
|
|
@@ -6262,7 +6278,7 @@ var ni = { exports: {} };
|
|
|
6262
6278
|
// passed `'center'`, it will zoom to the center of the view regardless of
|
|
6263
6279
|
// where the touch events (fingers) were. Enabled for touch-capable web
|
|
6264
6280
|
// browsers.
|
|
6265
|
-
touchZoom:
|
|
6281
|
+
touchZoom: b.touch,
|
|
6266
6282
|
// @option bounceAtZoomLimits: Boolean = true
|
|
6267
6283
|
// Set it to false if you don't want the map to zoom beyond min/max zoom
|
|
6268
6284
|
// and then bounce back when pinch-zooming.
|
|
@@ -6270,7 +6286,7 @@ var ni = { exports: {} };
|
|
|
6270
6286
|
});
|
|
6271
6287
|
var pn = dt.extend({
|
|
6272
6288
|
addHooks: function() {
|
|
6273
|
-
|
|
6289
|
+
I(this._map._container, "leaflet-touch-zoom"), O(this._map._container, "touchstart", this._onTouchStart, this);
|
|
6274
6290
|
},
|
|
6275
6291
|
removeHooks: function() {
|
|
6276
6292
|
q(this._map._container, "leaflet-touch-zoom"), H(this._map._container, "touchstart", this._onTouchStart, this);
|
|
@@ -6279,7 +6295,7 @@ var ni = { exports: {} };
|
|
|
6279
6295
|
var e = this._map;
|
|
6280
6296
|
if (!(!t.touches || t.touches.length !== 2 || e._animatingZoom || this._zooming)) {
|
|
6281
6297
|
var i = e.mouseEventToContainerPoint(t.touches[0]), n = e.mouseEventToContainerPoint(t.touches[1]);
|
|
6282
|
-
this._centerPoint = e.getSize()._divideBy(2), this._startLatLng = e.containerPointToLatLng(this._centerPoint), e.options.touchZoom !== "center" && (this._pinchStartLatLng = e.containerPointToLatLng(i.add(n)._divideBy(2))), this._startDist = i.distanceTo(n), this._startZoom = e.getZoom(), this._moved = !1, this._zooming = !0, e._stop(),
|
|
6298
|
+
this._centerPoint = e.getSize()._divideBy(2), this._startLatLng = e.containerPointToLatLng(this._centerPoint), e.options.touchZoom !== "center" && (this._pinchStartLatLng = e.containerPointToLatLng(i.add(n)._divideBy(2))), this._startDist = i.distanceTo(n), this._startZoom = e.getZoom(), this._moved = !1, this._zooming = !0, e._stop(), O(document, "touchmove", this._onTouchMove, this), O(document, "touchend touchcancel", this._onTouchEnd, this), J(t);
|
|
6283
6299
|
}
|
|
6284
6300
|
},
|
|
6285
6301
|
_onTouchMove: function(t) {
|
|
@@ -6307,40 +6323,43 @@ var ni = { exports: {} };
|
|
|
6307
6323
|
this._zooming = !1, st(this._animRequest), H(document, "touchmove", this._onTouchMove, this), H(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));
|
|
6308
6324
|
}
|
|
6309
6325
|
});
|
|
6310
|
-
N.addInitHook("addHandler", "touchZoom", pn), N.BoxZoom = un, N.DoubleClickZoom = ln, N.Drag = cn, N.Keyboard = fn, N.ScrollWheelZoom = dn, N.TapHold = _n, N.TouchZoom = pn, p.Bounds = U, p.Browser =
|
|
6311
|
-
var
|
|
6326
|
+
N.addInitHook("addHandler", "touchZoom", pn), N.BoxZoom = un, N.DoubleClickZoom = ln, N.Drag = cn, N.Keyboard = fn, N.ScrollWheelZoom = dn, N.TapHold = _n, N.TouchZoom = pn, p.Bounds = U, p.Browser = b, p.CRS = gt, p.Canvas = sn, p.Circle = $e, p.CircleMarker = fe, p.Class = mt, p.Control = ut, p.DivIcon = en, p.DivOverlay = _t, p.DomEvent = oo, p.DomUtil = io, p.Draggable = Ct, p.Evented = Gt, p.FeatureGroup = vt, p.GeoJSON = Lt, p.GridLayer = te, p.Handler = dt, p.Icon = Bt, p.ImageOverlay = ge, p.LatLng = D, p.LatLngBounds = et, p.Layer = lt, p.LayerGroup = It, p.LineUtil = vo, p.Map = N, p.Marker = ce, p.Mixin = co, p.Path = bt, p.Point = z, p.PolyUtil = fo, p.Polygon = At, p.Polyline = yt, p.Popup = ve, p.PosAnimation = Ni, p.Projection = yo, p.Rectangle = hn, p.Renderer = wt, p.SVG = ie, p.SVGOverlay = tn, p.TileLayer = Rt, p.Tooltip = ye, p.Transformation = Ce, p.Util = Cn, p.VideoOverlay = Qi, p.bind = a, p.bounds = tt, p.canvas = rn, p.circle = To, p.circleMarker = Mo, p.control = Jt, p.divIcon = Ao, p.extend = C, p.featureGroup = Po, p.geoJSON = $i, p.geoJson = zo, p.gridLayer = No, p.icon = Co, p.imageOverlay = Oo, p.latLng = A, p.latLngBounds = j, p.layerGroup = xo, p.map = so, p.marker = bo, p.point = k, p.polygon = ko, p.polyline = So, p.popup = Io, p.rectangle = Fo, p.setOptions = w, p.stamp = l, p.svg = an, p.svgOverlay = Eo, p.tileLayer = nn, p.tooltip = Bo, p.transformation = Wt, p.version = S, p.videoOverlay = Zo;
|
|
6327
|
+
var Go = window.L;
|
|
6312
6328
|
p.noConflict = function() {
|
|
6313
|
-
return window.L =
|
|
6329
|
+
return window.L = Go, this;
|
|
6314
6330
|
}, window.L = p;
|
|
6315
6331
|
});
|
|
6316
6332
|
})(ni, ni.exports);
|
|
6317
|
-
var
|
|
6318
|
-
const
|
|
6333
|
+
var xn = ni.exports;
|
|
6334
|
+
const xt = /* @__PURE__ */ $o(xn), cs = /* @__PURE__ */ Jo({
|
|
6335
|
+
__proto__: null,
|
|
6336
|
+
default: xt
|
|
6337
|
+
}, [xn]), Ft = {
|
|
6319
6338
|
mapType: "GaoDe"
|
|
6320
6339
|
};
|
|
6321
|
-
function
|
|
6322
|
-
const
|
|
6323
|
-
Object.keys(
|
|
6324
|
-
const
|
|
6325
|
-
|
|
6326
|
-
}),
|
|
6327
|
-
|
|
6328
|
-
|
|
6340
|
+
function Qo(Z) {
|
|
6341
|
+
const T = [];
|
|
6342
|
+
Object.keys(Z).forEach((p) => {
|
|
6343
|
+
const S = Ft[p], C = Z[p];
|
|
6344
|
+
S != C && C && (Ft[p] = C, T.push(p));
|
|
6345
|
+
}), T.forEach((p) => {
|
|
6346
|
+
Pn.filter((S) => S.itemType == p).forEach((S) => {
|
|
6347
|
+
S.handle(Ft[p], Ft, p);
|
|
6329
6348
|
});
|
|
6330
6349
|
});
|
|
6331
6350
|
}
|
|
6332
|
-
const
|
|
6333
|
-
function
|
|
6351
|
+
const Pn = [];
|
|
6352
|
+
function ts(Z, T) {
|
|
6334
6353
|
const p = {
|
|
6335
|
-
itemType:
|
|
6336
|
-
handle:
|
|
6354
|
+
itemType: Z,
|
|
6355
|
+
handle: T
|
|
6337
6356
|
};
|
|
6338
|
-
|
|
6357
|
+
Pn.push(p);
|
|
6339
6358
|
}
|
|
6340
|
-
function
|
|
6341
|
-
return [Ft[
|
|
6359
|
+
function es(Z) {
|
|
6360
|
+
return [Ft[Z], Ft];
|
|
6342
6361
|
}
|
|
6343
|
-
const
|
|
6362
|
+
const is = {
|
|
6344
6363
|
GaoDe: {
|
|
6345
6364
|
Normal: {
|
|
6346
6365
|
Map: "//webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"
|
|
@@ -6443,43 +6462,43 @@ const es = {
|
|
|
6443
6462
|
Subdomains: []
|
|
6444
6463
|
}
|
|
6445
6464
|
};
|
|
6446
|
-
function
|
|
6447
|
-
const
|
|
6448
|
-
`${
|
|
6465
|
+
function ns(Z, T, p) {
|
|
6466
|
+
const S = is[Z], C = S[T].Map, s = xt.tileLayer(
|
|
6467
|
+
`${C.startsWith("http") ? C : "https:" + C}`,
|
|
6449
6468
|
{
|
|
6450
|
-
subdomains:
|
|
6451
|
-
attribution: `${
|
|
6469
|
+
subdomains: S.Subdomains,
|
|
6470
|
+
attribution: `${Z} ${T}`
|
|
6452
6471
|
}
|
|
6453
6472
|
);
|
|
6454
6473
|
return s.addTo(p), s;
|
|
6455
6474
|
}
|
|
6456
|
-
function
|
|
6457
|
-
const [
|
|
6458
|
-
let p =
|
|
6459
|
-
|
|
6460
|
-
p.remove(), p =
|
|
6475
|
+
function os(Z) {
|
|
6476
|
+
const [T] = es("mapType");
|
|
6477
|
+
let p = Z({ mapType: T });
|
|
6478
|
+
ts("mapType", (S) => {
|
|
6479
|
+
p.remove(), p = Z({ mapType: S });
|
|
6461
6480
|
});
|
|
6462
6481
|
}
|
|
6463
|
-
function
|
|
6464
|
-
|
|
6465
|
-
var
|
|
6466
|
-
return (
|
|
6482
|
+
function ss(Z, T, p) {
|
|
6483
|
+
os(({ mapType: S }) => {
|
|
6484
|
+
var C;
|
|
6485
|
+
return (C = p.rightBottomTextHandle) == null || C.setText(`${S}`), ns(S, Z, T);
|
|
6467
6486
|
});
|
|
6468
6487
|
}
|
|
6469
|
-
function
|
|
6470
|
-
const
|
|
6471
|
-
return
|
|
6488
|
+
function rs(Z) {
|
|
6489
|
+
const T = xt.DomUtil.create("span", "", Z.getContainer());
|
|
6490
|
+
return T.style.position = "absolute", T.style.bottom = "2px", T.style.left = "5px", T.innerText = "", T.style.zIndex = "600", {
|
|
6472
6491
|
setText(p) {
|
|
6473
|
-
|
|
6492
|
+
T.innerText = p;
|
|
6474
6493
|
}
|
|
6475
6494
|
};
|
|
6476
6495
|
}
|
|
6477
6496
|
var yn = { exports: {} };
|
|
6478
|
-
(function(
|
|
6479
|
-
(function(p,
|
|
6480
|
-
|
|
6497
|
+
(function(Z, T) {
|
|
6498
|
+
(function(p, S) {
|
|
6499
|
+
S(T);
|
|
6481
6500
|
})(wn, function(p) {
|
|
6482
|
-
var
|
|
6501
|
+
var S = L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|
6483
6502
|
options: {
|
|
6484
6503
|
maxClusterRadius: 80,
|
|
6485
6504
|
//A cluster will cover at most this many pixels from its center
|
|
@@ -6552,7 +6571,7 @@ var yn = { exports: {} };
|
|
|
6552
6571
|
return this.addLayer(s);
|
|
6553
6572
|
var h = this._featureGroup, l = this._nonPointGroup, d = this.options.chunkedLoading, m = this.options.chunkInterval, f = this.options.chunkProgress, v = s.length, g = 0, P = !0, w;
|
|
6554
6573
|
if (this._map) {
|
|
6555
|
-
var F = (/* @__PURE__ */ new Date()).getTime(),
|
|
6574
|
+
var F = (/* @__PURE__ */ new Date()).getTime(), E = L.bind(function() {
|
|
6556
6575
|
var W = (/* @__PURE__ */ new Date()).getTime();
|
|
6557
6576
|
for (this._map && this._unspiderfy && this._unspiderfy(); g < v; g++) {
|
|
6558
6577
|
if (d && g % 200 === 0) {
|
|
@@ -6573,9 +6592,9 @@ var yn = { exports: {} };
|
|
|
6573
6592
|
h.removeLayer(Ht);
|
|
6574
6593
|
}
|
|
6575
6594
|
}
|
|
6576
|
-
f && f(g, v, (/* @__PURE__ */ new Date()).getTime() - F), g === v ? (this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons(), this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds)) : setTimeout(
|
|
6595
|
+
f && f(g, v, (/* @__PURE__ */ new Date()).getTime() - F), g === v ? (this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons(), this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds)) : setTimeout(E, this.options.chunkDelay);
|
|
6577
6596
|
}, this);
|
|
6578
|
-
|
|
6597
|
+
E();
|
|
6579
6598
|
} else
|
|
6580
6599
|
for (var G = this._needsClustering; g < v; g++) {
|
|
6581
6600
|
if (w = s[g], w instanceof L.LayerGroup) {
|
|
@@ -7014,7 +7033,7 @@ var yn = { exports: {} };
|
|
|
7014
7033
|
}), L.markerClusterGroup = function(s) {
|
|
7015
7034
|
return new L.MarkerClusterGroup(s);
|
|
7016
7035
|
};
|
|
7017
|
-
var
|
|
7036
|
+
var C = L.MarkerCluster = L.Marker.extend({
|
|
7018
7037
|
options: L.Icon.prototype.options,
|
|
7019
7038
|
initialize: function(s, a, h, l) {
|
|
7020
7039
|
L.Marker.prototype.initialize.call(
|
|
@@ -7229,13 +7248,13 @@ var yn = { exports: {} };
|
|
|
7229
7248
|
}
|
|
7230
7249
|
},
|
|
7231
7250
|
getNearObject: function(s) {
|
|
7232
|
-
var a = this._getCoord(s.x), h = this._getCoord(s.y), l, d, m, f, v, g, P, w, F = this._objectPoint,
|
|
7251
|
+
var a = this._getCoord(s.x), h = this._getCoord(s.y), l, d, m, f, v, g, P, w, F = this._objectPoint, E = this._sqCellSize, G = null;
|
|
7233
7252
|
for (l = h - 1; l <= h + 1; l++)
|
|
7234
7253
|
if (f = this._grid[l], f) {
|
|
7235
7254
|
for (d = a - 1; d <= a + 1; d++)
|
|
7236
7255
|
if (v = f[d], v)
|
|
7237
7256
|
for (m = 0, g = v.length; m < g; m++)
|
|
7238
|
-
P = v[m], w = this._sqDist(F[L.Util.stamp(P)], s), (w <
|
|
7257
|
+
P = v[m], w = this._sqDist(F[L.Util.stamp(P)], s), (w < E || w <= E && G === null) && (E = w, G = P);
|
|
7239
7258
|
}
|
|
7240
7259
|
return G;
|
|
7241
7260
|
},
|
|
@@ -7302,8 +7321,8 @@ var yn = { exports: {} };
|
|
|
7302
7321
|
getConvexHull: function(s) {
|
|
7303
7322
|
var a = !1, h = !1, l = !1, d = !1, m = null, f = null, v = null, g = null, P = null, w = null, F;
|
|
7304
7323
|
for (F = s.length - 1; F >= 0; F--) {
|
|
7305
|
-
var
|
|
7306
|
-
(a === !1 ||
|
|
7324
|
+
var E = s[F];
|
|
7325
|
+
(a === !1 || E.lat > a) && (m = E, a = E.lat), (h === !1 || E.lat < h) && (f = E, h = E.lat), (l === !1 || E.lng > l) && (v = E, l = E.lng), (d === !1 || E.lng < d) && (g = E, d = E.lng);
|
|
7307
7326
|
}
|
|
7308
7327
|
h !== a ? (w = f, P = m) : (w = g, P = v);
|
|
7309
7328
|
var G = [].concat(
|
|
@@ -7377,11 +7396,11 @@ var yn = { exports: {} };
|
|
|
7377
7396
|
}
|
|
7378
7397
|
}), L.MarkerCluster.include({
|
|
7379
7398
|
_animationSpiderfy: function(s, a) {
|
|
7380
|
-
var h = this, l = this._group, d = l._map, m = l._featureGroup, f = this._latlng, v = d.latLngToLayerPoint(f), g = L.Path.SVG, P = L.extend({}, this._group.options.spiderLegPolylineOptions), w = P.opacity, F,
|
|
7399
|
+
var h = this, l = this._group, d = l._map, m = l._featureGroup, f = this._latlng, v = d.latLngToLayerPoint(f), g = L.Path.SVG, P = L.extend({}, this._group.options.spiderLegPolylineOptions), w = P.opacity, F, E, G, W, pt, nt;
|
|
7381
7400
|
for (w === void 0 && (w = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity), g ? (P.opacity = 0, P.className = (P.className || "") + " leaflet-cluster-spider-leg") : P.opacity = w, l._ignoreMove = !0, F = 0; F < s.length; F++)
|
|
7382
|
-
|
|
7401
|
+
E = s[F], nt = d.layerPointToLatLng(a[F]), G = new L.Polyline([f, nt], P), d.addLayer(G), E._spiderLeg = G, g && (W = G._path, pt = W.getTotalLength() + 0.1, W.style.strokeDasharray = pt, W.style.strokeDashoffset = pt), E.setZIndexOffset && E.setZIndexOffset(1e6), E.clusterHide && E.clusterHide(), m.addLayer(E), E._setPos && E._setPos(v);
|
|
7383
7402
|
for (l._forceLayout(), l._animationStart(), F = s.length - 1; F >= 0; F--)
|
|
7384
|
-
nt = d.layerPointToLatLng(a[F]),
|
|
7403
|
+
nt = d.layerPointToLatLng(a[F]), E = s[F], E._preSpiderfyLatlng = E._latlng, E.setLatLng(nt), E.clusterShow && E.clusterShow(), g && (G = E._spiderLeg, W = G._path, W.style.strokeDashoffset = 0, G.setStyle({ opacity: w }));
|
|
7385
7404
|
this.setOpacity(0.3), l._ignoreMove = !1, setTimeout(function() {
|
|
7386
7405
|
l._animationEnd(), l.fire("spiderfied", {
|
|
7387
7406
|
cluster: h,
|
|
@@ -7390,9 +7409,9 @@ var yn = { exports: {} };
|
|
|
7390
7409
|
}, 200);
|
|
7391
7410
|
},
|
|
7392
7411
|
_animationUnspiderfy: function(s) {
|
|
7393
|
-
var a = this, h = this._group, l = h._map, d = h._featureGroup, m = s ? l._latLngToNewLayerPoint(this._latlng, s.zoom, s.center) : l.latLngToLayerPoint(this._latlng), f = this.getAllChildMarkers(null, !0), v = L.Path.SVG, g, P, w, F,
|
|
7412
|
+
var a = this, h = this._group, l = h._map, d = h._featureGroup, m = s ? l._latLngToNewLayerPoint(this._latlng, s.zoom, s.center) : l.latLngToLayerPoint(this._latlng), f = this.getAllChildMarkers(null, !0), v = L.Path.SVG, g, P, w, F, E, G;
|
|
7394
7413
|
for (h._ignoreMove = !0, h._animationStart(), this.setOpacity(1), P = f.length - 1; P >= 0; P--)
|
|
7395
|
-
g = f[P], g._preSpiderfyLatlng && (g.closePopup(), g.setLatLng(g._preSpiderfyLatlng), delete g._preSpiderfyLatlng, G = !0, g._setPos && (g._setPos(m), G = !1), g.clusterHide && (g.clusterHide(), G = !1), G && d.removeLayer(g), v && (w = g._spiderLeg, F = w._path,
|
|
7414
|
+
g = f[P], g._preSpiderfyLatlng && (g.closePopup(), g.setLatLng(g._preSpiderfyLatlng), delete g._preSpiderfyLatlng, G = !0, g._setPos && (g._setPos(m), G = !1), g.clusterHide && (g.clusterHide(), G = !1), G && d.removeLayer(g), v && (w = g._spiderLeg, F = w._path, E = F.getTotalLength() + 0.1, F.style.strokeDashoffset = E, w.setStyle({ opacity: 0 })));
|
|
7396
7415
|
h._ignoreMove = !1, setTimeout(function() {
|
|
7397
7416
|
var W = 0;
|
|
7398
7417
|
for (P = f.length - 1; P >= 0; P--)
|
|
@@ -7484,101 +7503,106 @@ var yn = { exports: {} };
|
|
|
7484
7503
|
var h = this.options.icon;
|
|
7485
7504
|
return L.setOptions(h, s), this.setIcon(h), a && this.__parent && this.__parent._group.refreshClusters(this), this;
|
|
7486
7505
|
}
|
|
7487
|
-
}), p.MarkerClusterGroup =
|
|
7506
|
+
}), p.MarkerClusterGroup = S, p.MarkerCluster = C, Object.defineProperty(p, "__esModule", { value: !0 });
|
|
7488
7507
|
});
|
|
7489
7508
|
})(yn, yn.exports);
|
|
7490
|
-
function
|
|
7491
|
-
const p =
|
|
7492
|
-
userdata:
|
|
7509
|
+
function as(Z, T) {
|
|
7510
|
+
const p = xt.marker(Z), S = {
|
|
7511
|
+
userdata: T
|
|
7493
7512
|
};
|
|
7494
|
-
return p.feature =
|
|
7513
|
+
return p.feature = xt.GeoJSON.asFeature({
|
|
7495
7514
|
type: "Feature",
|
|
7496
|
-
properties:
|
|
7497
|
-
}), p.GetUserData = () =>
|
|
7515
|
+
properties: S
|
|
7516
|
+
}), p.GetUserData = () => T, p;
|
|
7498
7517
|
}
|
|
7499
|
-
function Ln(
|
|
7500
|
-
return
|
|
7518
|
+
function Ln(Z) {
|
|
7519
|
+
return Z.GetUserData();
|
|
7501
7520
|
}
|
|
7502
|
-
const
|
|
7521
|
+
const hs = new xt.LatLngBounds(
|
|
7503
7522
|
[31.943814, 117.081204],
|
|
7504
7523
|
[31.697503, 117.455191]
|
|
7505
7524
|
);
|
|
7506
|
-
class
|
|
7507
|
-
constructor(
|
|
7508
|
-
this.renderOptions = p, this.map =
|
|
7525
|
+
class us {
|
|
7526
|
+
constructor(T, p) {
|
|
7527
|
+
this.renderOptions = p, this.map = T, this.markers = xt.markerClusterGroup({
|
|
7509
7528
|
animate: !1,
|
|
7510
7529
|
chunkedLoading: !0,
|
|
7511
7530
|
zoomToBoundsOnClick: !1,
|
|
7512
7531
|
// maxClusterRadius: 150,
|
|
7513
7532
|
showCoverageOnHover: !1,
|
|
7514
|
-
iconCreateFunction: p != null && p.rendeCluster ? (
|
|
7515
|
-
}), this.markers.addTo(
|
|
7516
|
-
var
|
|
7517
|
-
if ((
|
|
7518
|
-
const h =
|
|
7533
|
+
iconCreateFunction: p != null && p.rendeCluster ? (S) => this.iconCreateFunction(S) : void 0
|
|
7534
|
+
}), this.markers.addTo(T), this.markers.on("clusterclick", (S) => {
|
|
7535
|
+
var C, s, a;
|
|
7536
|
+
if ((C = this.renderOptions) != null && C.onClusterClick) {
|
|
7537
|
+
const h = S.propagatedFrom, l = h.getAllChildMarkers().map((d) => Ln(d));
|
|
7519
7538
|
(a = (s = this.renderOptions) == null ? void 0 : s.onClusterClick) == null || a.call(s, l, h, this.map);
|
|
7520
7539
|
}
|
|
7521
7540
|
}), this.test(), this.map.fitBounds(this.markers.getBounds());
|
|
7522
7541
|
}
|
|
7523
|
-
iconCreateFunction(
|
|
7524
|
-
var
|
|
7525
|
-
const p = (
|
|
7542
|
+
iconCreateFunction(T) {
|
|
7543
|
+
var S;
|
|
7544
|
+
const p = (S = this.renderOptions) == null ? void 0 : S.rendeCluster;
|
|
7526
7545
|
if (p) {
|
|
7527
|
-
const
|
|
7528
|
-
return p(
|
|
7546
|
+
const C = T.getAllChildMarkers().map((s) => Ln(s));
|
|
7547
|
+
return p(C, this.map, T);
|
|
7529
7548
|
}
|
|
7530
7549
|
throw "icon need";
|
|
7531
7550
|
}
|
|
7532
|
-
addMarkers(
|
|
7551
|
+
addMarkers(T) {
|
|
7533
7552
|
const p = [];
|
|
7534
|
-
for (let
|
|
7535
|
-
const
|
|
7553
|
+
for (let S = 0; S < T.length; S++) {
|
|
7554
|
+
const C = T[S], s = as(C.latlng, C.userdata);
|
|
7536
7555
|
p.push(s);
|
|
7537
7556
|
}
|
|
7538
7557
|
return this.markers.addLayers(p), p;
|
|
7539
7558
|
}
|
|
7540
7559
|
test() {
|
|
7541
|
-
function
|
|
7542
|
-
var s =
|
|
7543
|
-
return new
|
|
7560
|
+
function T() {
|
|
7561
|
+
var s = hs, a = s.getSouthWest(), h = s.getNorthEast(), l = h.lng - a.lng, d = h.lat - a.lat;
|
|
7562
|
+
return new xt.LatLng(
|
|
7544
7563
|
a.lat + d * Math.random(),
|
|
7545
7564
|
a.lng + l * Math.random()
|
|
7546
7565
|
);
|
|
7547
7566
|
}
|
|
7548
7567
|
const p = 5192;
|
|
7549
7568
|
this.markers;
|
|
7550
|
-
const
|
|
7569
|
+
const S = Array.from({ length: p }).map(() => ({ latlng: T(), userdata: {} })), C = this.addMarkers(S);
|
|
7551
7570
|
setInterval(() => {
|
|
7552
7571
|
Array.from({ length: Math.floor(Math.random() * 0) }).forEach((s) => {
|
|
7553
7572
|
const a = Math.floor(Math.random() * p);
|
|
7554
|
-
|
|
7573
|
+
C[a].setLatLng(T());
|
|
7555
7574
|
});
|
|
7556
7575
|
}, 1e3);
|
|
7557
7576
|
}
|
|
7558
7577
|
}
|
|
7559
|
-
function
|
|
7560
|
-
|
|
7561
|
-
mapType:
|
|
7578
|
+
function ls(Z) {
|
|
7579
|
+
Qo({
|
|
7580
|
+
mapType: Z.mapType
|
|
7562
7581
|
});
|
|
7563
7582
|
}
|
|
7564
|
-
function
|
|
7565
|
-
const
|
|
7583
|
+
function fs(Z) {
|
|
7584
|
+
const T = xt.map(Z.container, {
|
|
7566
7585
|
attributionControl: !1,
|
|
7567
7586
|
//zoomControl: false,
|
|
7568
7587
|
preferCanvas: !0,
|
|
7569
7588
|
maxZoom: 18,
|
|
7570
7589
|
minZoom: 3,
|
|
7571
7590
|
center: [51.505, -0.09],
|
|
7572
|
-
zoom: 5
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7591
|
+
zoom: 5,
|
|
7592
|
+
...Z.mapOptions
|
|
7593
|
+
}), p = rs(T);
|
|
7594
|
+
Z.tileType && ls(Z.tileType), ss("Normal", T, { rightBottomTextHandle: p });
|
|
7595
|
+
const S = new us(T, Z.renderOptions);
|
|
7576
7596
|
return {
|
|
7577
|
-
map:
|
|
7578
|
-
clusterHandler:
|
|
7597
|
+
map: T,
|
|
7598
|
+
clusterHandler: S,
|
|
7599
|
+
utils: {
|
|
7600
|
+
rightBottomTextHandle: p
|
|
7601
|
+
}
|
|
7579
7602
|
};
|
|
7580
7603
|
}
|
|
7581
7604
|
export {
|
|
7582
|
-
|
|
7583
|
-
|
|
7605
|
+
fs as CreateMap,
|
|
7606
|
+
cs as L,
|
|
7607
|
+
ls as SwichTileType
|
|
7584
7608
|
};
|