tg-map-vue3 3.5.0 → 3.5.1
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/CHANGELOG.md +2 -0
- package/dist/src/map/lat-lng.d.ts +1 -1
- package/dist/tg-map.js +38 -36
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +2 -2
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 3.5.x
|
|
4
4
|
|
|
5
|
+
- fix: [LatLngBounds]为空时中心点计算问题
|
|
5
6
|
- ***BREAKING CHANGE***: `useTgMap` -> [useTgMapInner]
|
|
6
7
|
|
|
7
8
|
## 3.4.x
|
|
@@ -43,3 +44,4 @@
|
|
|
43
44
|
[Autocomplete]: src/map/map/extra/autocomplete.ts "自动完成"
|
|
44
45
|
[SearchBox]: src/map/map/extra/search-box.ts "搜索框"
|
|
45
46
|
[useTgMapInner]: src/components/map-hooks.ts
|
|
47
|
+
[LatLngBounds]: src/map/lat-lng.ts#L157
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="google.maps" />
|
|
3
3
|
/// <reference types="heremaps" />
|
|
4
4
|
import { type LngLatTuple } from 'coordtransform';
|
|
5
|
-
import { type StringEnumValue } from '../
|
|
5
|
+
import { type StringEnumValue } from '../utils/mapped-types';
|
|
6
6
|
export declare enum CoordType {
|
|
7
7
|
wgs84 = "wgs84",
|
|
8
8
|
gcj02 = "gcj02",
|
package/dist/tg-map.js
CHANGED
|
@@ -125,21 +125,40 @@ function se(i, t) {
|
|
|
125
125
|
function je(i) {
|
|
126
126
|
throw new Error(`Unexpected object: ${i}`);
|
|
127
127
|
}
|
|
128
|
+
function hs() {
|
|
129
|
+
}
|
|
130
|
+
function Ve(i) {
|
|
131
|
+
return i;
|
|
132
|
+
}
|
|
133
|
+
function cs(i, t) {
|
|
134
|
+
return i instanceof t;
|
|
135
|
+
}
|
|
136
|
+
function ds(i, t) {
|
|
137
|
+
if (i instanceof t)
|
|
138
|
+
return i;
|
|
139
|
+
}
|
|
140
|
+
function Te(i, t) {
|
|
141
|
+
if ((i == null ? void 0 : i.$options.name) === t.name)
|
|
142
|
+
return i;
|
|
143
|
+
}
|
|
144
|
+
function us(i) {
|
|
145
|
+
return i;
|
|
146
|
+
}
|
|
128
147
|
function E(i) {
|
|
129
148
|
throw new Error(i);
|
|
130
149
|
}
|
|
131
150
|
function Zt(i) {
|
|
132
151
|
throw new Error(`Unsupported: ${i}`);
|
|
133
152
|
}
|
|
134
|
-
function
|
|
153
|
+
function ps(i) {
|
|
135
154
|
throw new Error(`todo: ${i}`);
|
|
136
155
|
}
|
|
137
|
-
function
|
|
156
|
+
function gs(i) {
|
|
138
157
|
return i;
|
|
139
158
|
}
|
|
140
159
|
function me(...i) {
|
|
141
160
|
}
|
|
142
|
-
function
|
|
161
|
+
function ms(i) {
|
|
143
162
|
return i != null;
|
|
144
163
|
}
|
|
145
164
|
var Q = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(Q || {});
|
|
@@ -263,6 +282,8 @@ const J = class {
|
|
|
263
282
|
return this.sw.lat <= e && e <= this.ne.lat && J.isBetweenLng(this.sw.lng, this.ne.lng, r);
|
|
264
283
|
}
|
|
265
284
|
getCenter() {
|
|
285
|
+
if (this.sw.equals(this.ne))
|
|
286
|
+
return this.sw;
|
|
266
287
|
const t = (this.sw.lat + this.ne.lat) / 2, e = (this.sw.lng + this.ne.lng + (this.sw.lng < this.ne.lng ? 0 : 360)) / 2;
|
|
267
288
|
return y.create(t, e, this.coord);
|
|
268
289
|
}
|
|
@@ -421,13 +442,13 @@ function Vt() {
|
|
|
421
442
|
function qr(i) {
|
|
422
443
|
i != null && (jt = Ht(Ur, i));
|
|
423
444
|
}
|
|
424
|
-
var
|
|
445
|
+
var Fe;
|
|
425
446
|
((i) => {
|
|
426
447
|
function t(e) {
|
|
427
448
|
return e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight;
|
|
428
449
|
}
|
|
429
450
|
i.isScrollable = t;
|
|
430
|
-
})(
|
|
451
|
+
})(Fe || (Fe = {}));
|
|
431
452
|
var ae;
|
|
432
453
|
((i) => {
|
|
433
454
|
function t(h, o) {
|
|
@@ -487,25 +508,6 @@ var le;
|
|
|
487
508
|
}
|
|
488
509
|
i.listenChanged = r;
|
|
489
510
|
})(le || (le = {}));
|
|
490
|
-
function us() {
|
|
491
|
-
}
|
|
492
|
-
function Fe(i) {
|
|
493
|
-
return i;
|
|
494
|
-
}
|
|
495
|
-
function ps(i, t) {
|
|
496
|
-
return i instanceof t;
|
|
497
|
-
}
|
|
498
|
-
function gs(i, t) {
|
|
499
|
-
if (i instanceof t)
|
|
500
|
-
return i;
|
|
501
|
-
}
|
|
502
|
-
function Te(i, t) {
|
|
503
|
-
if ((i == null ? void 0 : i.$options.name) === t.name)
|
|
504
|
-
return i;
|
|
505
|
-
}
|
|
506
|
-
function ms(i) {
|
|
507
|
-
return i;
|
|
508
|
-
}
|
|
509
511
|
function Ft(i, t, e) {
|
|
510
512
|
return i.addListener(t, e).remove;
|
|
511
513
|
}
|
|
@@ -3842,7 +3844,7 @@ class Oi extends nt {
|
|
|
3842
3844
|
});
|
|
3843
3845
|
}
|
|
3844
3846
|
setGestureHandling(e = G.auto) {
|
|
3845
|
-
switch (e === G.auto && (e = this.element.parentElement &&
|
|
3847
|
+
switch (e === G.auto && (e = this.element.parentElement && Fe.isScrollable(this.element.parentElement) ? G.cooperative : G.greedy), e) {
|
|
3846
3848
|
case G.cooperative:
|
|
3847
3849
|
this.map.disableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
|
|
3848
3850
|
break;
|
|
@@ -4554,7 +4556,7 @@ const Cs = () => {
|
|
|
4554
4556
|
},
|
|
4555
4557
|
data() {
|
|
4556
4558
|
return {
|
|
4557
|
-
map:
|
|
4559
|
+
map: Ve(),
|
|
4558
4560
|
isDestroyed: !1
|
|
4559
4561
|
};
|
|
4560
4562
|
},
|
|
@@ -5212,8 +5214,8 @@ const Is = /* @__PURE__ */ U(Fi, [["render", Ui]]), qi = C({
|
|
|
5212
5214
|
return {
|
|
5213
5215
|
attrs: F(t, i),
|
|
5214
5216
|
marker: void 0,
|
|
5215
|
-
label:
|
|
5216
|
-
info:
|
|
5217
|
+
label: Ve(),
|
|
5218
|
+
info: Ve(),
|
|
5217
5219
|
emittedPosition: void 0
|
|
5218
5220
|
};
|
|
5219
5221
|
},
|
|
@@ -5881,21 +5883,21 @@ export {
|
|
|
5881
5883
|
gr as createEmptyVNode,
|
|
5882
5884
|
ki as createPropertyObject,
|
|
5883
5885
|
Ms as createPropertyObjectTyped,
|
|
5884
|
-
|
|
5886
|
+
gs as debug,
|
|
5885
5887
|
Zs as default,
|
|
5886
5888
|
L as eventProp,
|
|
5887
5889
|
Os as extractVNodeFromSlotsByComponent,
|
|
5888
5890
|
Ts as findByComponentType,
|
|
5889
5891
|
ns as getDestination,
|
|
5890
5892
|
Vt as getTgMapConfig,
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5893
|
+
ms as isDef,
|
|
5894
|
+
cs as isInstanceOf,
|
|
5895
|
+
hs as lateinit,
|
|
5894
5896
|
me as noop,
|
|
5895
5897
|
m as optionalProp,
|
|
5896
5898
|
bi as path,
|
|
5897
5899
|
R as requiredProp,
|
|
5898
|
-
|
|
5900
|
+
ds as safeAs,
|
|
5899
5901
|
Te as safeAsComponent,
|
|
5900
5902
|
qr as setTgMapConfig,
|
|
5901
5903
|
Bi as splitAttrs,
|
|
@@ -5903,9 +5905,9 @@ export {
|
|
|
5903
5905
|
Pi as stringUnionPropFromValues,
|
|
5904
5906
|
E as throwError,
|
|
5905
5907
|
Zt as throwUnsupported,
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5908
|
+
ps as todo,
|
|
5909
|
+
Ve as typed,
|
|
5910
|
+
us as unwrapStringEnumValue,
|
|
5909
5911
|
Cs as useEventLogMethods,
|
|
5910
5912
|
F as useSplittedAttrs,
|
|
5911
5913
|
Gi as useTgMapInner
|