mirror of https://github.com/espruino/BangleApps
not needed
parent
3273ebfa15
commit
deb8cda26c
|
@ -22,16 +22,6 @@
|
|||
let query = `[bbox:38.4829,-121.8694,38.7110,-121.6215][out:json][timeout:5];way["name"="Davis Golf Course"];map_to_area ->.golfcourse;way["golf"="hole"](area.golfcourse)->.holes;(relation["golf"="fairway"](area.golfcourse);way["golf"~"^(green|tee|water_hazard|bunker|fairway)"](area.golfcourse);)->.features;.holes out geom;.features out geom;`;
|
||||
let course_input = null;
|
||||
|
||||
function findNodeCoordinates(elements, id) {
|
||||
for (let i = 0; i < elements.length; i++) {
|
||||
if (elements[i].type === "node" && elements[i].id === id) {
|
||||
let thing = (({ lat, lon }) => ({ lat, lon }))(elements[i]);
|
||||
return thing;
|
||||
}
|
||||
}
|
||||
console.error("node id: ", id, " not found");
|
||||
}
|
||||
|
||||
function processFeatures(course_verbose) {
|
||||
let course_processed = {
|
||||
holes: {}
|
||||
|
@ -109,7 +99,7 @@
|
|||
});
|
||||
|
||||
$("#download").click(function () {
|
||||
downloadObjectAsJSON(course, "golfcourse-" + course_name);
|
||||
downloadObjectAsJSON(courses[0].content, "golfcourse-" + course_name);
|
||||
});
|
||||
|
||||
// download info from the course
|
||||
|
|
Loading…
Reference in New Issue