You will define the GIS functionality in your Web applications by selecting and configuring tasks. Tasks encapsulate specific functionality for your application, such as querying or editing. Manager includes the following set of tasks:
- Editor task
- Find Address task
- Geoprocessing task
- Print Task
- Query Attributes task
- Search Attributes task
You can also use the developer libraries included with the Web ADF to create custom tasks. Refer to the developer help for more instructions.
When you create or edit a Web application in Manager, a wizard panel is included specifically for the purpose of adding and editing tasks. Click the Add Task link on this panel to select the task you want.
The Editor and Geoprocessing tasks are valid only with ArcGIS Server services. Other tasks can work with multiple types of services. For example, the Search Attributes task can search the attributes of layers from either ArcGIS Server or ArcIMS. Some tasks require that you define supporting services for them to run. For example, the Find Address task requires you to select an existing ArcGIS Server geocoding service, an ArcIMS service enabled for geocoding, or the Bing Maps geocoding service.
For each task that you add to your application, you can customize the specific look and behavior of the task. In many cases, this involves selecting the layers and fields that you want the task to work with. If you want to see field aliases appear in the task, you can configure this in the layer properties of the source map document or in Manager.
For each task that you add to your application, Manager lets you customize the specific look and behavior of the task.
The following sections describe the tasks in detail.
The Editor task provides a suite of tools for Web-based editing of features and attributes in ArcSDE geodatabases. This task requires that your application contain a map service accessed through an ArcGIS Server local connection that includes at least one layer from an ArcSDE geodatabase. If the geodatabase layer is versioned, a nonpooled ArcGIS Server map service is required. If the geodatabase feature class is nonversioned, the Editor task can use either a pooled or nonpooled ArcGIS Server map service. Shapefiles, personal geodatabase layers, and file geodatabase layers are not editable; however, you can include these types of layers in the map service.
When you add the Editor task to an application, users of that application will be able to access various tools to edit data and save their edits. The Editor task includes tools for creating, moving, copying, splitting, merging, and deleting features. Additionally, you can view and edit the locations of feature vertices. When you configure the Editor task for your application, you can select which versions and layers users will be able to edit. When editing, users of your application can adjust the snapping and selection options.
Editing in the Web environment has a slightly different feel from desktop editing, and you may want to use a practice dataset to accustom yourself to the available tools and their behavior. For instance, when editing with snapping enabled, you will not see the snapping occur on the screen until after you place the vertex. The placed vertex will be snapped to the appropriate vertex, edge, or end.
You cannot use the Editor task to create multipoint features. However, you can move, copy, or delete existing multipoint features with the Editor task. You can also use the Editor task to edit the attributes of existing multipoint features.
Only one Editor task can be configured per application using ArcGIS Web Manager. However, the Editor task can be configured to work with all the editable resources that have been added to the Web application.
The Editor task configuration page contains the following items:
- Task Name: The name as seen by users in the Web mapping application.
- Service: A list of services that have been added to the application. From this list choose a service accessed through an ArcGIS Server local connection. MSD-based map services cannot be used for editing. The map service should contain at least one layer from an ArcSDE geodatabase. If the geodatabase layer is versioned, a nonpooled ArcGIS Server map service is required.
- Edit Data In: A list of editable workspaces in a map service. A workspace is a combination of the host (ArcSDE server name), port, database, user name, and name of the editable version. If any one of these parameters is different between the layers in the map service, they are considered to be different workspaces.
- Add Configuration: Click this to create a new editing configuration. Each editing configuration has three property tabs, described in the following sections.
- Configuration Name: Enter a unique descriptive name for the editing configuration in this text input box. When the Editor task is executed, this descriptive name is used when listing the available configurations.
- Editable Layers: This column lists the editable layers in the selected workspace. Choose the layers you want to edit.
- Editable Versions: This column lists the available versions if the selected workspace is versioned.
- In the Edits Allowed section, check or uncheck the boxes next to each option listed to allow or disallow edits:
- Add Features: New features can be added if this box is checked.
- Edit Attributes: The fields associated with a feature can be edited if this box is checked.
- Edit Features: The geometry of features can be edited if this box is checked.
- Tolerance: Enter a tolerance value to apply to a point on the map selected via a mouse click. The larger the tolerance value, the larger the selection area. This is helpful when selecting feature components like vertices. A value that is too small will make it hard for users to select a vertex. A value that is too large can result in the selection of other features located near the vertex to be selected.
- Snapping Tolerance: The tolerance in pixels used to determine if a moved vertex should snap to an existing vertex, edge, or end.
- Highlight Color: The color used for features that have been selected for editing. The color is specified by three numbers between 0 and 255 that represent red, green, and blue values in that order. The default color is yellow.
- Vertices Color: The color used for newly added vertices. The color is specified by three numbers between 0 and 255 that represent red, green, and blue values in that order. The default color is red.
- Snapping Rules: When working with a map that contains small feature components, it can become difficult to select a feature with a click. When enabled, the snapping feature selects the feature closest to the location of the click. In this section, check or uncheck the boxes next to each option to enable or disable snapping. The available options are Vertex, Edge, and End. An edge is a line that forms a boundary for a feature. An end is a vertex that has only one edge connecting to it.
The Advanced tab contains autoreconciliation options to resolve conflicts between edits made by two different users. The Editor task autoreconciles conflicts based on two important settings:
- Are conflicts defined by object (row) or by attribute (column)? If two users edit different attributes of the same feature, is this considered a conflict? If you've chosen to define conflicts by object (row), this situation is treated as a conflict and only one of the users' edits can be applied. However, if you've chosen to define conflicts by attribute (column), both edits may be applied. In this case, a conflict would only occur if the two users edited the same attribute.
- Are conflicts resolved in favor of the database or the edit session? If someone else edits the same feature as you and saves his or her edits first, what happens when you save? If you've chosen to resolve conflicts in favor of the database, your edits will not be applied. This setting can be thought of as "first in wins." If you've chosen to resolve conflicts in favor of the edit session, your changes will overwrite the other user's edits. Resolving conflicts in favor of the edit version can be thought of as "last in wins."
Once saved, all available editing configurations are listed as shown in the screen shot below. Click the Edit icon to update an existing editing configuration or click the Delete icon to remove it from the Editor task.
Find Address task
The Find Address task prompts the user for an address, then displays the resulting address on the map. It can be configured with an ArcGIS Server geocoding service, an ArcIMS service with geocoding enabled, or the Bing Maps geocoding service.
The Bing Maps geocoding service can be very useful for the Find Address task because the service is configured to find well-known places that may not have a well-known street address (for example, Lincoln Memorial). If you use the Bing Maps geocoding service, you must have a Bing Maps layer that is set as the primary map resource, meaning that the map is configured to use the layer's coordinate system.
Keep in mind that there are specific restrictions when using Bing Maps geocoding:
- Geocodes may not be stored for any purpose except caching for performance.
- Geocodes may not be displayed on any map other than a Bing Map.
The Find Address task is based on an address locator service. Once you add a Find Address task to your Current Tasks list, you need to specify the geocoding service using the Supporting Services link in the right panel.
The text you see in the user interface for the Find Address task comes from the geocoding service's locator file. You can change this text by opening the locator (.loc) in a text file before publishing it to the server.
If you are using an ArcIMS service, you must select a service that supports geocoding, then configure the task.
- Click the Add Task link, choose Find Address, then click Add.
- In the left panel, choose the task, then click the Supporting Services link in the right panel to specify your service. Any service that has a geocode extension is listed.
- Choose a Find Address service and click Add.
- After selecting the geocoding service, specify a name for this task. This is the name that users will see in the Web mapping application for this task.
- Enter values in the Button Text and Help Tip text boxes that are displayed when the task is run.
- Click the Results tab to configure how results will appear on the map.
- By default, MapTips are enabled, which means geocoded address will appear on the map with an interactive display. If you want to turn this feature off, uncheck Show Map Tips.
- If you want to use a special symbol for the results of this task, select special symbols. If no symbols are specified, the defaults for the layer will be used.
- When finished, click Apply.
With the Geoprocessing task, you can make use of services that run ArcGIS geoprocessing jobs on the server and send the results back to the client application. The geoprocessing task requires an ArcGIS Server geoprocessing service, which you specify using the Supporting Services link. Geoprocessing services are based on models and can be published from either a toolbox or a map document containing a tool layer. Refer to the Geoprocessing with ArcGIS Server section of the help for more information on how to create one.
To configure a Geoprocessing task for a Web application, follow these steps:
- Click the Add Task link, select Geoprocessing from the list of available tasks, then click Add.
- In the left panel, choose the task, then click the Supporting Services link in the right panel to specify your service. If no services are listed, click Add GIS Server to add the ArcGIS Server that is hosting your geoprocessing service.
- Choose a geoprocessing service and click Add.
- Choose the desired geoprocessing tool from the service.
- You can check Show Job Messages if you want to display geoprocessing messages during the execution of the task.
- Click the General tab. Accept the default or enter a name for the task in the Task Name field. This will be the label for the task in the Web application.
- Accept the default value or enter text in the Run Button Text field.
- Click Apply to finish.
An end user who opens a geoprocessing task will see a palette of tools that allow specification of the model parameters. For example, if the underlying model requires a line feature class as input, tools will be available in the task for drawing lines. When the user has specified all the parameters, he or she can then execute the task. As the job runs, the end user can see any messages from the task in the Results panel of the Web application. If the geoprocessing service has an associated map service that was added to the application at design time, the results will also be visible on the map.
Geoprocessing services have a property that determines whether they run synchronously or asynchronously. If the service is configured to run asynchronously, the user has the option of viewing the results of the task even after closing the Web application. If the task had not finished executing before the user closed the browser, and if the user has cookies enabled, the results will be retrieved automatically when the user next visits the Web application. Otherwise, the user can click the Save link on the results node, save result information to a file, and use this file to check task results in another session. This link will only be available if the VirtualDirectory property of the Geoprocessing task is set. If the service is configured to run synchronously, there will be no Save link available and the user will have to keep the session open until the results are available.
The Print task allows the user to print the map along with any task results desired. When invoked from the Web application, the task displays a printing dialog box that allows the user to enter a title for the map, set the map size, and choose any task results to print under the map. Clicking the button to create the printed page opens a new browser window with a preview of the printed page. The user can then print to any available printer.
The Print task doesn't require any configuration in Manager unless you want to change the default settings that Manager provides. For example, you can change the default map title and select the legend items that you want to print.
To add and configure the Print task in Manager, follow these guidelines:
- When creating or editing a Web application in Manager, in the Tasks step, use the Add Task link to add a Print task to the list of tasks. Click the Print task on the left panel which displays the configuration for the Print task on the right panel.
- On the General tab, optionally change the text in the Task Name field; the task name is displayed in the list of available tasks on the menu bar of the application. You can also change the value for Button Text; button text is shown on the button the user clicks to create the print preview page.
- The Settings tab determines default settings for the print page. End users can change some of these settings when they run the Print task, while others are configurable only by you as the server administrator.
- Map Title determines what prints across the top of the page by default. The user can modify this setting.
- Map Size determines the default size of the map. The user can still choose the size from a pick list when running the Print task. The standard sizes correspond to the following: Small (3 inches by 3 inches), Medium (5 inches by 5 inches), and Large (7 inches by 7 inches). These sizes (including units) can be customized as described in the developer help.
- The Print results only (no map) option sets whether to print only task results (if any) by default. The user can change this setting when running the Print task.
- The Map Quality setting determines the quality of the map image. Draft prints the map at 96 dots/pixels per inch (dpi), which is sufficient for previewing on the screen but does not give the best quality when printed. Normal prints the map at 200 dpi. The Normal setting improves the appearance of the map when printed, although when displayed in print preview, it may look poorer due to interpolation of the higher-resolution image. The user cannot change this setting when running the Print task.
- The Preserve Scale option allows you to choose whether the printed map will preserve the map scale or the map extent that users see in the browser. Only one of these properties can be preserved to produce a high-resolution map for printing. If you choose to preserve map scale, the map displayed in the print window matches the current scale of the map in the application. Alternatively, if you choose not to preserve map scale, the current extent of the map in the application displays in the print window but the scale may change. The user cannot change this setting when running the Print task.
- The Map Elements tab sets the items that appear on the printed page. You can choose to include a scale bar, north arrow, and legend. You can also set the layers to be shown or hidden from the legend and the number of columns you want. Layers hidden in the legend are not hidden from display on the map. This option might be useful if you have many layers in the map, of which only certain ones need to be included in the legend.
When setting the page size and quality, keep in mind that the GIS server imposes limits on the maximum image size it can return. For example, ArcGIS Server map services, by default, restrict the image size to a maximum of 2048 x 2048 pixels. This means that a 10-inch-square map with a quality of 200 dpi is 2000 x 2000 pixels. If the Print task map request exceeds the limits of the GIS server, the particular service does not print.
Query Attributes task
The Query Attributes task helps users select or view certain data on the map, based on that data's attributes. A Query Attributes task creates a single query on one map layer. However, the query can have compound criteria. For example, you can define a query on a cities layer that selects cities with a population greater than a value entered by the user and with a name that begins with a value entered by the user.
Additionally, the Query Attributes task supports relates and stand-alone tables. Relates simply define a relationship between two tables without appending the associated data in each table. In many cases, the relates point toward stand-alone tables, which lack geometry but often contain valuable attribute information. For example, if you published a map service that contained relates between city parcels and a stand-alone table of parcel owners, you could use the Query Attributes task to display the owners and location of the parcel in the query results.
When you configure the Query Attributes task, you create an easy-to-understand form that will guide the user through the process of making the query. This way, users of your application will not have to know the details about the dataset, nor will they have to construct a Structured Query Language (SQL) statement, to query the data.
The following instructions describe the process to add a Query Attributes task to a Web application:
- When creating or editing a Web application in Manager, in the Tasks step, use the Add Task link to add a Query Attributes task to the list of tasks. Click the Query Attributes task on the left panel to display the configuration page for it on the right panel.
- On the General tab, you can change the wording that users will see when they run your task. You can change the Task Name, Button Text, and Help Tip values.
- Use the Settings tab to build your query. After selecting a map service and a layer to query, click the Add button to add a condition to your query. You can add multiple conditions to create a compound query. When configuring the task with multiple query expressions, the expressions are joined using the AND operator.
- Use the Label Text field to describe the Query Attributes task so that the users of the Web mapping application can understand what the task does.
- Choose the desired field and comparison operator for the query using the drop-down menus.
- Use the Value field to specify a default query criteria if desired. You can also limit the values that will be passed to the query by using the Select from List option.
- When finished configuring the parameters for the Query Attributes task, click Apply.
Search Attributes task
The Search Attributes task allows a user to enter some text that will be used to search the attributes of the layers on the map. This kind of search is similar to the simple Web search that sites like Yahoo! and Google provide. The user can then select, zoom to, or pan to any of these features.
Additionally, the Search Attributes task supports relates and stand-alone tables. Relates simply define a relationship between two tables without appending the associated data in each table. In many cases, the relates point toward stand-alone tables, which lack geometry but often contain valuable attribute information. For example, if you published a map service that contained relates between city parcels and a stand-alone table of parcel owners, you could utilize the Search Attributes task to display the owners and location of the parcel in the search results.
To configure the Search Attributes task, you'll need to specify the display settings, the search fields, and how you want the results to appear.
- When creating or editing a Web application in Manager, in the Tasks step, use the Add Task link to add a Search Attributes task to the list of tasks. Click the Search Attributes task on the left panel to display the configuration page for it on the right panel.
- On the General tab, you can change the wording that users will see when they run the Search Attributes task. You can change the following:
- The name of the task. This name appears along the top bar of the Web mapping application.
- The text of the button users will click to execute the task.
- The label text, which appears next to the search text box. You can phrase the label text any way you want, such as "Search for rivers" or "Enter the last name of a parcel owner."
- A help tip that will display when a user pauses the mouse pointer over the task.
- Use the Settings tab to determine which fields and layers in your map will be searchable. A list of the layers and fields in your map appears on the left. Choose which fields you want to be searchable and click the right arrow ( > ) button to move them to the list on the right.
- The best fields for the Search Attributes task are usually nominal fields where most records have a unique value, for example, the name of the feature. When working with ordinal, interval, or ratio fields—for example, the average temperature or the cost of a feature—consider using the Query Attributes task instead.
- Use the
tab to configure how task results will appear.
- You have the option to limit the number of results that are returned from a search. This can prevent the server from becoming unavailable if a search is made that would return an unreasonably large number of records.
- If you want your task to return a large number of results, be aware that ArcGIS Server map services limit the number of records returned by a query to 1,000. To change this default behavior, you need to manually edit the configuration file and change the MaxRecordCount property.
- You can disable the default behaviors of grouping the results by layer and showing the attributes of the records returned by the search. You may want to test different settings to find which appearance best meets your needs.
- If you choose to enable MapTips, users can click result features to see an informational pop-up window. Result features will also be highlighted when users pause the pointer over them.
- You can change how the results appear on the Results panel and in MapTips by choosing Custom formatting. When you do this, additional tabs appear that allow you to change the color of the result features, the information to be included, and the text format.