I'm in the middle of creating a leaflet map that shows the location of airline pilot domicile locations.
I have a JSON file of all airports, and can easily make a .csv of all airlines and domiciles.
What is the best way of listing variables or arrays, in order to be able to filter based on airline, flying category (major, regional, cargo, training), or state?
I need to allow a user to select a state, or airline, and see only the pilot bases offered in those options.
Ideally, I'd like to pull these from a separately-managed .csv, but any way for a non-coder to easily update would be just fine.
Here is the group of overlays I have so far.
<script>
var overlays = {
'Legacy': legacy,
'Major': major,
'Regional': regional,
'Cargo': cargo,
'EMS': ems,
'Military': military,
'Pilot Training': pilotTraining
};
//This line ADDS the control layer overlay box in the upper right of the map
var layerControl = L.control.layers(null, overlays).addTo(map);
</script>
[][2]
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment