-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
186 lines (160 loc) · 5.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Convert Google Maps saved places to Organic Maps</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="script/vendor/tokml.js"></script>
<script src="script/vendor/togpx.js"></script>
<script src="script/main.js"></script>
<link rel="icon" href="./assets/favicon.ico">
</head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
color: #333;
margin: 0;
padding: 0;
}
.container {
max-width: 600px;
margin: 20px auto;
padding: 20px;
background: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
width: 85%;
}
@media (max-width: 600px) {
.container {
margin-top: 15px;
}
}
.logo-container {
display: flex;
justify-content: space-between;
align-items: center;
width: 80%;
margin: 0 auto;
}
.logo-container img {
width: 30%;
}
.logo-container .arrow {
font-size: 10em;
}
@media (max-width: 600px) {
.logo-container img {
width: 30%;
}
.logo-container .arrow {
font-size: 5em;
}
}
h1 {
text-align: center;
color: #333;
}
p {
text-align: center;
line-height: 1.4em;;
margin-bottom: 2em;
color: #555;
}
p a {
color: #007bff;
text-decoration: none;
}
p a:hover {
color: #0056b3;
text-decoration: underline;
}
.form-group {
display: flex;
flex-direction: column;
}
label {
margin-bottom: 5px;
font-weight: bold;
}
textarea,
input[type="file"] {
margin-bottom: 15px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
.btn {
display: inline-block;
padding: 10px 20px;
color: #fff;
background-color: #007bff;
border: none;
border-radius: 4px;
text-align: center;
text-decoration: none;
cursor: pointer;
}
.btn:disabled {
background-color: #cccccc;
cursor: not-allowed;
}
.btn:not(:disabled):hover {
background-color: #0056b3;
}
#errorMessage {
text-align: center;
color: red;
display: none;
}
.downloadLink {
margin-top: 20px;
background-color: rgb(156, 73, 156);
}
.github {
text-align: center;
margin-top: 20px;
margin-bottom: 20px;
.btn {
background-color: #616161;
}
.btn:hover {
background-color: #424242;
}
}
</style>
<body>
<div class="container">
<div class="logo-container">
<img src="assets/googlemaps.png" alt="Google Maps logo">
<span class="arrow">→</span>
<img src="assets/organicmaps.png" alt="Organic Maps logo">
</div>
<h1>Convert Google Maps saved places to Organic Maps</h1>
<p>Generate GPX and KMZ files from your Google Maps saved places to import as bookmarks in <a href="https://organicmaps.app/" target="_blank">Organic Maps</a>, or use anywhere you'd like. This tool generates everything locally in your browser and does not upload any data.</p>
<p>You can retrieve a <code>Saved Places.json</code> file by navigating to "Your data in Maps" in your Google Account settings or by accessing <a href="https://myaccount.google.com/yourdata/maps" target="_blank">this page</a>, then pressing "Download your Maps data."</p>
<p>Read about why Organic Maps is <a href="https://news.itsfoss.com/organic-maps/" target="_blank">the open-source offline map you need to ditch Google Maps</a>.</p>
<form id="kmlForm" class="form-group">
<label for="json">Select <code>Saved Places.json</code></label>
<input type="file" id="json" name="json"><br>
<button type="button" class="btn" id="generateBtn" onclick="generateFiles()" disabled>Generate Files</button>
</form>
<p id="errorMessage"></p>
<a id="downloadGpxLink" class="downloadLink btn" style="display:none;">Download GPX</a>
<a id="downloadKmzLink" class="downloadLink btn" style="display:none;">Download KMZ</a>
</div>
<div class="github">
<a href="https://github.com/rudokemper/google-maps-places-to-organic-maps" class="btn" target="_blank">
<i class="fab fa-github"></i> GitHub
</a>
</div>
<script>
document.getElementById('json').addEventListener('change', function () {
document.getElementById('generateBtn').disabled = !this.files.length;
});
</script>
</body>
</html>