Last active
June 7, 2019 18:07
-
-
Save joeyfigaro/3f95142c2e4ea8e7825cd13ee6cb4630 to your computer and use it in GitHub Desktop.
# Flight-Planning (KML Imports without S3 Uploading/Persisted KML)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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