Skip to content

Commit ab2620c

Browse files
[fix]知识图谱例子修改 review by songym
1 parent 695b078 commit ab2620c

28 files changed

+354
-41
lines changed

examples/leaflet/config.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,12 +520,19 @@ var exampleConfig = {
520520
version: '11.1.0',
521521
content: [
522522
{
523-
name: '图谱图',
524-
name_en: 'graticule',
523+
name: '不动产图谱',
524+
name_en: 'Real Estate GraphMap',
525525
version: '11.1.0',
526526
thumbnail: 'knowledgeGraphMap.png',
527527
fileName: 'knowledgeGraphMap'
528-
}
528+
},
529+
{
530+
name: '河流流经省份图谱',
531+
name_en: 'Rivers flowing through provinces GraphMap',
532+
version: '11.1.0',
533+
thumbnail: 'knowledgeGraphMap1.png',
534+
fileName: 'knowledgeGraphMap1'
535+
}
529536
]
530537
},
531538
"security": {
-106 KB
Loading
235 KB
Loading

examples/leaflet/knowledgeGraphMap.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<script type="text/javascript">
3030
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
3131
const graphmap = new L.supermap.GraphMap(
32-
host + '/iserver/services/knowledgeGraph-simple/restjsr/graph/graphmaps/图谱'
32+
host + '/iserver/services/knowledgeGraph-budongchan/restjsr/graph/graphmaps/图谱'
3333
);
3434
</script>
3535
</body>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
margin: 0;
14+
padding: 0;
15+
width: 100%;
16+
height: 100vh;
17+
overflow: hidden;
18+
}
19+
#knowledgeGraph {
20+
width: 100%;
21+
height: 100%;
22+
}
23+
</style>
24+
</head>
25+
26+
<body>
27+
<div id="knowledgeGraph"></div>
28+
<script type="text/javascript" include="g6" src="../../dist/leaflet/include-leaflet.js"></script>
29+
<script type="text/javascript">
30+
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
31+
const graphmap = new L.supermap.GraphMap(
32+
host + '/iserver/services/knowledgeGraph-rivers/restjsr/graph/graphmaps/图谱'
33+
);
34+
</script>
35+
</body>
36+
</html>

examples/mapboxgl/config.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,14 +469,21 @@ var exampleConfig = {
469469
version: '11.1.0',
470470
content: [
471471
{
472-
name: '图谱图',
473-
name_en: 'graticule',
472+
name: '不动产图谱',
473+
name_en: 'Real Estate GraphMap',
474474
version: '11.1.0',
475475
thumbnail: 'knowledgeGraphMap.png',
476476
fileName: 'knowledgeGraphMap'
477-
}
477+
},
478+
{
479+
name: '河流流经省份图谱',
480+
name_en: 'Rivers flowing through provinces GraphMap',
481+
version: '11.1.0',
482+
thumbnail: 'knowledgeGraphMap1.png',
483+
fileName: 'knowledgeGraphMap1'
484+
}
478485
]
479-
}
486+
}
480487
}
481488
},
482489
iPortal: {
-106 KB
Loading
235 KB
Loading
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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+
margin: 0;
14+
padding: 0;
15+
width: 100%;
16+
height: 100vh;
17+
overflow: hidden;
18+
}
19+
20+
#knowledgeGraph {
21+
width: 100%;
22+
height: 100%;
23+
}
24+
</style>
25+
</head>
26+
27+
<body>
28+
<div id="knowledgeGraph"></div>
29+
<script type="text/javascript" include="g6" src="../../dist/mapboxgl/include-mapboxgl.js"></script>
30+
<script type="text/javascript">
31+
const data = {
32+
nodes: [
33+
{
34+
id: '1',
35+
label: '房地产',
36+
x: 500,
37+
y: 100,
38+
style: { fill: '#f16667', lineWidth: 0 },
39+
labelCfg: { style: { fontSize: 5, fill: '#fff' } }
40+
},
41+
{
42+
id: '2',
43+
label: '房屋',
44+
x: 550,
45+
y: 150,
46+
style: { fill: '#ebc386', lineWidth: 0 },
47+
labelCfg: { style: { fontSize: 5, fill: '#fff' } }
48+
},
49+
{
50+
id: '3',
51+
label: '宗地',
52+
x: 600,
53+
y: 100,
54+
style: { fill: '#569480', lineWidth: 0 },
55+
labelCfg: { style: { fontSize: 5, fill: '#fff' } }
56+
},
57+
{
58+
id: '4',
59+
label: '地籍子区',
60+
x: 610,
61+
y: 0,
62+
style: { fill: '#da7194', lineWidth: 0 },
63+
labelCfg: { style: { fontSize: 5, fill: '#fff' } }
64+
},
65+
{
66+
id: '5',
67+
label: '地籍区',
68+
x: 650,
69+
y: 250,
70+
style: { fill: '#4c8eda', lineWidth: 0 },
71+
labelCfg: { style: { fontSize: 5, fill: '#fff' } }
72+
},
73+
{
74+
id: '6',
75+
label: '行政区划',
76+
x: 650,
77+
y: 100,
78+
style: { fill: '#00bcd4', lineWidth: 0 },
79+
labelCfg: { style: { fontSize: 5, fill: '#fff' } }
80+
}
81+
],
82+
edges: [
83+
{ source: '2', target: '1', label: '开发商' },
84+
{ source: '2', target: '3', label: '隶属' },
85+
{ source: '3', target: '4', label: '所属地籍子区' },
86+
{ source: '4', target: '5', label: '所属地籍区' },
87+
{ source: '5', target: '6', label: '所属地区' }
88+
]
89+
};
90+
const data1 = {
91+
nodes: [
92+
{ id: '1', label: '1' },
93+
{ id: '2', label: '2' },
94+
{ id: '3', label: '3' }
95+
],
96+
edges: [
97+
{ source: '2', target: '1' },
98+
{ source: '3', target: '2' }
99+
]
100+
};
101+
const graph = new mapboxgl.supermap.KnowledgeGraph();
102+
graph.setData(data1);
103+
graph.collapseNode('1');
104+
105+
</script>
106+
</body>
107+
</html>

examples/mapboxgl/knowledgeGraphMap.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<script type="text/javascript">
3131
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
3232
const graphmap = new mapboxgl.supermap.GraphMap(
33-
host + '/iserver/services/knowledgeGraph-sample/restjsr/graph/graphmaps/图谱'
33+
host + '/iserver/services/knowledgeGraph-budongchan/restjsr/graph/graphmaps/图谱'
3434
);
3535
</script>
3636
</body>

0 commit comments

Comments
 (0)