Latest 1.3.5
License MIT
Platforms ios 8.0
Dependencies GoogleMaps
Frameworks Foundation


Direction for Google Map for iOS SDK

It is a library that makes it easy to conduct route search with the Google map SDK for iOS.
When creating an instance, you can display the route by passing the latitude and longitude of the departure point, the latitude and longitude of the arrival point as an argument, and calling the instance method.

Use it

Via SSH: For those who plan on regularly making direct commits, cloning over SSH may provide a better experience (which requires uploading SSH keys to GitHub):

$ git clone [email protected]:keisukeYamagishi/Direction.git

Via https: For those checking out sources as read-only, HTTPS works best:

$ git clone

Easy start

default map line width 0.6f
default map color blue

recommended Color library

A library that can convert recommended hexadecimal numbers to colors


get route!!!!



CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate GMSDirection into your Xcode project using CocoaPods, specify it in your Podfile:

vi ./Podfile

If you do not have the google map SDK for iOS

target 'Target Name' do
  pod 'Direction'
  # google map SDK for iOS
  pod 'GoogleMaps'
  pod 'GooglePlaces'

Then, run the following command:

$ pod setup
$ pod install


params result type
from start location String or CLLocationCoordinate2D
to end location String or CLLocationCoordinate2D
alternative multiple route Bool default false
mode route type DirectionType walking driving bicycling

Sample Code

let direction = Direction(from:"35.6775602107869,139.692658446729",to: "35.707848364433,139.701456092298",mode: .walking)
direction.directionCompletion(handler: { (route) in

    for route in route.routes {
        self.mapView.addDirection(path: (route?.overview_polyline?.points)!)

}) { (error) in
    print (error)

too easy!!

Please pass the first position and the goal of the position as parameter

get route



When the status code is 200 and data can be acquired, but there is API key or parameter problem and route can not be acquired


If a status code other than 200 returns, it will give an HTTPURLResponse Http response code and return an error.


Unknow Error

Latest podspec

    "name": "Direction",
    "version": "1.3.5",
    "summary": "Easy route search",
    "description": "Direction for Google Map for iOS SDK",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "keisuke": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.3.5"
    "platforms": {
        "ios": "8.0"
    "swift_versions": "5.0",
    "source_files": [
    "static_framework": true,
    "dependencies": {
        "GoogleMaps": []
    "frameworks": "Foundation",
    "swift_version": "5.0"

Pin It on Pinterest

Share This