forked from ssylvia/geoblog-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
timeTest.html
55 lines (46 loc) · 1.36 KB
/
timeTest.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
<!DOCTYPE html>
<html>
<head>
<title>Create a Web Map</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<link rel="stylesheet" type="text/css" href="http://servicesbeta.esri.com/jsapi/arcgis/3.5/js/esri/css/esri.css">
<style>
html,body,#mapDiv,.map.container{
padding:0;
margin:0;
height:100%;
}
#legendDiv{
background-color: #fff;
position: absolute !important;
z-index: 99;
top:10px;
right:20px;
}
</style>
<script>var dojoConfig = { parseOnLoad:true };</script>
<script src="http://servicesbeta.esri.com/jsapi/arcgis/3.5"></script>
<script>
dojo.require("esri.map");
dojo.require("esri.arcgis.utils");
var map;
function init(){
var webmapid = "cffc475ae9d74d41aa21138c267ba9f5";
esri.arcgis.utils.createMap(webmapid, "mapDiv",{
mapOptions: {
}
}).then(function(response){
map = response.map;
map.addLayer(new esri.layers.FeatureLayer("http://services.arcgis.com/nzS0F0zdNLvs7nc8/ArcGIS/rest/services/geoblog/FeatureServer/0"));
map.setTimeExtent(new esri.TimeExtent(null,new Date("1990")));
});
}
dojo.ready(init);
</script>
</head>
<body>
<div id="mapDiv"></div>
<div id="legendDiv"></div>
</body>
</html>