【update】更新至8c(2017)beta版 · Afee2019/iClient-for-JavaScript@957cb21 · GitHub
Skip to content

Commit 957cb21

Browse files
committed
【update】更新至8c(2017)beta版
1 parent c0654f1 commit 957cb21

228 files changed

Lines changed: 61041 additions & 711 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/3googlelayer.html

Lines changed: 64 additions & 0 deletions

examples/3osm.html

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
<!DOCTYPE html>
3+
<html>
4+
<head>
5+
<meta charset="utf-8">
6+
<title>OSM</title>
7+
<style type="text/css">
8+
body{
9+
margin: 0;
10+
overflow: hidden;
11+
background: #fff;
12+
}
13+
#map{
14+
position: relative;
15+
height: 553px;
16+
border:1px solid #3473b7;
17+
top: 10px;
18+
}
19+
</style>
20+
<link href='./css/bootstrap.min.css' rel='stylesheet' />
21+
<link href='./css/bootstrap-responsive.min.css' rel='stylesheet' />
22+
<script src = '../libs/SuperMap.Include.js'></script>
23+
<script type="text/javascript">
24+
var map, osmLayer,pointVector,vector,dataAdded=false;
25+
function init(){
26+
map = new SuperMap.Map("map",{controls:[
27+
new SuperMap.Control.Navigation() ,
28+
new SuperMap.Control.Zoom(),
29+
new SuperMap.Control.LayerSwitcher(),
30+
new SuperMap.Control.MousePosition()
31+
]});
32+
osmLayer = new SuperMap.Layer.OSM();
33+
vector = new SuperMap.Layer.Vector("vector");
34+
map.addLayers([osmLayer,vector]);
35+
addData();
36+
var bounds = new SuperMap.Bounds(-33554432,-33554432,33554432,33554432);
37+
map.zoomToExtent(bounds);
38+
}
39+
40+
function addData(){
41+
if(!dataAdded)
42+
{
43+
vector.removeAllFeatures();
44+
//点对象
45+
var point= new SuperMap.Geometry.Point(0,0);
46+
var pointVector = new SuperMap.Feature.Vector(point);
47+
pointVector.style={
48+
fillColor:"red",
49+
strokeColor:"yellow",
50+
pointRadius:10
51+
};
52+
53+
vector.addFeatures([pointVector]);
54+
dataAdded=true;
55+
} else{
56+
alert("数据已加载。");
57+
}
58+
}
59+
</script>
60+
</head>
61+
<body onLoad = "init()">
62+
<div id = "map"></div>
63+
</body>
64+
</html>
Lines changed: 175 additions & 0 deletions

0 commit comments

Comments
 (0)