Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source iOS Library Providing A Nice Way Of Interfacing With Mapping Apps For Directions

  •  
  •  
  •  
  •  
  •  

Late last year I mentioned a library called MWOpenInKit allowing you to provide the user a selection of different apps when opening multiple apps are available to perform a task such as opening Google Maps instead of Apple Maps.

Here’s a library that allows you to very easily show directions within many popular map apps called CMMapLauncher from Citymapper.

CMMapLauncher provides a simple syntax for detecting whether a directions app is installed, and setting up those directions.

Here’s an example from the readme showing how to detect if the Citymapper app is installed:

BOOL installed = [CMMapLauncher isMapAppInstalled:CMMapAppCitymapper];

and an example showing how to launch directions within the Citymapper app:

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

The apps supported by CMMapLauncher include: Apple Maps, Google Maps, Citymapper, Navigon, The Transit App, Waze and Yandex Navigator.

You can find CMMapLauncher on Github here.

A great tool for avoiding the need to set up different URL schemes and providing the user more options when providing directions.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments