ym-giswidget-2d 1.0.60 → 1.0.62
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/components/layer-switcher/LayerSwitcher.vue.d.ts +4 -1
- package/components/layer-switcher/LayerSwitcher.vue.js +1 -1
- package/components/layer-switcher/LayerSwitcher.vue2.js +9 -5
- package/components/layer-switcher/index.css +10 -10
- package/components/map-view/MapView.vue.d.ts +1 -0
- package/components/map-view/index.d.ts +1 -0
- package/components/multi-screen/MultiScreen.vue.d.ts +1 -0
- package/components/multi-screen/index.d.ts +1 -0
- package/components/toc-card/TocCard.vue.d.ts +16 -1
- package/components/toc-card/TocCard.vue.js +1 -1
- package/components/toc-card/TocCard.vue2.js +3 -2
- package/components/toc-card/index.css +1 -1
- package/components/toc-card/index.d.ts +45 -11
- package/package.json +2 -2
- package/components/layer-switcher/index.d.ts +0 -8
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { IMapService } from 'ym-gis-2d/entity';
|
|
2
2
|
import { default as OLMap } from 'ym-gis-2d/mapView/Map';
|
|
3
|
+
interface ILayerSwitcher extends IMapService {
|
|
4
|
+
isRepels?: boolean;
|
|
5
|
+
}
|
|
3
6
|
type __VLS_Props = {
|
|
4
7
|
map: OLMap;
|
|
5
|
-
layers:
|
|
8
|
+
layers: ILayerSwitcher[];
|
|
6
9
|
};
|
|
7
10
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
8
11
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./LayerSwitcher.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const _LayerSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const _LayerSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d9bf6ad4"]]);
|
|
5
5
|
export {
|
|
6
6
|
_LayerSwitcher as default
|
|
7
7
|
};
|
|
@@ -13,21 +13,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
activeIds: []
|
|
14
14
|
//用户存储当前激活的图层id
|
|
15
15
|
});
|
|
16
|
-
onMounted(() => {
|
|
16
|
+
onMounted(async () => {
|
|
17
17
|
for (const layer of props.layers) {
|
|
18
18
|
if (layer.checked) {
|
|
19
|
-
|
|
20
|
-
props.map.addMapLayer(layer);
|
|
19
|
+
await addLayer(layer);
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
});
|
|
24
|
-
function addLayer(layer) {
|
|
23
|
+
async function addLayer(layer) {
|
|
25
24
|
if (reactiveValues.activeIds.indexOf(layer.id) > -1) {
|
|
26
25
|
reactiveValues.activeIds.splice(reactiveValues.activeIds.indexOf(layer.id), 1);
|
|
27
26
|
props.map.removeLayerById(layer.id);
|
|
28
27
|
} else {
|
|
28
|
+
const ids = props.layers.filter((t) => t.isRepels).map((t) => t.id);
|
|
29
|
+
if (layer.isRepels && ids && ids.length > 0) {
|
|
30
|
+
props.map.removeLayerByIds(ids);
|
|
31
|
+
reactiveValues.activeIds = reactiveValues.activeIds.filter((t) => ids.indexOf(t) === -1);
|
|
32
|
+
}
|
|
29
33
|
reactiveValues.activeIds.push(layer.id);
|
|
30
|
-
props.map.addMapLayer(layer);
|
|
34
|
+
await props.map.addMapLayer(layer);
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
return (_ctx, _cache) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
-
.layerSwitcher[data-v-
|
|
2
|
+
.layerSwitcher[data-v-d9bf6ad4] {
|
|
3
3
|
width: 106px;
|
|
4
4
|
height: 70px;
|
|
5
5
|
position: absolute;
|
|
@@ -16,22 +16,22 @@
|
|
|
16
16
|
-o-transition: width 0.8s, height 0.8s, -o-transform 0.8s;
|
|
17
17
|
/* Opera */
|
|
18
18
|
}
|
|
19
|
-
.layerSwitcher[data-v-
|
|
19
|
+
.layerSwitcher[data-v-d9bf6ad4]:hover {
|
|
20
20
|
width: unset;
|
|
21
21
|
padding-right: 5px;
|
|
22
22
|
background: rgba(255, 255, 255, 0.3);
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
25
25
|
}
|
|
26
|
-
.layerSwitcher:hover .layer[data-v-
|
|
26
|
+
.layerSwitcher:hover .layer[data-v-d9bf6ad4] {
|
|
27
27
|
margin-left: 5px;
|
|
28
28
|
position: unset;
|
|
29
29
|
}
|
|
30
|
-
.layerSwitcher:hover span[data-v-
|
|
30
|
+
.layerSwitcher:hover span[data-v-d9bf6ad4] {
|
|
31
31
|
position: unset !important;
|
|
32
32
|
margin-top: 42px;
|
|
33
33
|
}
|
|
34
|
-
.layerSwitcher .mapTypeCard[data-v-
|
|
34
|
+
.layerSwitcher .mapTypeCard[data-v-d9bf6ad4] {
|
|
35
35
|
position: absolute;
|
|
36
36
|
top: 5px;
|
|
37
37
|
width: 86px;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
-o-transition: right 0.8s;
|
|
54
54
|
/* Opera */
|
|
55
55
|
}
|
|
56
|
-
.layerSwitcher .mapTypeCard span[data-v-
|
|
56
|
+
.layerSwitcher .mapTypeCard span[data-v-d9bf6ad4] {
|
|
57
57
|
width: 84px;
|
|
58
58
|
border-radius: 2px;
|
|
59
59
|
height: 16px;
|
|
@@ -67,15 +67,15 @@
|
|
|
67
67
|
background: #888f88;
|
|
68
68
|
opacity: 0.8;
|
|
69
69
|
}
|
|
70
|
-
.layerSwitcher .layer[data-v-
|
|
70
|
+
.layerSwitcher .layer[data-v-d9bf6ad4] {
|
|
71
71
|
background-position: center;
|
|
72
72
|
background-repeat: no-repeat;
|
|
73
73
|
background-size: cover;
|
|
74
74
|
}
|
|
75
|
-
.layerSwitcher .layer[data-v-
|
|
75
|
+
.layerSwitcher .layer[data-v-d9bf6ad4]:hover {
|
|
76
76
|
border: solid 1px #31a5f7;
|
|
77
77
|
}
|
|
78
|
-
.layerSwitcher .layer:hover span[data-v-
|
|
79
|
-
.layerSwitcher .active span[data-v-
|
|
78
|
+
.layerSwitcher .layer:hover span[data-v-d9bf6ad4],
|
|
79
|
+
.layerSwitcher .active span[data-v-d9bf6ad4] {
|
|
80
80
|
background: #31a5f7;
|
|
81
81
|
}
|
|
@@ -400,6 +400,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
400
400
|
addMapLayers: (layerInfo: import('ym-gis-2d/entity').IMapService[]) => Promise<import('ol/layer/Base').default[]>;
|
|
401
401
|
addLayer: (layer: import('ol/layer/Base').default, fitLayer?: boolean) => void;
|
|
402
402
|
removeLayerById: (id: string) => void;
|
|
403
|
+
removeLayerByIds: (ids: string[]) => void;
|
|
403
404
|
getLayerById: (id: string) => import('ol/layer/Base').default | undefined;
|
|
404
405
|
getLayerByLayerTag: (layerTag: string) => import('ol/layer/Base').default | undefined;
|
|
405
406
|
getLayersByIds: (ids: string[]) => import('ol/layer/Base').default[];
|
|
@@ -395,6 +395,7 @@ export declare const MapView: import('../../utils').WithInstall<import('vue').De
|
|
|
395
395
|
addMapLayers: (layerInfo: import('ym-gis-2d/entity').IMapService[]) => Promise<import('ol/layer/Base').default[]>;
|
|
396
396
|
addLayer: (layer: import('ol/layer/Base').default, fitLayer?: boolean) => void;
|
|
397
397
|
removeLayerById: (id: string) => void;
|
|
398
|
+
removeLayerByIds: (ids: string[]) => void;
|
|
398
399
|
getLayerById: (id: string) => import('ol/layer/Base').default | undefined;
|
|
399
400
|
getLayerByLayerTag: (layerTag: string) => import('ol/layer/Base').default | undefined;
|
|
400
401
|
getLayersByIds: (ids: string[]) => import('ol/layer/Base').default[];
|
|
@@ -402,6 +402,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
402
402
|
addMapLayers: (layerInfo: IMapService[]) => Promise<import('ol/layer/Base').default[]>;
|
|
403
403
|
addLayer: (layer: import('ol/layer/Base').default, fitLayer?: boolean) => void;
|
|
404
404
|
removeLayerById: (id: string) => void;
|
|
405
|
+
removeLayerByIds: (ids: string[]) => void;
|
|
405
406
|
getLayerById: (id: string) => import('ol/layer/Base').default | undefined;
|
|
406
407
|
getLayerByLayerTag: (layerTag: string) => import('ol/layer/Base').default | undefined;
|
|
407
408
|
getLayersByIds: (ids: string[]) => import('ol/layer/Base').default[];
|
|
@@ -398,6 +398,7 @@ export declare const MultiScreen: import('../../utils').WithInstall<import('vue'
|
|
|
398
398
|
addMapLayers: (layerInfo: import('ym-gis-2d/entity').IMapService[]) => Promise<import('ol/layer/Base').default[]>;
|
|
399
399
|
addLayer: (layer: import('ol/layer/Base').default, fitLayer?: boolean) => void;
|
|
400
400
|
removeLayerById: (id: string) => void;
|
|
401
|
+
removeLayerByIds: (ids: string[]) => void;
|
|
401
402
|
getLayerById: (id: string) => import('ol/layer/Base').default | undefined;
|
|
402
403
|
getLayerByLayerTag: (layerTag: string) => import('ol/layer/Base').default | undefined;
|
|
403
404
|
getLayersByIds: (ids: string[]) => import('ol/layer/Base').default[];
|
|
@@ -7,7 +7,16 @@ type __VLS_Props = {
|
|
|
7
7
|
showOpacity?: boolean;
|
|
8
8
|
showFilter?: boolean;
|
|
9
9
|
};
|
|
10
|
-
declare
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
title?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
20
|
loaded: (...args: any[]) => void;
|
|
12
21
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
22
|
onLoaded?: ((...args: any[]) => any) | undefined;
|
|
@@ -15,4 +24,10 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
15
24
|
showOpacity: boolean;
|
|
16
25
|
showFilter: boolean;
|
|
17
26
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
28
|
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./TocCard.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const _TocCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const _TocCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8416d467"]]);
|
|
5
5
|
export {
|
|
6
6
|
_TocCard as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElCard } from "element-plus/es";
|
|
2
2
|
import "element-plus/es/components/base/style/css";
|
|
3
3
|
import "element-plus/es/components/card/style/css";
|
|
4
|
-
import { defineComponent, createBlock, openBlock, withCtx, createVNode, unref } from "vue";
|
|
4
|
+
import { defineComponent, createBlock, openBlock, withCtx, renderSlot, createVNode, unref } from "vue";
|
|
5
5
|
import { LayerTree } from "../layer-tree/index.js";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "TocCard",
|
|
@@ -23,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
const _component_el_card = ElCard;
|
|
24
24
|
return openBlock(), createBlock(_component_el_card, { class: "toc-card" }, {
|
|
25
25
|
default: withCtx(() => [
|
|
26
|
+
renderSlot(_ctx.$slots, "title", {}, void 0, true),
|
|
26
27
|
createVNode(unref(LayerTree), {
|
|
27
28
|
data: props.data,
|
|
28
29
|
map: props.map,
|
|
@@ -32,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
33
|
onLoaded: loadedLayer
|
|
33
34
|
}, null, 8, ["data", "map", "editLayerTag", "showOpacity", "showFilter"])
|
|
34
35
|
]),
|
|
35
|
-
_:
|
|
36
|
+
_: 3
|
|
36
37
|
});
|
|
37
38
|
};
|
|
38
39
|
}
|
|
@@ -1,12 +1,40 @@
|
|
|
1
|
-
export declare const TocCard: import('../../utils').WithInstall<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export declare const TocCard: import('../../utils').WithInstall<{
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
|
+
data: import('ym-gis-2d/entity').IMapService[];
|
|
4
|
+
map: import('ym-gis-2d/mapView/Map').default;
|
|
5
|
+
editLayerTag?: string;
|
|
6
|
+
showOpacity?: boolean;
|
|
7
|
+
showFilter?: boolean;
|
|
8
|
+
}> & Readonly<{
|
|
9
|
+
onLoaded?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
loaded: (...args: any[]) => void;
|
|
12
|
+
}, import('vue').PublicProps, {
|
|
13
|
+
showOpacity: boolean;
|
|
14
|
+
showFilter: boolean;
|
|
15
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
16
|
+
P: {};
|
|
17
|
+
B: {};
|
|
18
|
+
D: {};
|
|
19
|
+
C: {};
|
|
20
|
+
M: {};
|
|
21
|
+
Defaults: {};
|
|
22
|
+
}, Readonly<{
|
|
23
|
+
data: import('ym-gis-2d/entity').IMapService[];
|
|
24
|
+
map: import('ym-gis-2d/mapView/Map').default;
|
|
25
|
+
editLayerTag?: string;
|
|
26
|
+
showOpacity?: boolean;
|
|
27
|
+
showFilter?: boolean;
|
|
28
|
+
}> & Readonly<{
|
|
29
|
+
onLoaded?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, {
|
|
31
|
+
showOpacity: boolean;
|
|
32
|
+
showFilter: boolean;
|
|
33
|
+
}>;
|
|
34
|
+
__isFragment?: never;
|
|
35
|
+
__isTeleport?: never;
|
|
36
|
+
__isSuspense?: never;
|
|
37
|
+
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
10
38
|
data: import('ym-gis-2d/entity').IMapService[];
|
|
11
39
|
map: import('ym-gis-2d/mapView/Map').default;
|
|
12
40
|
editLayerTag?: string;
|
|
@@ -14,8 +42,14 @@ export declare const TocCard: import('../../utils').WithInstall<import('vue').De
|
|
|
14
42
|
showFilter?: boolean;
|
|
15
43
|
}> & Readonly<{
|
|
16
44
|
onLoaded?: ((...args: any[]) => any) | undefined;
|
|
17
|
-
}>, {
|
|
45
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
46
|
+
loaded: (...args: any[]) => void;
|
|
47
|
+
}, string, {
|
|
18
48
|
showOpacity: boolean;
|
|
19
49
|
showFilter: boolean;
|
|
20
|
-
}, {},
|
|
50
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
51
|
+
$slots: {
|
|
52
|
+
title?(_: {}): any;
|
|
53
|
+
};
|
|
54
|
+
})>;
|
|
21
55
|
export default TocCard;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ym-giswidget-2d",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"element-plus": "^2.9.0",
|
|
11
11
|
"jszip": "^3.10.1",
|
|
12
12
|
"ol": "^9.2.4",
|
|
13
|
-
"ym-gis-2d": "1.0.
|
|
13
|
+
"ym-gis-2d": "1.0.40"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const LayerSwitcher: import('../../utils').WithInstall<import('vue').DefineComponent<{
|
|
2
|
-
map: import('ym-gis-2d/mapView/Map').default;
|
|
3
|
-
layers: import('ym-gis-2d/entity').IMapService[];
|
|
4
|
-
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
5
|
-
map: import('ym-gis-2d/mapView/Map').default;
|
|
6
|
-
layers: import('ym-gis-2d/entity').IMapService[];
|
|
7
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>>;
|
|
8
|
-
export default LayerSwitcher;
|