0% found this document useful (0 votes)
47 views29 pages

Customizing Arcgis - Naserver - Routing - Vbnet: Preparing Your Data For Network Analysis Routing With Arcgis Server

1) The document provides instructions for customizing an ArcGIS Network Analyst routing web application written in VB.Net. 2) It describes how to prepare network dataset routing data, publish map and locator services, and configure the web application to use these services. 3) Key steps include editing code files to reference the correct services, setting the start page and debugging errors.

Uploaded by

kselvaa1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views29 pages

Customizing Arcgis - Naserver - Routing - Vbnet: Preparing Your Data For Network Analysis Routing With Arcgis Server

1) The document provides instructions for customizing an ArcGIS Network Analyst routing web application written in VB.Net. 2) It describes how to prepare network dataset routing data, publish map and locator services, and configure the web application to use these services. 3) Key steps include editing code files to reference the correct services, setting the start page and debugging errors.

Uploaded by

kselvaa1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Customizing ArcGIS_NAServer_Routing_VBNet

Preparing your Data for Network Analysis Routing with ArcGIS


Server:

Creating Needed Services for ArcGIS_NAServer_Routing_VBNet


web application

Here is default web application:

If you are following “ArcGIS Server - Authoring with ArcGIS Desktop &
Publishing with ArcCatalog”, First you will need to create a
administrative connection in ArcCatalog,

-First you’ll have to create an administrative connection.

1)    Start Open    by clicking on Start menu

> >    >


.
2)    In the Catalog tree, expand the GIS Servers folder.
 
ArcCatalog allows you to establish connections to GIS Servers

 
3)    Double-click  – you will establish an
administrative connection since you will be publishing and
administering GIS Services.

4)    On the first panel of the Add ArcGIS Server wizard,


choose the option to
(as opposed to using them).

5)    Click
6)    In the Server URL field, enter your server’s URL (Kurt
provided).

GIS4 Server:
http://gis.sarup.uwm.edu/arcgisuwm/services
Campus Server:
     http://webgis.uwm.edu/arcgisuwm/services
 
7)    Click to create the connection to your GIS Server.

Publishing your map service

you need to locate your “mxd” in ArcCatalog. You want to select and
right click the “mxd” file

Choose and setup your map service with Map


service name.
Click

You will need to check box as seen above, it should be


already checked.

Click
Click

Create a web service for the address locator

If you want more information about address locators tasks, please


read “Address Locator Task and Query for Parcels”

In Catalog tree, right click on the address locator and select


Click

Put the service in the root folder.


Click

You will locate the ArcGIS_NAServer_Routing_VBNet web application


here:
M:\ArcGISServer\Data\studentlabData\Web_Applications\ArcGIS_NAS
erver_RoutingVBNet.zip, you will have to extract the web application
to your desktop.

 Locate the “ArcGIS_NAServer_RoutingVBNet.zip” in the directory


“M:\ArcGISServer\Data\studentlabData\Web_Applications\”

Copy “ArcGIS_NAServer_RoutingVBNet.zip” to your desktop computer.

You want to Extract files in the “ArcGIS_NAServer_RoutingVBNet.zip”.


Right click “ArcGIS_NAServer_RoutingVBNet.zip” and Choose
.

Click
Click
Click

Locate the folder name “ArcGIS_NAServer_RoutingVB”

Right Click “ArcGIS_NAServer_RoutingVB” and choose .


Rename the project folder to something that is related to your project.

In this example, we are going to use .

Important: Rename “ArcGIS_NAServer_RoutingVB” folder to


something appropriate for your project.
Select folder

Choose

You must copy folder to “M:\ArcGISServerWebs”


on the server.

Select
And Choose .

Locate folder located in the


“M:\ArcGISServerWebs\”

Using Notepad, open the new folder and select


“ArcGIS_NAServer_Routing_VBNet.sln” file.

In the top menu, click “Edit”, “Replace”:


In the “Find what:” box, enter “ArcGIS_NAServer_Routing_VBNet”

