MapLauncher 0.1.1

MapLauncher 0.1.1

Maintained by Dmytro Romanov.



  • By
  • Dmitriy Romanov

MapLauncher

Version License Platform

The library allows in the simplest way to add "Route to any location" functionality to your app. By calling the only one method the library attempt to present an ActionSheet with all supported and installed navigation app on the device.

For now, supporting: Apple Maps, Google Maps, Waze and Yandex.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

MapLauncher is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MapLauncher'

Usage

Add to your project Info.plist next key-value pair:

...
<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>waze</string>
		<string>comgooglemaps</string>
		<string>yandexnavi</string>
		<string>mapsme</string>
	</array>
...

In a place where you are going to implement the functionality you need to import the library:

import MapLauncher

And call ActionSheet next way:

...
// Desired destination coordinates
let placeLocation = CLLocationCoordinate2D(latitude: 50.4536, longitude: 30.5164)

// Presenting navigation apps ActionSheet
MapLauncher().present(destination: placeLocation, on: self)
...

Author

Dmitriy Romanov, [email protected]

License

MapLauncher is available under the MIT license. See the LICENSE file for more info.