use the recommended way to generate google maps urls

This commit is contained in:
Jakob Ketterl 2020-03-05 17:52:40 +01:00
parent 6b4509fca5
commit c2702e02a9

View File

@ -1097,7 +1097,8 @@ function on_ws_recv(evt) {
case "receiver_details":
var r = json['value'];
e('webrx-rx-title').innerHTML = r['receiver_name'];
e('webrx-rx-desc').innerHTML = r['receiver_location'] + ' | Loc: ' + r['locator'] + ', ASL: ' + r['receiver_asl'] + ' m, <a href="https://www.google.hu/maps/place/' + r['receiver_gps'][0] + ',' + r['receiver_gps'][1] + '" target="_blank" onclick="dont_toggle_rx_photo();">[maps]</a>';
var query = encodeURIComponent(r['receiver_gps'][0] + ',' + r['receiver_gps'][1]);
e('webrx-rx-desc').innerHTML = r['receiver_location'] + ' | Loc: ' + r['locator'] + ', ASL: ' + r['receiver_asl'] + ' m, <a href="https://www.google.com/maps/search/?api=1&query=' + query + '" target="_blank" onclick="dont_toggle_rx_photo();">[maps]</a>';
e('webrx-rx-photo-title').innerHTML = r['photo_title'];
e('webrx-rx-photo-desc').innerHTML = r['photo_desc'];
break;