Skip to content

Commit 33bf88c

Browse files
author
潘卓然-中地数码台式机
committed
添加修正拓扑关系的矢量瓦片示例
1 parent cf4da56 commit 33bf88c

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset='utf-8' />
6+
<title>Show and hide layers</title>
7+
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
8+
<script include="compare" src="../../libs/zondyclient/include-mapboxgl-local.js"></script>
9+
<style>
10+
body {
11+
margin: 0;
12+
padding: 0;
13+
}
14+
15+
#map {
16+
position: absolute;
17+
top: 0;
18+
bottom: 0;
19+
width: 100%;
20+
}
21+
</style>
22+
</head>
23+
24+
<body>
25+
26+
<style>
27+
body {
28+
overflow: hidden;
29+
}
30+
31+
body * {
32+
-webkit-touch-callout: none;
33+
-webkit-user-select: none;
34+
-moz-user-select: none;
35+
-ms-user-select: none;
36+
user-select: none;
37+
}
38+
39+
.map {
40+
position: absolute;
41+
top: 0;
42+
bottom: 0;
43+
width: 100%;
44+
}
45+
</style>
46+
47+
<div id='before' class='map'></div>
48+
<div id='after' class='map'></div>
49+
50+
<script>
51+
//一定要去mapbox注册一个key,这个key会失效的
52+
mapboxgl.accessToken =
53+
'pk.eyJ1IjoicGFybmRlZWRsaXQiLCJhIjoiY2o1MjBtYTRuMDhpaTMzbXhpdjd3YzhjdCJ9.sCoubaHF9-nhGTA-sgz0sA';
54+
55+
var beforeMap = new mapboxgl.Map({
56+
container: 'before',
57+
style: "http://192.168.10.185:6163/igs/rest/mrms/vtiles/styles/24.json",
58+
zoom: 10,
59+
pitch: 45,
60+
center: [113, 27]
61+
});
62+
var afterMap = new mapboxgl.Map({
63+
container: 'after',
64+
style: "http://192.168.10.185:6163/igs/rest/mrms/vtiles/styles/topology.json",
65+
zoom: 10,
66+
pitch: 45,
67+
center: [113, 27]
68+
});
69+
var map = new mapboxgl.Compare(beforeMap, afterMap, {
70+
// Set this to enable comparing two maps by mouse movement:
71+
// mousemove: true
72+
});
73+
</script>
74+
75+
</body>
76+
77+
</html>
477 KB
Binary file not shown.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy