Learn to search for a location by keyword.
- [Instructor] You just saw how to use…geocoding to get a coordinate.…Using MapKit, you can also find a series…of locations based on a natural language phrase.…This is best for finding landmarks…or for more general searches than an address.…Let's search for pizza restaurants…near our historical restaurants.…Stop the app, and in view controller…head back to the find pizza action.…Comment out the code that is already there.…You'll use a MK local search,…and an MK local search request to find your locations.…
The search request is an MK local search request object.…The simple way to use it is to make one…and set two properties.…I'll initialize a search request like this.…Let request equal MK Local search request.…The first property is a string with the user's request.…Usually, this will be a find control or text box.…But for our example, I'll use a…literal string for simplicity.…
Request dot natural language query equals pizza.…The request knows we're looking for pizza,…but it doesn't know where.…It uses an MK map region. Most often we'll use…
- 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
Advanced iOS Development: Working with APIswith Saul Mora1h 59m Intermediate
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.