Skip to content

Commit 1d51be1

Browse files
author
潘卓然ParnDeedlit
committed
【版本】【10.5.2】【发布版本前进行bug回归测试】
1 parent 24d1a2d commit 1d51be1

File tree

20 files changed

+522
-261
lines changed

20 files changed

+522
-261
lines changed

website/public/static/demo/config/config-mapboxgl.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -846,14 +846,6 @@
846846
"detail": "",
847847
"icon": "grid-search.png",
848848
"update": "最后更新时间:2019-11-07"
849-
},
850-
{
851-
"name": "热力分析",
852-
"file": "heat-search",
853-
"diffcult": "5",
854-
"detail": "",
855-
"icon": "heat-search.png",
856-
"update": "最后更新时间:2019-11-07"
857849
}
858850
]
859851
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
4+
<head>
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6+
<title>GeoPoint</title>
7+
<script src="./static/libs/include-mapboxgl-local.js"></script>
8+
<style>
9+
body {
10+
margin: 0;
11+
padding: 0;
12+
}
13+
14+
#map {
15+
position: absolute;
16+
top: 0;
17+
bottom: 0;
18+
width: 100%;
19+
}
20+
</style>
21+
</head>
22+
23+
<body>
24+
<div id="map"></div>
25+
<script>
26+
var { protocol, ip, port } = window.webclient;
27+
ip = 'localhost'
28+
var map = new mapboxgl.Map({
29+
container: 'map', // 绑定div
30+
style: `${protocol}://${ip}:${port}/igs/rest/mrms/vtiles/styles/epsg_4326_china.json`,
31+
center: [106.563777, 29.578285],
32+
zoom: 3,
33+
crs: 'EPSG:4326'
34+
});
35+
map.addControl(new mapboxgl.NavigationControl(), 'top-left');
36+
let sw = map.project(new mapboxgl.LngLat(73, 18));
37+
let ne = map.project(new mapboxgl.LngLat(134, 53));
38+
map.on('load', function (e) {
39+
var features = map.queryRenderedFeatures(
40+
[sw, ne],
41+
{ layers: ['省级行政区'] }
42+
);
43+
console.log('features', features);
44+
});
45+
</script>
46+
47+
48+
</body>
49+
50+
</html>

0 commit comments

Comments
 (0)