@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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supermapgis/vue-iclient-leaflet",
|
|
3
3
|
"description": "SuperMap iClient for Vue.js",
|
|
4
|
-
"version": "11.
|
|
4
|
+
"version": "11.3.0",
|
|
5
5
|
"homepage": "http://iclient.supermap.io",
|
|
6
6
|
"main": "lib/index",
|
|
7
7
|
"dependencies": {
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"@turf/length": "^6.0.2",
|
|
14
14
|
"@turf/rhumb-bearing": "^6.0.1",
|
|
15
15
|
"@turf/transform-scale": "^5.1.5",
|
|
16
|
-
"@turf/meta": "^6.5.0",
|
|
17
16
|
"@types/geojson": "^7946.0.7",
|
|
18
17
|
"@types/leaflet": "^1.5.5",
|
|
19
18
|
"@types/node": "^12.0.3",
|
|
@@ -40,14 +39,13 @@
|
|
|
40
39
|
"lodash.isnumber": "^3.0.3",
|
|
41
40
|
"lodash.isplainobject": "^4.0.6",
|
|
42
41
|
"lodash.max": "^4.0.1",
|
|
43
|
-
"lodash.min": "^4.0.1",
|
|
44
42
|
"lodash.merge": "^4.6.1",
|
|
45
43
|
"lodash.orderby": "^4.6.0",
|
|
46
44
|
"lodash.tonumber": "^4.0.3",
|
|
47
45
|
"lodash.uniqueid": "^4.0.1",
|
|
48
46
|
"mux.js": "^5.6.7",
|
|
49
47
|
"omit.js": "^2.0.2",
|
|
50
|
-
"proj4": "^2.
|
|
48
|
+
"proj4": "^2.8.0",
|
|
51
49
|
"resize-detector": "^0.2.0",
|
|
52
50
|
"simple-statistics": "^7.8.3",
|
|
53
51
|
"swiper": "^6.8.4",
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
|
|
3
|
-
src: url('icon-sm-components.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
url('icon-sm-components.ttf?t=1617681183966') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
|
|
7
|
-
url('icon-sm-components.svg?t=1617681183966#sm-components-icon-') format('svg'); /* iOS 4.1- */
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "sm-components-icon-"; /* Project id 2236405 */
|
|
3
|
+
src: url('icon-sm-components.woff2?t=1728443762490') format('woff2'),
|
|
4
|
+
url('icon-sm-components.woff?t=1728443762490') format('woff'),
|
|
5
|
+
url('icon-sm-components.ttf?t=1728443762490') format('truetype');
|
|
8
6
|
}
|
|
9
7
|
|
|
10
8
|
[class^="sm-components-icon-"], [class*=" sm-components-icon-"], .sm-components-icon {
|
|
@@ -15,6 +13,22 @@
|
|
|
15
13
|
-moz-osx-font-smoothing: grayscale;
|
|
16
14
|
}
|
|
17
15
|
|
|
16
|
+
.sm-components-icon-complete:before {
|
|
17
|
+
content: "\e6a0";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.sm-components-icon-tucengyangshi01:before {
|
|
21
|
+
content: "\e661";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sm-components-icon-attribute-table:before {
|
|
25
|
+
content: "\e7f7";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.sm-components-icon-suofangzhituceng:before {
|
|
29
|
+
content: "\e660";
|
|
30
|
+
}
|
|
31
|
+
|
|
18
32
|
.sm-components-icon-attribute:before {
|
|
19
33
|
content: "\e65f";
|
|
20
34
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/common/_lang/en.js
CHANGED
|
@@ -30,15 +30,15 @@ export default {
|
|
|
30
30
|
unavailableVideo: 'This video is temporarily unavailable, please try again later',
|
|
31
31
|
mapNotLoaded: 'The associated map has not been loaded yet, please wait for a second',
|
|
32
32
|
unassociatedMap: 'You need to configure the associated map!',
|
|
33
|
-
videojs:
|
|
34
|
-
'Please import video.js plugin: https://github.com/videojs/video.js',
|
|
33
|
+
videojs: 'Please import video.js plugin: https://github.com/videojs/video.js',
|
|
35
34
|
flvPlayer:
|
|
36
35
|
'Please import flv related plugin: https://github.com/bilibili/flv.js, https://github.com/mister-ben/videojs-flvjs'
|
|
37
36
|
},
|
|
38
37
|
success: { copySucccess: 'copy success' },
|
|
39
38
|
info: {
|
|
40
39
|
loading: 'Loading...',
|
|
41
|
-
pressEscToExit: 'Press the ESC key or click the close button to exit'
|
|
40
|
+
pressEscToExit: 'Press the ESC key or click the close button to exit',
|
|
41
|
+
pressEscOrClickToExit: 'Press the ESC key or click anywhere to exit'
|
|
42
42
|
},
|
|
43
43
|
unit: {
|
|
44
44
|
kilometers: 'km',
|
|
@@ -81,7 +81,11 @@ export default {
|
|
|
81
81
|
unSupportedData: 'The current data does not support linkage with the map'
|
|
82
82
|
},
|
|
83
83
|
layerList: {
|
|
84
|
-
title: 'Layer'
|
|
84
|
+
title: 'Layer',
|
|
85
|
+
layerStyle: 'layerStyle',
|
|
86
|
+
attributes: 'Attributes',
|
|
87
|
+
zoomToLayer: 'zoomToLayer',
|
|
88
|
+
opacity: 'Opacity'
|
|
85
89
|
},
|
|
86
90
|
slideshow: {
|
|
87
91
|
title: 'Slideshow'
|
|
@@ -120,12 +124,16 @@ export default {
|
|
|
120
124
|
loadingTip: 'Map is loading...',
|
|
121
125
|
crsNotSupport: 'The coordinate system of the current map is not supported!',
|
|
122
126
|
TileMatrixSetNotSuppport: 'Incoming TileMatrixSet is not supported!',
|
|
123
|
-
getLayerInfoFailed: 'Failed to
|
|
127
|
+
getLayerInfoFailed: 'Failed to load layer!',
|
|
124
128
|
getThemeInfoFailed: 'Failed to get theme information!',
|
|
125
129
|
crsnotsupport: 'Unsupported coordinate system!',
|
|
126
130
|
baiduMapNotSupport: 'Baidu maps is not supported yet!',
|
|
131
|
+
layerorsourcenameduplicated: 'layer or source name duplicated and cannot be added!',
|
|
127
132
|
sampleDataNotSupport: 'Sample datas is not supported yet!',
|
|
128
|
-
|
|
133
|
+
drillLayersNotSupport: 'Drill-down layers are not supported yet!',
|
|
134
|
+
mvtNotSupport: 'Vector tile layers is not supported yet!',
|
|
135
|
+
mapCreatedFailed: 'Failed to load map!',
|
|
136
|
+
projectionnotmatch: '{title} does not match the current map projection!'
|
|
129
137
|
},
|
|
130
138
|
drillMap: {
|
|
131
139
|
goBack: 'Go Back'
|
|
@@ -173,7 +181,8 @@ export default {
|
|
|
173
181
|
query: 'Query',
|
|
174
182
|
queryJob: 'Task',
|
|
175
183
|
queryResult: 'Result',
|
|
176
|
-
attributeCondition: '
|
|
184
|
+
attributeCondition: 'Query Condition',
|
|
185
|
+
keyQueryCondition: 'Search keyword',
|
|
177
186
|
spatialFilter: 'Spatial Filter',
|
|
178
187
|
mapBounds: 'Query within the whole map extent',
|
|
179
188
|
currentMapBounds: 'Query within current viewbound',
|
|
@@ -185,7 +194,9 @@ export default {
|
|
|
185
194
|
attributeValue: 'Attribute Value',
|
|
186
195
|
noResults: 'The query result is empty!',
|
|
187
196
|
queryFailed: 'Query failed!',
|
|
188
|
-
seviceNotSupport: 'This service does not support queries!'
|
|
197
|
+
seviceNotSupport: 'This service does not support queries!',
|
|
198
|
+
keyQueryPlaceholder: 'Please enter the search keyword',
|
|
199
|
+
sqlQueryPlaceholder: 'Please enter the SQL expression'
|
|
189
200
|
},
|
|
190
201
|
identify: {
|
|
191
202
|
layerNotExit: "The layer '{layer}' does not exist in the map's style",
|
package/src/common/_lang/zh.js
CHANGED
|
@@ -39,7 +39,8 @@ export default {
|
|
|
39
39
|
},
|
|
40
40
|
info: {
|
|
41
41
|
loading: '加载中',
|
|
42
|
-
pressEscToExit: '按下 ESC 键或点击关闭按钮退出'
|
|
42
|
+
pressEscToExit: '按下 ESC 键或点击关闭按钮退出',
|
|
43
|
+
pressEscOrClickToExit: '按下 ESC 键或点击任意位置退出'
|
|
43
44
|
},
|
|
44
45
|
unit: {
|
|
45
46
|
kilometers: '千米',
|
|
@@ -82,7 +83,11 @@ export default {
|
|
|
82
83
|
unSupportedData: '当前数据不支持与地图联动'
|
|
83
84
|
},
|
|
84
85
|
layerList: {
|
|
85
|
-
title: '图层'
|
|
86
|
+
title: '图层',
|
|
87
|
+
layerStyle: '图层样式',
|
|
88
|
+
attributes: '属性表',
|
|
89
|
+
zoomToLayer: '缩放至图层',
|
|
90
|
+
opacity: '不透明度'
|
|
86
91
|
},
|
|
87
92
|
slideshow: {
|
|
88
93
|
title: '幻灯片'
|
|
@@ -121,12 +126,16 @@ export default {
|
|
|
121
126
|
loadingTip: '地图加载中...',
|
|
122
127
|
crsNotSupport: '不支持当前地图的坐标系!',
|
|
123
128
|
TileMatrixSetNotSuppport: '不支持传入的 TileMatrixSet!',
|
|
124
|
-
getLayerInfoFailed: '
|
|
129
|
+
getLayerInfoFailed: '图层加载失败!',
|
|
125
130
|
getThemeInfoFailed: '获取图层样式信息失败!',
|
|
126
131
|
crsnotsupport: '不支持的坐标系!',
|
|
127
132
|
baiduMapNotSupport: '暂不支持加载百度地图!',
|
|
133
|
+
layerorsourcenameduplicated: '图层名或数据源名重复无法添加',
|
|
128
134
|
sampleDataNotSupport: '暂不支持加载示例数据!',
|
|
129
|
-
|
|
135
|
+
drillLayersNotSupport: '暂不支持加载下钻图层!',
|
|
136
|
+
mvtNotSupport: '暂不支持加载矢量瓦片图层!',
|
|
137
|
+
mapCreatedFailed: '地图加载失败!',
|
|
138
|
+
projectionnotmatch: '{title}与当前地图投影不匹配!'
|
|
130
139
|
},
|
|
131
140
|
videoPlus: {
|
|
132
141
|
loadingTip: '视频加载中...'
|
|
@@ -177,7 +186,8 @@ export default {
|
|
|
177
186
|
query: '查询',
|
|
178
187
|
queryJob: '任务',
|
|
179
188
|
queryResult: '结果',
|
|
180
|
-
attributeCondition: '
|
|
189
|
+
attributeCondition: '查询条件',
|
|
190
|
+
keyQueryCondition: '查询关键字',
|
|
181
191
|
spatialFilter: '空间过滤器',
|
|
182
192
|
mapBounds: '返回地图全图范围的要素',
|
|
183
193
|
currentMapBounds: '返回当前地图范围内的要素',
|
|
@@ -189,7 +199,9 @@ export default {
|
|
|
189
199
|
attributeValue: '属性值',
|
|
190
200
|
noResults: '查询结果为空!',
|
|
191
201
|
queryFailed: '查询失败!',
|
|
192
|
-
seviceNotSupport: '此服务不支持查询!'
|
|
202
|
+
seviceNotSupport: '此服务不支持查询!',
|
|
203
|
+
keyQueryPlaceholder: '请输入关查询键字',
|
|
204
|
+
sqlQueryPlaceholder: '请输入SQL表达式'
|
|
193
205
|
},
|
|
194
206
|
identify: {
|
|
195
207
|
layerNotExit: "地图上不存在该图层: '{layer}'",
|
|
@@ -8,7 +8,7 @@ import SmCollapseCard from 'vue-iclient/src/common/collapse-card/CollapseCard.vu
|
|
|
8
8
|
export default class CardMixin extends Vue {
|
|
9
9
|
@Prop({
|
|
10
10
|
default: 'top-left',
|
|
11
|
-
validator(value) {
|
|
11
|
+
validator(value: string) {
|
|
12
12
|
return ['top-left', 'top-right', 'bottom-left', 'bottom-right'].includes(value);
|
|
13
13
|
}
|
|
14
14
|
})
|
|
@@ -8,5 +8,6 @@ export default class iPortalDataParameter {
|
|
|
8
8
|
this.maxFeatures = options.maxFeatures || 20;
|
|
9
9
|
this.name = options.name || geti18n().t('commontypes.iportalData');
|
|
10
10
|
this.withCredentials = options.withCredentials || false;
|
|
11
|
+
this.queryMode = options.queryMode || 'SQL';
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -9,6 +9,7 @@ export interface iServerOptions {
|
|
|
9
9
|
proxy?: proxyFn | string;
|
|
10
10
|
layerName?: string;
|
|
11
11
|
dataName?: string;
|
|
12
|
+
queryMode?: 'SQL' | 'KEYWORD';
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export default class iServerBaseParameter {
|
|
@@ -17,6 +18,7 @@ export default class iServerBaseParameter {
|
|
|
17
18
|
attributeFilter: string;
|
|
18
19
|
maxFeatures: number;
|
|
19
20
|
proxy: proxyFn | string;
|
|
21
|
+
queryMode: iServerOptions['queryMode'];
|
|
20
22
|
|
|
21
23
|
constructor(options: iServerOptions) {
|
|
22
24
|
this.type = 'iServer';
|
|
@@ -24,5 +26,6 @@ export default class iServerBaseParameter {
|
|
|
24
26
|
this.attributeFilter = options.attributeFilter || null;
|
|
25
27
|
this.maxFeatures = options.maxFeatures || 20;
|
|
26
28
|
this.proxy = options.proxy;
|
|
29
|
+
this.queryMode = options.queryMode || 'SQL';
|
|
27
30
|
}
|
|
28
31
|
}
|
|
@@ -1,38 +1,43 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
1
|
import { getDataType } from 'vue-iclient/src/common/_utils/util';
|
|
2
|
+
import proj4 from 'proj4';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]',
|
|
8
|
-
'EPSG:4326':
|
|
9
|
-
'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],AXIS["Easting", "EAST"],AXIS["Northing", "NORTH"],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]',
|
|
10
|
-
'EPSG:4490':
|
|
11
|
-
'GEOGCS["China Geodetic Coordinate System 2000", DATUM["China 2000", SPHEROID["CGCS2000", 6378137.0, 298.257222101, AUTHORITY["EPSG","1024"]], AUTHORITY["EPSG","1043"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4490"]]'
|
|
12
|
-
},
|
|
13
|
-
registerProjection(epsgKey, epsgValue) {
|
|
14
|
-
if (getDataType(arguments[0]) === '[object Object]' && arguments.length === 1) {
|
|
15
|
-
this.epsgCodes = Object.assign({}, this.epsgCodes, arguments[0]);
|
|
16
|
-
} else if (epsgKey && epsgValue) {
|
|
17
|
-
this.epsgCodes[epsgKey] = epsgValue;
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
getProjection(epsgKey) {
|
|
21
|
-
return this.epsgCodes[epsgKey];
|
|
22
|
-
},
|
|
23
|
-
getAllProjections() {
|
|
24
|
-
return this.epsgCodes;
|
|
4
|
+
function defineProjection(epsgCode, projection) {
|
|
5
|
+
if (proj4.defs(epsgCode)) {
|
|
6
|
+
return;
|
|
25
7
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
if (!projection) {
|
|
9
|
+
console.error(`${epsgCode} not define`);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
proj4.defs(epsgCode, projection);
|
|
13
|
+
}
|
|
29
14
|
|
|
30
15
|
export function registerProjection(epsgKey, epsgValue) {
|
|
31
|
-
|
|
16
|
+
if (getDataType(arguments[0]) === '[object Object]' && arguments.length === 1) {
|
|
17
|
+
const projections = arguments[0];
|
|
18
|
+
for (const epsgCode in projections) {
|
|
19
|
+
defineProjection(epsgCode, projections[epsgCode]);
|
|
20
|
+
}
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
defineProjection(epsgKey, epsgValue);
|
|
32
24
|
}
|
|
33
25
|
|
|
34
26
|
export function getProjection(epsgKey) {
|
|
35
|
-
|
|
27
|
+
if (!proj4.defs(epsgKey)) {
|
|
28
|
+
const epsgCodes = {
|
|
29
|
+
'EPSG:3857':
|
|
30
|
+
'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]',
|
|
31
|
+
'EPSG:4326':
|
|
32
|
+
'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],AXIS["Easting", "EAST"],AXIS["Northing", "NORTH"],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]',
|
|
33
|
+
'EPSG:4490':
|
|
34
|
+
'GEOGCS["China Geodetic Coordinate System 2000", DATUM["China 2000", SPHEROID["CGCS2000", 6378137.0, 298.257222101, AUTHORITY["EPSG","1024"]], AUTHORITY["EPSG","1043"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4490"]]'
|
|
35
|
+
};
|
|
36
|
+
if (epsgCodes[epsgKey]) {
|
|
37
|
+
registerProjection(epsgKey, epsgCodes[epsgKey]);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return proj4.defs(epsgKey);
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
export function toEpsgCode(wkt) {
|
|
@@ -21,13 +21,18 @@ export default function getFeatures(dataset) {
|
|
|
21
21
|
toIndex,
|
|
22
22
|
hasGeometry,
|
|
23
23
|
orderBy,
|
|
24
|
-
returnFeaturesOnly
|
|
24
|
+
returnFeaturesOnly,
|
|
25
|
+
bounds,
|
|
26
|
+
keyWord,
|
|
27
|
+
onlyService
|
|
25
28
|
} = dataset;
|
|
26
29
|
if (dataset && (url || geoJSON) && type) {
|
|
27
30
|
let queryInfo = {
|
|
28
31
|
maxFeatures: maxFeatures,
|
|
29
32
|
attributeFilter: attributeFilter,
|
|
30
|
-
orderBy
|
|
33
|
+
orderBy,
|
|
34
|
+
bounds,
|
|
35
|
+
keyWord
|
|
31
36
|
};
|
|
32
37
|
if (type === 'iServer') {
|
|
33
38
|
let datasetInfo;
|
|
@@ -58,6 +63,9 @@ export default function getFeatures(dataset) {
|
|
|
58
63
|
params = [datasetInfo, queryInfo];
|
|
59
64
|
} else if (type === 'iPortal') {
|
|
60
65
|
queryInfo.withCredentials = withCredentials;
|
|
66
|
+
if (onlyService !== undefined) {
|
|
67
|
+
queryInfo.onlyService = onlyService;
|
|
68
|
+
}
|
|
61
69
|
superMapService = new iPortalDataService(url, withCredentials, {
|
|
62
70
|
epsgCode,
|
|
63
71
|
resourceId: dataset.id,
|
|
@@ -81,6 +89,9 @@ export default function getFeatures(dataset) {
|
|
|
81
89
|
getdatasucceeded: function(data) {
|
|
82
90
|
resolve(data);
|
|
83
91
|
},
|
|
92
|
+
featureisempty: function(data) {
|
|
93
|
+
resolve(data);
|
|
94
|
+
},
|
|
84
95
|
getdatafailed: function(e) {
|
|
85
96
|
reject(e);
|
|
86
97
|
}
|
|
@@ -2,6 +2,7 @@ import { FetchRequest, Util } from 'vue-iclient/static/libs/iclient-common/iclie
|
|
|
2
2
|
import iServerRestService, { vertifyEpsgCode, transformFeatures } from 'vue-iclient/src/common/_utils/iServerRestService';
|
|
3
3
|
import { isXField, isYField, handleWithCredentials, handleDataParentRes } from 'vue-iclient/src/common/_utils/util';
|
|
4
4
|
import { Events } from 'vue-iclient/src/common/_types/event/Events';
|
|
5
|
+
import { geti18n } from 'vue-iclient/src/common/_lang/index';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @class iPortalDataService
|
|
@@ -78,10 +79,12 @@ export default class iPortalDataService extends Events {
|
|
|
78
79
|
}
|
|
79
80
|
let datasetUrl = this.url;
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
const onlyService = queryInfo.onlyService;
|
|
83
|
+
if (preferContent && !onlyService) {
|
|
82
84
|
this._getDatafromContent(datasetUrl, queryInfo);
|
|
83
85
|
return;
|
|
84
86
|
}
|
|
87
|
+
delete queryInfo.onlyService;
|
|
85
88
|
FetchRequest.get(datasetUrl, null, {
|
|
86
89
|
withCredentials: this.withCredentials
|
|
87
90
|
})
|
|
@@ -100,8 +103,16 @@ export default class iPortalDataService extends Events {
|
|
|
100
103
|
this._getStructureDatafromContent();
|
|
101
104
|
return;
|
|
102
105
|
}
|
|
106
|
+
const hasService = data.dataItemServices && data.dataItemServices.length > 0;
|
|
107
|
+
if (onlyService && !hasService) {
|
|
108
|
+
this.triggerEvent('getdatafailed', {
|
|
109
|
+
error: { message: geti18n().t('query.seviceNotSupport') },
|
|
110
|
+
onlyService
|
|
111
|
+
});
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
103
114
|
// 是否有rest服务
|
|
104
|
-
if (
|
|
115
|
+
if (hasService) {
|
|
105
116
|
let dataItemServices = data.dataItemServices;
|
|
106
117
|
let resultData = dataItemServices.find(
|
|
107
118
|
item =>
|
|
@@ -163,7 +174,7 @@ export default class iPortalDataService extends Events {
|
|
|
163
174
|
// 所有请求结束
|
|
164
175
|
Promise.all(allRequest).then((results) => {
|
|
165
176
|
// 结果合并
|
|
166
|
-
results.
|
|
177
|
+
results.forEach((result) => {
|
|
167
178
|
featureResults = featureResults.concat(result.features);
|
|
168
179
|
});
|
|
169
180
|
this.iserverService._getFeaturesSucceed({
|