                 }
             }
             if CLLocationCoordinate2DIsValid(toDirection.location.coordinate) {
-                params.add(NSString(format: "endcoord=%f,%f", toDirection.location.coordinate.latitude, toDirection.location.coordinate.longitude))
+                params.add(NSString(format: "endcoord=%f,%f",
+                                    toDirection.location.coordinate.latitude,
+                                    toDirection.location.coordinate.longitude))
                 if !toDirection.name.isEmpty {
                     params.add(NSString(format: "endname=%@", urlEncode(toDirection.name as NSString)))
                 }

                               toDirection.name) as String
            }
        case .google:
            url = NSString(format: "comgooglemaps://?saddr=%@&daddr=%@", googleMapsString(fromDirections), googleMapsString(toDirection)) as String
        case .yandex:
            url = NSString(format: "yandexnavi://build_route_on_map?lat_to=%f&lon_to=%f&lat_from=%f&lon_from=%f",
                toDirection.location.coordinate.latitude, toDirection.location.coordinate.longitude, fromDirections.location.coordinate.latitude, fromDirections.location.coordinate.longitude) as String
        case .citymapper:
            let params: NSMutableArray! = NSMutableArray(capacity: 10)
            if CLLocationCoordinate2DIsValid(fromDirections.location.coordinate) {
                params.add(NSString(format: "startcoord=%f,%f", fromDirections.location.coordinate.latitude, fromDirections.location.coordinate.longitude))
                if !fromDirections.name.isEmpty {
                    params.add(NSString(format: "startname=%@", urlEncode(fromDirections.name as NSString)))
                }

        
        if !mapPoint.name.isEmpty {
            let encodedName = mapPoint.name.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)
            return NSString(format: "%f,%f+(%@)",
                            mapPoint.location.coordinate.latitude,
                            mapPoint.location.coordinate.longitude,
                            encodedName!)
        }
        
        return NSString(format: "%f,%f",
                        mapPoint.location.coordinate.latitude,
                        mapPoint.location.coordinate.longitude)
    }
    
    /**
