-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
837 lines (709 loc) · 21.4 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
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
<!DOCTYPE html>
<head>
<html lang="en">
<meta charset="utf-8">
<title>GPSFlow</title>
<link rel="icon" type="image/JPG" href="d3/favicon.png" />
<script src="d3/d3.js"></script>
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
<style>
body {
padding: 0px;
margin: 0px;
}
#heat_map,
#google_maps,
#resume_day {
margin: 8px;
}
.month {
margin-right: 8px;
}
.month-name {
font-size: 85%;
fill: #777;
font-family: Arial, Helvetica;
}
.year-name {
font-size: 200%;
fill: #777;
font-family: Arial, Helvetica;
}
.day-name {
font-size: 100%;
fill: #777;
font-family: Arial, Helvetica;
}
.arrow {
cursor: pointer;
}
.day {
cursor: pointer;
}
.day.hover {
stroke: #6d6E70;
stroke-width: 2;
}
.day.focus {
stroke: #FF0000;
stroke-width: 2;
}
/*ul {*/
/*list-style-type: none;*/
/*margin: 0;*/
/*padding: 8px;*/
/*overflow: hidden;*/
/*background-color: #023858;*/
/*}*/
/*li {*/
/*float: left;*/
/*}*/
.active {
background-color: #4CAF50;
}
.custom-file-upload {
border-radius: 5px;
border: none;
fill: #076AA4;
background-color: #87b2ec;
font: 14px sans-serif;
font-weight: bold;
color: black;
display: inline-block;
padding: 16px 24px;
cursor: pointer;
}
.custom-file-upload:hover {
background-color: #f6f6f6;
}
input[type="file"] {
display: none;
}
.custom-about {
border-radius: 5px;
border: none;
fill: #076AA4;
background-color: #076AA4;
font: 14px sans-serif;
color: white;
font-weight: bold;
padding: 8px 12px;
cursor: pointer;
}
.modal {
display: none;
/* Hidden by default */
position: fixed;
/* Stay in place */
z-index: 1;
/* Sit on top */
padding-top: 100px;
/* Location of the box */
left: 0;
top: 0;
width: 100%;
/* Full width */
height: 100%;
/* Full height */
overflow: auto;
/* Enable scroll if needed */
background-color: rgb(0, 0, 0);
/* Fallback color */
background-color: rgba(0, 0, 0, 0.4);
/* Black w/ opacity */
}
/* Modal Content */
.modal-content {
background-color: #fefefe;
font: 16px sans-serif;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 30%;
}
/* The Close Button */
.close {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.title {
color: white;
font: 30px sans-serif;
font-weight: bold;
}
#tooltip {
background-color: #fff;
border: 2px solid #ccc;
padding: 10px;
}
#map {
height: 100%;
}
#wrapper { position: relative; }
#over_map { position: absolute; top: 20px; left: 140px; z-index: 99; }
</style>
<style>
#primary_nav_wrap
{
background-color: #023858;
height: 60px;
}
#primary_nav_wrap ul
{
list-style:none;
position:relative;
margin:0;
padding:0
}
#primary_nav_wrap ul a
{
display:block;
color:#333;
text-decoration:none;
font-weight:700;
font-size:14px;
line-height:32px;
padding:0 15px;
font-family:"HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif
font-weight: bold;
}
#primary_nav_wrap ul li
{
position:relative;
margin:0;
padding:0
}
#primary_nav_wrap ul li.current-menu-item
{
margin-top: 5px;
border-radius: 5px;
border: none;
fill: #076AA4;
background-color: #87b2ec;
font: 16px sans-serif;
font-weight: bold;
color: white;
display: inline-block;
padding: 8px 12px;
margin-right: 10px;
cursor: pointer;
}
#primary_nav_wrap ul li.current-menu-item2
{
margin-top: 5px;
border-radius: 5px;
border: none;
fill: #076AA4;
background-color: #87b2ec;
font: 16px sans-serif;
font-weight: bold;
color: white;
display: inline-block;
margin-right: 10px;
cursor: pointer;
}
#primary_nav_wrap ul li:hover
{
background:#f6f6f6
}
#primary_nav_wrap ul ul
{
display:none;
position:absolute;
top:100%;
left:0;
background:#fff;
padding:0
}
#primary_nav_wrap ul ul li
{
float:none;
width:200px
}
#primary_nav_wrap ul ul a
{
line-height:120%;
padding:10px 15px
}
#primary_nav_wrap ul ul ul
{
top:0;
left:100%
}
#primary_nav_wrap ul li:hover > ul
{
display:block
}
</style>
</head>
<body>
<nav id="primary_nav_wrap">
<ul>
<li class="title" style="float: left ">GPS Flow</li>
<li class="current-menu-item " style="float:right;" id="myBtn"><a href="#">About</a></li>
<li class="current-menu-item2" style="float:right">
<input id="file" type="file" name="file" class="inputfile" onchange="read(this.files)">
<label for="file" class="custom-file-upload">Use your own file</label>
</li>
<li class="current-menu-item " style="float:right"><a href="#">R&D</a>
<ul>
<li><a target="_blank" href="d3/1-Display.html">1 : Display</a></li>
<li><a target="_blank" href="d3/2-Preprocessing.html">2 : Preprocessing</a></li>
<li><a target="_blank" href="d3/3-Segmentation.html">3 : Segmentation</a></li>
<li><a target="_blank" href="d3/4-StayPoint.html">4 : StayPoint</a></li>
<li><a target="_blank" href="d3/5-GlobalStat.html">5 : GlobalStat</a></li>
<li><a target="_blank" href="d3/6-Pipeline.html">6 : Pipeline</a></li>
</ul>
</li>
</ul>
</nav>
<div>
<div id="heat_map" style="display: inline-block; vertical-align:top;"></div>
<div id="wrapper">
<div id="google_maps" style="display: inline-block; vertical-align:top; "></div>
<div id="over_map">
<input onclick="showHideRaw();" type=button value="Raw Day">
</div>
</div>
<div id="resume_day" style="display: inline-block;"></div>
</div>
<!-- The Modal -->
<div id="myModal" style="overflow: scroll;" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="close">×</span>
<p>
<br> Authors :
<a href="https://github.com/MathReynaud"> Mathilde Reynaud </a> |
<a href="https://github.com/thalkz"> Roland Lamidieu</a> |
<a href="https://github.com/alexandrospopov"> Alexandre Popov </a> |
<a href="https://github.com/FrancoisPgm"> François Paugam </a> |
<a href="https://github.com/Skan0394"> Skander Malouche </a>
</br>
</p>
<h2> What is this project about ?</h2>
<p>
This project allows you to download, process and visualize your GPS data from your Google Location History.
If you do not wish to download your data, or if you do not have any, you can still play with the visualization,
there is some test data. You can see the treatment that has been done to the data by clicking on "raw day".
</p>
<h2> Want to use your own data ?</h2>
<p>
In order to have your data, just follow the
instructions <a href="https://github.com/AmigoCap/GPSFlow"> here</a>.
Once you followed all the steps and you have your file ready, just click on "Use your own file".
</p>
<h2>Do you have access to my data ?</h2>
No, not at all. The file that you select will not be uploaded : the computations are made locally, on your computer.
<h2> Want to learn more about it ?</h2>
The data showed is the process data, if you click on "raw day" you will see the data downloaded on Google Takeout.
As you will see, this data is messed up, that is why we have created a python library to process it. Everything
is open source, so if you are interested you can take a look at our work. Particulary, on R&D you will
find several Jupyter Notebook which explain the processing of the data in details.
<h2> Credits </h2>
We are five students from Centrale Lyon and we will like to thank our tutor <a href = "https://romain.vuillemot.net"> Romain Vuillemot
</a> that helped us and gave us the idea.
</div>
</div>
<script>
// Define stuff
{
var reader;
var json;
}
// Define div, svg, etc..
{
//D3 elements
var div_title = d3.select('#title')
var div_heat_map = d3.select('#heat_map')
var div_google_maps = d3.select('#google_maps')
var div_resume_day = d3.select('#resume_day')
//JS Elements
var div_title_2 = document.getElementById('title')
var div_heat_map_2 = document.getElementById('heat_map')
var div_google_maps_2 = document.getElementById('google_maps')
var div_resume_day_2 = document.getElementById('resume_day')
}
//Define margins, heights and widths
{
//Heat map
var margin1 = {
top: 10,
right: 20,
bottom: 20,
left: 20,
};
//Google maps
var margin2 = {
top: 10,
right: 20,
bottom: 30,
left: 40,
};
// Resume Day
var margin3 = {
top: 60,
right: 60,
bottom: 50,
left: 40,
};
var width = window.innerWidth;
var height = window.innerHeight;
// Set heights
var first_row_height = (height * 0.20) + "px";
var second_row_height = (height * 0.80) + "px";
div_heat_map_2.style.height = first_row_height;
div_google_maps_2.style.height = second_row_height;
div_resume_day_2.style.height = second_row_height;
// Set widths
var first_col_width = "100%";
var second_col_width = "100%";
var third_col_width = "0%"
div_heat_map_2.style.width = first_col_width;
div_google_maps_2.style.width = second_col_width;
div_resume_day_2.style.width = third_col_width;
var w1 = div_heat_map_2.clientWidth - margin1.left - margin1.right;
var h1 = div_heat_map_2.clientHeight - margin1.top - margin1.bottom;
var w2 = div_google_maps_2.clientWidth - margin2.left - margin2.right;
var h2 = div_google_maps_2.clientHeight - margin2.top - margin2.bottom;
var w3 = div_resume_day_2.clientWidth - margin3.left - margin3.right;
var h3 = div_resume_day_2.clientHeight - margin3.top - margin3.bottom;
}
// Defin the About pop up
{
// Get the modal
var modal = document.getElementById('myModal');
// Get the button that opens the modal
var btn = document.getElementById("myBtn");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks the button, open the modal
btn.onclick = function () {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function () {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function (event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
}
// Define div, svg, etc..
{
var body = d3.select("body");
var tooltip = body
.append("div").attr("id", "tooltip")
.style("position", "absolute")
.style("z-index", "10")
.style("visibility", "hidden")
.text("a simple tooltip");
/* var heat_map = div_heat_map
.append("svg")
.attr("height", (h1 + margin1.top + margin1.bottom))
.attr("width", (w1 + margin1.left + margin1.right)); */
// var google_maps = div_google_maps
// .append("svg")
// .attr("height", (h2 + margin2.top + margin2.bottom))
// .attr("width", (w2 + margin2.left + margin2.right));
var resume_day = div_resume_day
.append("svg")
.attr("height", (h3 + margin3.top + margin3.bottom))
.attr("width", (w3 + margin3.left + margin3.right));
}
//Define parsers
{
var parseUTCDateHour = d3.timeParse("%Y-%m-%dT%H:%M%Z");
var parseUTCDate = d3.timeParse("%Y-%m-%d");
var parseUTCDate2 = d3.timeParse("%W-%m-%Y");
var parseUTCDate_time = d3.timeParse("%Y-%m-%d-%H-%M");
}
// Define colors
{
var color_selected = "#2c7bb6";
var color_unselected = "#A0A0A0";
var color_received = "#00ccbc";
var color_sent = "#2c7bb6";
}
var map;
var aPaths=[];
var rawPath=null;
var aColors=['#228B22','#FFA500','#FF0000'];
var aMarkers=[];
var rawShown=false;
function read(file) {
reader = new FileReader();
reader.onloadend = assign_file;
reader.readAsText(file[0])
}
function assign_file() {
json = JSON.parse(reader.result);
var min_year = d3.min(json.days, function (d) { return d.date.substr(6, 10) })
update(min_year);
}
d3.json("d3/output.json", load_demo)
function load_demo(json_file) {
json = json_file;
var min_year = d3.min(json.days, function (d) { return d.date.substr(6, 10) })
main(min_year);
}
function main(year) {
draw_selector_calendar(year);
drawCalendar(year);
}
function update(year) {
div_heat_map.selectAll(".month").remove();
div_heat_map.selectAll(".selector").remove();
draw_selector_calendar(year);
drawCalendar(year);
}
function draw_selector_calendar(year) {
var min_year = d3.min(json.days, function (d) { return d.date.substr(6, 10) })
var max_year = d3.max(json.days, function (d) { return d.date.substr(6, 10) })
var current_year = year
var height = h1 / 5
var width = (w1 / 51)
var svg = div_heat_map.append("svg")
.attr("class", "selector")
.attr("height", h1)
.attr("width", (w1 / 17) * 1.5)
year_display = svg.append("text")
.attr('x', width * 2)
.attr('y', h1 / 3)
.attr("text-anchor", "middle")
.attr("class", "year-name")
.text(current_year)
var before = svg.append("g")
.attr("transform", "translate(" + width * 2 + "," + h1 / 2 + ")")
.append("path")
.attr("d", "M 0 " + 0 + " L " + 0 + " " + (height) + "L " + (-width) + " " + (height / 2) + " Z")
.attr("class", "arrow")
.style("fill", "#023858")
.on('click', function () {
if ((current_year - 1) >= min_year) {
current_year = +current_year - 1
div_heat_map.selectAll(".month").remove();
drawCalendar(current_year)
year_display.text(current_year)
}
});
var after = svg.append("g")
.attr("transform", "translate(" + (width * 2 + 10) + "," + h1 / 2 + ")")
.append("path")
.attr("d", "M 0 " + 0 + " L " + 0 + " " + (height) + "L " + (width) + " " + (height / 2) + " Z")
.attr("class", "arrow")
.style("fill", "#023858")
.on('click', function () {
if ((current_year + 1) <= max_year) {
current_year = +current_year + 1
div_heat_map.selectAll(".month").remove();
drawCalendar(current_year)
year_display.text(current_year)
}
})
day_display = svg.append("text")
.attr('x', width * 2)
.attr('y', h1/2 + height*2 )
.attr("text-anchor", "middle")
.attr("class", "day-name")
.text("")
}
function drawCalendar(year) {
var weeksInMonth = function (month) {
var m = d3.timeMonth.floor(month)
return d3.timeWeeks(d3.timeWeek.floor(m), d3.timeMonth.offset(m, 1)).length;
}
var minDate = new Date(+year, 0, 1)
var maxDate = new Date(+year, 11, 31)
var cellMargin = 2,
cellSize = (w1) / (17 * 5);
var day = d3.timeFormat("%w"),
week = d3.timeFormat("%U"),
format = d3.timeFormat("%d-%m-%Y"),
titleFormat = d3.utcFormat("%a, %d-%b");
monthName = d3.timeFormat("%B"),
months = d3.timeMonth.range(d3.timeMonth.floor(minDate), maxDate);
var svg = div_heat_map.selectAll(".month")
.data(months)
.enter().append("svg")
.attr("class", "month")
.attr("height", ((cellSize * 7) + (cellMargin * 8) + 20)) // the 20 is for the month labels
.attr("width", function (d) {
var columns = weeksInMonth(d);
return ((cellSize * columns) + (cellMargin * (columns + 1)));
})
.append("g")
svg.append("text")
.attr("class", "month-name")
.attr("y", (cellSize * 7) + (cellMargin * 8) + 15)
.attr("x", function (d) {
var columns = weeksInMonth(d);
return (((cellSize * columns) + (cellMargin * (columns + 1))) / 2);
})
.attr("text-anchor", "middle")
.text(function (d) { return monthName(d); })
var rect = svg.selectAll("rect.day")
.data(function (d, i) { return d3.timeDays(d, new Date(d.getFullYear(), d.getMonth() + 1, 1)); })
.enter().append("rect")
.attr("class", "day")
.attr("width", cellSize)
.attr("height", cellSize)
.attr("rx", 3).attr("ry", 3) // rounded corners
.attr("fill", '#eaeaea') // default light grey fill
.attr("y", function (d) { return (day(d) * cellSize) + (day(d) * cellMargin) + cellMargin; })
.attr("x", function (d) { return ((week(d) - week(new Date(d.getFullYear(), d.getMonth(), 1))) * cellSize) + ((week(d) - week(new Date(d.getFullYear(), d.getMonth(), 1))) * cellMargin) + cellMargin; })
.on("mouseover", function (d) {
d3.select(this).classed('hover', true);
tooltip.style("visibility", "visible");
tooltip.transition()
.duration(200)
.style("opacity", .9);
tooltip.html(d)
.style("left", (d3.event.pageX) + 30 + "px")
.style("top", (d3.event.pageY) + "px");
})
.on("mouseout", function (d) {
d3.select(this).classed('hover', false);
tooltip.transition()
.duration(500)
.style("opacity", 0);
})
.on("click",function(d){
dayData=json.days.filter(function (e) {return d==e.date})
if (dayData.length>0){
drawDayData(dayData);
drawDayRawData(dayData);
}
d3.selectAll(".day").classed('focus', false);
d3.select(this).classed('focus', true);
day_display.text(d)
})
.datum(format);
rect.append("title")
.text(function (d) { return titleFormat(new Date(d)); });
var scale = d3.scaleLinear()
.domain(d3.extent(json.days, function (d) { return d.points_count; }))
.range([0.4, 1]); // the interpolate used for color expects a number in the range [0,1] but i don't want the lightest part of the color scheme
json.days.forEach(function (d) {
rect.filter(function (e) { return e == d.date; })
.style("fill", d3.interpolatePuBu(scale(d.points_count)))
})
}
function initMap() {
map = new google.maps.Map(document.getElementById('google_maps'), {
zoom: 4,
center: {lat: 45.74793377391304, lng: 4.829102304347825},
mapTypeId: 'terrain'
});
}
function drawDayData(dayData){
removeLine();
removeMarkers();
map.setCenter({
lat: dayData[0].segments[0].points[0].lat,
lng: dayData[0].segments[0].points[0].lng
});
map.setZoom(12);
nbSeg=dayData[0].segments.length;
for (ii=0; ii<nbSeg; ii++){
maxSC=Math.max.apply(Math,dayData[0].segments[ii].points.map(function(o){return o.numSC;}))
backGroundPath = new google.maps.Polyline({
path: dayData[0].segments[ii].points,
strokeColor: aColors[1],
strokeOpacity: 1.0,
strokeWeight: 3
});
aPaths.push(backGroundPath)
for(jj=0;jj<=maxSC;jj++){
dataToDraw=dayData[0].segments[ii].points.filter(function(o){return o.numSC==jj});
if (dataToDraw.length>0){
colorToPlot=dataToDraw[0].speed;
path = new google.maps.Polyline({
path: dataToDraw ,
strokeColor: aColors[colorToPlot],
strokeOpacity: 1.0,
strokeWeight: 3
});
aPaths.push(path)
}
}
}
for( ii=0;ii<dayData[0].staypoints.length;ii++){
st=dayData[0].staypoints[ii];
start=new Date(st.start);
end=new Date(st.end);
marker = new google.maps.Marker({
position: {lat: st.lat, lng: st.lng},
title:
'From : ' + end.getHours() +':'+end.getMinutes() + '\n ' +
'To : ' +start.getHours() +':'+start.getMinutes()
});
aMarkers.push(marker)
}
addMarker();
addLine();
}
function drawDayRawData(dayData){
if(rawPath){removeRawPath()}
rawPath = new google.maps.Polyline({
path: dayData[0].raw_day,
strokeColor: '#6d3d10',
strokeOpacity: 1.0,
strokeWeight: 1
});
}
function addMarker(){
for(i=0;i<aMarkers.length;i++) {
aMarkers[i].setMap(map)
} }
function addLine() {
for(i=0;i<aPaths.length;i++) {
aPaths[i].setMap(map)
}
}
function removeLine() {
for(i=0;i<aPaths.length;i++) {
aPaths[i].setMap(null);
}
aPaths=[]
}
function showHideRaw() {
console.log(rawShown)
if(!rawShown){
addRawPath()
}
else{
removeRawPath()
}
}
function removeMarkers(){
for(i=0;i<aMarkers.length;i++) {
aMarkers[i].setMap(null);
}
aMarkers=[]
}
function removeRawPath(){
rawPath.setMap(null);
rawShown=false;
}
function addRawPath(){
rawPath.setMap(map)
rawShown=true;
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDsYwvF3UUxTx8RB40wd4SnUVzfnbW66LM&callback=initMap">
</script>
</body>
</html>