@supermapgis/vue-iclient-leaflet 11.2.1 → 11.3.0
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/iclient-leaflet-vue.css +23 -9
- package/dist/iclient-leaflet-vue.js +21689 -44354
- package/dist/iclient-leaflet-vue.min.css +2 -2
- package/dist/iclient-leaflet-vue.min.js +39 -293
- package/lib/_assets/iconfont/icon-sm-components.css +21 -7
- package/lib/_assets/iconfont/icon-sm-components.ttf +0 -0
- package/lib/_assets/iconfont/icon-sm-components.woff +0 -0
- package/lib/_assets/iconfont/icon-sm-components.woff2 +0 -0
- package/lib/_lang/en.js +20 -8
- package/lib/_lang/index.js +18 -18
- package/lib/_lang/zh.js +20 -8
- package/lib/_mixin/AntdRender.js +15 -17
- package/lib/_mixin/Card.js +10 -11
- package/lib/_mixin/GridLayer.js +4 -4
- package/lib/_mixin/Layer.js +4 -4
- package/lib/_mixin/Options.js +2 -2
- package/lib/_mixin/Popper.js +2 -2
- package/lib/_mixin/Theme.js +13 -15
- package/lib/_mixin/ThirdService.js +15 -16
- package/lib/_mixin/TileLayer.js +4 -4
- package/lib/_mixin/Timer.js +8 -9
- package/lib/_mixin/VmUpdater.js +10 -11
- package/lib/_mixin/map-events.js +8 -9
- package/lib/_mixin/map-getter.js +13 -14
- package/lib/_types/AddressMatchParameter.js +2 -2
- package/lib/_types/GeoJSONParamter.js +2 -2
- package/lib/_types/RestDataParameter.js +5 -6
- package/lib/_types/RestMapParameter.js +5 -6
- package/lib/_types/RestParameter.js +2 -2
- package/lib/_types/event/BaseTypes.js +2 -2
- package/lib/_types/event/Event.js +4 -4
- package/lib/_types/event/Events.js +10 -10
- package/lib/_types/event/Pixel.js +2 -2
- package/lib/_types/event/Util.js +2 -2
- package/lib/_types/iPortalDataParameter.js +3 -2
- package/lib/_types/iServerBaseParameter.js +3 -2
- package/lib/_types/iServerDataParameter.js +5 -6
- package/lib/_types/iServerMapParameter.js +5 -6
- package/lib/_types/index.js +18 -18
- package/lib/_types/map-event.js +6 -6
- package/lib/_utils/EchartsDataService.js +24 -24
- package/lib/_utils/RestService.js +1345 -1149
- package/lib/_utils/epsg-define.js +45 -34
- package/lib/_utils/get-features.js +23 -10
- package/lib/_utils/global-event.js +6 -6
- package/lib/_utils/iPortalDataService.js +1368 -1147
- package/lib/_utils/iServerRestService.js +1518 -1269
- package/lib/_utils/props-binder.js +2 -2
- package/lib/_utils/statistics.js +8 -17
- package/lib/_utils/style/color/colorPalette.js +4 -4
- package/lib/_utils/style/color/serialColors.js +8 -8
- package/lib/_utils/style/theme/chart.js +1343 -1146
- package/lib/_utils/style/theme/set-theme.js +10 -10
- package/lib/_utils/style/theme/theme.json +6 -6
- package/lib/_utils/util.js +12 -12
- package/lib/_utils/vue-types/utils.js +2 -2
- package/lib/attribute-panel/style/attribute-panel.css +1 -0
- package/lib/attribute-panel/style/css.js +7 -0
- package/lib/attribute-panel/style/index.js +7 -0
- package/lib/avatar/index.js +25 -25
- package/lib/border/index.js +77 -77
- package/lib/breadcrumb/index.js +47 -41
- package/lib/button/index.js +53 -50
- package/lib/card/index.js +47 -41
- package/lib/chart/index.js +1437 -1238
- package/lib/checkbox/index.js +36 -33
- package/lib/collapse/index.js +39 -36
- package/lib/collapse-card/index.js +71 -76
- package/lib/color-picker/index.js +48 -49
- package/lib/date-picker/index.js +107 -95
- package/lib/dropdown/index.js +27 -27
- package/lib/empty/index.js +27 -27
- package/lib/icon/index.js +25 -25
- package/lib/identify/index.js +58 -59
- package/lib/iframe/index.js +31 -31
- package/lib/image/index.js +226 -42
- package/lib/image/style/image.css +1 -1
- package/lib/index.js +4 -4
- package/lib/indicator/index.js +70 -67
- package/lib/init.js +8 -8
- package/lib/input/index.js +150 -135
- package/lib/input-number/index.js +100 -97
- package/lib/layout/index.js +72 -60
- package/lib/liquid-fill/index.js +73 -73
- package/lib/marker/index.js +43 -44
- package/lib/menu/index.js +47 -41
- package/lib/message/index.js +3 -3
- package/lib/message/style/message.css +1 -1
- package/lib/modal/index.js +67 -67
- package/lib/modal/style/modal.css +1 -1
- package/lib/notification/index.js +6 -6
- package/lib/notification/style/notification.css +1 -1
- package/lib/pagination/index.js +34 -34
- package/lib/popup/index.js +45 -46
- package/lib/progress/index.js +440 -440
- package/lib/radio/index.js +48 -42
- package/lib/select/index.js +47 -41
- package/lib/slider/index.js +27 -27
- package/lib/slideshow/index.js +103 -160
- package/lib/spin/index.js +30 -30
- package/lib/steps/index.js +35 -32
- package/lib/switch/index.js +25 -25
- package/lib/table/index.js +50 -44
- package/lib/table/style/table.css +1 -1
- package/lib/table-popup/index.js +43 -37
- package/lib/table-popup/style/table-popup.css +1 -1
- package/lib/tabs/index.js +35 -32
- package/lib/text/index.js +39 -39
- package/lib/tile-layer/index.js +35 -36
- package/lib/time-line/index.js +41 -43
- package/lib/time-picker/index.js +27 -27
- package/lib/time-range/index.js +53 -55
- package/lib/time-slider/index.js +73 -75
- package/lib/time-text/index.js +31 -31
- package/lib/tooltip/index.js +25 -25
- package/lib/tooltip/style/tooltip.css +1 -0
- package/lib/transfer/index.js +27 -27
- package/lib/tree/index.js +48 -42
- package/lib/tree-select/index.js +37 -34
- package/lib/video-player/index.js +98 -97
- package/lib/video-player/style/video-player.css +1 -1
- package/lib/web-map/index.js +2336 -103
- package/package.json +2 -4
- package/src/common/_assets/iconfont/icon-sm-components.css +21 -7
- package/src/common/_assets/iconfont/icon-sm-components.ttf +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.woff +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.woff2 +0 -0
- package/src/common/_lang/en.js +19 -8
- package/src/common/_lang/zh.js +18 -6
- package/src/common/_mixin/Card.ts +1 -1
- package/src/common/_types/iPortalDataParameter.js +1 -0
- package/src/common/_types/iServerBaseParameter.ts +3 -0
- package/src/common/_utils/epsg-define.js +32 -27
- package/src/common/_utils/get-features.js +13 -2
- package/src/common/_utils/iPortalDataService.js +14 -3
- package/src/common/_utils/iServerRestService.js +144 -78
- package/src/common/_utils/statistics.js +6 -14
- package/src/common/_utils/style/theme/theme.json +6 -6
- package/src/common/attribute-panel/AttributePanel.vue +58 -0
- package/src/common/attribute-panel/__test__/AttributePanel.spec.js +39 -0
- package/src/common/attribute-panel/index.js +9 -0
- package/src/common/attribute-panel/style/attribute-panel.scss +35 -0
- package/src/common/attribute-panel/style/index.js +4 -0
- package/src/common/collapse-card/style/collapse-card.scss +2 -2
- package/src/common/iframe/Iframe.vue +1 -1
- package/src/common/image/Image.vue +68 -6
- package/src/common/image/style/image.scss +32 -0
- package/src/common/message/style/message.scss +1 -0
- package/src/common/modal/style/modal.scss +36 -0
- package/src/common/notification/style/notification.scss +9 -0
- package/src/common/slideshow/Slideshow.vue +42 -95
- package/src/common/slideshow/Swiper.js +1 -1
- package/src/common/table/style/table.scss +36 -0
- package/src/common/table-popup/TablePopup.vue +5 -0
- package/src/common/tooltip/style/tooltip.scss +3 -0
- package/src/common/video-player/style/video-player.scss +1 -1
- package/src/leaflet/entrys.json +0 -2
- package/src/leaflet/package.json +2 -4
- package/src/leaflet/web-map/WebMap.vue +4 -4
- package/src/leaflet/web-map/WebMapViewModel.ts +64 -17
- package/static/libs/iclient-common/iclient-common-webmapv2base.js +2 -0
- package/static/libs/iclient-common/iclient-common.js +1 -1
- package/static/libs/iclient-leaflet/iclient-leaflet.min.js +5 -1738
- package/lib/_assets/iconfont/icon-sm-components.eot +0 -0
- package/lib/_assets/iconfont/icon-sm-components.svg +0 -197
- package/lib/_mixin/WebMapBase.js +0 -3467
- package/lib/_utils/WebMapService.js +0 -1607
- package/src/common/_assets/iconfont/icon-sm-components.eot +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.svg +0 -197
- package/src/common/_utils/WebMapService.ts +0 -1292
- package/src/common/web-map/WebMapBase.ts +0 -1178
- package/src/common/web-map/config/MunicipalCenter.json +0 -1
- package/src/common/web-map/config/ProvinceCenter.json +0 -1
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import L from '../leaflet-wrapper';
|
|
2
|
+
import { Events } from 'vue-iclient/src/common/_types/event/Events';
|
|
2
3
|
import 'vue-iclient/static/libs/iclient-leaflet/iclient-leaflet.min';
|
|
3
4
|
// import echarts from 'echarts'; // TODO iclient 拿不到 echarts ???
|
|
4
5
|
import 'vue-iclient/static/libs/geostats/geostats';
|
|
5
6
|
import getCenter from '@turf/center';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
7
|
+
import proj4 from 'proj4';
|
|
8
|
+
import { getProjection, toEpsgCode } from 'vue-iclient/src/common/_utils/epsg-define';
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
import { createWebMapV2BaseExtending } from 'vue-iclient/static/libs/iclient-common/iclient-common-webmapv2base';
|
|
8
11
|
|
|
9
|
-
interface
|
|
12
|
+
interface WebMapOptions {
|
|
10
13
|
target?: string;
|
|
11
14
|
serverUrl?: string;
|
|
12
15
|
accessToken?: string;
|
|
@@ -17,7 +20,7 @@ interface webMapOptions {
|
|
|
17
20
|
isSuperMapOnline?: boolean;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
|
-
interface
|
|
23
|
+
interface MapOptions {
|
|
21
24
|
center?: [number, number] | L.LatLng;
|
|
22
25
|
zoom?: number;
|
|
23
26
|
maxBounds?: [[number, number], [number, number]] | L.Bounds;
|
|
@@ -26,19 +29,41 @@ interface mapOptions {
|
|
|
26
29
|
crs?: L.CRS;
|
|
27
30
|
preferCanvas?: boolean;
|
|
28
31
|
}
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
const WebMapV2Base: InstanceType<any> = createWebMapV2BaseExtending(Events, 'triggerEvent');
|
|
29
34
|
|
|
30
35
|
// TODO 坐标系 / noWrap
|
|
31
|
-
export default class WebMapViewModel extends
|
|
36
|
+
export default class WebMapViewModel extends WebMapV2Base {
|
|
32
37
|
map: L.Map;
|
|
33
38
|
|
|
39
|
+
mapOptions: MapOptions;
|
|
40
|
+
|
|
41
|
+
serverUrl: string;
|
|
42
|
+
|
|
34
43
|
center: [number, number] | L.LatLng;
|
|
35
44
|
|
|
45
|
+
zoom: number;
|
|
46
|
+
|
|
47
|
+
target: string;
|
|
48
|
+
|
|
36
49
|
mapParams: { title?: string; description?: string };
|
|
37
50
|
|
|
38
51
|
layers: any = {};
|
|
39
52
|
|
|
40
53
|
crs: L.CRS;
|
|
41
54
|
|
|
55
|
+
baseProjection: string;
|
|
56
|
+
|
|
57
|
+
triggerEvent: any;
|
|
58
|
+
|
|
59
|
+
eventTypes: string[];
|
|
60
|
+
|
|
61
|
+
protected _layers: any = [];
|
|
62
|
+
|
|
63
|
+
protected layerAdded: number;
|
|
64
|
+
|
|
65
|
+
protected expectLayerLen: number;
|
|
66
|
+
|
|
42
67
|
private _dataFlowLayer: any;
|
|
43
68
|
|
|
44
69
|
private _dataflowFeatureCache: any;
|
|
@@ -53,10 +78,30 @@ export default class WebMapViewModel extends WebMapBase {
|
|
|
53
78
|
|
|
54
79
|
private _unprojectCrs;
|
|
55
80
|
|
|
56
|
-
constructor(id, options:
|
|
57
|
-
super(
|
|
81
|
+
constructor(id, options: WebMapOptions = {}, mapOptions: MapOptions = {}) {
|
|
82
|
+
super(
|
|
83
|
+
id,
|
|
84
|
+
{
|
|
85
|
+
...options,
|
|
86
|
+
credentialKey: (options.accessKey && 'key') || (options.accessToken && 'token'),
|
|
87
|
+
credentialValue: options.accessKey || options.accessToken,
|
|
88
|
+
proj4
|
|
89
|
+
},
|
|
90
|
+
mapOptions
|
|
91
|
+
);
|
|
58
92
|
this.center = mapOptions.center;
|
|
59
93
|
this.zoom = mapOptions.zoom;
|
|
94
|
+
this.eventTypes = [
|
|
95
|
+
'mapinitialized',
|
|
96
|
+
'mapcreatesucceeded',
|
|
97
|
+
'mapcreatefailed',
|
|
98
|
+
'layercreatefailed',
|
|
99
|
+
'baidumapnotsupport',
|
|
100
|
+
'projectionnotmatch',
|
|
101
|
+
'mapbeforeremove',
|
|
102
|
+
'addlayerssucceeded',
|
|
103
|
+
'mvtnotsupport'
|
|
104
|
+
];
|
|
60
105
|
this._initWebMap();
|
|
61
106
|
}
|
|
62
107
|
|
|
@@ -176,7 +221,7 @@ export default class WebMapViewModel extends WebMapBase {
|
|
|
176
221
|
layer = this._createBaiduTileLayer();
|
|
177
222
|
break;
|
|
178
223
|
case 'MAPBOXSTYLE':
|
|
179
|
-
this.triggerEvent('
|
|
224
|
+
this.triggerEvent('mvtnotsupport', {});
|
|
180
225
|
break;
|
|
181
226
|
default:
|
|
182
227
|
break;
|
|
@@ -195,7 +240,7 @@ export default class WebMapViewModel extends WebMapBase {
|
|
|
195
240
|
// TODO --- 暂不支持 SAMPLE_DATA
|
|
196
241
|
if (type === 'SAMPLE_DATA') {
|
|
197
242
|
this._addLayerSucceeded();
|
|
198
|
-
this.triggerEvent('
|
|
243
|
+
this.triggerEvent('layercreatefailed', {
|
|
199
244
|
error: 'SAMPLE DATA is not supported',
|
|
200
245
|
layer,
|
|
201
246
|
map: this.map
|
|
@@ -298,7 +343,7 @@ export default class WebMapViewModel extends WebMapBase {
|
|
|
298
343
|
} catch (err) {
|
|
299
344
|
console.error(err);
|
|
300
345
|
this._addLayerSucceeded();
|
|
301
|
-
this.triggerEvent('
|
|
346
|
+
this.triggerEvent('layercreatefailed', {
|
|
302
347
|
error: err,
|
|
303
348
|
layer: layerInfo,
|
|
304
349
|
map: this.map
|
|
@@ -684,9 +729,10 @@ export default class WebMapViewModel extends WebMapBase {
|
|
|
684
729
|
|
|
685
730
|
private _createMigrationLayer(layerInfo, features) {
|
|
686
731
|
// window['echarts'] = echarts;
|
|
687
|
-
|
|
732
|
+
const options = this.getEchartsLayerOptions(layerInfo, features, 'leaflet');
|
|
733
|
+
options.GLMap = { roam: true };
|
|
688
734
|
// @ts-ignore
|
|
689
|
-
|
|
735
|
+
const layer = L.supermap.echartsLayer(options);
|
|
690
736
|
this.echartslayer.push(layer);
|
|
691
737
|
return layer;
|
|
692
738
|
}
|
|
@@ -772,8 +818,9 @@ export default class WebMapViewModel extends WebMapBase {
|
|
|
772
818
|
|
|
773
819
|
private _addLayerToMap({ layer, type = 'overlays', layerInfo, sendToMap = true }) {
|
|
774
820
|
let { visible, layerID, name, index } = layerInfo;
|
|
775
|
-
|
|
776
|
-
|
|
821
|
+
if (sendToMap && type !== 'overlays') {
|
|
822
|
+
type = 'overlays';
|
|
823
|
+
}
|
|
777
824
|
type === 'overlays' && layer.setZIndex && layer.setZIndex(index + 1);
|
|
778
825
|
|
|
779
826
|
if (visible === undefined || visible) {
|
|
@@ -1076,11 +1123,11 @@ export default class WebMapViewModel extends WebMapBase {
|
|
|
1076
1123
|
}
|
|
1077
1124
|
}
|
|
1078
1125
|
|
|
1079
|
-
protected getTransformCoodinatesCRS(epsgCode) {
|
|
1126
|
+
protected getTransformCoodinatesCRS(epsgCode: number) {
|
|
1080
1127
|
const defName = `EPSG:${epsgCode}`;
|
|
1081
1128
|
const defValue = getProjection(defName);
|
|
1082
1129
|
// @ts-ignore
|
|
1083
|
-
return L.Proj.CRS(
|
|
1130
|
+
return L.Proj.CRS(defName, {
|
|
1084
1131
|
def: defValue
|
|
1085
1132
|
});
|
|
1086
1133
|
}
|
|
@@ -1091,7 +1138,7 @@ export default class WebMapViewModel extends WebMapBase {
|
|
|
1091
1138
|
this.stopCanvg();
|
|
1092
1139
|
this.center = null;
|
|
1093
1140
|
this.zoom = null;
|
|
1094
|
-
this._dataFlowLayer
|
|
1141
|
+
this._dataFlowLayer?.off('dataupdated', this._updateDataFlowFeaturesCallback);
|
|
1095
1142
|
this._unprojectCrs = null;
|
|
1096
1143
|
}
|
|
1097
1144
|
}
|