Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Trying to do routing with ARCGIS SDK for ios.I have a AGSPoint with me as

  AGSSpatialReference *sr = [AGSSpatialReference spatialReferenceWithWKID:102100];
  AGSPoint *myMarkerPoint =[AGSPoint pointWithX:-13626235.170442 
                                             y:4549170.396625 spatialReference:sr];

I have to make AGSStopGraphic with respect to this point ,How it can be done?This is something basic ,But don't know how to do it.

And how to do routing with this?Is there a better approch

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
319 views
Welcome To Ask or Share your Answers For Others

1 Answer

You need to create an AGStopGraphic using the AGSPoint. Your myMarkerPoint is a geometry that defines the location. Something like this:

AGSPictureMarkerSymbol* destSymbol  = [AGSPictureMarkerSymbol pictureMarkerSymbolWithImage:[UIImage imageNamed:@"RedPin.png"]];

AGSStopGraphic* stop = [AGSStopGraphic graphicWithGeometry:myMarkerPoint
                                                    symbol:destSymbol
                                                attributes:{@"Destination" : @"Name"}];

To do the routing request, you need to start with an AGSRouteTaskParameters object and add the stops to it (along with all the other parameters) using the setStopsWithFeatures: method. Then using your AGSRouteTask object, call the method solveWithParameters: and pass it the route task parameters.

According to the AGSRouteTask documentation there is a Routing sample app that you can look at.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...