potato-map3d-ui2 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/map3d-ui2.es.js +303 -48
- package/dist/map3d-ui2.umd.js +302 -47
- package/dist/style.css +1 -5
- package/package.json +35 -35
package/dist/map3d-ui2.es.js
CHANGED
@@ -1,60 +1,291 @@
|
|
1
|
-
import { defineComponent,
|
1
|
+
import { defineComponent, onMounted, onUnmounted, openBlock, createElementBlock, renderSlot, createElementVNode, normalizeClass, createTextVNode } from "vue";
|
2
|
+
const __uno = "";
|
2
3
|
const { tudou3d } = window;
|
3
4
|
function initMap(options) {
|
4
5
|
const { id, mapOptions } = options;
|
5
6
|
const map = new tudou3d.Map(id, mapOptions);
|
6
7
|
return map;
|
7
8
|
}
|
8
|
-
const
|
9
|
-
|
9
|
+
const defaultMapIds = {
|
10
|
+
mainMapId: "mainMapId",
|
11
|
+
rollMapId: "rollMapId",
|
12
|
+
splitMapId: "splitMapId"
|
13
|
+
};
|
14
|
+
const mapConfig = {
|
15
|
+
offLine: false,
|
16
|
+
scene: {
|
17
|
+
center: {
|
18
|
+
lat: 34.265944,
|
19
|
+
lng: 108.937913,
|
20
|
+
alt: 223552084e-1,
|
21
|
+
heading: 0,
|
22
|
+
pitch: -90
|
23
|
+
},
|
24
|
+
allowTextureFilterAnisotropic: true
|
25
|
+
},
|
26
|
+
fxaa: true,
|
27
|
+
globe: {
|
28
|
+
preloadAncestors: false
|
29
|
+
},
|
30
|
+
terrain: {
|
31
|
+
url: "//data.mars3d.cn/terrain",
|
32
|
+
show: true,
|
33
|
+
requestVertexNormals: true
|
34
|
+
},
|
35
|
+
control: {
|
36
|
+
infoBox: false,
|
37
|
+
baseLayerPicker: false
|
38
|
+
},
|
39
|
+
basemaps: [
|
40
|
+
{
|
41
|
+
id: 1,
|
42
|
+
name: "天地图卫星",
|
43
|
+
type: "group",
|
44
|
+
show: true,
|
45
|
+
layers: [
|
46
|
+
{
|
47
|
+
type: "tdt",
|
48
|
+
name: "卫星",
|
49
|
+
layer: "img_d",
|
50
|
+
key: [
|
51
|
+
"79dbab637f181bf953e0334bfd179f3e",
|
52
|
+
"7dea3b9cbee02a0d5d15699a4d2cf9cb",
|
53
|
+
"de2d36347d44020b5bab35b48c958801",
|
54
|
+
"d0c7b65873a6b8961d42f656b6ef7ae7",
|
55
|
+
"d5ddf0de8791e734dc8a8296b90cea5e"
|
56
|
+
]
|
57
|
+
},
|
58
|
+
{
|
59
|
+
name: "注记",
|
60
|
+
type: "tdt",
|
61
|
+
layer: "img_z",
|
62
|
+
key: ["de2d36347d44020b5bab35b48c958801"]
|
63
|
+
}
|
64
|
+
]
|
65
|
+
},
|
66
|
+
{
|
67
|
+
id: 2,
|
68
|
+
name: "天地图电子",
|
69
|
+
type: "group",
|
70
|
+
show: false,
|
71
|
+
layers: [
|
72
|
+
{
|
73
|
+
type: "tdt",
|
74
|
+
name: "底图",
|
75
|
+
layer: "vec_d",
|
76
|
+
key: [
|
77
|
+
"79dbab637f181bf953e0334bfd179f3e",
|
78
|
+
"7dea3b9cbee02a0d5d15699a4d2cf9cb",
|
79
|
+
"de2d36347d44020b5bab35b48c958801",
|
80
|
+
"d0c7b65873a6b8961d42f656b6ef7ae7",
|
81
|
+
"d5ddf0de8791e734dc8a8296b90cea5e"
|
82
|
+
]
|
83
|
+
},
|
84
|
+
{
|
85
|
+
name: "注记",
|
86
|
+
type: "tdt",
|
87
|
+
layer: "vec_z",
|
88
|
+
key: ["de2d36347d44020b5bab35b48c958801"]
|
89
|
+
}
|
90
|
+
]
|
91
|
+
},
|
92
|
+
{
|
93
|
+
id: 3,
|
94
|
+
name: "天地图地形地图",
|
95
|
+
type: "group",
|
96
|
+
show: false,
|
97
|
+
layers: [
|
98
|
+
{
|
99
|
+
type: "tdt",
|
100
|
+
name: "底图",
|
101
|
+
layer: "ter_d",
|
102
|
+
key: [
|
103
|
+
"79dbab637f181bf953e0334bfd179f3e",
|
104
|
+
"7dea3b9cbee02a0d5d15699a4d2cf9cb",
|
105
|
+
"de2d36347d44020b5bab35b48c958801",
|
106
|
+
"d0c7b65873a6b8961d42f656b6ef7ae7",
|
107
|
+
"d5ddf0de8791e734dc8a8296b90cea5e"
|
108
|
+
]
|
109
|
+
},
|
110
|
+
{
|
111
|
+
name: "注记",
|
112
|
+
type: "tdt",
|
113
|
+
layer: "ter_z",
|
114
|
+
key: ["de2d36347d44020b5bab35b48c958801"]
|
115
|
+
}
|
116
|
+
]
|
117
|
+
},
|
118
|
+
{
|
119
|
+
id: 7,
|
120
|
+
name: "天地图",
|
121
|
+
type: "group",
|
122
|
+
show: false,
|
123
|
+
layers: [
|
124
|
+
{
|
125
|
+
type: "tdt",
|
126
|
+
name: "底图",
|
127
|
+
layer: "ter_d",
|
128
|
+
key: [
|
129
|
+
"79dbab637f181bf953e0334bfd179f3e",
|
130
|
+
"7dea3b9cbee02a0d5d15699a4d2cf9cb",
|
131
|
+
"de2d36347d44020b5bab35b48c958801",
|
132
|
+
"d0c7b65873a6b8961d42f656b6ef7ae7",
|
133
|
+
"d5ddf0de8791e734dc8a8296b90cea5e"
|
134
|
+
]
|
135
|
+
},
|
136
|
+
{
|
137
|
+
name: "注记",
|
138
|
+
type: "tdt",
|
139
|
+
layer: "ter_z",
|
140
|
+
key: ["de2d36347d44020b5bab35b48c958801"]
|
141
|
+
}
|
142
|
+
]
|
143
|
+
},
|
144
|
+
{
|
145
|
+
id: 4,
|
146
|
+
name: "离线天地图卫星",
|
147
|
+
type: "group",
|
148
|
+
show: false,
|
149
|
+
layers: [
|
150
|
+
{
|
151
|
+
url: "/mapdata/maptile/wgs3857imgD/{z}/{x}/{y}.jpg",
|
152
|
+
type: "xyz",
|
153
|
+
name: "卫星",
|
154
|
+
minimumLevel: 3,
|
155
|
+
maximumLevel: 16,
|
156
|
+
minimumTerrainLevel: 3,
|
157
|
+
maximumTerrainLevel: 18
|
158
|
+
}
|
159
|
+
]
|
160
|
+
},
|
161
|
+
{
|
162
|
+
id: 5,
|
163
|
+
name: "离线天地图电子",
|
164
|
+
type: "group",
|
165
|
+
show: false,
|
166
|
+
layers: [
|
167
|
+
{
|
168
|
+
url: "/mapdata/maptile/wgs3857img/{z}/{x}/{y}.jpg",
|
169
|
+
type: "xyz",
|
170
|
+
name: "电子",
|
171
|
+
minimumLevel: 1,
|
172
|
+
maximumLevel: 13,
|
173
|
+
minimumTerrainLevel: 1,
|
174
|
+
maximumTerrainLevel: 16
|
175
|
+
},
|
176
|
+
{
|
177
|
+
url: "/mapdata/maptile/wgs3857imgZ/{z}/{x}/{y}.png",
|
178
|
+
type: "xyz",
|
179
|
+
name: "注记",
|
180
|
+
minimumLevel: 1,
|
181
|
+
maximumLevel: 13,
|
182
|
+
minimumTerrainLevel: 1,
|
183
|
+
maximumTerrainLevel: 16
|
184
|
+
}
|
185
|
+
]
|
186
|
+
},
|
187
|
+
{
|
188
|
+
id: 6,
|
189
|
+
name: "离线天地图地形地图",
|
190
|
+
type: "group",
|
191
|
+
show: false,
|
192
|
+
layers: [
|
193
|
+
{
|
194
|
+
url: "/mapdata/maptile/wgs3857vec/{z}/{x}/{y}.jpg",
|
195
|
+
type: "xyz",
|
196
|
+
name: "电子",
|
197
|
+
minimumLevel: 1,
|
198
|
+
maximumLevel: 13,
|
199
|
+
minimumTerrainLevel: 1,
|
200
|
+
maximumTerrainLevel: 16
|
201
|
+
},
|
202
|
+
{
|
203
|
+
type: "xyz",
|
204
|
+
name: "注记",
|
205
|
+
minimumLevel: 1,
|
206
|
+
maximumLevel: 13,
|
207
|
+
minimumTerrainLevel: 1,
|
208
|
+
maximumTerrainLevel: 16
|
209
|
+
}
|
210
|
+
]
|
211
|
+
}
|
212
|
+
]
|
213
|
+
};
|
214
|
+
const { mainMapId } = defaultMapIds;
|
215
|
+
const mapsObject = {};
|
216
|
+
function setMap(options) {
|
217
|
+
const { mapId, map } = options;
|
218
|
+
const key = mapId || mainMapId;
|
219
|
+
mapsObject[key] = map;
|
220
|
+
window.mapsObject = mapsObject;
|
221
|
+
}
|
222
|
+
function getMap(options) {
|
223
|
+
const { mapId } = options;
|
224
|
+
const key = mapId || mainMapId;
|
225
|
+
const map = mapsObject[key];
|
226
|
+
if (!map) {
|
227
|
+
console.log(`当前mapId:${mapId}的map对象不存在`);
|
228
|
+
}
|
229
|
+
return map;
|
230
|
+
}
|
231
|
+
function removeMap(options) {
|
232
|
+
const { mapId } = options;
|
233
|
+
const key = mapId || mainMapId;
|
234
|
+
const map = mapsObject[key];
|
235
|
+
if (map) {
|
236
|
+
map.destroy();
|
237
|
+
delete mapsObject[key];
|
238
|
+
} else {
|
239
|
+
console.log(`mapId为${mapId}的map对象已删除`);
|
240
|
+
}
|
241
|
+
}
|
242
|
+
const _hoisted_1$3 = ["id"];
|
243
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
10
244
|
__name: "index",
|
11
245
|
props: {
|
12
246
|
mapOptions: {
|
13
247
|
type: Object,
|
14
|
-
|
248
|
+
default: null
|
15
249
|
},
|
16
250
|
mapId: {
|
17
|
-
type:
|
18
|
-
default:
|
251
|
+
type: String,
|
252
|
+
default: defaultMapIds.mainMapId
|
19
253
|
}
|
20
254
|
},
|
21
|
-
|
255
|
+
emits: ["onInitMap"],
|
256
|
+
setup(__props, { emit }) {
|
22
257
|
const props = __props;
|
23
|
-
const { mapOptions
|
258
|
+
const { mapOptions } = props;
|
24
259
|
onMounted(() => {
|
25
|
-
|
26
|
-
id: mapId
|
27
|
-
mapOptions: mapOptions
|
260
|
+
const map = initMap({
|
261
|
+
id: `${props.mapId}-map`,
|
262
|
+
mapOptions: mapOptions || mapConfig
|
28
263
|
});
|
264
|
+
setMap({ mapId: props.mapId, map });
|
265
|
+
emit("onInitMap", map);
|
266
|
+
});
|
267
|
+
onUnmounted(() => {
|
268
|
+
removeMap({ mapId: props.mapId });
|
29
269
|
});
|
30
270
|
return (_ctx, _cache) => {
|
31
271
|
return openBlock(), createElementBlock("div", {
|
32
|
-
class: "
|
33
|
-
id:
|
34
|
-
}, null, 8, _hoisted_1$
|
272
|
+
class: "w-100% h-100%",
|
273
|
+
id: `${__props.mapId}-map`
|
274
|
+
}, null, 8, _hoisted_1$3);
|
35
275
|
};
|
36
276
|
}
|
37
277
|
});
|
38
|
-
const index_vue_vue_type_style_index_0_scoped_914d176b_lang = "";
|
39
|
-
const _export_sfc = (sfc, props) => {
|
40
|
-
const target = sfc.__vccOpts || sfc;
|
41
|
-
for (const [key, val] of props) {
|
42
|
-
target[key] = val;
|
43
|
-
}
|
44
|
-
return target;
|
45
|
-
};
|
46
|
-
const Map3dt = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-914d176b"]]);
|
47
278
|
const _imports_0$1 = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxnIGlkPSLpo47moLzorr7orqEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0i5bel5YW3LeWcsOWbvuaOp+WItiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQzMC4wMDAwMDAsIC00MzAuMDAwMDAwKSI+DQogICAgICAgICAgICA8ZyBpZD0i5Zyw5Zu+5o6n5Yi25bGV5byAIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjIuMDAwMDAwLCAyNTIuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPGcgaWQ9IuWcsOWbvue8qeWwjyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMDAwMDAwLCAxNzguMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgcng9IjQiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSI0IDEzIDQgMTEgMjAgMTEgMjAgMTMiPjwvcG9seWdvbj4NCiAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICA8L2c+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";
|
48
|
-
const _hoisted_1$
|
279
|
+
const _hoisted_1$2 = /* @__PURE__ */ createElementVNode("img", {
|
49
280
|
src: _imports_0$1,
|
50
281
|
class: "w-24px h-24px"
|
51
282
|
}, null, -1);
|
52
|
-
const _sfc_main$
|
283
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
53
284
|
__name: "index",
|
54
285
|
props: {
|
55
|
-
|
56
|
-
type:
|
57
|
-
default:
|
286
|
+
mapId: {
|
287
|
+
type: String,
|
288
|
+
default: defaultMapIds.mainMapId
|
58
289
|
},
|
59
290
|
placement: {
|
60
291
|
type: String,
|
@@ -63,12 +294,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
63
294
|
},
|
64
295
|
setup(__props) {
|
65
296
|
const props = __props;
|
66
|
-
const { map } = toRefs(props);
|
67
297
|
function zoomOut() {
|
68
|
-
const
|
69
|
-
if (
|
70
|
-
const height =
|
71
|
-
|
298
|
+
const map = getMap({ mapId: props.mapId });
|
299
|
+
if (map) {
|
300
|
+
const height = map.viewer.camera.positionCartographic.height / 10;
|
301
|
+
map.viewer.camera.zoomOut(height);
|
72
302
|
} else {
|
73
303
|
console.log("没有map对象");
|
74
304
|
}
|
@@ -79,7 +309,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
79
309
|
onClick: zoomOut
|
80
310
|
}, [
|
81
311
|
renderSlot(_ctx.$slots, "img", {}, () => [
|
82
|
-
_hoisted_1$
|
312
|
+
_hoisted_1$2
|
83
313
|
]),
|
84
314
|
createElementVNode("span", {
|
85
315
|
class: normalizeClass(["invisible group-hover:visible w-max bg-#000 absolute top-50% translate-y--50% text-14px p-4px rd-4px c-#fff lh-16px", __props.placement === "left" ? "right-150% " : "left-150%"])
|
@@ -96,16 +326,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
96
326
|
}
|
97
327
|
});
|
98
328
|
const _imports_0 = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxnIGlkPSLpo47moLzorr7orqEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0i5bel5YW3LeWcsOWbvuaOp+WItiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQzMC4wMDAwMDAsIC0zOTguMDAwMDAwKSI+DQogICAgICAgICAgICA8ZyBpZD0i5Zyw5Zu+5o6n5Yi25bGV5byAIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjIuMDAwMDAwLCAyNTIuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPGcgaWQ9IuWcsOWbvuaUvuWkpyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMDAwMDAwLCAxNDYuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgcng9IjQiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIxMy4xNDI4NTcyIDEzLjE0Mjg1NzIgMTMuMTQyODU3MiAyMCAxMC44NTcxNDI4IDIwIDEwLjg1NzE0MjggMTMuMTQyODU3MiA0IDEzLjE0Mjg1NzIgNCAxMC44NTcxNDI4IDEwLjg1NzE0MjggMTAuODU3MTQyOCAxMC44NTcxNDI4IDQgMTMuMTQyODU3MiA0IDEzLjE0Mjg1NzIgMTAuODU3MTQyOCAyMCAxMC44NTcxNDI4IDIwIDEzLjE0Mjg1NzIiPjwvcG9seWdvbj4NCiAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICA8L2c+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";
|
99
|
-
const _hoisted_1 = /* @__PURE__ */ createElementVNode("img", {
|
329
|
+
const _hoisted_1$1 = /* @__PURE__ */ createElementVNode("img", {
|
100
330
|
src: _imports_0,
|
101
331
|
class: "w-24px h-24px"
|
102
332
|
}, null, -1);
|
103
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
333
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
104
334
|
__name: "index",
|
105
335
|
props: {
|
106
|
-
|
107
|
-
type:
|
108
|
-
default:
|
336
|
+
mapId: {
|
337
|
+
type: String,
|
338
|
+
default: defaultMapIds.mainMapId
|
109
339
|
},
|
110
340
|
placement: {
|
111
341
|
type: String,
|
@@ -114,12 +344,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
114
344
|
},
|
115
345
|
setup(__props) {
|
116
346
|
const props = __props;
|
117
|
-
const { map } = toRefs(props);
|
118
347
|
function zoomIn() {
|
119
|
-
const
|
120
|
-
if (
|
121
|
-
const height =
|
122
|
-
|
348
|
+
const map = getMap({ mapId: props.mapId });
|
349
|
+
if (map) {
|
350
|
+
const height = map.viewer.camera.positionCartographic.height / 10;
|
351
|
+
map.viewer.camera.zoomIn(height);
|
123
352
|
} else {
|
124
353
|
console.log("没有map对象");
|
125
354
|
}
|
@@ -130,7 +359,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
130
359
|
onClick: zoomIn
|
131
360
|
}, [
|
132
361
|
renderSlot(_ctx.$slots, "img", {}, () => [
|
133
|
-
_hoisted_1
|
362
|
+
_hoisted_1$1
|
134
363
|
]),
|
135
364
|
createElementVNode("span", {
|
136
365
|
class: normalizeClass(["invisible group-hover:visible w-max bg-#000 absolute top-50% translate-y--50% text-14px p-4px rd-4px c-#fff lh-16px", __props.placement === "left" ? "right-150% " : "left-150%"])
|
@@ -146,11 +375,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
146
375
|
};
|
147
376
|
}
|
148
377
|
});
|
378
|
+
const _hoisted_1 = { class: "group w-28px h-28px rd-4px bg-#000 f-c-c p-2px float-left m-2px cursor-pointer relative z-999 hover:bg-blue" };
|
379
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
380
|
+
__name: "index",
|
381
|
+
props: {
|
382
|
+
placement: {
|
383
|
+
type: String,
|
384
|
+
default: "left"
|
385
|
+
}
|
386
|
+
},
|
387
|
+
setup(__props) {
|
388
|
+
return (_ctx, _cache) => {
|
389
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
390
|
+
renderSlot(_ctx.$slots, "img"),
|
391
|
+
createElementVNode("span", {
|
392
|
+
class: normalizeClass(["invisible group-hover:visible w-max bg-#000 absolute top-50% translate-y--50% text-14px p-4px rd-4px c-#fff lh-16px", __props.placement === "left" ? "right-150% " : "left-150%"])
|
393
|
+
}, [
|
394
|
+
renderSlot(_ctx.$slots, "default"),
|
395
|
+
createElementVNode("div", {
|
396
|
+
class: normalizeClass(["absolute top-50% translate-y--50% w-0px h-0px b-5px b-solid b-transparent", __props.placement === "left" ? "right--10px b-l-#000 " : "left--10px b-r-#000"])
|
397
|
+
}, null, 2)
|
398
|
+
], 2)
|
399
|
+
]);
|
400
|
+
};
|
401
|
+
}
|
402
|
+
});
|
149
403
|
const potatoMap3dUi2 = {
|
150
404
|
install: (app) => {
|
151
|
-
app.component("map3dt",
|
152
|
-
app.component("
|
153
|
-
app.component("
|
405
|
+
app.component("map3dt", _sfc_main$3);
|
406
|
+
app.component("ControlZoomOut", _sfc_main$2);
|
407
|
+
app.component("ControlZoomIn", _sfc_main$1);
|
408
|
+
app.component("ControlMask", _sfc_main);
|
154
409
|
}
|
155
410
|
};
|
156
411
|
export {
|
package/dist/map3d-ui2.umd.js
CHANGED
@@ -2,62 +2,293 @@
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(require("vue")) : typeof define === "function" && define.amd ? define(["vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global["map3d-ui2"] = factory(global.Vue));
|
3
3
|
})(this, function(vue) {
|
4
4
|
"use strict";
|
5
|
+
const __uno = "";
|
5
6
|
const { tudou3d } = window;
|
6
7
|
function initMap(options) {
|
7
8
|
const { id, mapOptions } = options;
|
8
9
|
const map = new tudou3d.Map(id, mapOptions);
|
9
10
|
return map;
|
10
11
|
}
|
11
|
-
const
|
12
|
-
|
12
|
+
const defaultMapIds = {
|
13
|
+
mainMapId: "mainMapId",
|
14
|
+
rollMapId: "rollMapId",
|
15
|
+
splitMapId: "splitMapId"
|
16
|
+
};
|
17
|
+
const mapConfig = {
|
18
|
+
offLine: false,
|
19
|
+
scene: {
|
20
|
+
center: {
|
21
|
+
lat: 34.265944,
|
22
|
+
lng: 108.937913,
|
23
|
+
alt: 223552084e-1,
|
24
|
+
heading: 0,
|
25
|
+
pitch: -90
|
26
|
+
},
|
27
|
+
allowTextureFilterAnisotropic: true
|
28
|
+
},
|
29
|
+
fxaa: true,
|
30
|
+
globe: {
|
31
|
+
preloadAncestors: false
|
32
|
+
},
|
33
|
+
terrain: {
|
34
|
+
url: "//data.mars3d.cn/terrain",
|
35
|
+
show: true,
|
36
|
+
requestVertexNormals: true
|
37
|
+
},
|
38
|
+
control: {
|
39
|
+
infoBox: false,
|
40
|
+
baseLayerPicker: false
|
41
|
+
},
|
42
|
+
basemaps: [
|
43
|
+
{
|
44
|
+
id: 1,
|
45
|
+
name: "天地图卫星",
|
46
|
+
type: "group",
|
47
|
+
show: true,
|
48
|
+
layers: [
|
49
|
+
{
|
50
|
+
type: "tdt",
|
51
|
+
name: "卫星",
|
52
|
+
layer: "img_d",
|
53
|
+
key: [
|
54
|
+
"79dbab637f181bf953e0334bfd179f3e",
|
55
|
+
"7dea3b9cbee02a0d5d15699a4d2cf9cb",
|
56
|
+
"de2d36347d44020b5bab35b48c958801",
|
57
|
+
"d0c7b65873a6b8961d42f656b6ef7ae7",
|
58
|
+
"d5ddf0de8791e734dc8a8296b90cea5e"
|
59
|
+
]
|
60
|
+
},
|
61
|
+
{
|
62
|
+
name: "注记",
|
63
|
+
type: "tdt",
|
64
|
+
layer: "img_z",
|
65
|
+
key: ["de2d36347d44020b5bab35b48c958801"]
|
66
|
+
}
|
67
|
+
]
|
68
|
+
},
|
69
|
+
{
|
70
|
+
id: 2,
|
71
|
+
name: "天地图电子",
|
72
|
+
type: "group",
|
73
|
+
show: false,
|
74
|
+
layers: [
|
75
|
+
{
|
76
|
+
type: "tdt",
|
77
|
+
name: "底图",
|
78
|
+
layer: "vec_d",
|
79
|
+
key: [
|
80
|
+
"79dbab637f181bf953e0334bfd179f3e",
|
81
|
+
"7dea3b9cbee02a0d5d15699a4d2cf9cb",
|
82
|
+
"de2d36347d44020b5bab35b48c958801",
|
83
|
+
"d0c7b65873a6b8961d42f656b6ef7ae7",
|
84
|
+
"d5ddf0de8791e734dc8a8296b90cea5e"
|
85
|
+
]
|
86
|
+
},
|
87
|
+
{
|
88
|
+
name: "注记",
|
89
|
+
type: "tdt",
|
90
|
+
layer: "vec_z",
|
91
|
+
key: ["de2d36347d44020b5bab35b48c958801"]
|
92
|
+
}
|
93
|
+
]
|
94
|
+
},
|
95
|
+
{
|
96
|
+
id: 3,
|
97
|
+
name: "天地图地形地图",
|
98
|
+
type: "group",
|
99
|
+
show: false,
|
100
|
+
layers: [
|
101
|
+
{
|
102
|
+
type: "tdt",
|
103
|
+
name: "底图",
|
104
|
+
layer: "ter_d",
|
105
|
+
key: [
|
106
|
+
"79dbab637f181bf953e0334bfd179f3e",
|
107
|
+
"7dea3b9cbee02a0d5d15699a4d2cf9cb",
|
108
|
+
"de2d36347d44020b5bab35b48c958801",
|
109
|
+
"d0c7b65873a6b8961d42f656b6ef7ae7",
|
110
|
+
"d5ddf0de8791e734dc8a8296b90cea5e"
|
111
|
+
]
|
112
|
+
},
|
113
|
+
{
|
114
|
+
name: "注记",
|
115
|
+
type: "tdt",
|
116
|
+
layer: "ter_z",
|
117
|
+
key: ["de2d36347d44020b5bab35b48c958801"]
|
118
|
+
}
|
119
|
+
]
|
120
|
+
},
|
121
|
+
{
|
122
|
+
id: 7,
|
123
|
+
name: "天地图",
|
124
|
+
type: "group",
|
125
|
+
show: false,
|
126
|
+
layers: [
|
127
|
+
{
|
128
|
+
type: "tdt",
|
129
|
+
name: "底图",
|
130
|
+
layer: "ter_d",
|
131
|
+
key: [
|
132
|
+
"79dbab637f181bf953e0334bfd179f3e",
|
133
|
+
"7dea3b9cbee02a0d5d15699a4d2cf9cb",
|
134
|
+
"de2d36347d44020b5bab35b48c958801",
|
135
|
+
"d0c7b65873a6b8961d42f656b6ef7ae7",
|
136
|
+
"d5ddf0de8791e734dc8a8296b90cea5e"
|
137
|
+
]
|
138
|
+
},
|
139
|
+
{
|
140
|
+
name: "注记",
|
141
|
+
type: "tdt",
|
142
|
+
layer: "ter_z",
|
143
|
+
key: ["de2d36347d44020b5bab35b48c958801"]
|
144
|
+
}
|
145
|
+
]
|
146
|
+
},
|
147
|
+
{
|
148
|
+
id: 4,
|
149
|
+
name: "离线天地图卫星",
|
150
|
+
type: "group",
|
151
|
+
show: false,
|
152
|
+
layers: [
|
153
|
+
{
|
154
|
+
url: "/mapdata/maptile/wgs3857imgD/{z}/{x}/{y}.jpg",
|
155
|
+
type: "xyz",
|
156
|
+
name: "卫星",
|
157
|
+
minimumLevel: 3,
|
158
|
+
maximumLevel: 16,
|
159
|
+
minimumTerrainLevel: 3,
|
160
|
+
maximumTerrainLevel: 18
|
161
|
+
}
|
162
|
+
]
|
163
|
+
},
|
164
|
+
{
|
165
|
+
id: 5,
|
166
|
+
name: "离线天地图电子",
|
167
|
+
type: "group",
|
168
|
+
show: false,
|
169
|
+
layers: [
|
170
|
+
{
|
171
|
+
url: "/mapdata/maptile/wgs3857img/{z}/{x}/{y}.jpg",
|
172
|
+
type: "xyz",
|
173
|
+
name: "电子",
|
174
|
+
minimumLevel: 1,
|
175
|
+
maximumLevel: 13,
|
176
|
+
minimumTerrainLevel: 1,
|
177
|
+
maximumTerrainLevel: 16
|
178
|
+
},
|
179
|
+
{
|
180
|
+
url: "/mapdata/maptile/wgs3857imgZ/{z}/{x}/{y}.png",
|
181
|
+
type: "xyz",
|
182
|
+
name: "注记",
|
183
|
+
minimumLevel: 1,
|
184
|
+
maximumLevel: 13,
|
185
|
+
minimumTerrainLevel: 1,
|
186
|
+
maximumTerrainLevel: 16
|
187
|
+
}
|
188
|
+
]
|
189
|
+
},
|
190
|
+
{
|
191
|
+
id: 6,
|
192
|
+
name: "离线天地图地形地图",
|
193
|
+
type: "group",
|
194
|
+
show: false,
|
195
|
+
layers: [
|
196
|
+
{
|
197
|
+
url: "/mapdata/maptile/wgs3857vec/{z}/{x}/{y}.jpg",
|
198
|
+
type: "xyz",
|
199
|
+
name: "电子",
|
200
|
+
minimumLevel: 1,
|
201
|
+
maximumLevel: 13,
|
202
|
+
minimumTerrainLevel: 1,
|
203
|
+
maximumTerrainLevel: 16
|
204
|
+
},
|
205
|
+
{
|
206
|
+
type: "xyz",
|
207
|
+
name: "注记",
|
208
|
+
minimumLevel: 1,
|
209
|
+
maximumLevel: 13,
|
210
|
+
minimumTerrainLevel: 1,
|
211
|
+
maximumTerrainLevel: 16
|
212
|
+
}
|
213
|
+
]
|
214
|
+
}
|
215
|
+
]
|
216
|
+
};
|
217
|
+
const { mainMapId } = defaultMapIds;
|
218
|
+
const mapsObject = {};
|
219
|
+
function setMap(options) {
|
220
|
+
const { mapId, map } = options;
|
221
|
+
const key = mapId || mainMapId;
|
222
|
+
mapsObject[key] = map;
|
223
|
+
window.mapsObject = mapsObject;
|
224
|
+
}
|
225
|
+
function getMap(options) {
|
226
|
+
const { mapId } = options;
|
227
|
+
const key = mapId || mainMapId;
|
228
|
+
const map = mapsObject[key];
|
229
|
+
if (!map) {
|
230
|
+
console.log(`当前mapId:${mapId}的map对象不存在`);
|
231
|
+
}
|
232
|
+
return map;
|
233
|
+
}
|
234
|
+
function removeMap(options) {
|
235
|
+
const { mapId } = options;
|
236
|
+
const key = mapId || mainMapId;
|
237
|
+
const map = mapsObject[key];
|
238
|
+
if (map) {
|
239
|
+
map.destroy();
|
240
|
+
delete mapsObject[key];
|
241
|
+
} else {
|
242
|
+
console.log(`mapId为${mapId}的map对象已删除`);
|
243
|
+
}
|
244
|
+
}
|
245
|
+
const _hoisted_1$3 = ["id"];
|
246
|
+
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
13
247
|
__name: "index",
|
14
248
|
props: {
|
15
249
|
mapOptions: {
|
16
250
|
type: Object,
|
17
|
-
|
251
|
+
default: null
|
18
252
|
},
|
19
253
|
mapId: {
|
20
|
-
type:
|
21
|
-
default:
|
254
|
+
type: String,
|
255
|
+
default: defaultMapIds.mainMapId
|
22
256
|
}
|
23
257
|
},
|
24
|
-
|
258
|
+
emits: ["onInitMap"],
|
259
|
+
setup(__props, { emit }) {
|
25
260
|
const props = __props;
|
26
|
-
const { mapOptions
|
261
|
+
const { mapOptions } = props;
|
27
262
|
vue.onMounted(() => {
|
28
|
-
|
29
|
-
id: mapId
|
30
|
-
mapOptions: mapOptions
|
263
|
+
const map = initMap({
|
264
|
+
id: `${props.mapId}-map`,
|
265
|
+
mapOptions: mapOptions || mapConfig
|
31
266
|
});
|
267
|
+
setMap({ mapId: props.mapId, map });
|
268
|
+
emit("onInitMap", map);
|
269
|
+
});
|
270
|
+
vue.onUnmounted(() => {
|
271
|
+
removeMap({ mapId: props.mapId });
|
32
272
|
});
|
33
273
|
return (_ctx, _cache) => {
|
34
274
|
return vue.openBlock(), vue.createElementBlock("div", {
|
35
|
-
class: "
|
36
|
-
id:
|
37
|
-
}, null, 8, _hoisted_1$
|
275
|
+
class: "w-100% h-100%",
|
276
|
+
id: `${__props.mapId}-map`
|
277
|
+
}, null, 8, _hoisted_1$3);
|
38
278
|
};
|
39
279
|
}
|
40
280
|
});
|
41
|
-
const index_vue_vue_type_style_index_0_scoped_914d176b_lang = "";
|
42
|
-
const _export_sfc = (sfc, props) => {
|
43
|
-
const target = sfc.__vccOpts || sfc;
|
44
|
-
for (const [key, val] of props) {
|
45
|
-
target[key] = val;
|
46
|
-
}
|
47
|
-
return target;
|
48
|
-
};
|
49
|
-
const Map3dt = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-914d176b"]]);
|
50
281
|
const _imports_0$1 = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxnIGlkPSLpo47moLzorr7orqEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0i5bel5YW3LeWcsOWbvuaOp+WItiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQzMC4wMDAwMDAsIC00MzAuMDAwMDAwKSI+DQogICAgICAgICAgICA8ZyBpZD0i5Zyw5Zu+5o6n5Yi25bGV5byAIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjIuMDAwMDAwLCAyNTIuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPGcgaWQ9IuWcsOWbvue8qeWwjyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMDAwMDAwLCAxNzguMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgcng9IjQiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSI0IDEzIDQgMTEgMjAgMTEgMjAgMTMiPjwvcG9seWdvbj4NCiAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICA8L2c+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";
|
51
|
-
const _hoisted_1$
|
282
|
+
const _hoisted_1$2 = /* @__PURE__ */ vue.createElementVNode("img", {
|
52
283
|
src: _imports_0$1,
|
53
284
|
class: "w-24px h-24px"
|
54
285
|
}, null, -1);
|
55
|
-
const _sfc_main$
|
286
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
56
287
|
__name: "index",
|
57
288
|
props: {
|
58
|
-
|
59
|
-
type:
|
60
|
-
default:
|
289
|
+
mapId: {
|
290
|
+
type: String,
|
291
|
+
default: defaultMapIds.mainMapId
|
61
292
|
},
|
62
293
|
placement: {
|
63
294
|
type: String,
|
@@ -66,12 +297,11 @@
|
|
66
297
|
},
|
67
298
|
setup(__props) {
|
68
299
|
const props = __props;
|
69
|
-
const { map } = vue.toRefs(props);
|
70
300
|
function zoomOut() {
|
71
|
-
const
|
72
|
-
if (
|
73
|
-
const height =
|
74
|
-
|
301
|
+
const map = getMap({ mapId: props.mapId });
|
302
|
+
if (map) {
|
303
|
+
const height = map.viewer.camera.positionCartographic.height / 10;
|
304
|
+
map.viewer.camera.zoomOut(height);
|
75
305
|
} else {
|
76
306
|
console.log("没有map对象");
|
77
307
|
}
|
@@ -82,7 +312,7 @@
|
|
82
312
|
onClick: zoomOut
|
83
313
|
}, [
|
84
314
|
vue.renderSlot(_ctx.$slots, "img", {}, () => [
|
85
|
-
_hoisted_1$
|
315
|
+
_hoisted_1$2
|
86
316
|
]),
|
87
317
|
vue.createElementVNode("span", {
|
88
318
|
class: vue.normalizeClass(["invisible group-hover:visible w-max bg-#000 absolute top-50% translate-y--50% text-14px p-4px rd-4px c-#fff lh-16px", __props.placement === "left" ? "right-150% " : "left-150%"])
|
@@ -99,16 +329,16 @@
|
|
99
329
|
}
|
100
330
|
});
|
101
331
|
const _imports_0 = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxnIGlkPSLpo47moLzorr7orqEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0i5bel5YW3LeWcsOWbvuaOp+WItiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQzMC4wMDAwMDAsIC0zOTguMDAwMDAwKSI+DQogICAgICAgICAgICA8ZyBpZD0i5Zyw5Zu+5o6n5Yi25bGV5byAIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjIuMDAwMDAwLCAyNTIuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPGcgaWQ9IuWcsOWbvuaUvuWkpyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMDAwMDAwLCAxNDYuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgcng9IjQiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIxMy4xNDI4NTcyIDEzLjE0Mjg1NzIgMTMuMTQyODU3MiAyMCAxMC44NTcxNDI4IDIwIDEwLjg1NzE0MjggMTMuMTQyODU3MiA0IDEzLjE0Mjg1NzIgNCAxMC44NTcxNDI4IDEwLjg1NzE0MjggMTAuODU3MTQyOCAxMC44NTcxNDI4IDQgMTMuMTQyODU3MiA0IDEzLjE0Mjg1NzIgMTAuODU3MTQyOCAyMCAxMC44NTcxNDI4IDIwIDEzLjE0Mjg1NzIiPjwvcG9seWdvbj4NCiAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICA8L2c+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";
|
102
|
-
const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("img", {
|
332
|
+
const _hoisted_1$1 = /* @__PURE__ */ vue.createElementVNode("img", {
|
103
333
|
src: _imports_0,
|
104
334
|
class: "w-24px h-24px"
|
105
335
|
}, null, -1);
|
106
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
336
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
107
337
|
__name: "index",
|
108
338
|
props: {
|
109
|
-
|
110
|
-
type:
|
111
|
-
default:
|
339
|
+
mapId: {
|
340
|
+
type: String,
|
341
|
+
default: defaultMapIds.mainMapId
|
112
342
|
},
|
113
343
|
placement: {
|
114
344
|
type: String,
|
@@ -117,12 +347,11 @@
|
|
117
347
|
},
|
118
348
|
setup(__props) {
|
119
349
|
const props = __props;
|
120
|
-
const { map } = vue.toRefs(props);
|
121
350
|
function zoomIn() {
|
122
|
-
const
|
123
|
-
if (
|
124
|
-
const height =
|
125
|
-
|
351
|
+
const map = getMap({ mapId: props.mapId });
|
352
|
+
if (map) {
|
353
|
+
const height = map.viewer.camera.positionCartographic.height / 10;
|
354
|
+
map.viewer.camera.zoomIn(height);
|
126
355
|
} else {
|
127
356
|
console.log("没有map对象");
|
128
357
|
}
|
@@ -133,7 +362,7 @@
|
|
133
362
|
onClick: zoomIn
|
134
363
|
}, [
|
135
364
|
vue.renderSlot(_ctx.$slots, "img", {}, () => [
|
136
|
-
_hoisted_1
|
365
|
+
_hoisted_1$1
|
137
366
|
]),
|
138
367
|
vue.createElementVNode("span", {
|
139
368
|
class: vue.normalizeClass(["invisible group-hover:visible w-max bg-#000 absolute top-50% translate-y--50% text-14px p-4px rd-4px c-#fff lh-16px", __props.placement === "left" ? "right-150% " : "left-150%"])
|
@@ -149,11 +378,37 @@
|
|
149
378
|
};
|
150
379
|
}
|
151
380
|
});
|
381
|
+
const _hoisted_1 = { class: "group w-28px h-28px rd-4px bg-#000 f-c-c p-2px float-left m-2px cursor-pointer relative z-999 hover:bg-blue" };
|
382
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
383
|
+
__name: "index",
|
384
|
+
props: {
|
385
|
+
placement: {
|
386
|
+
type: String,
|
387
|
+
default: "left"
|
388
|
+
}
|
389
|
+
},
|
390
|
+
setup(__props) {
|
391
|
+
return (_ctx, _cache) => {
|
392
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
393
|
+
vue.renderSlot(_ctx.$slots, "img"),
|
394
|
+
vue.createElementVNode("span", {
|
395
|
+
class: vue.normalizeClass(["invisible group-hover:visible w-max bg-#000 absolute top-50% translate-y--50% text-14px p-4px rd-4px c-#fff lh-16px", __props.placement === "left" ? "right-150% " : "left-150%"])
|
396
|
+
}, [
|
397
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
398
|
+
vue.createElementVNode("div", {
|
399
|
+
class: vue.normalizeClass(["absolute top-50% translate-y--50% w-0px h-0px b-5px b-solid b-transparent", __props.placement === "left" ? "right--10px b-l-#000 " : "left--10px b-r-#000"])
|
400
|
+
}, null, 2)
|
401
|
+
], 2)
|
402
|
+
]);
|
403
|
+
};
|
404
|
+
}
|
405
|
+
});
|
152
406
|
const potatoMap3dUi2 = {
|
153
407
|
install: (app) => {
|
154
|
-
app.component("map3dt",
|
155
|
-
app.component("
|
156
|
-
app.component("
|
408
|
+
app.component("map3dt", _sfc_main$3);
|
409
|
+
app.component("ControlZoomOut", _sfc_main$2);
|
410
|
+
app.component("ControlZoomIn", _sfc_main$1);
|
411
|
+
app.component("ControlMask", _sfc_main);
|
157
412
|
}
|
158
413
|
};
|
159
414
|
return potatoMap3dUi2;
|
package/dist/style.css
CHANGED
@@ -1,5 +1 @@
|
|
1
|
-
|
2
|
-
.map3d-class[data-v-914d176b] {
|
3
|
-
width: 100%;
|
4
|
-
height: 100%;
|
5
|
-
}
|
1
|
+
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}.f-c-c{display:flex;align-items:center;justify-content:center;}.group:hover .group-hover\:visible{visibility:visible;}.invisible{visibility:hidden;}.absolute{position:absolute;}.relative{position:relative;}.left--10px{left:-10px;}.left-150\%{left:150%;}.right--10px{right:-10px;}.right-150\%{right:150%;}.top-50\%{top:50%;}.z-999{z-index:999;}.float-left{float:left;}.m-2px{margin:2px;}.h-0px{height:0;}.h-100\%{height:100%;}.h-24px{height:24px;}.h-28px{height:28px;}.w-0px{width:0;}.w-100\%{width:100%;}.w-24px{width:24px;}.w-28px{width:28px;}.w-max{width:max-content;}.translate-y--50\%{--un-translate-y:-50%;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}.cursor-pointer{cursor:pointer;}.b-5px{border-width:5px;}.b-transparent{border-color:transparent;}.b-l-\#000{--un-border-opacity:1;--un-border-left-opacity:var(--un-border-opacity);border-left-color:rgba(0,0,0,var(--un-border-left-opacity));}.b-r-\#000{--un-border-opacity:1;--un-border-right-opacity:var(--un-border-opacity);border-right-color:rgba(0,0,0,var(--un-border-right-opacity));}.rd-4px{border-radius:4px;}.b-solid{border-style:solid;}.bg-\#000{--un-bg-opacity:1;background-color:rgba(0,0,0,var(--un-bg-opacity));}.hover\:bg-blue:hover{--un-bg-opacity:1;background-color:rgba(96,165,250,var(--un-bg-opacity));}.p-2px{padding:2px;}.p-4px{padding:4px;}.text-14px{font-size:14px;}.lh-16px{line-height:16px;}.c-\#fff{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}
|
package/package.json
CHANGED
@@ -1,35 +1,35 @@
|
|
1
|
-
{
|
2
|
-
"name": "potato-map3d-ui2",
|
3
|
-
"private": false,
|
4
|
-
"version": "0.0.
|
5
|
-
"main": "./dist/map3d-ui2.umd.js",
|
6
|
-
"module": "./dist/map3d-ui2.es.js",
|
7
|
-
"type": "module",
|
8
|
-
"files": [
|
9
|
-
"dist"
|
10
|
-
],
|
11
|
-
"exports": {
|
12
|
-
".": {
|
13
|
-
"import": "./dist/map3d-ui2.es.js",
|
14
|
-
"require": "./dist/map3d-ui2.umd.js"
|
15
|
-
},
|
16
|
-
"./*": "./*"
|
17
|
-
},
|
18
|
-
"scripts": {
|
19
|
-
"dev": "vite",
|
20
|
-
"build": "vue-tsc && vite build",
|
21
|
-
"preview": "vite preview"
|
22
|
-
},
|
23
|
-
"dependencies": {
|
24
|
-
"vite-plugin-dts": "^2.2.0",
|
25
|
-
"vue": "^3.2.47"
|
26
|
-
},
|
27
|
-
"devDependencies": {
|
28
|
-
"@types/node": "^18.15.11",
|
29
|
-
"@vitejs/plugin-vue": "^4.2.1",
|
30
|
-
"typescript": "^4.9.3",
|
31
|
-
"unocss": "^0.53.6",
|
32
|
-
"vite": "^4.3.2",
|
33
|
-
"vue-tsc": "^1.2.0"
|
34
|
-
}
|
35
|
-
}
|
1
|
+
{
|
2
|
+
"name": "potato-map3d-ui2",
|
3
|
+
"private": false,
|
4
|
+
"version": "0.0.18",
|
5
|
+
"main": "./dist/map3d-ui2.umd.js",
|
6
|
+
"module": "./dist/map3d-ui2.es.js",
|
7
|
+
"type": "module",
|
8
|
+
"files": [
|
9
|
+
"dist"
|
10
|
+
],
|
11
|
+
"exports": {
|
12
|
+
".": {
|
13
|
+
"import": "./dist/map3d-ui2.es.js",
|
14
|
+
"require": "./dist/map3d-ui2.umd.js"
|
15
|
+
},
|
16
|
+
"./*": "./*"
|
17
|
+
},
|
18
|
+
"scripts": {
|
19
|
+
"dev": "vite",
|
20
|
+
"build": "vue-tsc && vite build",
|
21
|
+
"preview": "vite preview"
|
22
|
+
},
|
23
|
+
"dependencies": {
|
24
|
+
"vite-plugin-dts": "^2.2.0",
|
25
|
+
"vue": "^3.2.47"
|
26
|
+
},
|
27
|
+
"devDependencies": {
|
28
|
+
"@types/node": "^18.15.11",
|
29
|
+
"@vitejs/plugin-vue": "^4.2.1",
|
30
|
+
"typescript": "^4.9.3",
|
31
|
+
"unocss": "^0.53.6",
|
32
|
+
"vite": "^4.3.2",
|
33
|
+
"vue-tsc": "^1.2.0"
|
34
|
+
}
|
35
|
+
}
|