Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9f10be5

Browse files
submit code
1 parent cafcf51 commit 9f10be5

File tree

9 files changed

+1864
-4
lines changed

9 files changed

+1864
-4
lines changed
Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Awesome-pyecharts</title>
6+
<script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
7+
<script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts-gl.min.js"></script>
8+
<script type="text/javascript" src="https://assets.pyecharts.org/assets/maps/guizhou.js"></script>
9+
10+
</head>
11+
<body>
12+
<div id="1422512d69694e5d865817ea3afc1868" class="chart-container" style="width:1200px; height:1200px;"></div>
13+
<script>
14+
var chart_1422512d69694e5d865817ea3afc1868 = echarts.init(
15+
document.getElementById('1422512d69694e5d865817ea3afc1868'), 'white', {renderer: 'canvas'});
16+
var option_1422512d69694e5d865817ea3afc1868 = {
17+
"animation": true,
18+
"animationThreshold": 2000,
19+
"animationDuration": 1000,
20+
"animationEasing": "cubicOut",
21+
"animationDelay": 0,
22+
"animationDurationUpdate": 300,
23+
"animationEasingUpdate": "cubicOut",
24+
"animationDelayUpdate": 0,
25+
"color": [
26+
"#c23531",
27+
"#2f4554",
28+
"#61a0a8",
29+
"#d48265",
30+
"#749f83",
31+
"#ca8622",
32+
"#bda29a",
33+
"#6e7074",
34+
"#546570",
35+
"#c4ccd3",
36+
"#f05b72",
37+
"#ef5b9c",
38+
"#f47920",
39+
"#905a3d",
40+
"#fab27b",
41+
"#2a5caa",
42+
"#444693",
43+
"#726930",
44+
"#b2d235",
45+
"#6d8346",
46+
"#ac6767",
47+
"#1d953f",
48+
"#6950a1",
49+
"#918597"
50+
],
51+
"series": [
52+
{
53+
"type": "lines3D",
54+
"coordinateSystem": "geo3D",
55+
"geo3DIndex": 0,
56+
"globeIndex": 0,
57+
"polyline": false,
58+
"effect": {
59+
"show": true,
60+
"period": 4,
61+
"trailWidth": 3,
62+
"trailLength": 0.5,
63+
"trailColor": "#f00",
64+
"trailOpacity": 1
65+
},
66+
"lineStyle": {
67+
"show": true,
68+
"width": 1,
69+
"opacity": 1,
70+
"curveness": 0,
71+
"type": "solid"
72+
},
73+
"data": [
74+
[
75+
[
76+
106.70722,
77+
26.5982,
78+
1000
79+
],
80+
[
81+
106.63024,
82+
26.64702,
83+
1000
84+
]
85+
],
86+
[
87+
[
88+
104.83023,
89+
26.59336
90+
],
91+
[
92+
106.92723,
93+
27.72545
94+
]
95+
],
96+
[
97+
[
98+
105.30504,
99+
27.29847
100+
],
101+
[
102+
107.52034,
103+
26.29322
104+
]
105+
],
106+
[
107+
[
108+
107.89868,
109+
26.52881
110+
],
111+
[
112+
104.948571,
113+
25.077502
114+
]
115+
],
116+
[
117+
[
118+
105.9462,
119+
26.25367
120+
],
121+
[
122+
109.18099,
123+
27.69066
124+
]
125+
]
126+
],
127+
"blendMode": "source-over",
128+
"zlevel": -10,
129+
"silent": false
130+
}
131+
],
132+
"legend": [
133+
{
134+
"data": [
135+
""
136+
],
137+
"selected": {
138+
"": true
139+
},
140+
"show": true,
141+
"padding": 5,
142+
"itemGap": 10,
143+
"itemWidth": 25,
144+
"itemHeight": 14
145+
}
146+
],
147+
"tooltip": {
148+
"show": true,
149+
"trigger": "item",
150+
"triggerOn": "mousemove|click",
151+
"axisPointer": {
152+
"type": "line"
153+
},
154+
"textStyle": {
155+
"fontSize": 14
156+
},
157+
"borderWidth": 0
158+
},
159+
"geo3D": {
160+
"map": "\u8d35\u5dde",
161+
"boxWidth": 100,
162+
"boxHeight": 10,
163+
"regionHeight": 3,
164+
"groundPlane": {
165+
"show": false,
166+
"color": "#aaa"
167+
},
168+
"instancing": false,
169+
"itemStyle": {
170+
"color": "rgb(5,101,123)",
171+
"borderColor": "rgb(62,215,213)",
172+
"borderWidth": 0.8,
173+
"opacity": 1
174+
},
175+
"emphasis": {},
176+
"light": {
177+
"main": {
178+
"color": "#fff",
179+
"intensity": 1.2,
180+
"shadow": true,
181+
"shadowQuality": "medium",
182+
"alpha": 55,
183+
"beta": 10
184+
},
185+
"ambient": {
186+
"color": "#fff",
187+
"intensity": 0.3
188+
},
189+
"ambientCubemap": {
190+
"diffuseIntensity": 0.5,
191+
"specularIntensity": 0.5
192+
}
193+
},
194+
"postEffect": {
195+
"enable": true,
196+
"bloom": {
197+
"enable": false,
198+
"bloomIntensity": 0.1
199+
},
200+
"depthOfField": {
201+
"enable": false,
202+
"focalDistance": 50,
203+
"focalRange": 20,
204+
"fstop": 2.8,
205+
"blurRadius": 10
206+
},
207+
"SSAO": {
208+
"enable": false,
209+
"quality": "medium",
210+
"radius": 2,
211+
"intensity": 1
212+
},
213+
"colorCorrection": {
214+
"enable": false,
215+
"exposure": 0,
216+
"brightness": 0,
217+
"contrast": 1,
218+
"saturation": 1
219+
},
220+
"FXAA": {
221+
"enable": false
222+
}
223+
},
224+
"temporalSuperSampling": {
225+
"enable": "auto"
226+
},
227+
"viewControl": {
228+
"projection": "perspective",
229+
"autoRotate": false,
230+
"autoRotateDirection": "cw",
231+
"autoRotateSpeed": 10,
232+
"autoRotateAfterStill": 3,
233+
"damping": 0.8,
234+
"rotateSensitivity": 1,
235+
"zoomSensitivity": 1,
236+
"panSensitivity": 1,
237+
"panMouseButton": "left",
238+
"rotateMouseButton": "middle",
239+
"distance": 100,
240+
"minDistance": 40,
241+
"maxDistance": 400,
242+
"orthographicSize": 100,
243+
"minOrthographicSize": 20,
244+
"maxOrthographicSize": 400,
245+
"alpha": 40,
246+
"beta": 0,
247+
"center": [
248+
-10,
249+
0,
250+
10
251+
],
252+
"minAlpha": 5,
253+
"maxAlpha": 90,
254+
"minBeta": -80,
255+
"maxBeta": 80,
256+
"animation": true,
257+
"animationDurationUpdate": 1000,
258+
"animationEasingUpdate": "cubicInOut"
259+
},
260+
"zlevel": -10,
261+
"left": "auto",
262+
"top": "auto",
263+
"right": "auto",
264+
"bottom": "auto",
265+
"width": "auto",
266+
"height": "auto"
267+
},
268+
"title": [
269+
{
270+
"text": "Map3D-GuiZhou3D",
271+
"padding": 5,
272+
"itemGap": 10
273+
}
274+
]
275+
};
276+
chart_1422512d69694e5d865817ea3afc1868.setOption(option_1422512d69694e5d865817ea3afc1868);
277+
</script>
278+
</body>
279+
</html>

