Skip to content

Commit ac1e19e

Browse files
[feature]新增知识图谱 review by songym
1 parent 00a1bcb commit ac1e19e

File tree

80 files changed

+3845
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3845
-27
lines changed

build/jsdocs/template/config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@
292292
"name": "影像服务",
293293
"name_en": "Image"
294294
},
295+
"KnowledgeGraph": {
296+
"name": "知识图谱",
297+
"name_en": "KnowledgeGraph"
298+
},
295299
"Core": {
296300
"name": "核心类",
297301
"name_en": "Core"

build/webpack.config.base.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ module.exports = {
7474
externals: {
7575
echarts: 'function(){try{return echarts}catch(e){return {}}}()',
7676
mapv: 'function(){try{return mapv}catch(e){return {}}}()',
77+
'@antv/g6': 'function(){try{return G6}catch(e){return {}}}()',
7778
'@elastic/elasticsearch': 'function(){try{return elasticsearch}catch(e){return {}}}()',
7879
'@tensorflow/tfjs': 'function(){try{return tf}catch(e){return {}}}()'
7980
},

dist/leaflet/include-leaflet.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484
inputCSS(libsurl + '/leaflet/plugins/leaflet-miniMap/3.6.1/dist/Control.MiniMap.min.css');
8585
inputScript(libsurl + '/leaflet/plugins/leaflet-miniMap/3.6.1/dist/Control.MiniMap.min.js');
8686
}
87+
if (inArray(includes, 'g6')) {
88+
inputScript(libsurl + '/antv/g6/4.3.2/g6.min.js');
89+
}
8790
if (inArray(includes, 'mapv')) {
8891
inputScript(libsurl + '/mapv/2.0.62/mapv.min.js');
8992
}

dist/mapboxgl/include-mapboxgl.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
22
* This program are made available under the terms of the Apache License, Version 2.0
33
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
4-
(function () {
4+
(function () {
55
var r = new RegExp('(^|(.*?\\/))(include-mapboxgl.js)(\\?|$)'),
66
s = document.getElementsByTagName('script'),
77
targetScript;
@@ -66,6 +66,9 @@
6666
inputCSS(libsurl + '/mapbox-gl-js-enhance/1.12.1/mapbox-gl-enhance.css');
6767
inputScript(libsurl + '/mapbox-gl-js-enhance/1.12.1/mapbox-gl-enhance.js');
6868
}
69+
if (inArray(includes, 'g6')) {
70+
inputScript(libsurl + '/antv/g6/4.3.2/g6.min.js');
71+
}
6972
if (inArray(includes, 'turf')) {
7073
inputScript(libsurl + '/turf/6.5.0/turf.min.js');
7174
}
@@ -76,7 +79,7 @@
7679

7780
if (inArray(includes, 'mapboxgl-draw-rectangle-drag')) {
7881
inputScript(libsurl + '/mapboxgl-draw-rectangle-drag/1.0.1/mapboxgl-draw-rectangle-drag.browser.js');
79-
}
82+
}
8083
if (inArray(includes, 'compare')) {
8184
inputCSS(libsurl + '/mapbox-gl-js/plugins/mapbox-gl-compare/0.4.0/mapbox-gl-compare.css');
8285
inputScript(libsurl + '/mapbox-gl-js/plugins/mapbox-gl-compare/0.4.0/mapbox-gl-compare.js');
@@ -206,8 +209,8 @@
206209
}
207210

208211
load({
209-
libsurl: 'https://iclient.supermap.io/web/libs',
210-
disturl: '../../dist'
212+
libsurl: 'https://iclient.supermap.io/web/libs',
213+
disturl: '../../dist'
211214
});
212215
window.isLocal = false;
213216
window.server = document.location.toString().match(/file:\/\//)

dist/maplibregl/include-maplibregl.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474
if (!inArray(excludes, 'iclient-maplibregl-css')) {
7575
inputCSS('../../dist/maplibregl/iclient-maplibregl.min.css');
7676
}
77+
if (inArray(includes, 'g6')) {
78+
inputScript(libsurl + '/antv/g6/4.3.2/g6.min.js');
79+
}
7780
}
7881

7982
load({

dist/ol/include-ol.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
inputCSS(libsurl + '/openlayers/4.6.5/ol-debug.css');
6868
inputScript(libsurl + '/openlayers/4.6.5/ol-debug.js');
6969
}
70+
if (inArray(includes, 'g6')) {
71+
inputScript(libsurl + '/antv/g6/4.3.2/g6.min.js');
72+
}
7073
if (inArray(includes, 'mapv')) {
7174
inputScript(libsurl + '/mapv/2.0.62/mapv.min.js');
7275
}

dist/openlayers/include-openlayers.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
inputCSS(libsurl + '/openlayers/4.6.5/ol-debug.css');
6868
inputScript(libsurl + '/openlayers/4.6.5/ol-debug.js');
6969
}
70+
if (inArray(includes, 'g6')) {
71+
inputScript(libsurl + '/antv/g6/4.3.2/g6.min.js');
72+
}
7073
if (inArray(includes, 'mapv')) {
7174
inputScript(libsurl + '/mapv/2.0.62/mapv.min.js');
7275
}

examples/leaflet/config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,20 @@ var exampleConfig = {
514514
}
515515
]
516516
},
517+
KnowledgeGraph: {
518+
name: '知识图谱',
519+
name_en: 'KnowledgeGraph',
520+
version: '11.1.0',
521+
content: [
522+
{
523+
name: '图谱图',
524+
name_en: 'graticule',
525+
version: '11.1.0',
526+
thumbnail: 'knowledgeGraphMap.png',
527+
fileName: 'knowledgeGraphMap'
528+
}
529+
]
530+
},
517531
"security": {
518532
name: "安全",
519533
name_en: "Security",
235 KB
Loading
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!--********************************************************************
2+
* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
3+
*********************************************************************-->
4+
<!DOCTYPE html>
5+
<html>
6+
<head>
7+
<meta charset="utf-8" />
8+
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
9+
<title data-i18n="resources.title_knowledgeGraphMap"></title>
10+
<script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
11+
<style>
12+
body {
13+
position: absolute;
14+
top: 0;
15+
margin: 0;
16+
padding: 0;
17+
width: 100%;
18+
height: 100%;
19+
}
20+
21+
#knowledgeGraph {
22+
width: 100%;
23+
height: 100%;
24+
}
25+
</style>
26+
</head>
27+
28+
<body>
29+
<div id="knowledgeGraph"></div>
30+
<script type="text/javascript" include="g6" src="../../dist/leaflet/include-leaflet.js"></script>
31+
<script type="text/javascript">
32+
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
33+
const graphmap = new L.supermap.GraphMap(
34+
host + '/iserver/services/knowledgeGraph-simple/restjsr/graph/graphmaps/图谱'
35+
);
36+
</script>
37+
</body>
38+
</html>

examples/mapboxgl/config.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,21 @@ var exampleConfig = {
462462
fileName: "imageService"
463463
}
464464
]
465-
}
465+
},
466+
KnowledgeGraph: {
467+
name: '知识图谱',
468+
name_en: 'KnowledgeGraph',
469+
version: '11.1.0',
470+
content: [
471+
{
472+
name: '图谱图',
473+
name_en: 'graticule',
474+
version: '11.1.0',
475+
thumbnail: 'knowledgeGraphMap.png',
476+
fileName: 'knowledgeGraphMap'
477+
}
478+
]
479+
}
466480
}
467481
},
468482
iPortal: {
235 KB
Loading
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!--********************************************************************
2+
* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
3+
*********************************************************************-->
4+
<!DOCTYPE html>
5+
<html>
6+
<head>
7+
<meta charset="utf-8" />
8+
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
9+
<title data-i18n="resources.title_knowledgeGraphMap"></title>
10+
<script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
11+
<style>
12+
body {
13+
position: relative;
14+
top: 0;
15+
margin: 0;
16+
padding: 0;
17+
width: 100%;
18+
height: 100%;
19+
overflow: hidden;
20+
}
21+
22+
#knowledgeGraph {
23+
width: 100%;
24+
height: 100%;
25+
}
26+
</style>
27+
</head>
28+
29+
<body>
30+
<div id="knowledgeGraph"></div>
31+
<script type="text/javascript" include="g6" src="../../dist/mapboxgl/include-mapboxgl.js"></script>
32+
<script type="text/javascript">
33+
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
34+
const graphmap = new mapboxgl.supermap.GraphMap(
35+
host + '/iserver/services/knowledgeGraph-simple/restjsr/graph/graphmaps/图谱'
36+
);
37+
</script>
38+
</body>
39+
</html>

