Layer properties available in Manager
Once you've added some layers as described in Adding layers to a Web application in Manager, you can set properties such as the name, transparency, and position of the layer. The following properties are available:
- Name—The visible name of the layer as displayed in the table of contents. This property allows you to override the service name.
- Visible—When checked, the layer will be drawn when the Web application starts.
- Transparency—A percentage between 0 and 100 that is applied to the layer so that the layers beneath it can be seen. By default, the backgrounds of all but the bottom layer are made transparent. If you want to change the default way background transparency works for a layer, you can configure the MapResourceManager control in Visual Studio.
- Request Image as—The type of image to request from the server. The pick list of image formats is static, and some formats may not be available depending on the type of service you are using (MXD-based ArcGIS Server, MSD-based ArcGIS Server, ArcIMS, and so on). If you select an image format that the service does not support, the server will revert to its default image format.
For example, if you're using an MSD-based service with antialiasing, you should choose the PNG 32 image format to get the best visual quality. In contrast, PNG 32 is not available with MXD-based services. If you choose PNG 32 with an MXD-based service, the server will revert to the default of PNG 24.
- Data Frame—For ArcGIS Server layers, the name of the data frame to use in the map.
- Seamless Panning—When checked, the layer will be redrawn while panning to create a seamless look. When unchecked, the layer will redraw only when panning stops. Disabling seamless panning provides better performance because only one image is requested.
You can only set seamless panning in Manager if you have ArcGIS Server 9.3 Service Pack 1 or higher. Otherwise, use the Dynamic Tiling property in the Map Resource Display Settings Editor in Visual Studio. For more details, see the MapResourceManager Control topic in the Developer Help.
To reorder the layers, use the up and down arrows between the Current Layers list and the Layer Properties list.
Setting properties for sublayers inside a layer
Clicking a sublayer inside a layer reveals additional properties for that sublayer. You'll see three categories of properties: Symbols, Records, and Fields. These properties allow you to specify how you want to draw and display attribute information for features in the sublayer. The Web Mapping Application uses these settings when identifying features and displaying task results as MapTips.
If you add, delete, or reorder layers in your source MXD or MSD after applying custom formatting in Manager, your custom formatting will be lost. The custom formatting depends on the index position of the layer in the source map table of contents (top layer is index 0, next layer or sublayer is index 1, and so on). If the layer is not found at the expected index, the formatting will not be applied. If you must change a layer index after applying custom formatting, you can manually edit the index position (id) in the <ResourceItems> section of the Web application's Default.aspx page.
Symbols
The Symbols category represents how the layer should draw its features found through executing a task, like the Search or Query Attributes task. These symbols are only used when drawing task results.
- Draw with—Allows you to choose a symbol to represent the feature. This symbol displays over the feature and represents the feature. For point layers, you can choose from one of the many point symbols available with Manager. For line and polygon layers, you can set the specific properties such as line color and polygon color.
- Highlight with—Allows you to choose the symbol to highlight the feature, for example, when displaying its MapTip. You might want to choose the same symbol as the one specified for Draw with in a more vibrant color or larger size.
Fields
The Fields category controls the display of field attributes for the layer when viewed in tabular form, such as when printing task results.
You can check those fields that should be visible and type in a more user-friendly name with the field alias. The primary display field is used to summarize the record. For example, the Identify tool uses the primary display field in its results to help the user quickly recognize the record returned. Typically, the primary display field is a name field.
For ArcGIS Server map services, the settings you initially see in the Fields category reflect the field aliases, visibility, and primary display field as defined in the source map document (.mxd) for the map service. The settings you specify in Manager override the map document settings only for the particular Web application you're creating. If you want to reuse these settings in other Web applications, you should consider setting the field properties in the source map document using ArcMap instead of setting them in each Web application in Manager.
For services that are not ArcGIS Server services and don't provide field settings, all fields are visible by default, and the alias is the same as the field name. The primary display field is set by default to the first string field with "name" in it. If no such field is found, it is the first string field. If there are no string fields, it is the first numeric field.
Records
The Records category defines how to format the display of attribute information for an individual record in the layer. These settings define the content of the MapTip window that appears when you click a task result and the content of the Identify window that displays when using the Identify tool. For example, here's a MapTip showing information about a particular school.
If you don't specify any record formatting, you'll get a simple list of field names and values based on the field visibility and alias settings set on the Fields tab. Alternatively, you can choose to display records using your own custom formatting.
To apply your own custom formatting to the records, click the Custom Formatting option to enable the text editor on this tab. You can set the title, or summary of the record, that appears in the title bar of the window and the contents or detailed information about the record.
- Title—The Title appears in bold text on the title bar of the MapTip window. You can type in static text and insert field values. The primary display field is the default value. Clicking the Fields drop-down arrow displays a list of fields allowing you to select one, inserting it into the text box at the current pointer location.
- Contents—The Contents area can contain static text, field attributes, hyperlinks, and images. By default, the Contents area is populated with visible fields by their aliases and the corresponding field values.
There are two ways you can edit the contents: in HTML view or Rich Text view. In HTML view, you can enter any valid HTML. In Rich Text view, you can use the toolbar to set the font name and size, as well as insert hyperlinks and images. Here are the list of tools available to you on the toolbar:
- Font—The list of fonts available.
- Font size—The font size: small, medium, or large.
- Bold—Makes the selected text bold.
- Italic—Makes the selected text italic.
- Underline—Underlines the selected text.
- Text color—Sets the color of the text.
- Background color—Sets the background color of the callout area.
- Undo—Undoes the last edit.
- Redo—Restores the previous undo.
- Left justify—Left aligns the line of text the cursor is in.
- Center justify—Centers the line of text the cursor is in.
- Right justify—Right aligns the line of text the cursor is in.
- Numbered list—Creates a numbered list.
- Bullet list—Creates a bullet list.
- Insert table—Inserts a table of the specified number of rows and columns.
- Insert hyperlink—Makes the selected text a hyperlink (you first need to select some text). The URL is defined by typing text and including field attribute values to derive a link.
- Insert image—Inserts an image at the cursor location. The source of the image is a URL defined by typing text and including field attribute values.
- Insert field—Inserts the value from a field. For a given feature, the actual attribute value will be substituted for the field reference. Curly brackets denote a field (for example, {Name}). The drop-down list will show all fields, regardless of field visibility, except for the Shape field, and any other nonalphanumeric fields.
Setting map display properties
At the bottom of the Layers tab is a set of map display properties. These allow you to configure the coordinate system and visible extent of the map in the Web application.
- Use coordinate system of—Sets the layer that will define the coordinate system. The layer chosen here becomes the primary map resource, meaning that other layers will be projected on the fly to match this coordinate system. By default, the primary map resource is the first cached service in your application. You should generally avoid setting noncached services as the primary map resource if you have cached services in your application. If none of the layers in your application is cached, the primary map resource is the bottom layer by default.
- Set the initial extent to—Sets the map extent that will display when the Web application starts. The default is the full extent of the primary map resource. A custom extent is useful if you want the initial view to contain just a portion of the map.
When you choose to use a custom initial extent, a preview window appears that allows you to set the extent interactively. You can pan and zoom the map, and the coordinates for the lower left and upper right will update accordingly. When you've determined the extent you want, click OK.
- Set the full extent to—Sets the extent that will display when the user clicks the Full Extent button in the application. The default is the full extent of the primary map resource.
A custom full extent is useful if the full extent of the primary map resource contains data outside your area of interest. This can commonly occur if you add a worldwide service, such as Bing Maps, to your application. When users click Full Extent, you may want them to zoom to a limited area of interest instead of the entire world.
When you choose to use a custom full extent, a preview window appears that allows you to set the extent interactively. You can pan and zoom the map, and the coordinates for the lower left and upper right will update accordingly. When you've determined the extent you want, click OK.
- Preview Map—Displays a preview of what the map will look like in the Web application. Use the preview to confirm that your transparency settings will appear as expected.
Rotated data frames
You can consume map services with rotated data frames in .NET Web applications built with Manager or the Web Application Developer Framework (ADF). The primary map resource determines the rotation of the map.
When using map services with rotated data frames, if your primary map resource is rotated, you cannot use nonrotatable service types, such as ArcIMS and WMS, in the same map. If you set the nonrotatable service as the primary map resource, the Web ADF will unrotate your rotated service on the fly so that it lines up with the nonrotatable service.
Maps with rotated data frames cannot be cached. Also, you should not set EnableTileCaching = True on a Map control containing a map service with a rotated data frame.