title: Draw polyline MapBox, iOS
body: <p>I'm creating a simple app with routes using Mapbox iOS SDK and trying to find out how to draw a polyline without geojson.
  First of all I tried to get the route with this method:</p>
  
  <pre><code> func getRoute(directionsRequest: MBDirectionsRequest){
  
      let directionsRequest = MBDirectionsRequest(sourceCoordinate: pointOne.coordinate, destinationCoordinate: pointTwo.coordinate)
      directionsRequest.transportType = .Automobile
  
      let directions = MBDirections(request: directionsRequest, accessToken: "pk.eyJ1IjoidXJiaWNhIiwiYSI6ImNpb2xkNndvMjAwMW13cW1ibmY4Z2t3NHcifQ.3wadKQBcytWcJVY1eUSVWQ")
  
  
      directions.calculateDirectionsWithCompletionHandler({ (response: MBDirectionsResponse?, error: NSError?) -&gt; Void in
  
          if error != nil {
              print(error)
          } else {
              self.myRoute = response?.routes.last
              print(self.myRoute?.destination.coordinate)
              self.drawRoute(self.myRoute!)
          }
  
      })
  }
  </code></pre>
  
  <p>And after that tried to draw a route, but it doesn't work.</p>
  
  <pre><code>func drawRoute(myRoute: MBRoute){
      let waypoints = myRoute.waypoints
  
      var coordinates: [CLLocationCoordinate2D] = []
  
      for point in waypoints {
  
          let coordinate = CLLocationCoordinate2DMake(point.coordinate.latitude, point.coordinate.longitude)
          coordinates.append(coordinate)
      }
  
      let line = MGLPolyline(coordinates: &amp;coordinates, count: UInt(coordinates.count))
  
      dispatch_async(dispatch_get_main_queue(), {
          [unowned self] in
          self.mapView.addAnnotation(line)
          print(line)
      })
  }
  </code></pre>