Put the name of your new folder in the “Replace with:” box and click
“Replace All”:
In this example, we are using “YourProjectName”

Click

Next you want to another for “localhost” in the


“ArcGIS_NAServer_Routing_VBNet.sln” file.

In the top menu, click “Edit”, “Replace”:


If you are using the GIS4 Server:

If you are using the Campus Server:


Click

Save the file. .

Very important step: Send an email to Kurt asking him to activate


your web application and create a web.config identity for your new
site (be sure to include the name of your new folder).

Please include location of web application. In this example, we would


include the email the location:
M:\ArcGISServerWebs\YourProjectName.

Wait for your Confirmation email from Kurt to proceed with web
application development.

Start Open    by clicking on Start

menu >
>   .

Choose File >

Select

Locate your project folder, in this example we are using


“YourProjectName”
Your Project foler will located under “M:\ArcGISServerWebs”

Click .

Note: If you have errors opening or previewing the project, it will have
to do with errors in the “ArcGIS_NAServer_Routing_VBNet.sln” file or
“web.config” file.

In the Solution Explorer – you should see these files.

In the Solution Explorer - If you expand the files you should see these
files:
Select and Double Click “Default.aspx”,
In the top menu, select  “ “ > select and choose “
” > select and choose .

Choose
In the “Find what:” box, put SanFrancisco:

Choose

In the “Replace with:” box, put your map service name. Click “Replace
All”. Save the file.
In this example, we using the map service called “eastsidebikeroutes”

Line 168 of “Default.aspx” should be updated

Close Find and Replace

Save Changes

Select and double click “Default.aspx.vb”.

Locate line 32 from the top you will see a line that says:

Private Const ROUTE_SERVICE_NAME As String =


"SanFrancisco"

Replace “SanFrancisco” with the name of your map service.

In this example, we using the “ROUTE_SERVICE_NAME” called


“eastsidebikeroutes”
Locate line 33:

Private Const LOCATOR_SERVICE_NAME As String =


"SanFranciscoLocator"

Replace “SanFranciscoLocator” with the name of your address locator


service.

In this example, we using the “LOCATOR_SERVICE_NAME” called


“eastsidebikeroutes2_Locator”

Save the file .

select and double click “Default_Static.aspx.vb”. Repeat the operation


of changing “ROUTE_SERVICE_NAME” and
“LOCATOR_SERVICE_NAME”.

In our example, the “Default_Static.aspx.vb changes will look like:

Save the file .

10. In Visual Web Developer, select and double click Default.aspx,


comment out any portion of the address input form that isn’t relevant
to your address locator. Change the default information to something
appropriate for your data. Don’t forget to change both the from and to
addresses:

In our example, located line 32 in “Default.aspx” file.

You want to type “<!—“


Locate Line 55 in “Default.aspx” file.

You want to type “”

Locate Line 72 in “Default.aspx” file.

You want to type “<!—“

Locate Line 72 in “Default.aspx” file.

You want to type “”

Locate line 29, and change “925 Jackson Street” to “2843 N Frederick Ave”

After adjustment:

Locate line 68, and change “213 Wilshire Avenue” to “2020 N Prospect Ave”

After adjustment:

Save Changes

Set “Default.aspx” as Start page


Need to set Start Options:

Right click the M:\ArcGISServerWebs\YourProjectName in the Solution


Explorer

Choose
Focus on Server section of Menu:

Select

If you are using the GIS4 Server:


You must include the project folder name

If you are using the Campus Server:

You must include the project folder name


Click

View your Changes in Browser:

Below is how the “ArcGIS_NAServer_Routing_VBNet” look before edits


were made in the example.
You can add a “Last Extent” tool to the Eastside Bike Router. You can
find this tool and other tools at: ESRI Support Arcscripts for ArcGIS
Server:

http://arcscripts.esri.com/details.asp?dbid=15254

Just follow the instructions To add “Last Extent” tool button to an


existing web application. (Hint: You'll probably need to increase the
width of your tool bar to see the tool once it's installed.)

You might also like