MTDirectionsKit

MTDirectionsKit

Released 6 years ago , Last update 5 years ago

Let your iOS App guide you wherever you want and show directions directly on top of MKMapView.

Why MTDirectionsKit?

Did you ever wonder why Apple didn't provide a way to show directions directly on top of MKMapView and force you to switch to their built-in Maps.app just to guide your users somewhere? We too, that's why we built MTDirectionsKit. Switching to Maps.app just to show directions results in a context-switch and can confuse your users, thus increasing the chance that they won't return to your Application.

MTDirectionsKit is a full-featured and easy to use solution to show directions in your App, directly on top of MKMapView. Not only will your users thank you for not throwing them out of your App, it will also distinguish your App from all the others that don't offer this functionality.

Convinced? Let's get you started.

MTDirectionsKit can use the following three APIs for gathering routing information:

  1. MapQuest Open Directions API
  2. Google Directions API
  3. [Bing Routes API] (http://msdn.microsoft.com/en-us/library/ff701705.aspx)

Demo and Documentation

You can find a demo application here: MTDirectionsKit Demo

Full documentation is available here: MTDirectionsKit Documentation

How to use?

MTDirectionsKit is very easy to use, here's a sample call:

MTDMapView *_mapView = [[MTDMapView alloc] initWithFrame:self.view.bounds];

// ...
// setup _mapView
// ...

// configure MTDirectionsKit (optional)
// log more messages
MTDDirectionsSetLogLevel(MTDLogLevelInfo);
// change used API to Google Directions
MTDDirectionsSetActiveAPI(MTDDirectionsAPIGoogle);
// manually change measurement system 
// Warning: MTDirectionsKit automatically sets it to the preferred one of the user's device,
// only override if you have a really good reason to
MTDDirectionsSetMeasurementSystem(MTDMeasurementSystemMetric);

// set the delegate of MKMapView. This automatically sets the directionsDelegate, if self
// conforms to the protocol MTDDirectionsDelegate
_mapView.delegate = self;

[_mapView loadDirectionsFrom:CLLocationCoordinate2DMake(51.38713, -1.0316)
                          to:CLLocationCoordinate2DMake(51.4554, -0.9742)
                   routeType:MTDDirectionsRouteTypeFastestDriving
        zoomToShowDirections:YES];

To see a detailed example on how to use MTDirectionsKit have a look at the provided Demo Application.

Integration

There are two ways to integrate MTDirectionsKit into your App:

  1. Include the binary framework MTDirectionsKit.framework
  2. Add MTDirectionsKit.xcodeproj as a dependency

The easiest way to integrate MTDirectionsKit is to add the binary framework to your App.

Independent of which way to integrate MTDirectionsKit you choose, you have to add some system frameworks and libraries to your project. For MTDirectionsKit to work you have to add

CoreLocation.framework
MapKit.framework
libxml2.dylib

to your target's linked libraries (found under Build Phases, see pictures below).

Integrating Binary Framework

Just drag MTDirectionsKit.framework onto the Frameworks-group of your App, add

#import <MTDirectionsKit/MTDirectionsKit.h>

everywhere you want to use it and you are good to go.

![MTDirectionsKit.framework](http://f.cl.ly/items/3x0F1L400f3r1T142p14/MTDirectionsKit_Framework.png "Binary Framework")

Integrating MTDirectionsKit.xcodeproj (Dependency)

First copy the whole MTDirectionsKit project into your applications root folder and use this project for the following steps:

  1. Locate the "MTDirectionsKit.xcodeproj" file inside your applications root folder and drag it onto the root of your Xcode project's Frameworks-group
  2. Add MTDirectionsKit as target dependency of your target under the tab Build Phases
  3. Drag libMTDirectionsKit.a onto the section 'Link Binary with Libraries' of your target

You are good to go, just

#import <MTDirectionsKit/MTDirectionsKit.h>

everywhere where you want to use it.

![MTDirectionsKit.xcodeproj as Dependency](http://f.cl.ly/items/3D40042w200D0a3u0h0R/MTDirectionsKit_Dependency.png "Dependency")

Requirements

MTDirectionsKit needs Xcode ≥ 4.5, iOS Base SDK ≥ 5.1 and Clang LLVM = 3.1 to compile. It doesn't work with the old LLVM GCC compiler.

MTDirectionsKit works on a deployment target of ≥ iOS 4.3 and can be used in ARC or non-ARC applications.

Pricing

14 day 14-day money-back guarantee

$499.99

Developer License

  • Perpetual license

  • Unlimited projects

  • Can distribute code and binary products

  • Commercial use

1 license From » $499.99 View Licenses

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.


Or enter your name and Email
  • KF Kleber Felipe 5 years ago
    Hello, Im from Brazil. Do you see this not working here due to location or it should work just fine? I noticed the sample apps lists cities in Brazil with the Z, I was wonrdering if it would be possible to change it to Brasil since this is how we spell it here. Thx
    • Matthias Tretter Publisher 5 years ago
      I'm afraid I don't fully know what you mean. Which sample apps are you referring to?