forked from Esri/arcgis-dijit-sample-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
119 lines (86 loc) · 2.56 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
112
113
114
115
116
117
118
119
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>Fullscreen Dijit</title>
<link rel="stylesheet" type="text/css" href="http://servicesbeta.esri.com/jsapi/arcgis/3.4/js/esri/css/esri.css">
<style>
body{
margin:40px;
padding:20px;
}
.container{
position:relative;
padding: 10px;
border: 1px solid #eee;
-webkit-border-radius: 3px;
border-radius: 3px;
}
#map{
width:100%;
height: 500px;
}
#fullscreen{
position:absolute;
z-index: 4;
top:20px;
right:20px;
}
.fs .toggle{
width: 30px;
height: 30px;
border: 2px solid #666666;
-webkit-user-select: none;
-webkit-border-radius: 5px;
border-radius: 5px;
cursor:pointer;
}
.fs .enter{
background: #fff url(images/fullscreen.png) no-repeat center center;
}
.fs .exit{
background: #fff url(images/fullscreen_exit.png) no-repeat center center;
}
</style>
<script type="text/javascript">
// get current path
var pathRegex = new RegExp(/\/[^\/]+$/);
var locationPath = location.pathname.replace(pathRegex, '');
// Dojo Config
var dojoConfig = {
parseOnLoad: true,
packages: [
{
name: "modules",
location: locationPath + '/js/'
}
]
};
</script>
<script src="http://servicesbeta.esri.com/jsapi/arcgis/3.4" type="text/javascript"></script>
<script type="text/javascript">
require(["esri/map", "modules/FullScreenMap"], function(Map, FullScreenMap){
var myMap = new esri.Map("map", {
center: [-56.049, 38.485],
zoom: 3,
basemap: "streets"
});
var fullscreen = new FullScreenMap({
map: myMap
}, "fullscreen");
fullscreen.startup();
fullscreen.watch("fullscreen", function(){
console.log("fullscreen: " + fullscreen.get("fullscreen"));
});
});
</script>
</head>
<body>
<div class="container">
<div id="map" class="map">
<div id="fullscreen"></div>
</div>
</div>
</body>
</html>