- [Instructor] For this solution,…you have everything you need…in the Add Polylines Function.…Go ahead and Stop the App.…And let's Go Back To Add Polylines,…and just above the addOverlays col,…put this in, var coordinates,…equals an array,…CLLocation coordinate 2D.…
So what we're going to do is,…we're going to collect all the points from the annotations…using this array.…So I'm going to do for location in annotations,…which we had from above.…And in there, coordinates.append…and (location.coordinate).…
So we're just essentially going to go through…all of our history annotations in order,…and just get their coordinates…and put them in an array.…Now once we have that array,…I can make a grand tour polyline,…let grandTour = MKPolyline,…with coordinates and count.…The coordinates will be that array…I just created of coordinates.…
And the count will just be coordinates.count.…And then assign a title of the grandTour,…grandTour.title,…and we'll call it "GrandTour_Line".…Now to show the GrandTour underneath the polyline,…I'm going to put it in the array first,…
- Getting coordinates from the web
- Working with Core Location data types and regions
- Creating a map in 2D, 3D, satellite, and flyover views
- Adding annotations
- Adding overlays
- Finding the current location
- Tracking heading, speed, and region
- Searching for locations
- Requesting and displaying directions
Skill Level Advanced
1. Basic Map and Location Concepts
5. Current Location
6. Heading, Speed, and Regions
Next steps1m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.