-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
763 lines (679 loc) · 25.9 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
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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8' />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.7.0/fullcalendar.min.css' rel='stylesheet' />
<link href='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.7.0/fullcalendar.print.css' rel='stylesheet' media='print' />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
<style>
html {
width: 100%;
height: 100%;
}
body {
--margin: 40px 10px;
padding: 0;
font-family: 'Roboto', sans-serif;
font-size: 14px;
height: 100%;
}
#menu>li {
display: inline;
}
#calendar {
--margin: 0 auto;
margin-top: 1%;
}
.fc-title {
white-space: normal;
}
#cinema {
overflow: hidden;
width: 100%;
height: 50%;
}
#googleMap {
float: left;
width: 75%;
height: 100%;
}
#lstcinema {
width: 25%;
height: 100%;
overflow: auto;
}
.inline {
display: inline-block;
}
a {
text-decoration: none;
}
#lstcinema a:visited {
color: blue;
}
#currentWeather {
overflow: hidden;
float: left;
width: 40%;
}
#timelineWeather {
overflow: hidden;
width: 60%;
}
#iframe1 {
border: 0px none;
height: 260px;
margin-top: -155px;
width: -webkit-fill-available;
width: -moz-available;
}
#iframe2 {
border: 0px none;
height: 400px;
margin-top: -295px;
width: -webkit-fill-available;
width: -moz-available;
}
.nav-link{
text-align: center;
}
</style>
</head>
<body>
<div id="currentWeather">
<iframe id="iframe1" scrolling="no" src="about:blank">
</iframe>
</div>
<div id="timelineWeather">
<iframe id="iframe2" scrolling="no" src="about:blank">
</iframe>
</div>
<div id="cinema">
<div id="googleMap" class="inline"></div>
<div id="lstcinema" class="inline">
<ol id="list"></ol>
</div>
</div>
<div id="myMenu">
<nav class="navbar sticky-top navbar-expand-lg navbar-light bg-light">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul id="menu" class="navbar-nav mx-auto">
<li class="nav-item"><a class="navbar-brand" href="#" data-toggle="collapse" data-parent="#navbarSupportedContent"
data-target="#calendar">Calendar</a></li>
<li class="nav-item"><a class="nav-link" href="#" data-toggle="collapse" data-parent="#navbarSupportedContent"
data-target="#beta">Beta
Cineplex</a></li>
<li class="nav-item"><a class="nav-link" href="#" data-toggle="collapse" data-parent="#navbarSupportedContent"
data-target="#bhd">BHD</a></li>
<li class="nav-item"><a class="nav-link" href="#" data-toggle="collapse" data-parent="#navbarSupportedContent"
data-target="#cgv">CGV</a></li>
<li class="nav-item"><a class="nav-link" href="#" data-toggle="collapse" data-parent="#navbarSupportedContent"
data-target="#lotte">Lotte
Cinema</a></li>
<li class="nav-item"><a class="nav-link" href="#" data-toggle="collapse" data-parent="#navbarSupportedContent"
data-target="#platinum">Platinum
Cineplex</button></li>
</ul>
</div>
</nav>
<div class="accordion-group">
<div id='calendar' class="collapse show indent"></div>
<div id="beta" class="collapse indent">
<img alt="" src="https://files.betacorp.vn/files/ecm/2018/08/02/mydinh-1920x3072-01-171300-020818-59.jpg">
</div>
<div id="bhd" class="collapse">
<img alt="" src="https://www.bhdstar.vn/wp-content/uploads/2016/07/BHD-Star_BangGiaVe_PhamNgocThach-2D-052018.png">
<img alt="" src="https://www.bhdstar.vn/wp-content/uploads/2016/07/BHD-Star_BangGiaVe_PhamNgocThach-ATMOS-052018.png">
<img alt="" src="https://www.bhdstar.vn/wp-content/uploads/2016/04/BHD-Star_BangGiaVe-3D.jpg">
<img alt="" src="https://www.bhdstar.vn/wp-content/uploads/2016/07/BHD-Star_BangGiaVe-3D_Atmos-1.jpg">
<img alt="" src="https://www.bhdstar.vn/wp-content/uploads/2018/04/BHDStar-GiaVe-Le2018-PNT-1920x1080.jpg">
<img alt="" src="https://www.bhdstar.vn/wp-content/uploads/2016/10/BHD-Star_BangGiaVe_PhamNgocThach-FirstClass.jpg">
</div>
<div id="cgv" class="collapse">
<img alt="" src="https://imgur.com/PIhHvWu.png">
</div>
<div id="lotte" class="collapse">
<img alt="" src="https://moveek.com/media/5b7b8f9c5c9b0187323608.jpg">
</div>
<div id="platinum" class="collapse">
<img alt="" src="https://imgur.com/1G1kwbO.png">
</div>
</div>
</div>
</body>
<script>
//Google map
function initMap() {
var myLatLng;
var infowindow = new google.maps.InfoWindow();
var golInfo = new google.maps.InfoWindow();
var marker, i, cinema;
var distance;
var list, entry, li;
var distanceArr = [];
var cinemaArr = [];
var infoWindowArr = [];
var link;
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
myLatLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var mapProp = {
center: myLatLng,
zoom: 13,
};
var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
var currentMarker = new google.maps.Marker({
position: myLatLng,
map: map
});
google.maps.event.addListener(currentMarker, 'click', (function (currentMarker, i) {
return function () {
infowindow.setContent('You are here');
infowindow.open(map, currentMarker);
}
})(currentMarker, i));
link = 'https://darksky.net/forecast/' + position.coords.latitude + ',' + position.coords.longitude + '/si12/en';
document.getElementById('iframe1').src = link;
document.getElementById('iframe2').src = link;
var locations = [
//CGV Cinemas
['CGV Vincom Center Bà Triệu', 21.0110831, 105.8495107],
['CGV Vincom Nguyễn Chí Thanh', 21.0232842, 105.8092125],
['CGV Aeon Long Biên', 21.0265591, 105.9006806],
['CGV Hà Nội Centerpoint', 21.0048854, 105.8047025],
['CGV Mipec Tower', 21.0059122, 105.8233082],
['CGV Vincom Mega Mall Royal City', 21.0030263, 105.8154839],
['CGV Vincom Long Biên', 21.0509866, 105.9163423],
['CGV Artemis Hà Nội', 20.9996882, 105.8283506],
['CGV Vincom Mega Mall Times City', 20.9942669, 105.8684911],
['CGV Rice City', 20.9634609, 105.8230029],
['CGV Hồ Gươm Plaza', 20.9790077, 105.7856378],
['CGV IPH Hà Nội', 21.036056, 105.782275],
['CGV Golden Plaza', 10.7536086, 106.6547646],
['CGV Vincom Đồng Khởi', 10.7779234, 106.7019528],
['CGV Parkson Đồng Khởi', 10.7772273, 106.7021943],
['CGV Saigonres Nguyễn Xí', 10.8164305, 106.7072272],
['CGV Liberty Citypoint', 10.7746086, 106.7008277],
['CGV CT Plaza', 10.813248, 106.6658153],
['CGV Aeon Bình Tân', 10.7432125, 106.6131745],
['CGV Thảo Điền Pearl', 10.8017757, 106.7328027],
['CGV Parkson Paragon', 10.729619, 106.721674],
['CGV Hoàng Văn Thụ', 10.7989085, 106.6598939],
['CGV Pearl Plaza', 10.8001177, 106.7184879],
['CGV Thủ Đức', 10.850432, 106.7652939],
['CGV Celadon Tân Phú', 10.801702, 106.6179746],
['CGV Hùng Vương Plaza', 10.7557866, 106.663047],
['CGV Gò Vấp', 10.8267795, 106.6891474],
['CGV Pandora City', 10.8069193, 106.6342392],
['CGV VivoCity', 10.7301828, 106.7038375],
['CGV Crescent Mall', 10.72907, 106.718945],
['CGV Vincom Rạch Giá', 10.003258, 105.081058],
['CGV Vincom Trà Vinh', 9.935693, 106.336814],
['CGV Vincom Vị Thanh', 9.783455, 105.47037],
['CGV Lam Sơn Square', 10.3485847, 107.0740269],
['CGV Bình Dương Square', 10.9842298, 106.6671181],
['CGV Aeon Canary', 10.9309662, 106.7119234],
['CGV Empire', 10.9747974, 106.6565686],
['CGV Vincom Vĩnh Long', 10.246386, 105.977636],
['CGV Vincom Phú Yên', 13.101163, 109.30882],
['CGV Thùy Dương Plaza', 20.8463948, 106.7068879],
['CGV Vĩnh Trung Plaza', 16.0666435, 108.2130983],
['CGV Vincom Đà Nẵng', 16.0710745, 108.2301815],
['CGV Coopmart Biên Hòa', 10.9584608, 106.8339886],
['CGV BigC Đồng Nai', 10.9066022, 106.8509585],
['CGV Marine Plaza Hạ Long', 20.955323, 107.0127904],
['CGV Vincom Hạ Long', 20.9502607, 107.0841509],
['CGV Sense City', 10.0341076, 105.7859695],
['CGV Vincom Hùng Vương', 10.0453833, 105.7796137],
['CGV Vincom Xuân Khánh', 10.0246788, 105.7749034],
['CGV Kim Cúc Plaza', 13.7539247, 109.2077195],
['CGV BigC Nha Trang', 12.2557792, 109.1702839],
['CGV Buôn Mê Thuột', 12.6934449, 108.0643639],
['CGV Vincom Yên Bái', 21.708523, 104.881632],
['CGV Vincom Hà Tĩnh', 18.3358861, 105.8983069],
//Lotte Cinema
['Lotte Cinema Keangnam', 21.0170462, 105.7835932],
['Lotte Cinema Hà Đông', 20.9636625, 105.7718115],
['Lotte Cinema Thăng Long', 21.0079594, 105.7932772],
['Lotte Cinema Gò Vấp', 10.8382627, 106.6716334],
['Lotte Cinema Phú Thọ', 10.7631133, 106.6570733],
['Lotte Cinema Thủ Đức', 10.8712548, 106.7692378],
['Lotte Cinema Cộng Hoà', 10.8007354, 106.6530744],
['Lotte Cinema Nam Sài Gòn', 10.7409423, 106.7023147],
['Lotte Cinema Nowzone', 10.7638952, 106.6827205],
['Lotte Cinema Diamond', 10.7807545, 106.6985286],
['Lotte Cinema Cantavil', 10.8017125, 106.7471659],
['Lotte Cinema Huế', 16.4596076, 107.5993896],
['Lotte Cinema Ninh Kiều', 10.0422661, 105.7669419],
['Lotte Cinema Cần Thơ', 10.0143628, 105.7848188],
['Lotte Cinema Ninh Bình', 20.2421667, 106.0041833],
['Lotte Cinema Tuyên Quang', 21.8189594, 105.2052689],
['Lotte Cinema Hải Dương', 20.9301829, 106.314114],
['Lotte Cinema Đồng Nai', 10.948776, 106.8709498],
['Lotte Cinema Biên Hoà', 10.9577074, 106.8431749],
['Lotte Cinema Hạ Long', 20.9421623, 107.1105517],
['Lotte Cinema Bắc Giang', 21.2667501, 106.2083048],
['Lotte Cinema Long Xuyên', 10.383699, 105.4373093],
['Lotte Cinema Thái Bình', 20.4444697, 106.336863],
['Lotte Cinema Tây Ninh', 11.3126047, 106.0958367],
['Lotte Cinema Nha Trang', 12.2483989, 109.1867668],
['Lotte Cinema Đà Nẵng', 16.0351775, 108.2290006],
['Lotte Cinema Bình Dương', 10.9050217, 106.711583],
['Lotte Cinema Phan Thiết', 10.9387914, 108.1109073],
['Lotte Cinema Vũng Tàu', 10.3498331, 107.0935979],
['Lotte Cinema Việt Trì', 21.3122469, 105.3955485],
['Lotte Cinema Hải Phòng', 20.8658747, 106.6913653],
['Lotte Cinema Vinh', 18.6878634, 105.6657331],
['Lotte Cinema Nam Định', 20.4299976, 106.1613687],
//Galaxy Cinema
['Galaxy Mipec Long Biên', 21.0454663, 105.8657759],
['Galaxy Cinema Nguyễn Du', 10.772937, 106.693387],
['Galaxy Cinema Trung Chánh', 10.8553679, 106.6080076],
['Galaxy Cinema Quang Trung', 10.8347421, 106.6622241],
['Galaxy Cinema Phạm Văn Chí', 10.7409146, 106.6383598],
['Galaxy Cinema Tân Bình', 10.7902587, 106.6407119],
['Galaxy Cinema Kinh Dương Vương', 10.7500903, 106.6281603],
['Galaxy Cinema Huỳnh Tấn Phát', 10.7124455, 106.7369246],
['Galaxy Cinema Đà Nẵng', 16.0666313, 108.1865912],
['Galaxy Cinema Hải Phòng', 20.8562254, 106.686444],
['Galaxy Cà Mau', 9.1775886, 105.1542908],
['Galaxy Cinema Vinh', 18.6765293, 105.6770785],
['Galaxy Bến Tre', 10.2413981, 106.3767538],
//Beta Cineplex
['Beta Cineplex Thái Nguyên', 21.5789802, 105.8168203],
['Beta Cineplex Biên Hòa', 10.9470274, 106.824883],
['Beta Cineplex Thanh Xuân', 21.0026136, 105.8022909],
['Beta Cineplex Mỹ Đình', 21.0119067, 105.7752579],
['Beta Cineplex Thanh Hóa', 19.8066892, 105.7780607],
['Beta Cineplex Bắc Giang', 21.2769679, 106.194764],
['Beta Cineplex Đan Phượng', 21.0750687, 105.7017894],
['Beta Cineplex Long Xuyên', 10.3786468, 105.4474761],
['Beta Cineplex Cao Thắng', 10.7741087, 106.6775114],
['Beta FLC Twin Tower', 21.0341676, 105.7946568],
['Beta Cineplex Nha Trang', 12.2489006, 109.1938314],
//BHD Star Cineplex
['BHD Star Vincom Phạm Ngọc Thạch', 21.0064286, 105.8319952],
['BHD Cầu Giấy', 21.0354272, 105.7944174],
['BHD Huế', 16.4631061, 107.5945241],
['BHD Star Cineplex - Bitexco', 10.771681, 106.704395],
['BHD Star Cineplex - Vincom Thảo Điền', 10.8023027, 106.7409533],
['BHD Star Cineplex - 3/2', 10.775898, 106.680465],
['BHD Star Cineplex - Phạm Hùng', 10.7335534, 106.6744053],
['BHD Star Cineplex - Vincom Quang Trung', 10.8293161, 106.672507],
['BHD Star Cineplex - Vincom Lê Văn Việt', 10.845552, 106.779172],
//Starlight
['Starlight Nguyễn Kim Đà Nẵng', 16.0662446, 108.2033211],
['Starlight Buôn Ma Thuột', 12.6817914, 108.0439885],
['Starlight Quy Nhơn', 13.773944, 109.2333608],
['Starlight Bạc Liêu', 9.2871169, 105.7220206],
['Starlight Bảo Lộc', 11.5431619, 107.8047938],
['Starlight Huế', 16.4710245, 107.5873903],
//Cinestar
['Cinestar Hai Bà Trưng', 10.782454, 106.6981727],
['Cinestar Cinema Quốc Thanh', 10.763907, 106.6872936],
['Cinestar Đà Lạt', 11.9382909, 108.4458008],
//Platinum Cineplex
['Platinum Cinema Garden', 21.01535, 105.777933],
['Platinum Cineplex – Nha Trang', 12.2478777, 109.195772],
//Other
['Rạp Quốc gia', 21.0167483, 105.8155677],
['Fafim Cinema', 21.0019643, 105.8203706],
['Rạp Tháng 8', 21.0214854, 105.8525409],
['Rạp Kim Đồng', 21.0238755, 105.852959],
['Đống Đa Cinema', 10.753524, 106.674247],
['MegaGS Cinema - Cao Thắng', 10.769061, 106.683116],
['Cinebox - Lý Chính Thắng', 10.7804476, 106.6825965],
['Empire Cineplex Bình Dương', 10.9746822, 106.656628],
];
var iconCinema = 'https://maps.google.com/mapfiles/kml/pal2/icon22.png';
for (i = 0; i < locations.length; i++) {
cinema = new google.maps.LatLng(locations[i][1], locations[i][2]);
marker = new google.maps.Marker({
position: cinema,
map: map,
icon: iconCinema
});
google.maps.event.addListener(marker, 'click', (function (marker, i) {
return function () {
infowindow.setContent(locations[i][0]);
infowindow.open(map, marker);
}
})(marker, i));
distance = google.maps.geometry.spherical.computeDistanceBetween(myLatLng, cinema)
//distance = distance / 1000 + 'km'
distanceArr.push([Math.round(distance) / 1000, locations[i][0], locations[i][1], locations[i][2]])
cinemaArr.push(cinema);
}
distanceArr.sort(function (a, b) {
return a[0] - b[0]
});
var li;
for (i = 0; i < distanceArr.length; i++) {
list = document.getElementById('list');
li = document.createElement("li");
entry = document.createElement('a');
entry.setAttribute("href", "#");
entry.setAttribute("id", "cinema" + i);
entry.setAttribute("lat", distanceArr[i][2]);
entry.setAttribute("lng", distanceArr[i][3]);
entry.appendChild(document.createTextNode(distanceArr[i][1] + ' : ' + distanceArr[i][0] + ' km'));
li.appendChild(entry);
list.appendChild(li);
}
// Instantiate a directions service.
var directionsService = new google.maps.DirectionsService
var directionDisplay;
var directionsDisplay = [];
$('#lstcinema a').click(function (e) {
cinema = new google.maps.LatLng($(this).attr('lat'), $(this).attr('lng'));
for (var i = 0; i < infoWindowArr.length; i++) {
infoWindowArr[i].close()
}
//calculateAndDisplayRoute(map, directionsDisplay, directionsService, directionDisplay, myLatLng, cinema);
directionsService.route({
origin: myLatLng,
destination: cinema,
provideRouteAlternatives: true,
travelMode: google.maps.TravelMode.DRIVING,
optimizeWaypoints: true
}, function (response, status) {
if (status == google.maps.DirectionsStatus.OK) {
for (i = 0; i < directionsDisplay.length; i++) {
directionsDisplay[i].setMap(null);
}
for (i = 0; i < response.routes.length; i++) {
directionDisplay = new google.maps.DirectionsRenderer({
map: map,
directions: response,
routeIndex: i,
suppressMarkers: true,
suppressInfoWindows: true
})
directionsDisplay.push(directionDisplay);
var infoLeg = new google.maps.InfoWindow();
infoLeg = new google.maps.InfoWindow();
var step = Math.ceil((response.routes[i].legs[0].steps.length / 2));
infoLeg.setContent(response.routes[i].legs[0].distance.text + "<br>" + response.routes[i].legs[0].duration
.text + " ");
infoLeg.setPosition(response.routes[i].legs[0].steps[step].end_location);
infoLeg.open(map);
infoWindowArr.push(infoLeg);
}
} else {
window.alert('Directions request failed due to ' + status);
}
});
});
}, function error(msg) {
alert('Please enable your GPS.');
}, {
maximumAge: 600000,
//timeout: 5000,
enableHighAccuracy: true
});
}
}
function calculateAndDisplayRoute(map, directionsDisplay, directionsService, directionDisplay, pointA, pointB, golInfo) {
directionsService.route({
origin: pointA,
destination: pointB,
provideRouteAlternatives: true,
travelMode: google.maps.TravelMode.DRIVING,
optimizeWaypoints: true
}, function (response, status) {
if (status == google.maps.DirectionsStatus.OK) {
for (i = 0; i < directionsDisplay.length; i++) {
directionsDisplay[i].setMap(null);
}
for (i = 0; i < response.routes.length; i++) {
directionDisplay = new google.maps.DirectionsRenderer({
map: map,
directions: response,
routeIndex: i
})
directionsDisplay.push(directionDisplay);
//var infoLeg = new google.maps.InfoWindow();
var step = Math.floor(response.routes[i].legs[0].steps.length - 1);
golInfo.setContent(response.routes[i].legs[0].distance.text + "<br>" + response.routes[i].legs[0].duration.text +
" ");
golInfo.setPosition(response.routes[i].legs[0].steps[step].end_location);
golInfo.open(map);
}
} else {
window.alert('Directions request failed due to ' + status);
}
});
}
</script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBMZKcVJJ0FCXeUyYYsVl5_Y22aIOgTAxQ&callback=initMap&libraries=geometry"
type="text/javascript"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.19.3/moment.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.7.0/fullcalendar.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js'></script>
<script>
$(document).ready(function () {
//Calendar
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
displayEventTime: false,
editable: true,
events: [{
title: 'BHD - XEM TRỄ CỰC PHÊ',
start: '22:00',
dow: [0, 1, 2, 3, 4, 5, 6],
description: '50K sau 22h',
url: 'https://www.bhdstar.vn/deals/xem-tre-cuc-phe/'
},
{
title: 'BHD - SUẤT SỚM ',
start: '08:00',
end: '10:00',
dow: [2, 3, 4, 5],
description: '45K 2D trước 10h',
url: 'https://www.bhdstar.vn/deals/suat-som-gia-chi-45k/'
},
{
title: 'Beta - Thứ Ba vui vẻ',
start: '08:30',
dow: [2],
description: '45k (2D) và 65k (3D)',
url: 'https://betacineplex.vn/khuyen-mai-moi/thu-3-vui-ve.htm'
},
{
title: 'Lotte LOVELY TUESDAY',
start: '08:30',
dow: [2],
description: '45-60k (2D) và 75-90k (3D)',
url: 'http://www.lottecinemavn.com/LCHS/Contents/Event/infomation-delivery-event.aspx?EventID=101010000018007'
},
//{
// title: 'Platinum Special Couple\'s Day',
// start: '10:00',
// dow: [2],
// description: 'mua 2 vé tặng 1 bỏng và 2 đồ uống,',
// url: 'https://platinumcineplex.vn/vi/news/news-and-promotion/special-couple-s-day'
//},
{
title: 'Platinum Special Thursday',
start: '10:00',
dow: [4],
description: '45K 2D',
url: 'https://platinumcineplex.vn/vi/news/news-and-promotion/n-a'
},
//{
// title: 'Platinum ladies\' night',
// start: '10:00',
// dow: [3],
// description: 'giảm 50% cho vé thứ 2 và 1 phiếu giảm 50% cho 1 loại combo tại quầy Concessions cho nữ',
// url: 'https://platinumcineplex.vn/vi/news/news-and-promotion/ladies-night'
//},
],
eventClick: function (event) {
if (event.url) {
window.open(event.url);
return false;
}
},
eventRender: function (event, element) {
element.find('.fc-title').append("<br/>" + event.description);
}
});
// adding a custom events:
$('#calendar').fullCalendar('addEventSource',
function (start, end, timezone, callback) {
var events = [];
var y = start._d.getFullYear(),
m = start._d.getMonth();
var firstDay = new Date(y, m, 1);
var lastDay = new Date(y, m + 1, 0);
var test_date = new Date(lastDay);
while (test_date.getDay() !== 1) {
test_date.setDate(test_date.getDate() - 1);
}
// Last monday of last month
if (test_date.is().monday()) {
events.push({
title: 'CGV CULTURE DAY',
start: '08:30',
start: test_date,
description: '50K 2D',
url: 'https://www.cgv.vn/default/newsoffer/cgv-culture-day/'
}, // CGV
{
title: 'Lotte Big Smile Day',
start: '08:30',
start: test_date,
description: '45K 2D',
url: 'https://lottecinemavn.com/vi-vn/su-kien/e-l-selection/l-selection-(45).aspx'
} // lottecinema
);
}
y = end._d.getFullYear(),
m = end._d.getMonth() - 1;
firstDay = new Date(y, m, 1);
lastDay = new Date(y, m + 1, 0);
test_date = new Date(lastDay);
while (test_date.getDay() !== 1) {
test_date.setDate(test_date.getDate() - 1);
}
// Last monday of current month
if (test_date.is().monday()) {
events.push({
title: 'CGV CULTURE DAY',
start: '08:30',
start: test_date,
description: '50K 2D',
url: 'https://www.cgv.vn/default/newsoffer/cgv-culture-day/'
}, // CGV
{
title: 'Lotte Big Smile Day',
start: '08:30',
start: test_date,
description: '45K 2D',
url: 'https://lottecinemavn.com/vi-vn/su-kien/e-l-selection/l-selection-(45).aspx'
} // lottecinema
);
}
// First wednesday current month
y = start._d.getFullYear(),
m = start._d.getMonth();
firstDay = new Date(y, m, 1);
lastDay = new Date(y, m + 1, 0);
test_date = new Date(lastDay);
while (test_date.getDay() !== 3) {
test_date.setDate(test_date.getDate() + 1);
}
if (test_date.is().wednesday()) {
events.push({
title: 'BHD B\'DAY',
start: '08:30',
start: test_date,
description: '45K 2D',
url: 'http://www.bhdstar.vn/deals/bday-2/'
});
}
// First wednesday next month
y = end._d.getFullYear(),
m = end._d.getMonth();
firstDay = new Date(y, m, 1);
lastDay = new Date(y, m + 1, 0);
test_date = new Date(firstDay);
while (test_date.getDay() !== 3) {
test_date.setDate(test_date.getDate() + 1);
}
if (test_date.is().wednesday()) {
events.push({
title: 'BHD B\'DAY',
start: '08:30',
start: test_date,
description: '45K 2D',
url: 'http://www.bhdstar.vn/deals/bday-2/'
});
}
// First monday current month
y = start._d.getFullYear(),
m = start._d.getMonth();
firstDay = new Date(y, m, 1);
lastDay = new Date(y, m + 1, 0);
test_date = new Date(lastDay);
while (test_date.getDay() !== 1) {
test_date.setDate(test_date.getDate() + 1);
}
if (test_date.is().monday()) {
events.push({
title: 'Beta - MAD SALE DAY',
start: '08:30',
start: test_date,
description: '45K 2D & tặng 1 bỏng (Phụ thu 5k đối với phim bom tấn)',
url: 'https://betacineplex.vn/khuyen-mai-moi/bung-no-voi-mad-sale-day.htm'
});
}
// First monday next month
y = end._d.getFullYear(),
m = end._d.getMonth();
firstDay = new Date(y, m, 1);
lastDay = new Date(y, m + 1, 0);
test_date = new Date(firstDay);
while (test_date.getDay() !== 1) {
test_date.setDate(test_date.getDate() + 1);
}
if (test_date.is().monday()) {
events.push({
title: 'Beta - MAD SALE DAY',
start: '08:30',
start: test_date,
description: '45K 2D & tặng 1 bỏng (Phụ thu 5k đối với phim bom tấn)',
url: 'https://betacineplex.vn/khuyen-mai-moi/bung-no-voi-mad-sale-day.htm'
});
}
// return events generated
callback(events);
}
);
var $myGroup = $('#myMenu');
$myGroup.on('show.bs.collapse', '.collapse', function () {
$myGroup.find('.collapse.show').collapse('hide');
});
});
</script>
</html>