Skip to content

Commit 0c92171

Browse files
author
潘卓然-中地数码台式机
committed
补充arcserver的ogc示例以及说明
1 parent 3b5f18c commit 0c92171

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

config/config-leaflet.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,20 @@ var config = {
12531253
}
12541254
]
12551255
},
1256+
{
1257+
name: "ArcServer",
1258+
materialicon: "layers",
1259+
folder: "arcserver",
1260+
leaffolder: true,
1261+
childs: [{
1262+
name: "arcserver-ogc-4326",
1263+
file: "arcserver_ogc_4326",
1264+
diffcult: "1",
1265+
detail: "http://www.mg.cgs.gov.cn:6080/arcgis/rest/services/",
1266+
icon: "arcserver_ogc_4326.png",
1267+
update: "最后更新时间:2018-10-19"
1268+
}]
1269+
},
12561270
{
12571271
name: "客户端可视化",
12581272
materialicon: "camera",
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+
<title>加载OGC的WMS图层</title>
6+
<script src="../../libs/zondyclient/include-leaflet-local.js"></script>
7+
<script type="text/javascript">
8+
/**显示地图
9+
*/
10+
function init() {
11+
"use strict";
12+
//地图容器
13+
var map = L.map('leaf_map', {
14+
//参考坐标系,默认是墨卡托坐标系(EPSG3857),EPSG4326为经纬度坐标系
15+
crs: L.CRS.EPSG4326,
16+
//显示中心
17+
center: [45, -90],
18+
//最小显示等级
19+
minZoom: 1,
20+
//最大显示等级
21+
maxZoom: 15,
22+
//当前显示等级
23+
zoom: 5,
24+
//限制显示地理范围
25+
maxBounds: L.latLngBounds(L.latLng(-180, -180), L.latLng(180, 180))
26+
});
27+
//wms服务
28+
var Layer = L.tileLayer.wms('http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?', {
29+
//图层序列号
30+
layers: '0,1,2',
31+
//wms版本号
32+
version: '1.3.0',
33+
//设置地图不连续显示
34+
noWrap:true
35+
}).addTo(map);
36+
37+
var layer1 = new Zondy.Map.TDTLayer({
38+
//图层类型
39+
layerType: 'vec',
40+
//最小显示等级
41+
minZoom: 0,
42+
//最大显示等级
43+
maxZoom: 15,
44+
//设置地图不连续显示
45+
noWrap: true
46+
}).addTo(map);
47+
}
48+
</script>
49+
</head>
50+
<body onload="init()">
51+
<div id="leaf_map" style="width: 100%; height:700px;">
52+
</div>
53+
</body>
54+
</html>

0 commit comments

Comments
 (0)