examples/maplibregl/config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,20 @@ var exampleConfig = {
378378
// fileName: "machinelearning_landcoverclassification"
379379
// }
380380
]
381+
},
382+
KnowledgeGraph: {
383+
name: '知识图谱',
384+
name_en: 'KnowledgeGraph',
385+
version: '11.1.0',
386+
content: [
387+
{
388+
name: '图谱图',
389+
name_en: 'graticule',
390+
version: '11.1.0',
391+
thumbnail: 'knowledgeGraphMap.png',
392+
fileName: 'knowledgeGraphMap'
393+
}
394+
]
381395
}
382396
}
383397
},
235 KB
Loading
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!--********************************************************************
2+
* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
3+
*********************************************************************-->
4+
<!DOCTYPE html>
5+
<html>
6+
<head>
7+
<meta charset="utf-8" />
8+
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
9+
<title data-i18n="resources.title_knowledgeGraphMap"></title>
10+
<script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
11+
<style>
12+
body {
13+
position: relative;
14+
top: 0;
15+
margin: 0;
16+
padding: 0;
17+
width: 100%;
18+
height: 100%;
19+
overflow: hidden;
20+
}
21+
22+
#knowledgeGraph {
23+
width: 100%;
24+
height: 100%;
25+
}
26+
</style>
27+
</head>
28+
29+
<body>
30+
<div id="knowledgeGraph"></div>
31+
<script type="text/javascript" include="g6" src="../../dist/maplibregl/include-maplibregl.js"></script>
32+
<script type="text/javascript">
33+
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
34+
const graphmap = new maplibregl.supermap.GraphMap(
35+
host + '/iserver/services/knowledgeGraph-simple/restjsr/graph/graphmaps/图谱'
36+
);
37+
</script>
38+
</body>
39+
</html>

