Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

satellite view in google maps button (w/ heading) #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions vfrmap/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
window.open(url,'_blank');
}

function open_in_google_maps_sat() {
var url = "https://www.google.com/maps/@" + last_report.latitude + "," + last_report.longitude + "," + last_report.altitude/2 + "a,35y," + last_report.heading + "h" + "/data=!3m1!1e3"
window.open(url,'_blank');
}

function updateMap(msg) {
var pos = L.latLng(msg.latitude, msg.longitude);
marker.setLatLng(pos);
Expand Down Expand Up @@ -302,6 +307,7 @@
main: document.getElementById("plane-popup"),
pos: document.getElementById("plane-popup-pos"),
gmap: document.getElementById("plane-popup-gmap"),
gmapsat: document.getElementById("plane-popup-gmap-sat"),
follow: document.getElementById("plane-popup-follow"),
};
teleport_popup = {
Expand Down Expand Up @@ -344,6 +350,7 @@
<div id="plane-popup">
<p><h3 id="plane-popup-pos"></h3></p>
<p><button id="plane-popup-gmap" onclick="open_in_google_maps();">open in google maps</button></p>
<p><button id="plane-popup-gmap-sat" onclick="open_in_google_maps_sat();">open in gmaps satellite</button></p>
<p><button id="plane-popup-follow" onclick="toggle_follow();"></button></p>
</div>

Expand Down