Skip to content

Commit

Permalink
Holes filled. Theme adjusted for airac announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
Kahn committed Sep 22, 2021
1 parent 65978f1 commit 0e3e369
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions public/sectormap.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ function unionArray(array){
if (featureCollection.length === 0) {
return null
}

let ret = featureCollection.features[0];
// buffer is a dirty dirty hack to close up some holes in datasets
let ret = turf.buffer(featureCollection.features[0],0.3, {units: 'kilometers'});

turf.featureEach(featureCollection, function (currentFeature, featureIndex) {
if (featureIndex > 0) {
ret = turf.union(ret, currentFeature)
ret = turf.union(ret, turf.buffer(currentFeature,0.3, {units: 'kilometers'}))
}
});
return ret;
Expand Down Expand Up @@ -174,6 +174,7 @@ async function getATCSectors() {
'type': 'line',
'source': 'std', // reference the data source
'layout': {},
'maxzoom': 5,
'paint': {
'line-color': await getColourHex('GenericText'),
'line-width': 1
Expand Down Expand Up @@ -231,6 +232,7 @@ var map = new mapboxgl.Map({
style: 'mapbox://styles/cycloptivity/cksqo94ovrrk517lyn947vqw2',
center: mapCenter, // starting position [lng, lat]
zoom: mapZoom, // starting zoom
maxZoom: 7,
attributionControl: false
});
map.dragRotate.disable();
Expand Down

0 comments on commit 0e3e369

Please sign in to comment.