This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

1// "open in" links for a coordinate; shared by index.html and at.html. 2// There is no single url every maps app opens, so offer one per app. 3function mapLinks(lat, lon) { 4 // iOS has no handler for geo: (iPadOS reports itself as a Mac) 5 var ios = 6 /iPad|iPhone|iPod/.test(navigator.userAgent) || 7 (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1); 8 var ll = lat + "," + lon; 9 var links = [ 10 [ 11 "Google Maps", 12 "https://www.google.com/maps/search/?api=1&query=" + 13 encodeURIComponent(ll), 14 ], 15 ["Apple Maps", "https://maps.apple.com/?ll=" + ll + "&q=lassulus"], 16 ]; 17 // android: app chooser incl. Google Maps, OsmAnd, Organic Maps, ... 18 if (!ios) 19 links.push(["choose app…", "geo:" + ll + "?q=" + ll + "(lassulus)"]); 20 links.push([ 21 "OpenStreetMap", 22 "https://www.openstreetmap.org/?mlat=" + 23 lat + 24 "&mlon=" + 25 lon + 26 "#map=16/" + 27 lat + 28 "/" + 29 lon, 30 ]); 31 return links; 32} 33 34function renderMapLinks(container, lat, lon) { 35 container.replaceChildren(); 36 mapLinks(lat, lon).forEach(function (l) { 37 var a = document.createElement("a"); 38 a.textContent = l[0]; 39 a.href = l[1]; 40 container.appendChild(a); 41 }); 42}