Skip to content

Commit 594cca9

Browse files
committed
update
1 parent acb8429 commit 594cca9

49 files changed

Lines changed: 5178 additions & 1818 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
node_modules
2+
node_modules/*
13
build
24
build/*
5+
.parcel-cache
6+
node_modules
7+
node_modules/*
8+
.parcel-cache
9+
build/*
10+
dist/*
11+
dist
12+
build
13+
.cache
14+
.env
315
webpage-uploader.sh
16+
build.sh
17+
.gitignore
18+
webpage
19+
webpage/*
20+
.gitignore
21+

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,6 @@ you can also add an overpass layer, https://taginfo.openstreetmap.org/ you add t
109109

110110
you can find an example file here: [omap_maps.json](omap_maps.json)
111111

112-
### Search
113-
114-
The search can be opened with key 2, you can search for locations or start the search with / and then enter an open location code
115-
[open location code](https://en.wikipedia.org/wiki/Open_Location_Code)
116-
117112
### Good to know
118113

119114
Some layers cannot be loaded because KaiOs has not equipped all devices with a valid Let's Encrypt certificate. If your device is rooted you can do it yourself:
@@ -127,7 +122,7 @@ https://strukturart.github.io/o.map/
127122

128123
## How to install
129124

130-
- KaiOs Store
125+
- KaiOS Store
131126
- Sideloading <a href="https://www.martinkaptein.com/blog/sideloading-and-deploying-apps-to-kai-os/">step-by-step article</a> by martinkaptein
132127

133128
### Thank you
@@ -138,8 +133,6 @@ https://strukturart.github.io/o.map/
138133
- https://www.rainviewer.com/api.html
139134
- https://github.com/MazeMap/Leaflet.TileLayer.PouchDBCached
140135
- leaflet.js
141-
- [Bananna Hackers Group](https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!forum/bananahackers)
142-
- Luxferre [olc](https://gist.github.com/plugnburn/95de231ff94130f1de8eb2a2afaf8516)
143136

144137
### LICENSES
145138

application/assets/css/main.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,3 +1005,35 @@ div#tracking-view div span {
10051005
text-align: center;
10061006
font-size: 0.7rem;
10071007
}
1008+
1009+
@media screen and (min-width: 600px) {
1010+
div#finder {
1011+
position: absolute;
1012+
z-index: 5;
1013+
top: 0px;
1014+
left: 0px;
1015+
background: rgba(0, 0, 0, 1);
1016+
padding: 5px;
1017+
color: white;
1018+
display: none;
1019+
overflow-y: hidden !important;
1020+
max-height: 99vh !important;
1021+
}
1022+
1023+
div.panel {
1024+
display: none;
1025+
margin: 30px 0px 0px 0px;
1026+
padding: 5px;
1027+
max-height: 90vh;
1028+
width: 30%;
1029+
margin-left: 35%;
1030+
color: white;
1031+
background: none;
1032+
overflow-y: scroll !important;
1033+
scrollbar-width: none;
1034+
}
1035+
1036+
*::-webkit-scrollbar {
1037+
display: none;
1038+
}
1039+
}

application/assets/js/kaiads.v5.min.js

Lines changed: 2 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

application/assets/js/module.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -435,12 +435,6 @@ const module = (() => {
435435

436436
let marker_latlng = markers_collection[index].getLatLng();
437437

438-
what3words(marker_latlng.lat, marker_latlng.lng, "76YHEAE5").then(
439-
(what3wordsAddress) => {
440-
document.querySelector("#what3words").textContent = what3wordsAddress;
441-
}
442-
);
443-
444438
//popup
445439
document.querySelector("input#popup").value = "";
446440
let pu = markers_collection[index].getPopup();
@@ -1226,24 +1220,6 @@ const module = (() => {
12261220
return a.toFixed(2);
12271221
};
12281222

1229-
let what3words = (lat, lng, key) => {
1230-
const url = `https://api.what3words.com/v3/convert-to-3wa?coordinates=${lat},${lng}&key=${key}`;
1231-
1232-
return fetch(url)
1233-
.then((response) => response.json())
1234-
.then((data) => {
1235-
if (data.words) {
1236-
return data.words;
1237-
} else {
1238-
throw new Error(data);
1239-
}
1240-
})
1241-
.catch((error) => {
1242-
console.error("Error:", error);
1243-
return "sorry, could not be determined";
1244-
});
1245-
};
1246-
12471223
return {
12481224
hotline,
12491225
convert_units,
@@ -1269,6 +1245,5 @@ const module = (() => {
12691245
uniqueId,
12701246
parseGPX,
12711247
update_gpx_info,
1272-
what3words,
12731248
};
12741249
})();

application/assets/js/openweather.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

application/assets/js/osm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const osm = (() => {
174174
);
175175
url.searchParams.append(
176176
"redirect_uri",
177-
"https://omap.strukturart.com/redirect.html"
177+
"https://omap.strukturart.com/index.html"
178178
);
179179
url.searchParams.append("scope", "write_gpx read_gpx read_prefs");
180180

application/assets/js/settings.js

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
const settings = ((_) => {
22
let save_settings = function () {
3-
localStorage.setItem("owm-key", document.getElementById("owm-key").value);
4-
5-
localStorage.setItem("past-radar", document.getElementById("past-radar").value)
3+
localStorage.setItem(
4+
"past-radar",
5+
document.getElementById("past-radar").value
6+
);
67

7-
localStorage.setItem("forecast-radar", document.getElementById("forecast-radar").value)
8+
localStorage.setItem(
9+
"forecast-radar",
10+
document.getElementById("forecast-radar").value
11+
);
812

9-
localStorage.setItem("radar-time", document.getElementById("radar-time").value)
13+
localStorage.setItem(
14+
"radar-time",
15+
document.getElementById("radar-time").value
16+
);
1017

1118
localStorage.setItem(
1219
"routing_profil",
@@ -181,10 +188,10 @@ const settings = ((_) => {
181188

182189
//set values in setting page
183190

184-
document.getElementById("owm-key").value = setting.openweather_api;
185191
document.getElementById("past-radar").value = setting.past_radar_count;
186-
document.getElementById("forecast-radar").value = setting.forecast_radar_count;
187-
document.getElementById("radar-time").value = setting.radar_time
192+
document.getElementById("forecast-radar").value =
193+
setting.forecast_radar_count;
194+
document.getElementById("radar-time").value = setting.radar_time;
188195

189196
document.getElementById("ors-key").value = setting.ors_api;
190197
document.getElementById("routing-profil").value = setting.routing_profil;
@@ -253,9 +260,12 @@ const settings = ((_) => {
253260

254261
setTimeout(() => {
255262
document.getElementById("owm-key").value = setting.openweather_api;
256-
document.getElementById("past-radar").value = setting.past_radar_count || "5";
257-
document.getElementById("forecast-radar").value = setting.forecast_radar_count || "3";
258-
document.getElementById("radar-time").value = setting.radar_time || "2000";
263+
document.getElementById("past-radar").value =
264+
setting.past_radar_count || "5";
265+
document.getElementById("forecast-radar").value =
266+
setting.forecast_radar_count || "3";
267+
document.getElementById("radar-time").value =
268+
setting.radar_time || "2000";
259269

260270
document.getElementById("ors-key").value = setting.ors_api;
261271
document.getElementById("routing-profil").value =
@@ -306,11 +316,14 @@ const settings = ((_) => {
306316
document.getElementById("owm-key").value =
307317
setting.openweather_api;
308318

309-
document.getElementById("past-radar").value = setting.past_radar_count;
319+
document.getElementById("past-radar").value =
320+
setting.past_radar_count;
310321

311-
document.getElementById("forecast-radar").value = setting.forecast_radar_count;
322+
document.getElementById("forecast-radar").value =
323+
setting.forecast_radar_count;
312324

313-
document.getElementById("radar-time").value = setting.radar_time
325+
document.getElementById("radar-time").value =
326+
setting.radar_time;
314327

315328
document.getElementById("ors-key").value =
316329
setting.ors_api;
@@ -417,4 +430,4 @@ const settings = ((_) => {
417430
export_settings,
418431
load_settings_from_file,
419432
};
420-
})();
433+
})();

0 commit comments

Comments
 (0)