-
Notifications
You must be signed in to change notification settings - Fork 0
/
map.html
88 lines (73 loc) · 2.14 KB
/
map.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<title>World Map</title>
<style type="text/css">
html {
height: 100%;
}
body {
height: 100%;
margin: 0;
padding: 0;
}
#map-canvas {
height: 100%;
}
</style>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBTtOKGvOo4YhOExPhLqeBFZCH_jO_JCL4&sensor=false"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="map.js"></script>
</head>
<body>
<button onclick=" parseGeoJSON(testC, true) ">Some countries</button>
<button onclick=" addAuthMarker(testAuth) ">Add Twittes</button>
<div id="map-canvas"></div>
<script type="text/javascript">
var testC = {};
testC['Canada'] = 12;
testC['Senegal'] = 321;
testC['Swaziland'] = 1322;
testC['Sweden'] = 51;
testC['Austria'] = 22;
var testAuth = [];
testAuth[0] = { lat: 25, lng: 33, twitte: 'Gigel' };
testAuth[1] = { lat: 31, lng: 2, twitte: 'Dorel' };
testAuth[2] = { lat: 12, lng: 22, twitte: 'Masa' };
testAuth[3] = { lat: 43, lng: 13, twitte: 'Tasu' };
function mockData() {
var countries = {};
countries['romania'] = {
lat: 46,
lng: 25,
radius: 300000,
tweets: 12
};
countries['spania'] = {
lat: 40,
lng: -3,
radius: 300000,
tweets: 241
};
countries['usa'] = {
lat: 37,
lng: -95,
radius: 300000,
tweets: 322
};
countries['brazilia'] = {
lat: -14,
lng: -51,
radius: 300000,
tweets: 891
};
for (var country in countries) {
addCircle(countries[country].lat, countries[country].lng, countries[country].radius, countries[country].tweets);
}
addCircle(37, -77, 300000, 11);
}
</script>
</body>
</html>