From 233d5734376b98ec9b8efbd41f0f48e725fd50e2 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Mon, 24 Mar 2014 21:57:38 +0100 Subject: [PATCH 1/3] browsermap: declutter the map on large scales --- webgui/map/index.html | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/webgui/map/index.html b/webgui/map/index.html index 610f047e6..939f25ada 100644 --- a/webgui/map/index.html +++ b/webgui/map/index.html @@ -211,6 +211,22 @@ html,body,#map { } }, + filter : function(feature, layer) { + var zoom = map.getZoom(); + switch( feature.properties.type ) { + case 'airport': + if( zoom >= 10 ) return true; + return feature.properties.longestRwyLength_m >= 2000; + break; + + case 'NDB': + if( zoom >= 10 ) return true; + if( zoom >= 8 ) return feature.properties.range_nm >= 30; + return feature.properties.range_nm > 50; + } + return true; + }, + style : function(feature) { if (feature.properties.type == "ILS" || feature.properties.type == "localizer") { return { @@ -243,9 +259,9 @@ html,body,#map { if (radius < 10) radius = 10; - var filter = "vor,dme,ndb,airport"; + var filter = "vor,ndb,airport"; if (radius < 60) - filter += ",ils,loc,om"; + filter += ",ils,dme,loc,om"; if (radius < 20) filter += ",mm"; @@ -276,15 +292,12 @@ html,body,#map { var overlays = { "NAVDB" : navdbLayer, - //"ICAO VFR (Germany)" : icaoGermany, - //"Lower Airspace (Germany)" : lowerGermany, + "ICAO VFR (Germany)" : icaoGermany, + "Lower Airspace (Germany)" : lowerGermany, "Precipitation" : owmPrecipitation, "Isobares" : owmPressure, }; - L.control.layers(baseLayers, overlays).addTo(map); - L.control.scale().addTo(map); - var aircraftMarker = new L.RotatedMarker(map.getCenter(), { angle : 45, icon : L.icon({ @@ -324,18 +337,18 @@ html,body,#map { this._div.innerHTML = s; }; - info.addTo(map); - var FollowAircraftControl = L.control(); FollowAircraftControl.onAdd = function(map) { this._div = L.DomUtil.create('div', 'followAircraft'); this._div.innerHTML = ''; this._div.onclick = function() { toggleFollowAircraft(); return true; }; -// this.update(); return this._div; } + L.control.scale().addTo(map); + info.addTo(map); FollowAircraftControl.addTo(map); + L.control.layers(baseLayers, overlays).addTo(map); map.on('resize', function(e) { navdbLayer.dirty = true; From 03e5112c946c9436d749df3a7ff348adffecdc20 Mon Sep 17 00:00:00 2001 From: Emilian Huminiuc Date: Mon, 24 Mar 2014 22:27:15 +0100 Subject: [PATCH 2/3] Move linear features to bin7 to be drawn beneath runway lights --- Effects/lfeat.eff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Effects/lfeat.eff b/Effects/lfeat.eff index 472e2ed76..e1b1dd3b4 100644 --- a/Effects/lfeat.eff +++ b/Effects/lfeat.eff @@ -53,7 +53,7 @@ smooth back - 111 + 7 DepthSortedBin From 2fc3f657e3a86fceada2c271ace2cd8a115e7f17 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Mon, 24 Mar 2014 23:24:53 +0100 Subject: [PATCH 3/3] browsermap: lift aircraft symbol above other --- webgui/map/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webgui/map/index.html b/webgui/map/index.html index 939f25ada..2227069fb 100644 --- a/webgui/map/index.html +++ b/webgui/map/index.html @@ -305,7 +305,8 @@ html,body,#map { iconAnchor : [ 30, 30 ], popupAncor : [ 0, -32 ], iconUrl : "images/aircraft.svg", - }) + }), + zIndexOffset: 10000, }); aircraftMarker.addTo(map); aircraftMarker.setState = function(s) {