CMMapLauncher

by citymapper

citymapper / CMMapLauncher

CMMapLauncher is a mini-library for iOS that makes it quick and easy to show directions in various m...

194 Stars 27 Forks Last release: Not found MIT License 10 Commits 2 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

CMMapLauncher

CMMapLauncher is a mini-library for iOS that makes it quick and easy to show directions in various mapping applications. To use it, just add

CMMapLauncher.h
and
CMMapLauncher.m
to your project.

To check whether one of the supported mapping apps is present on the user's device:

BOOL installed = [CMMapLauncher isMapAppInstalled:CMMapAppCitymapper];

Then, to launch into directions in that app:

CLLocationCoordinate2D bigBen = CLLocationCoordinate2DMake(51.500755, -0.124626);
[CMMapLauncher launchMapApp:CMMapAppCitymapper
            forDirectionsTo:[CMMapPoint mapPointWithName:@"Big Ben"
                                              coordinate:bigBen]];

CMMapLauncher currently knows how to show directions in the following mapping apps:

  • Apple Maps —
    CMMapAppAppleMaps
  • Citymapper —
    CMMapAppCitymapper
  • Google Maps —
    CMMapAppGoogleMaps
  • Navigon —
    CMMapAppNavigon
  • The Transit App —
    CMMapAppTheTransitApp
  • Waze —
    CMMapAppWaze
  • Yandex Navigator —
    CMMapAppYandex

If you know of other direction-providing apps that expose a URL scheme for launching from other apps, this project wants to incorporate them! Pull requests and issues providing URL schemes are encouraged.

CMMapLauncher was originally created by Citymapper, but is released under the MIT License for the benefit of the iOS developer community.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.