Skip to content
Snippets Groups Projects
Commit b130115c authored by Peter J. Keleher's avatar Peter J. Keleher
Browse files

auto

parent 8a5198f2
No related branches found
No related tags found
No related merge requests found
# Assignment 4: Documents and a SwiftUI Map
v1.1
## Goals
Learn to use:
......@@ -18,19 +18,13 @@ all this and just emulate the demo video. Doing that gets you
full points. However, the following set of steps is a good approach to
building this app methodically.
## Step 1: Showing a Map (25 pts)
## Step 1: Showing a Map and Tracking the Rider (25 pts)
Go through the video on 10/26 for Core Location and using the SwiftUI Map object.
Display the static location of the user on a map. Core data was
discussed 10/14 and 10/19
## Step 2: Tracking the Rider (25 pts)
- Set up location updating to get location updates.
- Keep the user centered in the middle of the screen in a region with
an appropriate zoom level. Do this by using the appropriate
`userTrackingMode` in your `Map()` view initialization. This will
make the tracking smooth, not jerky.
discussed 10/14 and 10/19. Note that **you must display your map with `Map()`**,
not `MKMapView()`. Use the appropriate user tracking parameter with your map
initialization to track the rider smoothly.
## Step 3: Drawing the Path Trajectory (25 pts)
......@@ -42,13 +36,27 @@ you deem appropriate. You will receive most of the credit as long as the view
indicates the taken path and looks decent. You will get more points if
you are able to use a `polyline` overlay over the `Map` object.
## Step 4: Saving and Viewing Tracks (25 pts)
## Step 4: Saving Tracks (25 pts)
You should have at least two
tabs in your app, one for the recording map and one for displaying the set of
saved tracks from CoreData.
When the user stop recording and/or "saves", you must save the track to
`CoreData`, programmatically moving to the saved tracks tab.
Define a core data `Track` entity that contains, at a minimum, a name,
a timestamp, and a sequence of coordinates.
You will need to have routines to serialize to and from JSON, which is
cast as a `Data`, which is then written/read to/from the database.
You could create multiple entity types, such as a *Track* and a *Point*, and
then establish relationships between them. It is also acceptable
to serialize the set of points as a JSON, and represent that in the Track as
"binary data".
## Step 5: Track Tab (25 pts)
This tab should show all saved tracks, allow deleting of individual tracks
with swipe left, and use navigation links to display individual tracks when
selected. See the video.
## Hints:
......@@ -84,7 +92,7 @@ that exports location info through bound variables.
## Notes:
**Important**: Please avoid the usage of UIKit or any wrappers for UIKit views such as UIViewRepresentable.
**Important**: Please avoid the usage of UIKit, MKMapView or any UIKit views such as UIViewRepresentable.
Using such packages would result in an automatic 0 in the respective
task. You should *not* use **MKMapView()**. Instead, use **Map()**.
- Might look [here]() for polygons. I have *not* verified this, might cause your laptop to go up in a puff of smoke, work great, or fail to compile.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment