Skip to main content

Campus Support for ArcGIS, ArcIMS, ArcSDE and Map Mashups

Go Search
Home
  

Help you locate How-To's and Recouses for ArcGIS Server, ArcIMS, ArcSDE and Map Mashups.
ArcGIS Server Labs
 
 
+++++++++++++++++++++++++++++++++++++++
Working with your Map Service
+++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++
Network Analyst Rounting
+++++++++++++++++++++++++++++++++++++++
 
 
 
+++++++++++++++++++++++++++++++++++++++
Customizing ArcGIS Website applications 
+++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++
Custom DLL and Custom Tasks for ArcGIS Server
++++++++++++++++++++++++++++++++++++++++
  1. "Custom Print" is an available task item in ArcGIS Manager for GIS and Campus Server.(http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/samples/Web_Applications/Common_PrintTask/18425b7d-4b61-4d87-b2d2-4919b29c78f4.htm) - it can be added and configured during creating your web application. 
 
 
 
3 Main Steps to Publishing a Map on the Web Using ArcGIS Server Manager
As you remember from lecture, there are 3 main steps to publishing a map on the web using ArcGIS Server:

1.    Author content for a GIS Service

2.    Publish GIS Service and

3.    Create a Web Mapping Application for consumption.

Note: you will need to read "What You Need to do Before You Work with ArcGIS Server" before starting the lab section.

AUTHOR

1)    Open   by clicking on Start menu > >   > .

2)    Add datasets from M: drive (M:\ArcGISSERVER\Data\YourLogin), for example, streets.


Click



Click  to add the M: Drive Connection







Click

Note: GISDAY 2009 look for data in M:\ArcGISServer\Data\user##\GISDay\



Click

3)    Modify symbology

4)    When finished modifying the symbology, from your File menu, choose Save As.

     

5)    On the Save As dialog box, click the Save in down arrow and navigate to the M drive: (M:\ArcGISSERVER \MXD\Yourlogin).
Note: Save your GISDAY 2009 mxd in M:\ArcGISServer\mxd\user##\

6)    In the File name field, type MKE_[Your initials].mxd

7)    Click

8)    Close ArcMap

II. PUBLISH

Publish a map service using ArcGIS Server Manager.  In this exercise you will publish a service again – using the same MXD but with a different service name (e.g. yourname2Service).  This will give you experience creating a service in both tools (ArcCatalog and ArcGIS Server Manager).

1)    Start ArcGIS Server Manager
GIS4 Server:
http://gis.sarup.uwm.edu/ArcGISUWM/Manager/login.aspx
UWM Campus Server:
http://webgis.uwm.edu/ArcGISUWM/Manager/login.aspx

2)    Login with 'ad\yourUWMlogin' and password

3)    Click

4)    Click the tab at the TOP of the page or Click  on the ArcGIS manager.

Notice your previous service (and anyone else who already published theirs) is displayed in ArcGIS Server Manger.

5)    At the top of the Services panel, click .   

The wizard will open a Web version of the Publish to ArcGIS Server wizard that you used in ArcCatalog

6)    On the first panel of the Publish GIS Resource wizard, click the folder icon and navigate to the \ \GIS to your "MXD" folder.

Click

Click

Click

Locate and Click folder.

7)    Select your MXD document.

Click

8)    In the Name field, name the service yourname2Service_[Your initials]

9) Chose the option to publish the service to an existing folder,
If you need to choose existing folder like "GISDAY" from the drop-down list.

 

10) Click

11) On the next panel, keep the default capabilities checked (Mapping Only).

12) Click

13) On the final panel, click to publish the yourname2Service map service.

14) On the Services tab of ArcGIS Server Manager, expand your service you created.

You should see a thumbnail preview and properties of each service. 

15) Try starting and stopping your services: check the check box next to the service(s) you wish to start or stop and click Start or Stop.

16) When you are finished, leave your services running.

CREATE WEB Mapping Application

1)    At the top of the ArcGIS Server Manager window, click the tab or the.

2)    Click Create to begin creating a new web appilcation.

3)    On the first panel of the wizard, in the Host field, accept the default (which is the name of your machine).

Click

For GIS4 Server:

For Campus Server

4)    Specify the following name and description for the new application:

a.    Name: Your Name Web App (spaces ok)

b.    Description: [enter any description you'd like]

5)    Click

Click

For GIS4 Server

Select

Campus Server

Select http://webgis/arcgisuwm/services

6) Select your MAP SERVICE, and then click Add to add it to the Selected Services list.

Locate and select your map service:

Click


Select and click your current layers to verify the layers

7) Click

     

GIS4 Note: The next panel prompts you for the tasks that you wish to include in the new application.  Many of these tasks require a supporting GIS service.  For now you will not add any tasks, we will add them in the next 1-2 weeks.


8) Accept the default settings on this panel.
On the Enable Map Elements panel, keep all the elements selected.

14) Click

9) On the Set Page Properties panel, give a title and a theme for the application (you can accept the defaults or provide your own).

Click and you can choose new theme for your web application:

Select and click

 

10) Click

11) Turn off the Cache layer inforlmation for lab session.

Click

Cache Layer – or Map service cache coming later

The final panel shows a summary of your new Web mapping application.  Note your URL.

25) At the bottom of the panel, make sure that that View the Web application in a new browser window check box is checked.

26) Click to create the application.  Your application will start in a new window.


Explore the application

1)    Use the interactive navigation tools to zoom in and pan around a section of the map.

2)    Locate the Help link in the upper right of the application.

3)    Click the Help link and preview some of the help topics and links within the Help.

4)    Close the help window.

5)    Click the Identify tool, then click a feature in the map.

The results window expands in the left console.

6)    Expand the results listed in the Results window and examine the information returned.

7)    Experiment with the control for expanding or collapsing the Results window (the up or down facing small pyramid).

8)    Experiment with the control for docking or floating the Results window (by clicking on the double right arrows).

9)    Expand the Map Contents window if is not expanded.

10) Experiment with turning on/off layers.

11) Next, expand the Navigation window.

12) Position your mouse pointer over the north tip of the north arrow, then click and hold down your mouse button.

The map continuously pans north as long as you hold the mouse button down.

13) Use the control to pan in other directions.

14) Expand the Overview window.

15) Click the red rectangle in the Overview window and drag it to a new location.

16) When you are finished exploring your Web application, close the Web application window and the ArcGIS Server Manager window.

Please  of ArcGIS Server Manager!!!

GIS Day 2008
 
ArcGIS Server - Use the California Data
 
GIS Day 2008 Lab Session
 
 
ArcGIS Explorer
 
Tutorial Using ArcGIS Explorer - Using the California Map Service
GIS Day 2008 Lab Session

Creating a Connection to the ArcSDE Environment on ArcGIS Servers

Click

Next Click

UWM Campus Server:

Server: webgis.uwm.edu
Service: 5151
Database: sde

Select for Account

Click

You should see "Connection Succeeded"

Click

Click to complete Connection to ArcSDE Database.

Importing Data into ArcSDE – Import Datasets using the Feature Datasets or Raster Datasets Methed

In this example, you will be creating a Feature Dataset.

Right Click the Data connection like

 You have choose to next select

Type Name of Feature Dataset

 It is recommend that you use your login

Note: Any data that does not have login information or project name will be removed unless given an exemptions by the GIS Council for Campus Server or GIS4 instructors for GIS Server.

Click

Must set coordinate system

 You can choose one of three: Geographic Coordinate System, Project Coordinate System or Unknown.

 Or you can import the coordinate system using your data

Click - you will import coordinate system for this example.

Locate your data and choose a shape file

     

Let choose  

Click

 Coordinate system is set

Click

You can set Z coordinate system – if needed with your data

Click for our example

Click

Set the XY Tolerance

Click - you are going to stay with default for this example dataset.

Locate and click your

Right Click

   

Choose, and select

Click to import feature data – browse for data

Select for this example.

Click

You must choose Output Feature Class

Let type California for this example

Click

Click after the data has been successful import into ArcSDE database.

Working with ArcSDE Database Connection in ArcMAP

Start ArcMAP - Open   by clicking on Start menu > >   > .

Click and Choose .

If you need to create a database connection look at blog post: Creating a Connection to the ArcSDE Environment on ArcGIS Servers

Or Choose and Click for the Campus Server

Select the Data layers for your project.

Double Click

Select your Data

   

Click

Now – save your map.

Click

Choose the "mxd" directory location and save with "YourIntials_CAL.mxd"

PUBLISH

-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 (such as WMS, ArcIMS, or ArcGIS Servers).  Later we'll see how to setup the connections using ArcGIS Server Manager.

 

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

Campus Server:

     http://webgis.uwm.edu/arcgisuwm/services

   

7)    Click to create the connection to your GIS Server.

8)    Right-click the connection and choose Server Properties

GIS4 Server Connection:

UWM Campus Server Connection:

9)    Use the tabs on the ArcGIS Server Properties dialog box to explore the default settings for your GIS Server.

10) When you are finished, click  the ArcGIS Server Properties dialog box.

-Second, you will actually PUBLISH the service.  You will use the wizards in ArcCatalog to publish your map document.  It is simple to publish, start, or stop GIS Services using ArcCatalog.

11) In the Catalog tree, navigate to the M:\ArcGISSERVER \MXD folder and locate the .mxd you authored earlier.




Click  If you need to add the M: Drive Connection







Click



12) Right-click on the map document



and choose

13) On the first panel of the Publish to ArcGIS Server wizard, change the service name to yournameService

 


UWM Campus Server:

GIS Services names cannot contain a space.

   

14) On the same panel, choose the option .

15) In the Folder Name field, select GISDAY

16) Click

17) On the next panel, keep the default capabilities checked (Mapping Only).

18) Click .

19) On the final panel, click to publish your map service.

This is a quick and easy way to publish a GIS Service.  Properties can always be edited later.

Upon completing the wizard, you see the service listed under your server folder (in the GISDay folder that you specified).  You will now preview the service to verify that it is running as expected.

20) In the Catalog tree, expand the GISDAY folder under your GIS Server.

21) Click your service (yournameService)

22) On the right, click the Preview tab to view the map service.

23) Use some of the navigation tools of ArcCatalog (zoom in, zoom out, Pan, Identify).

24) Close ArcCatalog when finished.

You are now ready to Create a Web Application in ArcGIS Server Manager.

URL and Login into ArcGIS Server Manager:

1)    Start ArcGIS Server Manager
UWM Campus Server:
http://webgis.uwm.edu/ArcGISUWM/Manager/login.aspx

2)    Login with 'ad\yourUWMlogin' and password

3)    Click

Create Web Application

1)    At the top of the ArcGIS Server Manager window, click the tab or .

2)    At the top of the tab, click Create Web Application to begin creating a new .

3)    On the first panel of the wizard, in the Host field, accept the default (which is the name of your machine).

4)    Specify the following name and description for the new application:

a.    Name: Your Name Web App (spaces ok)

b.    Description: [enter any description you'd like]

5)    Click

   

In order to access the services you've created, you must establish a connection to the GIS Server.

   

Note: This step is done when you first use your ArcGIS server.

6)     Under the Available Services list box, click Add GIS Server.

7)    On the Add GIS Server dialog box that appears, choose to create an ArcGIS Server Internet connection.

8)    Type the URL for the GIS Server

9)    Click Add Server to create the connection.

   

The new connection appears in the Available Services list.  If you expand it, you will see the services you published earlier.

   

10) Expand the connection to your GIS Server.

GIS4 Server Connection:

UWM Campus Server Connections:

11) Select your MAP SERVICE, and then click Add to add it to the Selected Services list.

Click

12) Click

   

GIS4 Note: The next panel prompts you for the tasks that you wish to include in the new application.  Many of these tasks require a supporting GIS service.  For now you will not add any tasks, we will add them in the next 1-2 weeks.


13) Accept the default settings on this panel.

14) Click

15) On the Set Page Properties panel, give a title and a theme for the application (you can accept the defaults or provide your own).


16) Click

17) On the Enable Map Elements panel, keep all the elements selected.

18) Next to the Overview Map element, click .

19) On the Settings dialog box, click the Map Service down arrow and select your service as the map service to display in the overview map.

20) Click OK on the Settings dialog box.

21) Click next to the North Arrow element.

22) On the Settings dialog box, select a north arrow symbol.

23) Click OK on the Settings dialog box.

24) On the Enable Map Elements panel, click .

The final panel shows a summary of your new Web mapping application.  Note your URL.

25) At the bottom of the panel, make sure that that View the Web application in a new browser window check box is checked.

26) Click to create the application.  Your application will start in a new window.


Explore the application

1)    Use the interactive navigation tools to zoom in and pan around a section of the map.

2)    Locate the Help link in the upper right of the application.

3)    Click the Help link and preview some of the help topics and links within the Help.

4)    Close the help window.

5)    Click the Identify tool, and then click a feature in the map.

   

The results window expands in the left console.

   

6)    Expand the results listed in the Results window and examine the information returned.

7)    Experiment with the control for expanding or collapsing the Results window (the up or down facing small pyramid).

8)    Experiment with the control for docking or floating the Results window (by clicking on the double right arrows).

9)    Expand the Map Contents window if is not expanded.

10) Experiment with turning on/off layers.

11) Next, expand the Navigation window.

12) Position your mouse pointer over the north tip of the north arrow, then click and hold down your mouse button.

   

The map continuously pans north as long as you hold the mouse button down.

   

13) Use the control to pan in other directions.

14) Expand the Overview window.

15) Click the red rectangle in the Overview window and drag it to a new location.

16) When you are finished exploring your Web application, close the Web application window and the ArcGIS Server Manager window.

Please  of ArcGIS Server Manager!!!

Easy Ways to Change the Look of Your ArcGIS Map Application

You may want to read "Locating your ArcGIS Web Application, Understanding the File Structure of ArcGIS Server Web Application", before starting to changing the look of your web application.

You may to look at: Adding Maptips to an ArcGIS Application Website, it will help you setting up your development enviroment in Visual Studio or Visual Studio Express.

Method 1. Remove all ESRI banners and pictures:

