From c8f16d1a06a82b450d144784f923b42e2b9af0b7 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 8 Jan 2022 16:57:17 +0000 Subject: [PATCH] [QSO][Map] Fixed annoying but where it was no longer going to DXCC or grid when entering a callsign on the map --- assets/js/sections/qso.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index f1c3fafc..309b9597 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -281,7 +281,6 @@ function reset_fields() { } $("#callsign").focusout(function() { - if ($(this).val().length >= 3) { // Temp store the callsign @@ -381,9 +380,11 @@ $("#callsign").focusout(function() { if (typeof result.latlng !== "undefined" && result.latlng !== false) { var marker = L.marker([result.latlng[0], result.latlng[1]], {icon: redIcon}); mymap.panTo([result.latlng[0], result.latlng[1]]); + mymap.setView([result.latlng[0], result.latlng[1]], 8); } else { var marker = L.marker([result.dxcc.lat, result.dxcc.long], {icon: redIcon}); mymap.panTo([result.dxcc.lat, result.dxcc.long]); + mymap.setView([result.dxcc.lat, result.dxcc.long], 8); } markers.addLayer(marker).addTo(mymap); @@ -586,6 +587,7 @@ $("#locator").keyup(function(){ var marker = L.marker([result[0], result[1]], {icon: redIcon}); mymap.setZoom(8); mymap.panTo([result[0], result[1]]); + mymap.setView([result[0], result[1]], 8); } markers.addLayer(marker).addTo(mymap); })