sctj-components 1.0.56 → 1.0.57
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/lib/sctj-components.es.js +24 -6
- package/lib/sctj-components.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -5031,7 +5031,7 @@ const _sfc_main$6 = {
|
|
|
5031
5031
|
};
|
|
5032
5032
|
}
|
|
5033
5033
|
};
|
|
5034
|
-
const
|
|
5034
|
+
const index_vue_vue_type_style_index_0_scoped_0946936d_lang = "";
|
|
5035
5035
|
const _hoisted_1$4 = { class: "action-container" };
|
|
5036
5036
|
const _hoisted_2$3 = {
|
|
5037
5037
|
key: 0,
|
|
@@ -5110,8 +5110,8 @@ const _sfc_main$5 = {
|
|
|
5110
5110
|
setup(__props, { expose, emit }) {
|
|
5111
5111
|
const props = __props;
|
|
5112
5112
|
useCssVars((_ctx) => ({
|
|
5113
|
-
"
|
|
5114
|
-
"
|
|
5113
|
+
"1dd03d1d": __props.width,
|
|
5114
|
+
"fb2f26a0": __props.height
|
|
5115
5115
|
}));
|
|
5116
5116
|
const mapContainer = ref$1(null);
|
|
5117
5117
|
const map = shallowRef(null);
|
|
@@ -5120,6 +5120,7 @@ const _sfc_main$5 = {
|
|
|
5120
5120
|
const satelliteLayer = shallowRef(null);
|
|
5121
5121
|
shallowRef(null);
|
|
5122
5122
|
const controlBar = shallowRef(null);
|
|
5123
|
+
const toolBar = shallowRef(null);
|
|
5123
5124
|
const staticMarkerInstances = shallowRef([]);
|
|
5124
5125
|
const dynamicMarkerInstances = shallowRef([]);
|
|
5125
5126
|
const polylineInstances = shallowRef([]);
|
|
@@ -5301,6 +5302,12 @@ const _sfc_main$5 = {
|
|
|
5301
5302
|
controlBar.value = null;
|
|
5302
5303
|
}
|
|
5303
5304
|
};
|
|
5305
|
+
const clearMapToolBar = () => {
|
|
5306
|
+
if (toolBar.value) {
|
|
5307
|
+
map.value.removeControl(toolBar.value);
|
|
5308
|
+
toolBar.value = null;
|
|
5309
|
+
}
|
|
5310
|
+
};
|
|
5304
5311
|
onMounted$1(async () => {
|
|
5305
5312
|
await initMap();
|
|
5306
5313
|
handleMapEvents();
|
|
@@ -5320,6 +5327,7 @@ const _sfc_main$5 = {
|
|
|
5320
5327
|
if (map.value) {
|
|
5321
5328
|
clearMapEvents();
|
|
5322
5329
|
clearMapControlBar();
|
|
5330
|
+
clearMapToolBar();
|
|
5323
5331
|
clearStaticMarkers();
|
|
5324
5332
|
clearDynamicMarkers();
|
|
5325
5333
|
clearPolylines();
|
|
@@ -5349,13 +5357,14 @@ const _sfc_main$5 = {
|
|
|
5349
5357
|
const AMap2 = await AMapLoader.load({
|
|
5350
5358
|
key: props.amapKey,
|
|
5351
5359
|
version: "2.0",
|
|
5352
|
-
plugins: ["AMap.Marker", "AMap.Polyline", "AMap.Polygon", "AMap.BezierCurve", "AMap.Circle", "AMap.Text", "AMap.LabelMarker", "AMap.BezierCurveEditor", "AMap.TileLayer.Satellite", "AMap.ControlBar", "AMap.OverlayGroup"]
|
|
5360
|
+
plugins: ["AMap.Marker", "AMap.Polyline", "AMap.Polygon", "AMap.BezierCurve", "AMap.Circle", "AMap.Text", "AMap.LabelMarker", "AMap.BezierCurveEditor", "AMap.TileLayer.Satellite", "AMap.ControlBar", "AMap.OverlayGroup", "AMap.ToolBar"]
|
|
5353
5361
|
});
|
|
5354
5362
|
const mapConfig = {
|
|
5355
5363
|
viewMode: props.viewMode,
|
|
5356
5364
|
zoom: 15,
|
|
5357
5365
|
mapStyle: props.mapStyle,
|
|
5358
|
-
center: parsePosition(props.center) || [116.397428, 39.90923]
|
|
5366
|
+
center: parsePosition(props.center) || [116.397428, 39.90923],
|
|
5367
|
+
zooms: [3, 25]
|
|
5359
5368
|
};
|
|
5360
5369
|
if (props.viewMode === "3D") {
|
|
5361
5370
|
mapConfig.pitch = 45;
|
|
@@ -5375,6 +5384,15 @@ const _sfc_main$5 = {
|
|
|
5375
5384
|
map.value.addControl(controlBar.value);
|
|
5376
5385
|
}
|
|
5377
5386
|
}
|
|
5387
|
+
if (!toolBar.value) {
|
|
5388
|
+
toolBar.value = new AMap2.ToolBar({
|
|
5389
|
+
position: {
|
|
5390
|
+
top: "10px",
|
|
5391
|
+
left: "10px"
|
|
5392
|
+
}
|
|
5393
|
+
});
|
|
5394
|
+
map.value.addControl(toolBar.value);
|
|
5395
|
+
}
|
|
5378
5396
|
state.currentZoom = map.value.getZoom();
|
|
5379
5397
|
} catch (error) {
|
|
5380
5398
|
console.error("Failed to load AMap:", error);
|
|
@@ -5973,7 +5991,7 @@ const _sfc_main$5 = {
|
|
|
5973
5991
|
};
|
|
5974
5992
|
}
|
|
5975
5993
|
};
|
|
5976
|
-
const SCTJMapViewer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
5994
|
+
const SCTJMapViewer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-0946936d"]]);
|
|
5977
5995
|
const index_vue_vue_type_style_index_0_scoped_761d2ab4_lang = "";
|
|
5978
5996
|
const _withScopeId$2 = (n) => (pushScopeId("data-v-761d2ab4"), n = n(), popScopeId(), n);
|
|
5979
5997
|
const _hoisted_1$3 = {
|