-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstreamlayer.html
65 lines (59 loc) · 1.39 KB
/
streamlayer.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>StreamLayer-Simple</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.16/esri/css/esri.css">
<style type="text/css">
html,
body{
height: 100%;
width: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
.banner {
margin-top: 5px;
margin-bottom: 5px;
color: #000080;
font-size: 2em;
font-weight: bold;
}
#mapDiv {
height: 90%;
width: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
<script src="https://js.arcgis.com/3.16/"></script>
</head>
<body>
<div class="banner">
Stream Layer: Moving Observations
</div>
<div id="mapDiv"></div>
</body>
<script>
require([
"esri/map",
"esri/InfoTemplate",
"esri/layers/StreamLayer",
"dojo/domReady!"
], function(Map, InfoTemplate, StreamLayer){
var url = "http://ec2-75-101-155-202.compute-1.amazonaws.com:6080/arcgis/rest/services/AsdiTracks/StreamServer";
var streamLayer = new StreamLayer(url, {
infoTemplate: new InfoTemplate("Attributes", "${*}")
});
var map = new Map("mapDiv", {
basemap: "topo",
center: [-90, 40],
zoom: 3
});
map.addLayer(streamLayer);
});
</script>
</html>