-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
226 lines (171 loc) · 5.96 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
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
<html>
<head>
<title>Elektrica - charge your future</title>
<!--stylesheets and font imports-->
<link href="index.css" rel="stylesheet" type="text/css" media="screen" />
<link href="http://meyerweb.com/eric/tools/css/reset/reset.css" rel="stylesheet" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Doppio+One' rel='stylesheet' type='text/css'>
<!--external javascript file calls-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3&sensor=false" type="text/javascript"></script>
<!--google map JSON parser-->
<script type="text/javascript">
var icon = new google.maps.MarkerImage(
"car.png",
new google.maps.Size(32, 37), new google.maps.Point(0, 0),
new google.maps.Point(16, 37)
);
var center = null;
var map = null;
var currentPopup;
var bounds = new google.maps.LatLngBounds();
var geocoder = new google.maps.Geocoder();
function addMarker(pt, info) {
bounds.extend(pt);
var marker = new google.maps.Marker({
position: pt,
icon: icon,
map: map
});
var popup = new google.maps.InfoWindow({
content: info,
maxWidth: 300
});
google.maps.event.addListener(marker, "click", function() {
if (currentPopup != null) {
currentPopup.close();
currentPopup = null;
}
popup.open(map, marker);
currentPopup = popup;
});
google.maps.event.addListener(popup, "closeclick", function() {
currentPopup = null;
});
}
function initMap() {
map = new google.maps.Map(document.getElementById("map"), {
center: new google.maps.LatLng(51.1890850,4.3836280),
zoom: 10,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR
},
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}
});
}
//data get operations
$( document ).ready(function() {
$.ajax({
url: "http://127.0.0.1/elektrika/antwerpen.php"
})
.done(function( data ) {
$.each( data, function(key) {
geocoder.geocode( { 'address': data[key].zip + ' ' + data[key].city + ', ' + data[key].street}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
setTimeout( addMarker(results[0].geometry.location,'<b>Go go go darling! Kisses... xXx') , 5000 );
} else {
console.log("Geocode was not successful for the following reason: " + status);
}
});
});
});
//scrollfades (tested on 1920x1080 15 inch screens. Probaly broken on others. Needs fluid replacement.)
$( window ).scroll(function() {
$('#btnMap,#btnMobile,#btnService,#btnExplanation').css('color','#bfc8cc');
if ( $(document).scrollTop() > 2500 ){
$('#btnMap').css('color','#272dbe');
}
else if ( $(document).scrollTop() > 2280 ){
$( "#map" ).animate({
opacity: 1,
}, 750);
$('#btnMobile').css('color','#272dbe');
}
else if ( $(document).scrollTop() > 1700 ){
$( "#mobile" ).animate({
opacity: 1,
}, 750);
$('#btnService').css('color','#272dbe');
}
else if ( $(document).scrollTop() > 1060 ){
$( "#cutcord" ).animate({
opacity: 1,
}, 750);
$('#btnExplanation').css('color','#272dbe');
}
else if($(document).scrollTop() > 50) {
$( "#explanation" ).animate({
opacity: 1,
}, 750);
}
});
});
</script>
</head>
<body onload="initMap()">
<ul class="menubar"> <!-- Menu to switch cards-->
<li><a class="menulink" id="btnExplanation" href="#explanation">explanation</a></li>
<li><a class="menulink" id="btnService" href="#cutcord">service</a></li>
<li><a class="menulink" id="btnMobile" href="#mobile">mobile</a></li>
<li><a class="menulink" id="btnMap" href="#map">map</a></li>
<li id="logoplaceholder"><img id="logo" src="assets/images/logowhite.png"></li>
</ul>
<div id="container"> <!--carousel layout container-->
<!--card 1--> <div class="cards" id="first">
<p class="herotext">supercharge your electric experience</p>
</div>
<div class="cards" id="explanation" style="opacity: 0.2;">
<div class="wrapper">
<div class="divider">
<p class="normal">
Elektrica is a service designed for electric mobility. <br>
Charging points are all over the place. <br/>
The only problem is finding them. <br/>
We aim to provide the location data so you can just <br> <br> <br><span id="bolded">sit back, relax and let the GPS do the work.</span> <br/>
</p></div>
<div class="divider"><img id="leaf" src="assets/images/leaf.png" style="margin-left: 120px;"></div>
</div>
</div>
<!--card 2--> <div class="cards" id="cutcord" style="opacity: 0.2;">
<div class="wrapper">
<div class="divider"><img id="outlet" src="assets/images/outletcombo.png"></div>
<div class="divider" style="width: 33%;">
<p class="normal">
Charging points are all over the place. <br/>
The only problem is finding them. <br/>
We aim to provide the location data so you can just <br> <br> <br><span id="bolded">sit back, relax and let the GPS do the work.</span> <br/>
</p>
</div>
</div>
</div>
<!--card 3--> <div class="cards" id="mobile" style="opacity: 0.2;">
<div class="wrapper">
<div class="divider">
<p class="herotext">
Mobile application coming soon. <br>
Based on fences and gps location uplinking.<br>
<br><span id="bolded">sit back, relax and let the GPS do the work.</span> <br/>
</p>
</div>
<div class="divider">
<img id="leaf" src="assets/images/phone.png">
</div>
</div>
</div>
<!--card 4--> <div class="cards" id="map" style="opacity: 0.2;">
<!--(interactive card-)--> <div class="wrapper">
<div class="divider">
<p class="herotext">
Location
</p>
</div>
</div>
</div>
</div>
</body>
</html>