diff --git a/gmap.html b/gmap.html
index aba4997..3b78a17 100644
--- a/gmap.html
+++ b/gmap.html
@@ -59,7 +59,13 @@
var he = document.createElement("P");
he.innerHTML = '>';
var rotation = 45+360-plane.track;
- he = '
✈️
';
+ var selhtml = '';
+ if (Selected == plane.hex) {
+ selhtml = 'border:1px dotted #0000aa; border-radius:10px;';
+ } else {
+ selhtml = '';
+ }
+ he = '✈️
';
var icon = L.divIcon({html: he, className: 'plane-icon'});
return icon;
}
@@ -75,6 +81,12 @@
Planes[Selected].marker.setIcon(getIconForPlane(Planes[Selected]));
refreshSelectedInfo();
}
+
+ function selectPlaneCallback(hex) {
+ return function() {
+ return selectPlane(hex);
+ }
+ }
function refreshGeneralInfo() {
var i = document.getElementById('geninfo');
@@ -123,7 +135,7 @@
var icon = getIconForPlane(plane);
var marker = L.marker([plane.lat, plane.lon], {icon: icon}).addTo(Map);
var hex = plane.hex;
- marker.on('click',function () {selectPlane(hex)});
+ marker.on('click',selectPlaneCallback(plane.hex));
plane.marker = marker;
marker.planehex = plane.hex;
Planes[plane.hex] = plane;