UK/RSGB 70cm BEACON PROJECT
The following uses Google Maps to show the locations of current/planned 70cms / 432MHz UHF Beacons in the UK:-
|
var gmarkers = []; var myicon = ""; var htmls = []; var htmls1 = []; var htmls2 = []; var navlinks_html = ""; var menulinks_html = ""; var openedWindow = null ; // Remember the opened window // Define extra colored icons - as default is red var gicons = []; gicons[""] = "https://www.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png" ; gicons["red"] = "https://www.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png" ; //gicons["red"].iconSize = new GSize(32,32); gicons["blue"] = "https://www.google.com/intl/en_us/mapfiles/ms/micons/blue-dot.png" ; //gicons["blue"].iconSize = new GSize(32,32); gicons["green"] = "https://www.google.com/intl/en_us/mapfiles/ms/micons/green-dot.png" ; //gicons["green"].iconSize = new GSize(32,32); gicons["yellow"] = "https://www.google.com/intl/en_us/mapfiles/ms/micons/yellow-dot.png" ; //gicons["yellow"].iconSize = new GSize(32,32); gicons["purple"] = "https://www.google.com/intl/en_us/mapfiles/ms/micons/purple-dot.png" ; //gicons["purple"].iconSize = new GSize(32,32); gicons["orange"] = "https://www.google.com/intl/en_us/mapfiles/ms/micons/orange-dot.png" ; //gicons["orange"].iconSize = new GSize(32,32); gicons["pink"] = "https://www.google.com/intl/en_us/mapfiles/ms/micons/pink-dot.png" ; //gicons["pink"].iconSize = new GSize(32,32); function createMarker(point,callsign, html1, html2, myicon) { var marker = new google.maps.Marker({ position: point, map: map, icon: gicons[myicon], title: callsign }); gmarkers.push(marker); htmls1.push(html1); htmls2.push(html2); // var id = 55; google.maps.event.addListener(marker, 'click', function() { beaconinfo_html= html1+ ' ' + html2 ; document.getElementById("beaconinfo").innerHTML = beaconinfo_html; var infowindow = new google.maps.InfoWindow({ content: html1 // NB html2 not used unless tabs available }); if (openedWindow != null) openedWindow.close(); infowindow.open(map, marker); openedWindow = infowindow ; // remember it }); }; // Beacon menu function myclick(id) { // map.setCenter(gmarkers[i].getPosition()); google.maps.event.trigger(gmarkers[id], 'click'); beaconinfo_html= htmls1[id]+ ' ' + htmls2[id] ; document.getElementById("beaconinfo").innerHTML = beaconinfo_html; } //Map Options such as Reset, Toggle map type function menuclick(id) { if (id==1) { var pt = new google.maps.LatLng(54, -1); map.setCenter(pt); map.setZoom(5); map.setMapTypeId(google.maps.MapTypeId.ROADMAP); if (openedWindow != null) openedWindow.close(); beaconinfo_html= " " ; document.getElementById("beaconinfo").innerHTML = beaconinfo_html; }; if (id==2) { var currentMapType = map.getMapTypeId(); if (currentMapType == "roadmap") { map.setMapTypeId(google.maps.MapTypeId.TERRAIN)} if (currentMapType == "terrain") { map.setMapTypeId(google.maps.MapTypeId.HYBRID)} if (currentMapType == "hybrid") { map.setMapTypeId(google.maps.MapTypeId.ROADMAP)} if (currentMapType == "satellite") { map.setMapTypeId(google.maps.MapTypeId.ROADMAP)} } } var map; var mapOptions = { zoom:5, center: new google.maps.LatLng(54, -1), panControl: true, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.NORMAL }, rotateControl: true, scaleControl: true, scaleControlOptions: { position: google.maps.ControlPosition.RIGHT_CENTER }, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR }, streetViewControl: false, overviewMapControl: true, overviewMapControlOptions: {opened: true} // mapTypeId: google.maps.MapTypeId.TERRAIN }; var map = new google.maps.Map(document.getElementById("map"), mapOptions); // Close InfoWindow when clicking anywhere on the map. google.maps.event.addListener(map, 'click', function() { if (openedWindow != null) openedWindow.close(); }); var myicon=""; var point = new google.maps.LatLng(56.5545,-2.9859); var marker = createMarker(point, 'GB3ANG', 'GB3ANG 'Heading: 170 // map.addOverlay(marker); navlinks_html += 'System: ' + "GB3ANG" + '<\/a> '; var point = new google.maps.LatLng(51.398, -2.6455); var marker = createMarker(point, 'GB3BSL', 'GB3BSL - QRT 'Heading: 90 // map.addOverlay(marker); navlinks_html += '' + "GB3BSL" + '<\/a> '; var point = new google.maps.LatLng(50.38238,-4.82761); var marker = createMarker(point, 'GB3MCB', 'GB3MCB 'Heading: 45 // moved from 432.970, Feb 2015 // map.addOverlay(marker); navlinks_html += '' + "GB3MCB" + '<\/a> '; // Leicester - replaces Sutton Coldfield var point = new google.maps.LatLng(52.6924,-1.2823); var marker = createMarker(point, 'GB3LEU', 'GB3LEU 'Heading: 135 & 300 // map.addOverlay(marker); navlinks_html += '' + "GB3LEU" + '<\/a> '; // Slievanorra, N.Ireland - replaces LER var point = new google.maps.LatLng(55.0746500, -6.2256344 ); var marker = createMarker(point, 'GB3NGI', 'GB3NGI 'Heading: 125 // map.addOverlay(marker); navlinks_html += '' + "GB3NGI" + '<\/a> '; // Fairseat - New - co-sited with GB3VHF var point = new google.maps.LatLng(51.3292100, +0.3396609); var marker = createMarker(point, 'GB3UHF', 'GB3UHF 'Heading: 288 & 348 // map.addOverlay(marker); navlinks_html += '' + "GB3UHF" + '<\/a> '; // Finningley - replaces Emley var point = new google.maps.LatLng( 53.5646300, -0.8745778 ); var marker = createMarker(point, 'GB3FNY', 'GB3FNY 'Heading: 90 & 180 // map.addOverlay(marker); navlinks_html += '' + "GB3FNY" + '<\/a> '; // Test Source var point = new google.maps.LatLng(50.91023,-1.2916); var marker = createMarker(point, 'G4JNT/B', 'G4JNT/B (Test Source) 'Test Source: // map.addOverlay(marker); navlinks_html += ' and ' + "G4JNT/B" + '<\/a> '; menulinks_html = 'Options: ' + "Reset" + '<\/a> '; menulinks_html += '' + "Toggle-MapType" + '<\/a> '; // put the assembled menu/navlinks_html contents into the navbars divs document.getElementById("navlinks").innerHTML = navlinks_html; document.getElementById("menulinks").innerHTML = menulinks_html;
|
|
Notes:
Yellow=Test only, Purple=QRT, Green=Complete
Background:
Click here if you do not see the main menu bar on the left
10-Aug-2017