Put Stop identity in directions (instead of calling it location1)

1352
2
10-16-2012 01:34 AM
Highlighted
New Contributor III
Hello,

I built a network dataset and am using it in a WPF application through arcgis server. I have a Directions window that lists the directions for driving through the route that was calculated.

My problem is:
The directions refer to the stops as "location1", "location2" and so on. I saw in the online API that the stops are referred to as the addresses themselves (Look in the the attachment - underlined in red). How can I mimic this?

Thanks.
Tags (2)
Reply
0 Kudos
2 Replies
Highlighted
Regular Contributor III
Hi, when you add locations to the Stops sublayer of the Route layer, you can specify which value/field will be used for the Name. The Name field is used then in the Directions window (of course you can choose what field to use in the Directions).

I believe there should be an individual property for the Stops class where you can programmatically add the value user entered (and the one that is used for geocoding).

Stops properties from the Network Analyst help.
Reply
0 Kudos
Highlighted
New Contributor III
Thanks,  tereshenkov. Here is the code I used in the end:

GraphicsLayer stopsGraphicsLayer = myMap.Layers["myStops"] as GraphicsLayer;
Graphic stop = new Graphic() [Geometry = e.MapPoint };
ESRI.ArcGIS.Client.Geometry.Geometry whats = stop.Geometry;
Reply
0 Kudos