AnsweredAssumed Answered

travel mode as a param of routeTask.solveWithParameters?

Question asked by danieltoptal on May 11, 2016
Latest reply on May 13, 2016 by danieltoptal

Guys, I'm trying to get travel time from the iOS SDK, but a parameter for that doesn't seem to exist just like the one we have at the JS SDK.

 

I'm using this code to solve the Route:

 

       if self.routeTask == nil {

            self.routeTask = AGSRouteTask.routeTaskWithURL(NSURL(string: "http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World"), credential: cred) as! AGSRouteTask

             self.routeTask.delegate = self

        }

        let params = AGSRouteTaskParameters()

        let firstStop = AGSStopGraphic(geometry: myLocation, symbol: nil, attributes: nil)

        let lastStop = AGSStopGraphic(geometry: destination, symbol: nil, attributes: nil)

        params.setStopsWithFeatures([firstStop, lastStop])

        params.returnRouteGraphics = true

        params.returnDirections = true

        params.findBestSequence = false

        params.preserveFirstStop = true

        params.preserveLastStop = true

        params.outSpatialReference = self.mapView.spatialReference

        params.ignoreInvalidLocations = false

        self.routeTask.solveWithParameters(params)

 

 

Can you guys help me how to achieve that here? I didn't find anything at the documentation!

 

Thanks a lot!

Outcomes