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>

0 commit comments

Comments
 (0)