-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain2.html
More file actions
368 lines (281 loc) · 12.6 KB
/
main2.html
File metadata and controls
368 lines (281 loc) · 12.6 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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
<<<<<<< HEAD
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src="D3/d3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.4/d3.min.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"/>
<script type="text/javascript" src="D3/d3pie-master/d3pie/d3pie.min.js"></script>
<script src="Leaflet/leaflet.js"> </script>
<script src="/heatmap.js-master/build/heatmap.js"> </script>
<script src="/leaflet-div-heatmap-master/src/leaflet-div-heatmap.js"> </script>
<link rel="stylesheet" type="text/css" href="Style.css">
<script src='https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.js'></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src='https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.css' rel='stylesheet' />
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="../../canvasjs.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css"/>
<script src="../../jquery.canvasjs.min.js"></script>
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-heat/v0.1.3/leaflet-heat.js'></script>
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-image/v0.0.4/leaflet-image.js'></script>
<script src="/leaflet-graphicscale-master/dist/Leaflet.GraphicScale.min.js"></script>
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-label/v0.2.1/leaflet.label.js'></script>
<link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-label/v0.2.1/leaflet.label.css' rel='stylesheet' />
<script src="/functions/retrieveOutputFile.js"> </script>
<script src="/functions/PlotChar.js"> </script>
<script type="text/javascript">
/*window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
title: {
text: "Top Categories of New Year's Resolution"
},
exportFileName: "CanvasJS Chart",
exportEnabled: true,
animationEnabled: true,
legend: {
verticalAlign: "bottom",
horizontalAlign: "center"
},
data: [
{
type: "pie",
showInLegend: true,
toolTipContent: "{legendText}: <strong>{y}%</strong>",
indexLabel: "{label} {y}%",
dataPoints: [
{ y: 35, legendText: "Health", exploded: true, label: "Health" },
{ y: 20, legendText: "Finance", label: "Finance" },
{ y: 18, legendText: "Career", label: "Career" },
{ y: 15, legendText: "Education", label: "Education" },
{ y: 5, legendText: "Family", label: "Family" },
{ y: 7, legendText: "Real Estate", label: "Real Estate" }
]
}
]
});
chart.render();
}
*/
/* function DisBarChart () {
CanvasJS.addCultureInfo("es", {
decimalSeparator: ",",// Observe ToolTip Number Format
digitGroupSeparator: ".", // Observe axisY labels
days: ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"]
});
var chart = new CanvasJS.Chart("barchartContainer", {
theme: "theme1",
culture: "es",
axisX: {
valueFormatString: "DDDD"
},
// change to "theme1"
title: {
text: document.getElementById("Lable").value
},
data: [
{
type: "column",
dataPoints: [
//Note: month input is 0-11 in JavaScript - 05 is June
{ x: new Date(2013, 05, 3), y: 3275.6 },
{ x: new Date(2013, 05, 4), y: 5250.8 },
{ x: new Date(2013, 05, 5), y: 6255.3 },
{ x: new Date(2013, 05, 6), y: 8275.2 },
{ x: new Date(2013, 05, 7), y: 6378.1 },
{ x: new Date(2013, 05, 8), y: 5258.4 },
{ x: new Date(2013, 05, 9), y: 3514.8 }
]
}
]
});
chart.render();
}
</script>
<script src="../../canvasjs.min.js"></script>
<title>CanvasJS Example</title>
</head>
<body>
<form action="">
Lable:<br>
<input type="text" id="Lable" name="firstname" value="insert bar chart lable"><br><br>
X Axis:<br>
<select id="xAxis" style="width:130px;">
<option value="District"> </option>
</select><br>
<br>
Y Axis:<br>
<select id="yAxis" style="width:130px;">
<option value="District"> </option>
</select>
<br>
</form><br>
<button id="dis" onclick="DisBarChart()"> Display</button>
<div id="barchartContainer" style="height: 400px; width: 100%;"></div>
<div id="chartContainer" style="height: 400px; width: 100%;"></div>
</body>
</html>
=======
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script type="text/javascript" src="D3/d3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.4/d3.min.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"/>
<script type="text/javascript" src="D3/d3pie-master/d3pie/d3pie.min.js"></script>
<script src="Leaflet/leaflet.js"> </script>
<script src="/heatmap.js-master/build/heatmap.js"> </script>
<script src="/heatmap.js-master/plugins/leaflet-heatmap.js"> </script>
<script src="/leaflet-div-heatmap-master/src/leaflet-div-heatmap.js"> </script>
<link rel="stylesheet" type="text/css" href="Style.css">
<script src='https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.js'></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src='https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.css' rel='stylesheet' />
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css"/>
<link href='//fonts.googleapis.com/css?family=Bungee Inline' rel='stylesheet'>
<!-- Add your external js file here-->
<script src="/functions/FILENAME.js"> </script>
<script src="/Data/region.js"> </script>
<link rel="stylesheet" href="leaflet-graphicscale-master/dist/Leaflet.GraphicScale.min.css" />
<link href='http://fonts.googleapis.com/css?family=Italianno' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
</head>
<body>
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-heat/v0.1.3/leaflet-heat.js'></script>
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-image/v0.0.4/leaflet-image.js'></script>
<script src="/leaflet-graphicscale-master/dist/Leaflet.GraphicScale.min.js"></script>
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-label/v0.2.1/leaflet.label.js'></script>
<link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-label/v0.2.1/leaflet.label.css' rel='stylesheet' />
<!-------------------------------------- HTML ------------------------------------------->
<!--NAjat is here-->
<div class="container">
<div class="box" id="main_box">
<button id="homeButton" onclick="showHome()"> <img style="height:17px;"src ="Images/home.png"/> </button>
<button id="homeButton" onclick="showHome()"> <img style="height:17px;"src ="Images/info.png"/> </button>
<ul id="IWButtContainer" >
<li id="IWButtons" > <a class="IWLink" href="#home">Natural </a> </li>
<li id="IWButtons" > <a class="IWLink" href="#news">Human </a> </li>
<li id="IWButtons" > <a class="IWLink" href="#contact">Produced </a> </li>
</ul>
<div id= "main_button_container">
<div id="main_box_content">
<table class="mainTable" >
<tr>
<th colspan="3"> <p id="mainHeaderLabel">Intelligent Systems</p></th>
</tr>
<tr>
<td><button class="button" onclick="showDesal() "><img class="button" id="image" src ="Images/env.png"/> </button>
<p id="mainButLabel" ><br>Environmental Systems</p></td>
<td> <button class="button" onclick="showDesal()"><img class="button" id="image" src ="Images/drop.png"/> </button>
<p id="mainButLabel" ><br>Water Management</p> </td>
<td> <button class="button" onclick="showDesal()"><img class="button" id="image" src ="Images/Energy.png"/> </button>
<p id="mainButLabel" ><br>Energy Planning</p> </td>
</tr>
<tr>
<td> <button class="button" onclick="showDesal()"><img class="button" id="image" src ="Images/Mobility.png"/> </button>
<p id="mainButLabel" ><br>Mobility Dynamics</p></td>
<td> <button class="button" onclick="showDesal()"><img class="button" id="image" src ="Images/Urban.png"/> </button>
<p id="mainButLabel" ><br>Urban Development</p>
</td>
<td> <button class="button" onclick="showDesal()"><img class="button" id="image" src ="Images/Social.png"/> </button>
<p id="mainButLabel" ><br>Social Analyitics</p></td>
</tr>
<tr>
<td><button class="button" onclick="showDesal()"><img class="button" id="image" src ="Images/labor.png"/> </button>
<p id="mainButLabel" ><br>Labor Market</p></td>
<td> <button class="button" onclick="showDesal()"><img class="button" id="image" src ="Images/Tech.png"/> </button>
<p id="mainButLabel" ><br>Technological Evolution</p></td>
<td> <button class="button" onclick="showIW()"><img class="button" id="image" src ="Images/ResourceAl.png"/></button>
<p id="mainButLabel"><br>Resource Allocation</p></td>
</tr>
</table>
</div>
</div>
</div>
<!-- Map -->
<div id="map" class ="map"> </div>
</div>
<!-------------------------------------- HTML END ------------------------------------------>
<script>
// Creating the map using mapbox
var map;
var token = L.mapbox.accessToken = 'pk.eyJ1IjoiYWxtYWhhIiwiYSI6ImM4M2YxY2U3ZDVhNTg3YjdkZWI0MDRkNmU5YzU5NWI4In0.5g65rHetoEtp1RqK8t2gsA';
var mapKey = 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=' + token;
window.map = L.mapbox.map('map', 'mapbox.light', {zoomControl:false}).setView([21.2954, 55.6794],5);
//move the map left/right: [ up/down , right/left ] up less, left more.
L.tileLayer(mapKey, {id: 'mapbox.light'}).addTo(map);
//Jo
function showDesal(){
document.getElementById("main_button_container").style.display='none';
map.setView([25.2954, 50.6794],7)}
var IWlayer;
function showIW(){
document.getElementById("IWButtContainer").style.display='block';
document.getElementById("main_button_container").style.display='none';
map.setView([21.2954, 55.6794],5);
new L.Control.Zoom({ position: 'topright' }).addTo(map);
map._initPathRoot();
//najat
function getColor(d) {
return "#000";
}
function style(feature) {
return {
fillColor: getColor(feature.properties.Shape_Area),
weight: 2,
opacity: 1,
color: 'white',
dashArray: '3',
fillOpacity: 0.7
};
}
function highlightFeature(e) {
var layer = e.target;
layer.setStyle({
weight: 2,
fillColor:'#333',
dashArray: '',
fillOpacity: 0.5
});
if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) {
layer.bringToFront();
}
// specify popup options
var customOptions =
{
'maxWidth': '500',
'className' : 'custom'
}
layer.bindPopup(layer.feature.properties.ProvName_e +'',customOptions)
.openPopup();
}
function resetHighlight(e) {
IWlayer.resetStyle(e.target);
}
function onEachFeature(feature, layer) {
layer.on({
mouseover: highlightFeature,
mouseout: resetHighlight
});
}
IWlayer = L.geoJson(region, {
style: style,
onEachFeature: onEachFeature
}).addTo(map);
}
function showHome(){
document.getElementById("main_button_container").style.display='block';
document.getElementById("IWButtContainer").style.display='none';
map.setView([21.2954, 55.6794],5);
map.removeLayer(IWlayer);
}
</script>
</body>
</html>
>>>>>>> origin