This method removes all background formats (so you'll have to supply your own).

Simply open the Web.Config file in your web application folder with Notepad (or Visual Studio or Frontpage) and comment out the line that begins:

 

 

<pages theme="<customization folder>"/>

So that it looks something like this:

<!-- <pages theme="<customization folder>"/> -->

 

where <customization folder> is the name of the folder in App_Themes that is currently being used to set the customizations to the web site.

 

 

Now use Visual Studio to edit the default.aspx file to give the look you want.

Method 2. Substitute your own banners and pictures for ESRI's.

Open the Web.Config file in your web application folder with Notepad (or Visual Studio or Frontpage) and find the line that begins:

<pages theme="<customization folder>"/>

This line contains the name of the folder in App_Themes that has the ESRI banners and pictures used in your application. Open this folder and substitute your own pictures for the ones in the images folder inside it. You'll have to rename pictures so that they match the names of the original pictures. If your pictures are in a different format (size and file type) you'll need to change them in Adobe Photoshop to match the originals.

 

Do not comment out <pages theme="…

You can change other defaults on the page like fonts and colors by editing the Default.skin file also in the customization folder. You can see an example of the many things one can easily customize using this method:

Running Example:

http://gis.sarup.uwm.edu/witebsky_geoprocessing_test_site

Download Web Application Code

You can continue with Customizing the Web Mapping Application - Using Visual Studio for additinal tips.

Adding Maptips to an ArcGIS Application Website


Note: Requirements for Customizing ArcGIS Web Applications – the workstation will need to have ArcGIS Server Web ADF Runtime for the Microsoft .Net Framework installed. If you are in SARUP computer labs, there are selected workstations setups for ArcGIS Server development. Please read: "
ArcGIS Server – Custom Web Applications", if you are locate at another location at UW-Milwaukee.

The MapTips control enables an associated Map control to display attributes of a feature when a user hovers over a map feature. A MapTips control is associated with a single Map control via the Map property. The properties of the MapTips control determine what layer is displayed with maptips, as well as how information about features is displayed to the user.

The MapTips control supports only point layer types and a map resource must return feature geometry.  MapTips are supported with ArcGIS Server, ArcIMS map services.  MapTips can be utilized programmatically with Web ADF Graphics data sources.  

Assembly: ESRI.ArcGIS.ADF.Web.UI.WebControls.dll
Class: ESRI.ArcGIS.ADF.Web.UI.WebControls.MapTips
JavaScript libraries: display_common.js, display_dotnetadf.js, display_maptips.js

  1. Open Visual Studio or Visual Web Developer 2005 Express Edition (Express).
  2. Open your Web Mapping Application.

    Visual Studio: Click File | Open | Web site
    Express: Click File | Open Web site
  3. In the left panel, click File System if it is not already selected.

  4. Select your application from the list and click .
  5. After the application opens, double click Default.aspx in Solution Explorer located in the upper right of the IDE. Default.aspx is the main Web page that shows the layout of the application either graphically or in HTML.
  6. By default, the page opens in Source mode, which shows the HTML source. In the lower left area of the IDE, click on the Design tab to switch to Design mode.

Accessing the Properties dialog

You can access Web control properties in the Property dialog one of two ways:

  1. Click on a Web control.

  2. Pick the Web control from the dropdown list in the Properties dialog box.

Adding tools to the toolbox when using Express

When you open Express the first time, the ESRI Web controls may not be included in the toolbox, and you must manually add them. You only need to do this procedure once.

  1. Expand the Toolbox if it is not already opened.

  2. Right click below the General tab, and select Add Tab.

  3. Type in a name for the tab such as ESRI. The Web ADF controls will be placed under this tab.
  4. Right click below the new tab, and select Choose Items.

  5. In the dialog that appears,

    click . Note: the dialog may take some time to appear.
  6. Navigate to C:\Program Files\ArcGIS\DotNet.
  7. Select ESRI.ArcGIS.ADF.Web.UI.WebControls.dll, and

    click .
  8. Check everything in the ESRI.ArcGIS.ADF.Web.UI.WebControls namespace, which will likely be highlighted by default. You can sort the namespaces alphabetically by clicking on the Namespace tab.
  9. Click . The Web controls are added to the toolbox.

Working with Maptips

If the website application was created using Manager, the MapTips control already exists on Default.aspx. Scroll around on the page until you find it.

Black arrow points to MapTips Control that you need to select.

  1. Set MapTips properties

    1. Select the MapTips control.  In the Properties page:

    2. Set the Map property to the name of the Map control if not already set. 

    3. Set the Layer property to the map layer to use for maptips.



    To do this, click inside the value area of the Layer property (found under the MapTips section of the MapTips1 properties), then click the ellipsis ().



    This brings up the Map Tips Layer Editor dialog.

    You can also access this dialog from the MapTips control on the page, by clicking the arrow in the upper right of the control, and choosing Set Layer. In this dialog, set the Resource Manager to the one you added earlier. Then set the Resource to a resource added in the Resource Manager. Finally, set the Layer to one of the available layers. Only point feature layers will be available for maptips.



    Click to close the dialog and set the Layer property.

    1. The HeaderFormatString property sets the field(s) that pop up when the user hovers over the feature.

      To set the HeaderFormatString, click in its value in the Properties dialog, then click the ellipsis .






      Click



      The BodyFormatString sets the field(s) that display when the user clicks on the maptip to expand it.

      To set the BodyFormatString, click in its value in the Properties dialog, then click the ellipsis .

      This displays the Map Tips Expression Editor. You can also bring up these dialogs by clicking the arrow on the upper right of the MapTips control.

      In the Map Tips Expression Editor, add the fields you want to display in the header or body of the maptip. For example, say you had a Cities layer with fields that included Name, Population, Capital and URL. You might want to display the Name field in the header, and display the other fields in the body. The body fields only display if the user clicks on the maptip.

      You can add formatting and hyperlink information to the maptip body or header. In the example shown, where we are editing the BodyFormatString, we add some explanatory text for Population and Capital fields. We also create a hyperlink with the URL field. Fields must be enclosed in curly braces {} in order to substitute the actual field value. Use the Insert Field drop-down list and Insert button to add available fields. All other text in the editor is displayed the same as entered for all maptips.



      To add a hyperlink, you may use the Insert Link button to bring up the Map Tips Link Editor. This allows choosing a field for the link text and for the URL. You may also enter static text to be used for all links for either link text or URL. Once you have set the link options, click OK to close the dialog and insert the link into the expression editor.



      After setting the expression editor to the text and fields you want, click to close the dialog.

    2. Additional properties can be configured to change how the maptips behave at runtime.  See the Properties section below for information on property settings.
        

Members

Properties

The following table provides a list of properties of interest.  For complete reference information, see the MapTips control in the library reference section.

Property Name 

Type

Description

BodyFormatString

string

Field(s) and text displayed when user clicks on the maptip.  Note, the use of double-quotes is not permitted. 

ClickImage

string

Image displayed at the maptip location when user clicks on the maptip.  

CloseButtonImage

string

Image displayed on right side of maptip header after the user clicks on the maptip, and which closes the maptip when clicked.

DefaultImage

string

Image displayed when a maptip first displays and is not selected.    

FeatureLimit

int

Maximum number of maptips displayed on the Map at a given time.

HeaderFormatString

string

Field(s) and text displayed when user hovers over the maptip.  Note, the use of double-quotes is not permitted. 

HoverImage

string

Image displayed at the maptip location when a user hovers over it.

Layer

string

Layer, along with MapResourceManager and Resource for which maptips are displayed.

Map

string

ID of the Map control in which the map tips are displayed.

ShowOnlyWhenLayerIsVisible

bool

Whether to display maptips only when the layer is visible, and not when the layer is turned off or invisible due to scale factor settings.

WhereClause

string

Displays maptips only for features matching the expression.


Discussion

 

Preview Changes to the default.aspx for MapTips:

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:

http://gis.sarup.uwm.edu

You must include the project folder name

If you are using the Campus Server:

http://webgis.uwm.edu

You must include the project folder name

 

Click

View your Changes in Browser:

 

Customizing "ArcGIS_NAServer_Routing_VBNet" ArcGIS web Application

Please read: 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_NAServer_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:

http://gis.sarup.uwm.edu

You must include the project folder name

 

If you are using the Campus Server:

http://webgis.uwm.edu

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 Serverer:

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.)

To add “Last Extent” tool button to an existing ArcGIS web application

ArcGIS Server 9.2 only

Note: this example will be using the web application that was started in Customizing ArcGIS_NAServer_Routing_VBNet

Download code from ArcScripts: Back (Zoom-Previous) Button for Toolbar .NET

  • Extract to a location of your choice either ZoomPreviousCommand.cs or ZoomPreviousCommand.vb, depending on whether your web application uses C# or VB. If in doubt, check the extensions of the files in the web application: if you see files with .cs extensions, use the C# version; if .vb extensions, use the VB version.

  • Open the Web application in Visual Studio 2005 (or Visual Web Developer Express 2005). From the main menu of Visual Studio, choose File-Open-Website (not Project/Solution). Navigate to your website, either on the local IIS server or on the file system.

  • In the Solution Explorer sub-window, look under the web application for a folder called App_Code. If not already present, right-click on the website (not the Solution), hover over Add ASP.NET Folder to display the sub-menu, and then click App_Code.

  • Add the ZoomPreviousCommand.cs or .vb file to the App_Code folder.

    Do this by right-clicking on the App_Code folder and choosing Add Existing Item...

    In the dialog that pops up, navigate to the location where you extracted the .cs or .vb file in the first step. Select the file and click Add. The file will be added within the App_Code folder

  • Open the web page where you want to add the zoom-previous button. Typically this is the Default.aspx page. To open the page, right-click on the page in Solution Explorer and choose View Designer

    (or, double-click to open the file, then click the Design tab at the bottom of the Visual Studio window).

     

  • Locate the Toolbar (ArcGIS Web control) on the page – below the black arrow point to the toolbar in our Example.

    If not already present, add a Toolbar control from the VS toolbar window. Note that a Map control must also be on the page, and the Toolbar must have its BuddyControls include the Map control. The standard Web Mapping Application generated from Manager will already have these settings present. 

     

  • Open the ToolbarItems collection editor:
    • Right-click on the Toolbar and choose Properties.


    • Below the black Arrow point to the the Properties window.

      Closer look at Toolbar Properties below:


    • Scroll to find the line, and Click once on the right side of this line; an ellipsis button (...) will appear .


    • Click this button to open the collection editor .
  • Add a new Command (not Tool) button to the toolbar:

    • In the Toolbar Items column, click the Command item.
    • Click the Add button to add it to the toolbar.


  • Set the properties of the new command button:
    • Click the new Command item in the Current Toolbar Contents column to select it. This displays the properties of the command in the Properties column at the right side of the collection editor.

    • If desired, click and drag the lower right edge of the collection editor to expand it – black arrow is pointing. 


       
    • Set the ServerActionAssembly to App_Code
    • Set the ServerActionClass to ZoomTools.ZoomPreviousCommand


    • Set the Text property for the command (e.g., Previous or Back). This text will display to the user in the button.


    • If desired, set an image for the button using the DefaultImage property.

       

      A sample image (zoomlast_1.gif) is included in the sample websites.



      To add a new image to the website, click OK to exit from the collection editor, right-click on the website in the Solution Explorer, choose Add Existing Item, and navigate to the image (extract it from the zip file if necessary). Once the image is in the website, return to the toolbar items collection editor, select the zoom-previous button, and click in the right side of the DefaultImage property. Click the ellipsis button to pick the image from the website files.

  • Click to save and exit the toolbar items collection editor.
  • You need to expand or increase the width of the Toolbar in design mode, so you can see your new tool

    Increasing width of toolbar


  • Save Default.aspx, and test the website by loading it into a browser (or press Ctrl-F5 in Visual Studio).

     

