Skip to content

Commit

Permalink
funding
Browse files Browse the repository at this point in the history
  • Loading branch information
strukturart committed Aug 3, 2024
1 parent 46dacb7 commit 935a3a8
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [octocat, surftocat]
custom: ["https://www.paypal.me/strukturart"]
2 changes: 2 additions & 0 deletions FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [strukturart]
custom: ["https://www.paypal.me/strukturart"]
2 changes: 1 addition & 1 deletion application/assets/js/overpass.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const overpass = (() => {
node_query = `[${part1}][${part2}]`;
}

if (overpassQuery.indexOf("public_transport") > -1) {
if (overpassQuery == "public_transport") {
node_query = "['public_transport'='stop_position']['bus'='yes']";
relation_query = "['type'='route']['route'='bus']";
way_query = "['public_transport'='stop_platform']['bus'='yes']";
Expand Down
18 changes: 17 additions & 1 deletion application/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,14 @@ document.addEventListener("DOMContentLoaded", function () {
.querySelector("div#overpass")
.insertAdjacentHTML(
"afterend",
'<div class="item" data-type="overpass" data-url="amenity=shelter,shelter_type!~public_transports">Shelter</div>'
'<div class="item" data-type="overpass" data-url="amenity=shelter,shelter_type!=public_transport">Shelter</div>'
);

document
.querySelector("div#overpass")
.insertAdjacentHTML(
"afterend",
'<div class="item" data-type="overpass" data-url="amenity=atm">ATM</div>'
);

find_gpx();
Expand Down Expand Up @@ -2919,6 +2926,15 @@ document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("keydown", handleKeyDown);
document.addEventListener("keyup", handleKeyUp);
});
//mozActivity
//open app
try {
navigator.mozSetMessageHandler("activity", function (activityRequest) {
console.log(activityRequest.source);
});
} catch (e) {}

//debugger helper

if (debug) {
window.onerror = function (msg, url, linenumber) {
Expand Down
8 changes: 7 additions & 1 deletion application/manifest.webapp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.9.798",
"version": "1.9.799",
"version_name": "hotline",
"name": "o.map",
"description": "O.map, your ultimate navigation companion for KaiOS-powered devices. O.map is a lightweight and feature-rich map application designed specifically for KaiOS, enabling you to explore and navigate the world with ease. Whether you're a local resident, a tourist, or an adventurer, O.map is here to enhance your journey and keep you on the right track.",
Expand All @@ -18,6 +18,12 @@
"url": "https://github.com/strukturart/o.map"
},

"activities": {
"maps": {
href: "/index.html",
disposition: "inline"
},

"dependencies": {
"ads-sdk": "1.5.7"
},
Expand Down
17 changes: 16 additions & 1 deletion docs/assets/js/overpass.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,22 @@ const overpass = (() => {
let relation_query = "[" + overpassQuery + "]";
let way_query = "[" + overpassQuery + "]";
let node_query = "[" + overpassQuery + "]";
if (overpassQuery.indexOf("public_transport") > -1) {

if (overpassQuery.indexOf(",") > -1) {
// Split the query by comma
let parts = overpassQuery.split(",");

// Trim whitespace from each part
let part1 = parts[0].trim();
let part2 = parts[1].trim();

// Construct the queries
relation_query = `[${part1}][${part2}]`;
way_query = `[${part1}][${part2}]`;
node_query = `[${part1}][${part2}]`;
}

if (overpassQuery == "public_transport") {
node_query = "['public_transport'='stop_position']['bus'='yes']";
relation_query = "['type'='route']['route'='bus']";
way_query = "['public_transport'='stop_platform']['bus'='yes']";
Expand Down
2 changes: 1 addition & 1 deletion docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ document.addEventListener("DOMContentLoaded", function () {
.querySelector("div#overpass")
.insertAdjacentHTML(
"afterend",
'<div class="item" data-type="overpass" data-url="amenity=shelter">Shelter</div>'
'<div class="item" data-type="overpass" data-url="amenity=shelter,shelter_type!=public_transport">Shelter</div>'
);

find_gpx();
Expand Down

0 comments on commit 935a3a8

Please sign in to comment.