potato-map3d-ui2 0.0.17 → 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 +302 -48
- package/dist/map3d-ui2.umd.js +301 -47
- package/dist/style.css +1 -5
- package/package.json +35 -35
package/dist/map3d-ui2.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent,
|
1
|
+
import { defineComponent, onMounted, onUnmounted, openBlock, createElementBlock, renderSlot, createElementVNode, normalizeClass, createTextVNode } from "vue";
|
2
2
|
const __uno = "";
|
3
3
|
const { tudou3d } = window;
|
4
4
|
function initMap(options) {
|
@@ -6,56 +6,286 @@ function initMap(options) {
|
|
6
6
|
const map = new tudou3d.Map(id, mapOptions);
|
7
7
|
return map;
|
8
8
|
}
|
9
|
-
const
|
10
|
-
|
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({
|
11
244
|
__name: "index",
|
12
245
|
props: {
|
13
246
|
mapOptions: {
|
14
247
|
type: Object,
|
15
|
-
|
248
|
+
default: null
|
16
249
|
},
|
17
250
|
mapId: {
|
18
|
-
type:
|
19
|
-
default:
|
251
|
+
type: String,
|
252
|
+
default: defaultMapIds.mainMapId
|
20
253
|
}
|
21
254
|
},
|
22
|
-
|
255
|
+
emits: ["onInitMap"],
|
256
|
+
setup(__props, { emit }) {
|
23
257
|
const props = __props;
|
24
|
-
const { mapOptions
|
258
|
+
const { mapOptions } = props;
|
25
259
|
onMounted(() => {
|
26
|
-
|
27
|
-
id: mapId
|
28
|
-
mapOptions: mapOptions
|
260
|
+
const map = initMap({
|
261
|
+
id: `${props.mapId}-map`,
|
262
|
+
mapOptions: mapOptions || mapConfig
|
29
263
|
});
|
264
|
+
setMap({ mapId: props.mapId, map });
|
265
|
+
emit("onInitMap", map);
|
266
|
+
});
|
267
|
+
onUnmounted(() => {
|
268
|
+
removeMap({ mapId: props.mapId });
|
30
269
|
});
|
31
270
|
return (_ctx, _cache) => {
|
32
271
|
return openBlock(), createElementBlock("div", {
|
33
|
-
class: "
|
34
|
-
id:
|
35
|
-
}, null, 8, _hoisted_1$
|
272
|
+
class: "w-100% h-100%",
|
273
|
+
id: `${__props.mapId}-map`
|
274
|
+
}, null, 8, _hoisted_1$3);
|
36
275
|
};
|
37
276
|
}
|
38
277
|
});
|
39
|
-
const index_vue_vue_type_style_index_0_scoped_914d176b_lang = "";
|
40
|
-
const _export_sfc = (sfc, props) => {
|
41
|
-
const target = sfc.__vccOpts || sfc;
|
42
|
-
for (const [key, val] of props) {
|
43
|
-
target[key] = val;
|
44
|
-
}
|
45
|
-
return target;
|
46
|
-
};
|
47
|
-
const Map3dt = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-914d176b"]]);
|
48
278
|
const _imports_0$1 = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxnIGlkPSLpo47moLzorr7orqEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0i5bel5YW3LeWcsOWbvuaOp+WItiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQzMC4wMDAwMDAsIC00MzAuMDAwMDAwKSI+DQogICAgICAgICAgICA8ZyBpZD0i5Zyw5Zu+5o6n5Yi25bGV5byAIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjIuMDAwMDAwLCAyNTIuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPGcgaWQ9IuWcsOWbvue8qeWwjyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMDAwMDAwLCAxNzguMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgcng9IjQiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSI0IDEzIDQgMTEgMjAgMTEgMjAgMTMiPjwvcG9seWdvbj4NCiAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICA8L2c+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";
|
49
|
-
const _hoisted_1$
|
279
|
+
const _hoisted_1$2 = /* @__PURE__ */ createElementVNode("img", {
|
50
280
|
src: _imports_0$1,
|
51
281
|
class: "w-24px h-24px"
|
52
282
|
}, null, -1);
|
53
|
-
const _sfc_main$
|
283
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
54
284
|
__name: "index",
|
55
285
|
props: {
|
56
|
-
|
57
|
-
type:
|
58
|
-
default:
|
286
|
+
mapId: {
|
287
|
+
type: String,
|
288
|
+
default: defaultMapIds.mainMapId
|
59
289
|
},
|
60
290
|
placement: {
|
61
291
|
type: String,
|
@@ -64,12 +294,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
64
294
|
},
|
65
295
|
setup(__props) {
|
66
296
|
const props = __props;
|
67
|
-
const { map } = toRefs(props);
|
68
297
|
function zoomOut() {
|
69
|
-
const
|
70
|
-
if (
|
71
|
-
const height =
|
72
|
-
|
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);
|
73
302
|
} else {
|
74
303
|
console.log("没有map对象");
|
75
304
|
}
|
@@ -80,7 +309,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
80
309
|
onClick: zoomOut
|
81
310
|
}, [
|
82
311
|
renderSlot(_ctx.$slots, "img", {}, () => [
|
83
|
-
_hoisted_1$
|
312
|
+
_hoisted_1$2
|
84
313
|
]),
|
85
314
|
createElementVNode("span", {
|
86
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%"])
|
@@ -97,16 +326,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
97
326
|
}
|
98
327
|
});
|
99
328
|
const _imports_0 = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxnIGlkPSLpo47moLzorr7orqEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0i5bel5YW3LeWcsOWbvuaOp+WItiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQzMC4wMDAwMDAsIC0zOTguMDAwMDAwKSI+DQogICAgICAgICAgICA8ZyBpZD0i5Zyw5Zu+5o6n5Yi25bGV5byAIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjIuMDAwMDAwLCAyNTIuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPGcgaWQ9IuWcsOWbvuaUvuWkpyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMDAwMDAwLCAxNDYuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgcng9IjQiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIxMy4xNDI4NTcyIDEzLjE0Mjg1NzIgMTMuMTQyODU3MiAyMCAxMC44NTcxNDI4IDIwIDEwLjg1NzE0MjggMTMuMTQyODU3MiA0IDEzLjE0Mjg1NzIgNCAxMC44NTcxNDI4IDEwLjg1NzE0MjggMTAuODU3MTQyOCAxMC44NTcxNDI4IDQgMTMuMTQyODU3MiA0IDEzLjE0Mjg1NzIgMTAuODU3MTQyOCAyMCAxMC44NTcxNDI4IDIwIDEzLjE0Mjg1NzIiPjwvcG9seWdvbj4NCiAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICA8L2c+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";
|
100
|
-
const _hoisted_1 = /* @__PURE__ */ createElementVNode("img", {
|
329
|
+
const _hoisted_1$1 = /* @__PURE__ */ createElementVNode("img", {
|
101
330
|
src: _imports_0,
|
102
331
|
class: "w-24px h-24px"
|
103
332
|
}, null, -1);
|
104
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
333
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
105
334
|
__name: "index",
|
106
335
|
props: {
|
107
|
-
|
108
|
-
type:
|
109
|
-
default:
|
336
|
+
mapId: {
|
337
|
+
type: String,
|
338
|
+
default: defaultMapIds.mainMapId
|
110
339
|
},
|
111
340
|
placement: {
|
112
341
|
type: String,
|
@@ -115,12 +344,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
115
344
|
},
|
116
345
|
setup(__props) {
|
117
346
|
const props = __props;
|
118
|
-
const { map } = toRefs(props);
|
119
347
|
function zoomIn() {
|
120
|
-
const
|
121
|
-
if (
|
122
|
-
const height =
|
123
|
-
|
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);
|
124
352
|
} else {
|
125
353
|
console.log("没有map对象");
|
126
354
|
}
|
@@ -131,7 +359,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
131
359
|
onClick: zoomIn
|
132
360
|
}, [
|
133
361
|
renderSlot(_ctx.$slots, "img", {}, () => [
|
134
|
-
_hoisted_1
|
362
|
+
_hoisted_1$1
|
135
363
|
]),
|
136
364
|
createElementVNode("span", {
|
137
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%"])
|
@@ -147,11 +375,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
147
375
|
};
|
148
376
|
}
|
149
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
|
+
});
|
150
403
|
const potatoMap3dUi2 = {
|
151
404
|
install: (app) => {
|
152
|
-
app.component("map3dt",
|
153
|
-
app.component("
|
154
|
-
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);
|
155
409
|
}
|
156
410
|
};
|
157
411
|
export {
|
package/dist/map3d-ui2.umd.js
CHANGED
@@ -9,56 +9,286 @@
|
|
9
9
|
const map = new tudou3d.Map(id, mapOptions);
|
10
10
|
return map;
|
11
11
|
}
|
12
|
-
const
|
13
|
-
|
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({
|
14
247
|
__name: "index",
|
15
248
|
props: {
|
16
249
|
mapOptions: {
|
17
250
|
type: Object,
|
18
|
-
|
251
|
+
default: null
|
19
252
|
},
|
20
253
|
mapId: {
|
21
|
-
type:
|
22
|
-
default:
|
254
|
+
type: String,
|
255
|
+
default: defaultMapIds.mainMapId
|
23
256
|
}
|
24
257
|
},
|
25
|
-
|
258
|
+
emits: ["onInitMap"],
|
259
|
+
setup(__props, { emit }) {
|
26
260
|
const props = __props;
|
27
|
-
const { mapOptions
|
261
|
+
const { mapOptions } = props;
|
28
262
|
vue.onMounted(() => {
|
29
|
-
|
30
|
-
id: mapId
|
31
|
-
mapOptions: mapOptions
|
263
|
+
const map = initMap({
|
264
|
+
id: `${props.mapId}-map`,
|
265
|
+
mapOptions: mapOptions || mapConfig
|
32
266
|
});
|
267
|
+
setMap({ mapId: props.mapId, map });
|
268
|
+
emit("onInitMap", map);
|
269
|
+
});
|
270
|
+
vue.onUnmounted(() => {
|
271
|
+
removeMap({ mapId: props.mapId });
|
33
272
|
});
|
34
273
|
return (_ctx, _cache) => {
|
35
274
|
return vue.openBlock(), vue.createElementBlock("div", {
|
36
|
-
class: "
|
37
|
-
id:
|
38
|
-
}, null, 8, _hoisted_1$
|
275
|
+
class: "w-100% h-100%",
|
276
|
+
id: `${__props.mapId}-map`
|
277
|
+
}, null, 8, _hoisted_1$3);
|
39
278
|
};
|
40
279
|
}
|
41
280
|
});
|
42
|
-
const index_vue_vue_type_style_index_0_scoped_914d176b_lang = "";
|
43
|
-
const _export_sfc = (sfc, props) => {
|
44
|
-
const target = sfc.__vccOpts || sfc;
|
45
|
-
for (const [key, val] of props) {
|
46
|
-
target[key] = val;
|
47
|
-
}
|
48
|
-
return target;
|
49
|
-
};
|
50
|
-
const Map3dt = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-914d176b"]]);
|
51
281
|
const _imports_0$1 = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxnIGlkPSLpo47moLzorr7orqEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0i5bel5YW3LeWcsOWbvuaOp+WItiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQzMC4wMDAwMDAsIC00MzAuMDAwMDAwKSI+DQogICAgICAgICAgICA8ZyBpZD0i5Zyw5Zu+5o6n5Yi25bGV5byAIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjIuMDAwMDAwLCAyNTIuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPGcgaWQ9IuWcsOWbvue8qeWwjyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMDAwMDAwLCAxNzguMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgcng9IjQiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSI0IDEzIDQgMTEgMjAgMTEgMjAgMTMiPjwvcG9seWdvbj4NCiAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICA8L2c+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";
|
52
|
-
const _hoisted_1$
|
282
|
+
const _hoisted_1$2 = /* @__PURE__ */ vue.createElementVNode("img", {
|
53
283
|
src: _imports_0$1,
|
54
284
|
class: "w-24px h-24px"
|
55
285
|
}, null, -1);
|
56
|
-
const _sfc_main$
|
286
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
57
287
|
__name: "index",
|
58
288
|
props: {
|
59
|
-
|
60
|
-
type:
|
61
|
-
default:
|
289
|
+
mapId: {
|
290
|
+
type: String,
|
291
|
+
default: defaultMapIds.mainMapId
|
62
292
|
},
|
63
293
|
placement: {
|
64
294
|
type: String,
|
@@ -67,12 +297,11 @@
|
|
67
297
|
},
|
68
298
|
setup(__props) {
|
69
299
|
const props = __props;
|
70
|
-
const { map } = vue.toRefs(props);
|
71
300
|
function zoomOut() {
|
72
|
-
const
|
73
|
-
if (
|
74
|
-
const height =
|
75
|
-
|
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);
|
76
305
|
} else {
|
77
306
|
console.log("没有map对象");
|
78
307
|
}
|
@@ -83,7 +312,7 @@
|
|
83
312
|
onClick: zoomOut
|
84
313
|
}, [
|
85
314
|
vue.renderSlot(_ctx.$slots, "img", {}, () => [
|
86
|
-
_hoisted_1$
|
315
|
+
_hoisted_1$2
|
87
316
|
]),
|
88
317
|
vue.createElementVNode("span", {
|
89
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%"])
|
@@ -100,16 +329,16 @@
|
|
100
329
|
}
|
101
330
|
});
|
102
331
|
const _imports_0 = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxnIGlkPSLpo47moLzorr7orqEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0i5bel5YW3LeWcsOWbvuaOp+WItiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQzMC4wMDAwMDAsIC0zOTguMDAwMDAwKSI+DQogICAgICAgICAgICA8ZyBpZD0i5Zyw5Zu+5o6n5Yi25bGV5byAIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjIuMDAwMDAwLCAyNTIuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPGcgaWQ9IuWcsOWbvuaUvuWkpyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMDAwMDAwLCAxNDYuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgcng9IjQiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIxMy4xNDI4NTcyIDEzLjE0Mjg1NzIgMTMuMTQyODU3MiAyMCAxMC44NTcxNDI4IDIwIDEwLjg1NzE0MjggMTMuMTQyODU3MiA0IDEzLjE0Mjg1NzIgNCAxMC44NTcxNDI4IDEwLjg1NzE0MjggMTAuODU3MTQyOCAxMC44NTcxNDI4IDQgMTMuMTQyODU3MiA0IDEzLjE0Mjg1NzIgMTAuODU3MTQyOCAyMCAxMC44NTcxNDI4IDIwIDEzLjE0Mjg1NzIiPjwvcG9seWdvbj4NCiAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICA8L2c+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";
|
103
|
-
const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("img", {
|
332
|
+
const _hoisted_1$1 = /* @__PURE__ */ vue.createElementVNode("img", {
|
104
333
|
src: _imports_0,
|
105
334
|
class: "w-24px h-24px"
|
106
335
|
}, null, -1);
|
107
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
336
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
108
337
|
__name: "index",
|
109
338
|
props: {
|
110
|
-
|
111
|
-
type:
|
112
|
-
default:
|
339
|
+
mapId: {
|
340
|
+
type: String,
|
341
|
+
default: defaultMapIds.mainMapId
|
113
342
|
},
|
114
343
|
placement: {
|
115
344
|
type: String,
|
@@ -118,12 +347,11 @@
|
|
118
347
|
},
|
119
348
|
setup(__props) {
|
120
349
|
const props = __props;
|
121
|
-
const { map } = vue.toRefs(props);
|
122
350
|
function zoomIn() {
|
123
|
-
const
|
124
|
-
if (
|
125
|
-
const height =
|
126
|
-
|
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);
|
127
355
|
} else {
|
128
356
|
console.log("没有map对象");
|
129
357
|
}
|
@@ -134,7 +362,7 @@
|
|
134
362
|
onClick: zoomIn
|
135
363
|
}, [
|
136
364
|
vue.renderSlot(_ctx.$slots, "img", {}, () => [
|
137
|
-
_hoisted_1
|
365
|
+
_hoisted_1$1
|
138
366
|
]),
|
139
367
|
vue.createElementVNode("span", {
|
140
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%"])
|
@@ -150,11 +378,37 @@
|
|
150
378
|
};
|
151
379
|
}
|
152
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
|
+
});
|
153
406
|
const potatoMap3dUi2 = {
|
154
407
|
install: (app) => {
|
155
|
-
app.component("map3dt",
|
156
|
-
app.component("
|
157
|
-
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);
|
158
412
|
}
|
159
413
|
};
|
160
414
|
return potatoMap3dUi2;
|
package/dist/style.css
CHANGED
@@ -1,5 +1 @@
|
|
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-24px{height:24px;}.h-28px{height:28px;}.w-0px{width:0;}.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));}
|
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
|
+
}
|