Skip to content

Instantly share code, notes, and snippets.

@joeyfigaro
Last active June 7, 2019 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeyfigaro/3f95142c2e4ea8e7825cd13ee6cb4630 to your computer and use it in GitHub Desktop.
Save joeyfigaro/3f95142c2e4ea8e7825cd13ee6cb4630 to your computer and use it in GitHub Desktop.
# Flight-Planning (KML Imports without S3 Uploading/Persisted KML)
# Flight-Planning (KML Imports without S3 Uploading/Persisted KML)
Flight Planning*
# User dropped / imported KML file
Empty*
drop KML file -> KML Added
import KML file manually -> KML Added
KML Added
# Begins as soon as a user drops/attaches a KML file
Create Readable File
succeeded -> Convert to GeoJSON
failed -> Error
# Passes File contents to @mapbox/togeojson
Convert to GeoJSON
succeeded -> Validate GeoJSON
failed -> Error
# Checks for a single Polygon feature
Validate GeoJSON
# GeoJSON has one Polygon
succeeded -> Update Map
# GeoJSON doesn't contain a Polygon, or has more than one
failed -> Error
Error
# Add new Polygon/Flight Boundary to the map
Update Map
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment