Right now, I have code that allows the user to indicate on a map, which contains a Network Dataset layer, stops that are needed to create a route. I need to add functionality to the interface that allows the user to also create barriers as well as stops.
The way this is normally done in ArcMap is as follows:
- Create the route layer by clicking on Network Analyst and New Route
- Make the Network Analyst window visible
- Highlight the Restriction layer inside the Line Barriers layer
- Click on the button for Create Network Location Tool
- Draw the barrier on the map.
I already have implemented the ability to create stops by using ControlsNetworkAnalystCreateLocationToolClass()
.
My question is, how can I also implement the capability of creating barriers as well as stops into my code?