There are several steps to this if you don't have any map layers defined yet. The classes you'll need are documented here. Your map view (AGSMapView
) needs to have a graphics layer (AGSGraphicsLayer
). You can add AGSGeometry
objects to the graphics layer, such as a AGSSimpleLineGeomtry
. You set the geometry of the AGSSimpleLineGeometry
object from the AGSPolyline
object which defines its geometry. Something like this:
Use the
AGSPolyline
class to define the geometry (AGSPolyline
is a subclass ofAGSGeometry
).Create an
AGSGraphic
object and set its geometry property to the polyline geometry created first. Use you can use one of the subclasses ofAGSGraphic
such asAGSSimpleLineGeometry
.Add the
AGSGraphic
object to anAGSGraphicsLayer
, which has been added to your map (AGSMapView
is aUIView
subclass)