-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
83 lines (79 loc) · 3.68 KB
/
index.html
File metadata and controls
83 lines (79 loc) · 3.68 KB
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
<!DOCTYPE html>
<html>
<head>
<title>supermap</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="./js/SuperMap.Include.js"></script>
<script src="./js/jquery-1.8.2.js"></script>
<script src="./js/sm_bev_main.js"></script> <!--引入bev入口脚本-->
<script>
var map, layer0,panZoomBar,myWidgetControl,myMenuPanel,myMeasure,myNavigation;
function init() {
//初始化bev框架,
SuperMap.Bev.Main.init(function(){
//页面代码需要放入其回调函数中
//设置主题
SuperMap.Bev.Theme.set("dot-luv");
initDemo();
panZoomBar = new SuperMap.Control.PanZoomBar();
myNavigation = new SuperMap.Control.Navigation({ dragPanOptions: { enableKinetic: true } });
map = new SuperMap.Map('mapContainer',{ controls: [ new SuperMap.Control.ScaleLine(),
panZoomBar,
myNavigation], units: 'm'}
);
layer0 = new SuperMap.Layer.CloudLayer();
map.addLayer(layer0);
map.setCenter(new SuperMap.LonLat(0 , 0) , 2);
});
}
function initDemo(){
myWidgetControl = new SuperMap.Bev.WidgetControl("#widgetControl");
myMenuPanel = new SuperMap.Bev.MenuPanel($("#toolbar"),{
"tree":[
{
"icon":"measure_icon",
"title":"基本操作",
"menu":new SuperMap.Bev.Menu(null,{
"tree":[
{
"icon":"measure_16_16",
"text":"量 算",
"events":{
"click":function(){
if(!myMeasure){
var dialog = new SuperMap.Bev.Dialog(myWidgetControl,null,{
"icon":"measure_16_16",
"text":"量 算"
});
var contentBody = dialog.getContentBody();
myMeasure = new SuperMap.Bev.Measure(contentBody,map);
dialog.on("dialogclose",function(){
if(myMeasure){
myMeasure.destroy();
myMeasure = null;
}
})
}
}
}
}
]
})
}
]
});
}
</script>
</head>
<body onload="init()">
<!--[if IE 7]><div style="position: absolute;width: 100%;height: 100%;overflow: hidden;"><![endif]-->
<div id="mapContainer"></div>
<div id="head" class="background_1">
<span id="logo" class="head_child"></span>
<span id="toolbar" class="head_child"></span>
</div>
<div id="widgetControl"></div>
<!--[if IE 7]></div><![endif]-->
</body>
</html>