How to use
See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample.
Data has been provided for your use with this sample. It can be found at
<Your ArcGIS Developer Kit Install directory>/Samples/data/SanFranciscoNetwork.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders.
However, you will need to update the sample to point to the location of the data once you have extracted all the files.
- Click the different tabs to get the solver results according to your NAServerRouteParams.
- Publish a network analysis service (see the following section).
- Open the solution file in Visual Studio.
- In the Solution Explorer, right-click References and choose Add Web Reference.
- Type the uniform resource location (URL), http://localhost/arcgis/services/SanFrancisco/MapServer/NAServer?wsdl (change localhost if the ArcGIS server is on a different machine), then click Go.
- In the Web Reference Name control, type the name WebService.
- Click Add Reference.
- Save the solution.
- Build and run the project.
- Choose the route solver options.
- Click the Find Route button.
- Click the different tabs to get the solver results according to your NAServerRouteParams.
Publish a network analysis service
- Start ArcCatalog.
- Browse to <Your ArcGIS Developer Kit install folder>\samples\data\SanFrancisco.
- Right-click SanFrancisco.mxd and click Publish to ArcGIS Server.
- Type SanFrancisco as the service name and click Next.
- Ensure Network Analysis is selected and click Next.
- Click Finish.
- Exit ArcCatalog.
Route_WebServiceClass.cs | Code for the main form. |
Route_WebServiceClass.vb | Code for the main form. |
Download the files for all languages
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine Runtime: Network |
ArcView: Network Analyst | ArcView: Network Analyst |
ArcEditor: Network Analyst | ArcEditor: Network Analyst |
ArcInfo: Network Analyst | ArcInfo: Network Analyst |