Skip to content

Commit e90faf3

Browse files
committed
ol对接supermapcloud 天地图
1 parent 2519e9c commit e90faf3

File tree

12 files changed

+976
-618
lines changed

12 files changed

+976
-618
lines changed

build/deps.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,14 @@ var deps = {
230230
"name": "百度图层",
231231
"src": ['./src/OL3/mapping/baidu.js']
232232
},
233+
"Tianditu": {
234+
"name": "天地图图层",
235+
"src": ['./src/OL3/mapping/tianditu.js']
236+
},
237+
"SuperMapCloud": {
238+
"name": "超图云图层",
239+
"src": ['./src/OL3/mapping/supermapcloud.js']
240+
},
233241

234242
},
235243
"SuperMap": {

dist/iclient9-openlayers.js

Lines changed: 730 additions & 617 deletions
Large diffs are not rendered by default.

examples/css/examples.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ h3.category-title {
4343
overflow: hidden;
4444
text-overflow: ellipsis;
4545
white-space: nowrap;
46-
padding: 10px 10px 2px 0px;
46+
padding: 10px 10px 8px 0px;
4747
margin: 0;
4848
font-weight: normal;
4949
}

examples/openlayers/config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,26 @@ var exampleConfig = {
399399
thumbnail: "ol_baiduLayer.png",
400400
fileName: "baiduLayer"
401401
}]
402+
},
403+
"Tianditu": {
404+
name: "",
405+
content: [{
406+
name: "天地图-经纬度",
407+
thumbnail: "ol_tianditu_ll.png",
408+
fileName: "tiandituLayer_ll"
409+
}, {
410+
name: "天地图-墨卡托",
411+
thumbnail: "ol_tianditu_mercator.png",
412+
fileName: "tiandituLayer_mecartor"
413+
}]
414+
},
415+
"SuperMapCloud": {
416+
name: "",
417+
content: [{
418+
name: "超图云地图",
419+
thumbnail: "ol_cloud.png",
420+
fileName: "superMapCloudLayer"
421+
}]
402422
}
403423
}
404424
}
107 KB
Loading
204 KB
Loading
641 KB
Loading
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>超图云地图</title>
6+
<link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
7+
<link href="http://cdn.bootcss.com/openlayers/4.0.1/ol.css" rel="stylesheet">
8+
</head>
9+
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%">
10+
<div id="map" style="width: 100%;height:100%;border: 1px solid #dddddd"></div>
11+
</body>
12+
<script src="http://cdn.bootcss.com/openlayers/4.0.1/ol-debug.js"></script>
13+
<script type="text/javascript" src="../../dist/iclient9-openlayers.js"></script>
14+
<script type="text/javascript">
15+
var map = new ol.Map({
16+
target: 'map',
17+
view: new ol.View({
18+
center: [0, 0],
19+
minZoom:3,
20+
zoom: 3,
21+
})
22+
});
23+
var layer = new ol.layer.Tile({
24+
source: new ol.source.SuperMapCloud()
25+
});
26+
map.addLayer(layer);
27+
</script>
28+
</html>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>天地图-经纬度</title>
6+
<link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
7+
<link href="http://cdn.bootcss.com/openlayers/4.0.1/ol.css" rel="stylesheet">
8+
</head>
9+
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%">
10+
<div id="map" style="width: 100%;height:100%;border: 1px solid #dddddd"></div>
11+
</body>
12+
<script src="http://cdn.bootcss.com/openlayers/4.0.1/ol-debug.js"></script>
13+
<script type="text/javascript" src="../../dist/iclient9-openlayers.js"></script>
14+
<script type="text/javascript">
15+
var resolutions = [];
16+
for (var i = 6; i < 10; i++) {
17+
resolutions.push(0.703125 / (Math.pow(2, i)));
18+
}
19+
var map = new ol.Map({
20+
target: 'map',
21+
view: new ol.View({
22+
center: [116.402, 39.905],
23+
zoom: 0,
24+
projection: "EPSG:4326",
25+
resolutions: resolutions
26+
}),
27+
28+
layers: [new ol.layer.Tile({
29+
source: new ol.source.Tianditu({
30+
url: "http://t0.tianditu.com/vec_c/wmts",
31+
matrixSet: 'c',
32+
layer: 'vec',
33+
projection: "EPSG:4326"
34+
})
35+
}), new ol.layer.Tile({
36+
source: new ol.source.Tianditu({
37+
url: " http://t0.tianditu.com/cva_c/wmts",
38+
matrixSet: 'c',
39+
layer: 'cva',
40+
projection: "EPSG:4326",
41+
tileGrid: new ol.tilegrid.WMTS({
42+
extent: [-180, -90, 180, 90],
43+
resolutions: resolutions,
44+
origin: [-180, 90],
45+
matrixIds: [7, 8, 9, 10],
46+
})
47+
})
48+
})]
49+
});
50+
</script>
51+
</html>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>天地图-墨卡托</title>
6+
<link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
7+
<link href="http://cdn.bootcss.com/openlayers/4.0.1/ol.css" rel="stylesheet">
8+
</head>
9+
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%">
10+
<div id="map" style="width: 100%;height:100%;border: 1px solid #dddddd"></div>
11+
</body>
12+
<script src="http://cdn.bootcss.com/openlayers/4.0.1/ol-debug.js"></script>
13+
<script type="text/javascript" src="../../dist/iclient9-openlayers.js"></script>
14+
<script src="https://cdn.bootcss.com/fetch-jsonp/1.0.6/fetch-jsonp.min.js"></script>
15+
<script type="text/javascript">
16+
var resolutions = [];
17+
for (var i = 0; i < 18; i++) {
18+
resolutions.push(78271.5169640203125 / (Math.pow(2, i)));
19+
}
20+
var map = new ol.Map({
21+
target: 'map',
22+
view: new ol.View({
23+
center: [0, 0],
24+
zoom: 0,
25+
resolutions: resolutions
26+
}),
27+
layers: [new ol.layer.Tile({
28+
source: new ol.source.Tianditu()
29+
}),new ol.layer.Tile({
30+
source: new ol.source.Tianditu({
31+
url: "http://t0.tianditu.com/cia_w/wmts",
32+
matrixSet: 'w',
33+
layer: 'cia'
34+
})
35+
})]
36+
});
37+
</script>
38+
</html>

0 commit comments

Comments
 (0)