diff --git a/index.html b/index.html index 616059f..17073a5 100644 --- a/index.html +++ b/index.html @@ -132,8 +132,6 @@

Show the Map or the Log

element.style.display = 'none'; menuLink.classList.add('active'); } - - //_map.invalidateSize() } function toggleLog(e) { @@ -147,17 +145,15 @@

Show the Map or the Log

var mapCanvas = document.getElementById('map-canvas'); toggleElement(mapCanvas, sender); } - // If a lat/long is specified in the query string, try to use it as the - // QTH/Operating location for the log file. - // This allows for semi-obvious location-range mapping - // ex: qth=22.303940,114.170372 will place a yellow marker at 22.3, 114.1 on the map - var qth = getQueryVariable('qth'); - if (qth !== null) { - createQTHMarker(qth, "Home QTH") - //createQTHMarker(40.786, -73.961, "Home QTH") - } - + // If a lat/long is specified in the query string, try to use it as the + // QTH/Operating location for the log file. + // This allows for semi-obvious location-range mapping + // ex: qth=22.303940,114.170372 will place a yellow marker at 22.3, 114.1 on the map + var qth = getQueryVariable('qth'); + if (qth !== null) { + createQTHMarker(qth, "Home QTH") + } diff --git a/qso-mapper.css b/qso-mapper.css index a03cebb..ce76b3b 100644 --- a/qso-mapper.css +++ b/qso-mapper.css @@ -3,7 +3,7 @@ * 2020/09/05 Stephen Houser, N1SH */ - html, body { +html, body { height: 100%; width: 100%; } @@ -28,11 +28,9 @@ body { } #map-canvas { - /* height: calc ( 100vh - 6rem ); */ display: block; height: 100%; width: 100%; - /* border: 2px dashed black; */ } #call-log { @@ -52,7 +50,6 @@ body { width: 100% } - .qth h1 { font-size: 2rem; } diff --git a/qso-mapper.js b/qso-mapper.js index 3f4af6e..fddb7ea 100644 --- a/qso-mapper.js +++ b/qso-mapper.js @@ -218,38 +218,42 @@ function removeQso(qso) { * when the marker is selected. */ function createQTHMarker(latlong, popupText) { - // To use a smaller marker, use something like this... - var blueMarkerSmall = L.icon({ - iconUrl: 'icons/ylw-blank.png', - iconSize: [32, 32], // size of the icon - iconAnchor: [16, 32], // point of the icon which will correspond to marker's location - popupAnchor: [0, -16] // point from which the popup should open relative to the iconAnchor - }); - var [latitude, longitude] = latlong.split(','); - var marker = L.marker([latitude, longitude], {icon: blueMarkerSmall, zIndexOffset: 1000}); - - marker.addTo(_markerFeatureGroup) - .bindPopup(popupText); - - _markers.push(marker); - return marker; + // To use a smaller marker, use something like this... + var blueMarkerSmall = L.icon({ + iconUrl: 'icons/ylw-blank.png', + iconSize: [32, 32], // size of the icon + iconAnchor: [16, 32], // point of the icon which will correspond to marker's location + popupAnchor: [0, -16] // point from which the popup should open relative to the iconAnchor + }); + + var [latitude, longitude] = latlong.split(','); + var marker = L.marker([latitude, longitude], {icon: blueMarkerSmall, zIndexOffset: 1000}); + + marker.addTo(_markerFeatureGroup) + .bindPopup(popupText); + + _markers.push(marker); + return marker; } /* addMarkerforQth - add a marker to the map for a given operating location */ + +/* TODO: Does not look like this function is used anywhere, remove in next revision function addMarkerForQth(qth) { - var latlon = latLonForQso(qth); - if (latlon == null) { - return null; - } - - var [latitude, longitude] = latlon; - var popupText = '
' + - '

' + qth.call + '


' + - '
'; - - marker = createMarker(latitude, longitude, popupText); - return marker; + var latlon = latLonForQso(qth); + if (latlon == null) { + return null; + } + + var [latitude, longitude] = latlon; + var popupText = '
' + + '

' + qth.call + '


' + + '
'; + + marker = createMarker(latitude, longitude, popupText); + return marker; } +*/ /* addMarkerForQso - add a marker to the map for a given QSO */ function addMarkerForQso(qso) {