‎chaoxi/Earth_view/guizhou_map_3d.py‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
from pyecharts import options as opts
2+
from pyecharts.charts import Map3D
3+
from pyecharts.globals import ChartType
4+
5+
# 写入省份内各地区经纬度
6+
example_data = [
7+
[[106.70722,26.59820, 1000],[106.63024, 26.64702, 1000]],
8+
[[104.83023, 26.59336], [106.92723, 27.72545]],
9+
[[105.30504, 27.29847], [107.52034, 26.29322]],
10+
[[107.89868, 26.52881], [104.948571, 25.077502]],
11+
[[105.9462, 26.25367], [109.18099, 27.69066]],
12+
]
13+
# 添加 3D 地图
14+
c = (
15+
Map3D(init_opts=opts.InitOpts(width='1200px', height='1200px'))
16+
.add_schema(
17+
maptype="贵州",
18+
itemstyle_opts=opts.ItemStyleOpts(
19+
color="rgb(5,101,123)",
20+
opacity=1,
21+
border_width=0.8,
22+
border_color="rgb(62,215,213)",
23+
),
24+
light_opts=opts.Map3DLightOpts(
25+
main_color="#fff",
26+
main_intensity=1.2,
27+
is_main_shadow=True,
28+
main_alpha=55,
29+
main_beta=10,
30+
ambient_intensity=0.3,
31+
),
32+
view_control_opts=opts.Map3DViewControlOpts(center=[-10, 0, 10]),
33+
post_effect_opts=opts.Map3DPostEffectOpts(is_enable=True),
34+
35+
)
36+
.add(
37+
series_name="",
38+
data_pair=example_data,
39+
type_=ChartType.LINES3D,
40+
effect=opts.Lines3DEffectOpts(
41+
is_show=True,
42+
period=4,
43+
trail_width=3,
44+
trail_length=0.5,
45+
trail_color="#f00",
46+
trail_opacity=1,
47+
),
48+
label_opts=opts.LabelOpts(is_show=True),
49+
)
50+
.set_global_opts(title_opts=opts.TitleOpts(title="Map3D-GuiZhou3D"))
51+
.render("guizhou_map_3d.html")
52+
)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /