forked from marsprj/Map5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
111 lines (102 loc) · 2.85 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="lib/css/Map5.min.css">
<script type="text/javascript" src="src/depends/jquery-1.11.1.js"></script>
<script type="text/javascript" src="src/depends/bootstrap.min.js"></script>
<script type="text/javascript" src="lib/Map5.min.js"></script>
<style type="text/css">
body{
margin: 0px;
height:100%;
width:100%;
}
#mapDiv{
position: absolute;
height:100%;
width:100%;
margin: 0px;
padding: 0px;
z-index: 5;
}
#mapbar{
position: absolute;
height:30px;
width:100%;
margin: 0px;
padding: 0px;
top: 0px;
background-color: #FFFFFF;
opacity: 0.5;
z-index: 10;
}
.toolbar{
float: right;
right: 20px;
margin-right: 30px;
}
ul{
display: block;
list-style: none;
margin: 0px;
}
li{
float: left;
width: 50px;
text-align: center;
}
/* .toolbar a{
display: block;
width: 100px;
}*/
</style>
<title>Map5地图</title>
<body onload="init()">
<div id="mapbar">
<div class="toolbar">
<ul>
<li><a href="tutorials" target="_blank">Tutorials</a></li>
<li><a href="api" target="_blank">API</a></li>
<li><a href="Map5-v1.0.0-alpha.rar">Download</a></li>
</ul>
</div>
</div>
<div id="mapDiv"></div>
</body>
<script type="text/javascript">
var mapObj = null;
function init(){
mapObj = new GeoBeans.Map({
target : "mapDiv", //地图存放的容器
name : "map", //地图的名称
srs : GeoBeans.Proj.WGS84, //地图的投影
baseLayer : "world", //地图的底图名称,应该为layers中的一个图层
layers : [
new GeoBeans.Layer.TileLayer({ //定义一个瓦片图层
name : "world", //图层的名称
source : new GeoBeans.Source.Tile.QuadServer({ // 定义数据源
url : "/QuadServer/maprequest", // QuadServer服务的地址
imageSet : "world_image" //数据集名称
}),
opacity : 1.0, // 透明度
visible : true // 是否显示
}),
new GeoBeans.Layer.ClusterLayer({
name : "cluster",
geometryType : GeoBeans.Geometry.Type.POINT,
source : new GeoBeans.Source.Feature.GeoJSON({
url : "example/all/data/geojson/cities.json",
geometryName : "geometry",
}),
showGeometry : false
})
],
viewer : {
// center : new GeoBeans.Geometry.Point(0,0),
// zoom : 3,
extent : new GeoBeans.Envelope(-180,-90,180,90)
}
});
}
</script>