MapKit Help

Hello everyone, I am learning swift and learning the MapKit API. I have done a little research but the App I am attempting to build is complicated (But will save my work money). I am creating a Bus Stop Manager for the school I work at. My best logic is I have the map overlay with a menu bar where you can add locations, those locations are saved either to an Array or an SQLite database. The map pulls all (between 8-15) locations and gives turn-by-turn directions for Sub Bus Drivers.

So my question is well is it possible for my logic to become reality and if so does anyone have any tutorials or suggestions on how to go about it?

Thank you!

Replies

Hello! This is definitely something possible with the MapKit Framework. Probably it's not straightforward but possible!

A couple of documentation you might find useful:

  • MKDirections: You can use this class to get turn-by-turn directions from point A to point B. E.g. you can call
 let directions: MKDirections = .init(request: request)
 directions.calculate { handler in ... }
  • MKLocalSearch: You can use this class to search for locations. Maybe the user search destinations through a search bar, you can use MKLocalSearch to get all the places like a city or a shop.

  • MKMapView: You can use the MKMapView UIKit view to display the map itself and add annotations or turn-by-turn directions in it.

Hope this answer your question!