The zoom-previous command button now tracks the map's extent history and goes back to previous extents with each click of the command, up to the maximumPreviousExtents setting. To increase or descrease the number of extents tracked, open the ZoomPreviousCommand.cs/.vb file in Visual Studio (or VWDE), and update the value of maximumPreviousExtents at line 34 of the file.

Preparing your Data for Network Analysis Routing with ArcGIS Server Preparing your Data for Network Analysis Routing with ArcGIS Server
  1. Create a network from your route layers or files in your data folder on the M: drive, set up a Network Analysis application with "route" and save the .mxd in your mxd folder on the M: drive. Using the same data, set up an address locator service in your mxd folder (you'll need a single street file covering your entire area to do this):

  2. Your routing data (streets and/or walking paths and/or public transportation net works) needs to have a time "cost" field named "MINUTES" or ("TF_MINUTES" and "FT_MINUTES" if you include one-way streets). This should be your primary cost field. If a street is not drivable, set its cost to -1 (this is how I eliminated freeways from the network on the bicycle site).

  3. The routing data also needs a length "cost" field called "FEET" or "METERS" or "KILOMETERS" or "MILES" or "YARDS". (It may be called something else, but if it is, you will need to specify attribute name, type (=cost) and distance units when setting up the network.) (See Network Analyst, Setting Directions in the Help Index for other requirements in ESRI ArcMAP Help.)

  4. You can combine different data in your service by a number of different techniques:

    1. I added the Oak Leaf Trail and Hank Aaron Trail to the City of Milwaukee street file and added snapped vertices to both where there were access points. I then set "Connectivity" to "any vertex" when I created the network service, instead of using the default (end points).
    2. One could instead use separate street and bike path files with a connection point file where there are access points. (See Network Analyst, Understanding Connectivity in the Help Index of ESRI ArcMAP Help for information on how to do this.) Test out your routing application in ArcMAP using the .mxd to make sure it works as you want it to.

Create a map service from the .mxd. Be sure to check the Network Analysis box:

If you are following "3 Main Steps to Publishing a Map on the Web Using ArcGIS Server Manager", you will need to check box as seen below:

  

 

If you are following "ArcGIS Server - Authoring with ArcGIS Desktop & Publishing with ArcCatalog", First you will need to create a administrative connection in ArcCatalog, when you are publishing your service - you will need to check box as seen below:

Read more about Sample Routing Web Applications using Network Analyst Rounting.

You can read about Customizing "ArcGIS_NAServer_Routing_VBNet" ArcGIS web Application

1 - 10 Next

 ‭(Hidden)‬ Admin Links