examples/openlayers/config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,20 @@ var exampleConfig = {
488488
}
489489
]
490490
},
491+
KnowledgeGraph: {
492+
name: '知识图谱',
493+
name_en: 'KnowledgeGraph',
494+
version: '11.1.0',
495+
content: [
496+
{
497+
name: '图谱图',
498+
name_en: 'graticule',
499+
version: '11.1.0',
500+
thumbnail: 'knowledgeGraphMap.png',
501+
fileName: 'knowledgeGraphMap'
502+
}
503+
]
504+
},
491505
"security": {
492506
name: "安全",
493507
name_en: "Security",
235 KB
Loading
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!--********************************************************************
2+
* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
3+
*********************************************************************-->
4+
<!DOCTYPE html>
5+
<html>
6+
<head>
7+
<meta charset="utf-8" />
8+
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
9+
<title data-i18n="resources.title_knowledgeGraphMap"></title>
10+
<script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
11+
<style>
12+
body {
13+
position: absolute;
14+
top: 0;
15+
margin: 0;
16+
padding: 0;
17+
width: 100%;
18+
height: 100%;
19+
}
20+
21+
#knowledgeGraph {
22+
width: 100%;
23+
height: 100%;
24+
}
25+
</style>
26+
</head>
27+
28+
<body>
29+
<div id="knowledgeGraph"></div>
30+
<script type="text/javascript" include="g6" src="../../dist/ol/include-ol.js"></script>
31+
<script type="text/javascript">
32+
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
33+
const graphmap = new ol.supermap.GraphMap(
34+
host + '/iserver/services/knowledgeGraph-simple/restjsr/graph/graphmaps/图谱'
35+
);
36+
</script>
37+
</body>
38+
</html>

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
"webpack-node-externals": "^2.5.2"
127127
},
128128
"dependencies": {
129+
"@antv/g6": "^4.8.14",
129130
"@elastic/elasticsearch": "^5.6.22",
130131
"@mapbox/vector-tile": "1.3.1",
131132
"@sinonjs/text-encoding": "^0.7.2",
@@ -138,11 +139,13 @@
138139
"fetch-ie8": "1.5.0",
139140
"fetch-jsonp": "1.1.3",
140141
"flatgeobuf": "3.23.1",
142+
"insert-css": "^2.0.0",
141143
"jsonsql": "0.2.5",
142144
"leaflet": "1.7.1",
143145
"lodash.difference": "^4.5.0",
144146
"lodash.remove": "^4.7.0",
145147
"lodash.topairs": "4.3.0",
148+
"lodash.uniqby": "^4.7.0",
146149
"mapbox-gl": "1.13.2",
147150
"maplibre-gl": "2.4.0",
148151
"mapv": "2.0.62",

src/common/iServer/AddressMatchService.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export class AddressMatchService extends CommonServiceBase {
6969
scope: this,
7070
processCompleted: function(result) {
7171
if (eventId === result.result.eventId && callback) {
72+
delete result.result.eventId;
7273
callback(result);
7374
}
7475
},
@@ -86,14 +87,14 @@ export class AddressMatchService extends CommonServiceBase {
8687
scope: this,
8788
success(result) {
8889
result.eventId = eventId;
89-
this.serviceProcessCompleted(result, eventId);
90+
this.serviceProcessCompleted(result);
9091
},
9192
failure(result) {
9293
if (result.error) {
9394
result.error.eventId = eventId;
9495
}
9596
result.eventId = eventId;
96-
this.serviceProcessFailed(result, eventId);
97+
this.serviceProcessFailed(result);
9798
}
9899
});
99100
}

src/common/iServer/DatasetService.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ export class DatasetService extends CommonServiceBase {
101101
scope: this,
102102
processCompleted: function(result) {
103103
if (eventId === result.result.eventId && callback) {
104+
delete result.result.eventId;
104105
callback(result);
105106
}
106107
},

0 commit comments

Comments
 (0)