Although this is a new app, there's quite a bit of similarity between this app and the Filer app. Instead of noteStorage
and textNoteEditView
, we'll be using pathStorage
and pathEditView
. Of course, there are some changes in the data models to be aware of, including new models to handle position data.
The biggest difference between this new app and Filer is the type of data it processes. A note only had a few properties, but a path can have dozens (even hundreds) of places within it. It should be apparent that we're dealing with two separate objects: Place
and Path
. Of course, as it was necessary in the Filer app, we'll also need a storage mechanism for these objects. Consider the following diagram:
Much of this should look pretty familiar by now. You can see that the Place
model directly mirrors most of the position data obtained from the geolocation API. Only the extra properties have to do with formatting the latitude and longitude in a human...