tg-map-vue3 3.5.6 → 3.5.7
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 +1 -0
- package/dist/src/components/TgMap.vue.d.ts +9 -0
- package/dist/src/components/overlays/TgMarker.vue.d.ts +3 -2
- package/dist/src/map/map/map-options.d.ts +9 -0
- package/dist/src/map/map/map.d.ts +2 -0
- package/dist/src/map/map/overlay/baidu-info-box.d.ts +5 -0
- package/dist/src/map/map/overlay/info-box.d.ts +1 -0
- package/dist/src/map/map/overlay/marker.d.ts +2 -0
- package/dist/tg-map.js +52 -46
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +3 -3
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -60,6 +60,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
60
|
type: import("vue").PropType<number>;
|
|
61
61
|
required: true;
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
|
|
65
|
+
* @see MapOptions.infoWindowMode
|
|
66
|
+
*/
|
|
63
67
|
infoWindowMode: {
|
|
64
68
|
type: import("vue").PropType<"single" | "multi">;
|
|
65
69
|
};
|
|
@@ -150,6 +154,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
150
154
|
type: import("vue").PropType<number>;
|
|
151
155
|
required: true;
|
|
152
156
|
};
|
|
157
|
+
/**
|
|
158
|
+
* 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
|
|
159
|
+
* @see MapOptions.infoWindowMode
|
|
160
|
+
*/
|
|
153
161
|
infoWindowMode: {
|
|
154
162
|
type: import("vue").PropType<"single" | "multi">;
|
|
155
163
|
};
|
|
@@ -195,6 +203,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
195
203
|
onClick?: ((event: import("../map/event").Tg.MouseEvent) => any) | undefined;
|
|
196
204
|
onDblclick?: ((event: import("../map/event").Tg.MouseEvent) => any) | undefined;
|
|
197
205
|
onRightclick?: ((event: import("../map/event").Tg.MouseEvent) => any) | undefined;
|
|
206
|
+
onContextmenu?: ((event: import("../map/event").Tg.MouseEvent) => any) | undefined;
|
|
198
207
|
onMousedown?: ((event: import("../map/event").Tg.MouseEvent) => any) | undefined;
|
|
199
208
|
onMouseup?: ((event: import("../map/event").Tg.MouseEvent) => any) | undefined;
|
|
200
209
|
onMouseout?: ((event: import("../map/event").Tg.MouseEvent) => any) | undefined;
|
|
@@ -57,11 +57,10 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
57
57
|
readonly offset?: any;
|
|
58
58
|
style?: unknown;
|
|
59
59
|
onClick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
60
|
-
class?: unknown;
|
|
61
60
|
ref?: import("vue").VNodeRef | undefined;
|
|
61
|
+
class?: unknown;
|
|
62
62
|
ref_for?: boolean | undefined;
|
|
63
63
|
ref_key?: string | undefined;
|
|
64
|
-
readonly mapPane?: import("../../utils/mapped-types").StringEnumValue<typeof import("../../map/map/overlay/element-overlay").MapPane> | undefined;
|
|
65
64
|
onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
66
65
|
[key: string]: any;
|
|
67
66
|
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -100,6 +99,7 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
100
99
|
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
101
100
|
[key: string]: any;
|
|
102
101
|
}>) => void)[] | undefined;
|
|
102
|
+
readonly mapPane?: import("../../utils/mapped-types").StringEnumValue<typeof import("../../map/map/overlay/element-overlay").MapPane> | undefined;
|
|
103
103
|
};
|
|
104
104
|
$attrs: {
|
|
105
105
|
[x: string]: unknown;
|
|
@@ -238,6 +238,7 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
238
238
|
onClick?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
239
239
|
onDblclick?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
240
240
|
onRightclick?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
241
|
+
onContextmenu?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
241
242
|
onMousedown?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
242
243
|
onMouseup?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
243
244
|
onMouseout?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
@@ -24,6 +24,15 @@ export interface MapOptions {
|
|
|
24
24
|
center: LatLng;
|
|
25
25
|
/** 缩放等级, 必须是整数 */
|
|
26
26
|
zoom: number;
|
|
27
|
+
/**
|
|
28
|
+
* ## 不同行为
|
|
29
|
+
* - baidu: 只支持单窗口
|
|
30
|
+
* - google: 支持单窗口或多窗口, 默认多窗口
|
|
31
|
+
*
|
|
32
|
+
* 要显示多个弹窗, 推荐使用InfoBox替代
|
|
33
|
+
*
|
|
34
|
+
* {@macros info_window_vs_box}
|
|
35
|
+
*/
|
|
27
36
|
infoWindowMode?: InfoWindowMode;
|
|
28
37
|
gestureHandling?: GestureHandlingOptions;
|
|
29
38
|
minZoom?: number;
|
|
@@ -27,7 +27,9 @@ import type { RectangleOptions, RectangleOverlay } from './overlay/rectangle';
|
|
|
27
27
|
export type AbstractMapEventMap = {
|
|
28
28
|
click: Tg.MouseEvent;
|
|
29
29
|
dblclick: Tg.MouseEvent;
|
|
30
|
+
/** @deprecated 使用`contextmenu`替代 */
|
|
30
31
|
rightclick: Tg.MouseEvent;
|
|
32
|
+
contextmenu: Tg.MouseEvent;
|
|
31
33
|
dragstart: Tg.Event;
|
|
32
34
|
drag: Tg.Event;
|
|
33
35
|
dragend: Tg.Event;
|
|
@@ -36,10 +36,15 @@ export declare function createBaiduInfoBox(content: HTMLElement, position?: BMap
|
|
|
36
36
|
}): void;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
|
+
* {@template info_window_vs_box}
|
|
39
40
|
* baidu自带的InfoWindow有如下问题:
|
|
40
41
|
* 1. 窗体不可自定义, 默认的窗体有点丑
|
|
41
42
|
* 2. 一次只能显示一个
|
|
42
43
|
* 3. 和MarkerClusterer的配合并不好, 重建聚合时会使InfoWindow消失
|
|
44
|
+
*
|
|
45
|
+
* 故重新实现了一个InfoBox, 解决上述问题, 用来替代InfoWindow, 但Info也点问题...:
|
|
46
|
+
* 1. 未实现InfoWindow的autoPan功能
|
|
47
|
+
* {@endtemplate }
|
|
43
48
|
*/
|
|
44
49
|
declare function createBaiduInfoBoxClass(): {
|
|
45
50
|
new (content: HTMLElement, position?: BMap.Point, offset?: Point, zIndex?: number, maxWidth?: number, borderClass?: string): {
|
|
@@ -36,7 +36,9 @@ export interface MarkerOptions extends OverlayOptions {
|
|
|
36
36
|
export type MarkerEventMap = {
|
|
37
37
|
click: Tg.MouseEvent;
|
|
38
38
|
dblclick: Tg.MouseEvent;
|
|
39
|
+
/** @deprecated 使用`contextmenu`替代 */
|
|
39
40
|
rightclick: Tg.MouseEvent;
|
|
41
|
+
contextmenu: Tg.MouseEvent;
|
|
40
42
|
mousedown: Tg.MouseEvent;
|
|
41
43
|
mouseup: Tg.MouseEvent;
|
|
42
44
|
mouseout: Tg.MouseEvent;
|
package/dist/tg-map.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var br = Object.defineProperty;
|
|
3
3
|
var Mr = (i, t, e) => t in i ? br(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
4
4
|
var c = (i, t, e) => (Mr(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
5
|
-
import { createCommentVNode as Fe, computed as Nt, defineComponent as C, markRaw as Tr, watch as Gt, openBlock as W, createElementBlock as j, mergeProps as ce, createElementVNode as Or, normalizeClass as $e, renderSlot as G, normalizeStyle as Cr, getCurrentInstance as wr, inject as Er, onMounted as Lr, onBeforeUnmount as xr, toRaw as
|
|
5
|
+
import { createCommentVNode as Fe, computed as Nt, defineComponent as C, markRaw as Tr, watch as Gt, openBlock as W, createElementBlock as j, mergeProps as ce, createElementVNode as Or, normalizeClass as $e, renderSlot as G, normalizeStyle as Cr, getCurrentInstance as wr, inject as Er, onMounted as Lr, onBeforeUnmount as xr, toRaw as ze, withDirectives as Pr, vShow as kr } from "vue";
|
|
6
6
|
function V(i, t, e) {
|
|
7
7
|
Object.keys(i).forEach((r) => {
|
|
8
8
|
r.startsWith("update:") || e != null && e.includes(r) || t.addEventListener(r, i[r]);
|
|
@@ -162,29 +162,29 @@ function fs(i) {
|
|
|
162
162
|
return i != null;
|
|
163
163
|
}
|
|
164
164
|
var Q = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(Q || {});
|
|
165
|
-
const He = "wgs84",
|
|
165
|
+
const He = "wgs84", z = class {
|
|
166
166
|
constructor(t, e, r) {
|
|
167
167
|
this.lat = t, this.lng = e, this.coord = r;
|
|
168
168
|
}
|
|
169
169
|
/** @param coord Baidu Map的坐标一般都是bd09 */
|
|
170
170
|
static fromBaidu(t, e) {
|
|
171
|
-
return new
|
|
171
|
+
return new z(t.lat, t.lng, e);
|
|
172
172
|
}
|
|
173
173
|
/** @param coord Google Map的坐标依据地图类型不同是不一样的 */
|
|
174
174
|
static fromGoogle(t, e) {
|
|
175
|
-
return new
|
|
175
|
+
return new z(t.lat(), t.lng(), e);
|
|
176
176
|
}
|
|
177
177
|
static fromHere(t, e) {
|
|
178
|
-
return new
|
|
178
|
+
return new z(t.lat, t.lng, e);
|
|
179
179
|
}
|
|
180
180
|
static fromLiteral(t) {
|
|
181
|
-
return new
|
|
181
|
+
return new z(t.lat, t.lng, t.coord || He);
|
|
182
182
|
}
|
|
183
183
|
static fromLngLat(t, e, r = He) {
|
|
184
|
-
return new
|
|
184
|
+
return new z(e, t, r);
|
|
185
185
|
}
|
|
186
186
|
static create(t, e, r = He) {
|
|
187
|
-
return new
|
|
187
|
+
return new z(t, e, r);
|
|
188
188
|
}
|
|
189
189
|
/** 转换坐标到指定坐标系 */
|
|
190
190
|
to(t) {
|
|
@@ -192,7 +192,7 @@ const He = "wgs84", D = class {
|
|
|
192
192
|
if (this.coord === e)
|
|
193
193
|
return this;
|
|
194
194
|
const [r, s] = this._convert(e);
|
|
195
|
-
return new
|
|
195
|
+
return new z(s, r, e);
|
|
196
196
|
}
|
|
197
197
|
toBaidu(t) {
|
|
198
198
|
let e = this.lat, r = this.lng;
|
|
@@ -233,8 +233,8 @@ const He = "wgs84", D = class {
|
|
|
233
233
|
return JSON.stringify(this);
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
-
let y =
|
|
237
|
-
c(y, "ZERO",
|
|
236
|
+
let y = z;
|
|
237
|
+
c(y, "ZERO", z.create(0, 0));
|
|
238
238
|
const J = class {
|
|
239
239
|
/**
|
|
240
240
|
* 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
|
|
@@ -356,9 +356,9 @@ function $r(i) {
|
|
|
356
356
|
var t = Object.prototype.toString.call(i);
|
|
357
357
|
return t === "[object RegExp]" || t === "[object Date]" || Nr(i);
|
|
358
358
|
}
|
|
359
|
-
var
|
|
359
|
+
var zr = typeof Symbol == "function" && Symbol.for, Dr = zr ? Symbol.for("react.element") : 60103;
|
|
360
360
|
function Nr(i) {
|
|
361
|
-
return i.$$typeof ===
|
|
361
|
+
return i.$$typeof === Dr;
|
|
362
362
|
}
|
|
363
363
|
function Gr(i) {
|
|
364
364
|
return Array.isArray(i) ? [] : {};
|
|
@@ -422,11 +422,11 @@ const jt = /* @__PURE__ */ Je(Ur), ke = ["3.0"], qr = {
|
|
|
422
422
|
// 在build时会被静态替换, 导致使用者不能无法设置它
|
|
423
423
|
// @see https://cn.vitejs.dev/guide/build.html#library-mode:~:text=%E6%A8%A1%E5%BC%8F%E4%B8%8B%EF%BC%8C%E6%89%80%E6%9C%89-,({}).*,-%E7%94%A8%E6%B3%95%E5%9C%A8%E6%9E%84
|
|
424
424
|
// @see @vite_process_env_detail
|
|
425
|
-
key: ""
|
|
425
|
+
key: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h"
|
|
426
426
|
},
|
|
427
427
|
google: {
|
|
428
428
|
version: "quarterly",
|
|
429
|
-
key: "",
|
|
429
|
+
key: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo",
|
|
430
430
|
language: "en-us",
|
|
431
431
|
libraries: ["places"]
|
|
432
432
|
},
|
|
@@ -530,7 +530,7 @@ class qt {
|
|
|
530
530
|
return this.target = t, this;
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
|
-
class
|
|
533
|
+
class De {
|
|
534
534
|
constructor(t, e) {
|
|
535
535
|
c(this, "eventHub", new Yt());
|
|
536
536
|
this.delegate = t, this.options = e;
|
|
@@ -627,6 +627,8 @@ let ne = Re;
|
|
|
627
627
|
c(ne, "EVENT_TYPE_MAP", {
|
|
628
628
|
drag: "dragging",
|
|
629
629
|
closeclick: "clickclose",
|
|
630
|
+
// baidu不支持contextmenu事件, 将其映射为rightclick
|
|
631
|
+
contextmenu: "rightclick",
|
|
630
632
|
"zoom-changed": "zoomend",
|
|
631
633
|
"map-type-changed": "maptypechange"
|
|
632
634
|
});
|
|
@@ -2840,7 +2842,7 @@ class ct extends pr {
|
|
|
2840
2842
|
}, 0), n;
|
|
2841
2843
|
}
|
|
2842
2844
|
createDelegate() {
|
|
2843
|
-
return this.eventHubDelegate = new
|
|
2845
|
+
return this.eventHubDelegate = new De(super.createDelegate(), {
|
|
2844
2846
|
types: ["radius-changed", "center-changed"],
|
|
2845
2847
|
onListen: (e) => {
|
|
2846
2848
|
e === "radius-changed" ? (this.prevRadius = this.innerOverlay.getRadius(), this.innerOverlay.addEventListener("lineupdate", this.onRadiusChanged)) : (this.prevCenter = this.innerOverlay.getCenter(), this.innerOverlay.addEventListener("lineupdate", this.onCenterChanged));
|
|
@@ -3728,7 +3730,7 @@ class bt extends pr {
|
|
|
3728
3730
|
this.isDoingSetPath = !0, this.innerOverlay.setPath(e), this.isDoingSetPath = !1;
|
|
3729
3731
|
}
|
|
3730
3732
|
createDelegate() {
|
|
3731
|
-
return this.eventHubDelegate = new
|
|
3733
|
+
return this.eventHubDelegate = new De(super.createDelegate(), {
|
|
3732
3734
|
types: [this.pathEditedEventType],
|
|
3733
3735
|
onListen: () => {
|
|
3734
3736
|
this.prevPath = this.innerOverlay.getPath(), this.innerOverlay.addEventListener("lineupdate", this.onLineUpdate);
|
|
@@ -3791,7 +3793,7 @@ class Tt extends Ge {
|
|
|
3791
3793
|
(e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
|
|
3792
3794
|
}
|
|
3793
3795
|
createDelegate() {
|
|
3794
|
-
return this.eventHubDelegate = new
|
|
3796
|
+
return this.eventHubDelegate = new De(super.createDelegate(), {
|
|
3795
3797
|
types: ["path-edited"],
|
|
3796
3798
|
onListen: () => this.setupPathChangedListeners(),
|
|
3797
3799
|
onCancel: () => this.clearPathChangedListeners()
|
|
@@ -3868,7 +3870,7 @@ class Ct extends Ge {
|
|
|
3868
3870
|
(e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
|
|
3869
3871
|
}
|
|
3870
3872
|
createDelegate() {
|
|
3871
|
-
return this.eventHubDelegate = new
|
|
3873
|
+
return this.eventHubDelegate = new De(super.createDelegate(), {
|
|
3872
3874
|
types: ["paths-edited"],
|
|
3873
3875
|
onListen: () => this.setupPathChangedListeners(),
|
|
3874
3876
|
onCancel: () => this.clearPathChangedListeners()
|
|
@@ -4457,7 +4459,7 @@ class Li extends lt {
|
|
|
4457
4459
|
throw new Error("Method not implemented.");
|
|
4458
4460
|
}
|
|
4459
4461
|
}
|
|
4460
|
-
var
|
|
4462
|
+
var D = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(D || {}), Xe;
|
|
4461
4463
|
((i) => {
|
|
4462
4464
|
function t(e, r, s) {
|
|
4463
4465
|
const n = Ke.create(s);
|
|
@@ -4476,16 +4478,16 @@ function xi({ type: i, config: t }) {
|
|
|
4476
4478
|
const e = window, r = Pi(i);
|
|
4477
4479
|
if (e[r])
|
|
4478
4480
|
return Promise.resolve();
|
|
4479
|
-
switch (i !==
|
|
4480
|
-
case
|
|
4481
|
+
switch (i !== D.here && !t.key && E(`请先配置${i}地图的key`), i) {
|
|
4482
|
+
case D.google:
|
|
4481
4483
|
return {}.VITE_FALSE ? (ti({
|
|
4482
4484
|
key: t.key,
|
|
4483
4485
|
v: "3.52"
|
|
4484
4486
|
// v: config.version,
|
|
4485
|
-
}), google.maps.importLibrary("core")) :
|
|
4486
|
-
case
|
|
4487
|
-
return
|
|
4488
|
-
case
|
|
4487
|
+
}), google.maps.importLibrary("core")) : zt(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);
|
|
4488
|
+
case D.baidu:
|
|
4489
|
+
return zt(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
|
|
4490
|
+
case D.here:
|
|
4489
4491
|
return ue(de("core", t.version)).then(() => Promise.all([
|
|
4490
4492
|
// 其他大多数模块都可以同时载入
|
|
4491
4493
|
ue(de("service", t.version)),
|
|
@@ -4502,16 +4504,16 @@ function de(i, t = ke[0]) {
|
|
|
4502
4504
|
}
|
|
4503
4505
|
function Pi(i) {
|
|
4504
4506
|
switch (i) {
|
|
4505
|
-
case
|
|
4507
|
+
case D.google:
|
|
4506
4508
|
return "google";
|
|
4507
|
-
case
|
|
4509
|
+
case D.baidu:
|
|
4508
4510
|
return "BMap";
|
|
4509
|
-
case
|
|
4511
|
+
case D.here:
|
|
4510
4512
|
return "H";
|
|
4511
4513
|
}
|
|
4512
4514
|
}
|
|
4513
4515
|
let ki = 0;
|
|
4514
|
-
function
|
|
4516
|
+
function zt(i, t = "callback") {
|
|
4515
4517
|
return new Promise((e, r) => {
|
|
4516
4518
|
const s = `__callback${ki++}`;
|
|
4517
4519
|
window[s] = e;
|
|
@@ -4662,7 +4664,7 @@ const Es = () => {
|
|
|
4662
4664
|
inheritAttrs: !1,
|
|
4663
4665
|
props: {
|
|
4664
4666
|
/** type没做响应式, 但外部可以把type作为tg-map的key, 让type修改时完全重建tg-map */
|
|
4665
|
-
type: N(
|
|
4667
|
+
type: N(D, D.google),
|
|
4666
4668
|
/**
|
|
4667
4669
|
* 当对该属性使用双向绑定时, 改变center将触发update:center又反过来触发center改变, 最终导致无限循环...
|
|
4668
4670
|
* 当前通过setCenter()时判断center是否有改变来避免该问题, 但为了避免可能存在的问题, 另外设计了如下机制:
|
|
@@ -4689,6 +4691,10 @@ const Es = () => {
|
|
|
4689
4691
|
*/
|
|
4690
4692
|
lastCenter: m(y),
|
|
4691
4693
|
zoom: R(Number),
|
|
4694
|
+
/**
|
|
4695
|
+
* 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
|
|
4696
|
+
* @see MapOptions.infoWindowMode
|
|
4697
|
+
*/
|
|
4692
4698
|
infoWindowMode: Bi(vi),
|
|
4693
4699
|
gestureHandling: N(Z),
|
|
4694
4700
|
minZoom: m(Number),
|
|
@@ -4833,7 +4839,7 @@ function Ri(i, t, e, r, s, n) {
|
|
|
4833
4839
|
], 16);
|
|
4834
4840
|
}
|
|
4835
4841
|
const $i = /* @__PURE__ */ U(Ai, [["render", Ri]]);
|
|
4836
|
-
function
|
|
4842
|
+
function zi(i) {
|
|
4837
4843
|
if (i == null)
|
|
4838
4844
|
return;
|
|
4839
4845
|
let t;
|
|
@@ -4844,7 +4850,7 @@ function Di(i) {
|
|
|
4844
4850
|
t = i;
|
|
4845
4851
|
return `${t}px`;
|
|
4846
4852
|
}
|
|
4847
|
-
const
|
|
4853
|
+
const Di = C({
|
|
4848
4854
|
name: "tg-map-widget",
|
|
4849
4855
|
props: {
|
|
4850
4856
|
left: {
|
|
@@ -4870,7 +4876,7 @@ const zi = C({
|
|
|
4870
4876
|
}
|
|
4871
4877
|
},
|
|
4872
4878
|
methods: {
|
|
4873
|
-
dimen:
|
|
4879
|
+
dimen: zi
|
|
4874
4880
|
}
|
|
4875
4881
|
});
|
|
4876
4882
|
function Ni(i, t, e, r, s, n) {
|
|
@@ -4881,7 +4887,7 @@ function Ni(i, t, e, r, s, n) {
|
|
|
4881
4887
|
G(i.$slots, "default")
|
|
4882
4888
|
], 6);
|
|
4883
4889
|
}
|
|
4884
|
-
const Ls = /* @__PURE__ */ U(
|
|
4890
|
+
const Ls = /* @__PURE__ */ U(Di, [["render", Ni]]), Gi = C({
|
|
4885
4891
|
name: "tg-custom-control",
|
|
4886
4892
|
mixins: [P],
|
|
4887
4893
|
props: {
|
|
@@ -5142,7 +5148,7 @@ const Vi = /* @__PURE__ */ U(Hi, [["render", ji]]), Is = C({
|
|
|
5142
5148
|
center(i) {
|
|
5143
5149
|
if (this.emittedCenter != null) {
|
|
5144
5150
|
const t = this.emittedCenter;
|
|
5145
|
-
if (this.emittedCenter = void 0, t ===
|
|
5151
|
+
if (this.emittedCenter = void 0, t === ze(i))
|
|
5146
5152
|
return;
|
|
5147
5153
|
}
|
|
5148
5154
|
this.overlay.setCenter(i);
|
|
@@ -5275,7 +5281,7 @@ const As = /* @__PURE__ */ U(Ui, [["render", qi]]), Yi = C({
|
|
|
5275
5281
|
position(i) {
|
|
5276
5282
|
if (this.emittedPosition != null) {
|
|
5277
5283
|
const t = this.emittedPosition;
|
|
5278
|
-
if (this.emittedPosition = void 0, t ===
|
|
5284
|
+
if (this.emittedPosition = void 0, t === ze(i))
|
|
5279
5285
|
return;
|
|
5280
5286
|
}
|
|
5281
5287
|
this.marker.setPosition(i);
|
|
@@ -5563,7 +5569,7 @@ function rs(i, t, e, r, s, n) {
|
|
|
5563
5569
|
G(i.$slots, "default")
|
|
5564
5570
|
], 16);
|
|
5565
5571
|
}
|
|
5566
|
-
const
|
|
5572
|
+
const zs = /* @__PURE__ */ U(ts, [["render", rs]]), Ds = C({
|
|
5567
5573
|
name: "tg-polygon",
|
|
5568
5574
|
mixins: [P],
|
|
5569
5575
|
inheritAttrs: !1,
|
|
@@ -5592,7 +5598,7 @@ const Ds = /* @__PURE__ */ U(ts, [["render", rs]]), zs = C({
|
|
|
5592
5598
|
handler(i) {
|
|
5593
5599
|
if (this.emittedPaths != null) {
|
|
5594
5600
|
const t = this.emittedPaths;
|
|
5595
|
-
if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e ===
|
|
5601
|
+
if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e === ze(i[r])))
|
|
5596
5602
|
return;
|
|
5597
5603
|
}
|
|
5598
5604
|
this.overlay.setPaths(i);
|
|
@@ -5659,7 +5665,7 @@ const Ds = /* @__PURE__ */ U(ts, [["render", rs]]), zs = C({
|
|
|
5659
5665
|
handler(i) {
|
|
5660
5666
|
if (this.emittedPath != null) {
|
|
5661
5667
|
const t = this.emittedPath;
|
|
5662
|
-
if (this.emittedPath = void 0, t ===
|
|
5668
|
+
if (this.emittedPath = void 0, t === ze(i))
|
|
5663
5669
|
return;
|
|
5664
5670
|
}
|
|
5665
5671
|
this.overlay.setPath(i);
|
|
@@ -5809,7 +5815,7 @@ const Ds = /* @__PURE__ */ U(ts, [["render", rs]]), zs = C({
|
|
|
5809
5815
|
function me(i) {
|
|
5810
5816
|
return i * Math.PI / 180;
|
|
5811
5817
|
}
|
|
5812
|
-
function
|
|
5818
|
+
function Dt(i) {
|
|
5813
5819
|
return i * 180 / Math.PI;
|
|
5814
5820
|
}
|
|
5815
5821
|
function ns(i, t) {
|
|
@@ -5834,7 +5840,7 @@ function os(i, t, e) {
|
|
|
5834
5840
|
u * x + d * O * o,
|
|
5835
5841
|
(1 - n) * Math.sqrt(b * b + te * te)
|
|
5836
5842
|
), yr = Math.atan2(O * h, d * x - u * O * o), We = n / 16 * _ * (4 + n * (4 - 3 * _)), vr = yr - (1 - We) * n * b * (w + We * O * (v + We * x * (-1 + 2 * v * v)));
|
|
5837
|
-
return { lng: i.lng +
|
|
5843
|
+
return { lng: i.lng + Dt(vr), lat: Dt(Ze) };
|
|
5838
5844
|
}
|
|
5839
5845
|
const Ws = {
|
|
5840
5846
|
getDistance: ns,
|
|
@@ -5922,15 +5928,15 @@ export {
|
|
|
5922
5928
|
As as TgElementOverlay,
|
|
5923
5929
|
Rs as TgInfoBox,
|
|
5924
5930
|
$s as TgInfoWindow,
|
|
5925
|
-
|
|
5931
|
+
zs as TgLabel,
|
|
5926
5932
|
$i as TgMap,
|
|
5927
5933
|
Xe as TgMapFactory,
|
|
5928
|
-
|
|
5934
|
+
D as TgMapType,
|
|
5929
5935
|
Ps as TgMapTypeControl,
|
|
5930
5936
|
Ls as TgMapWidget,
|
|
5931
5937
|
xt as TgMarker,
|
|
5932
5938
|
Vi as TgMarkerClusterer,
|
|
5933
|
-
|
|
5939
|
+
Ds as TgPolygon,
|
|
5934
5940
|
Ns as TgPolyline,
|
|
5935
5941
|
Gs as TgRectangle,
|
|
5936
5942
|
ks as TgScaleControl,
|