Tags for Modifying Map Themes

Using ADF Geographic Map Components 27-9

27.4.2 How to Customize the Labels of a Map Theme

By default, the ID of the map theme is used as the label when that theme is displayed in the legend or in the Theme Selection dialog. However, each map theme tag has the following attributes that serve as optional labels for the theme: ■ shortLabel: Specifies a label for the theme when displayed in the map legend. ■ menuLabel: Specifies a label for the theme in the Theme Selection dialog. Use these attributes to create meaningful labels that identify both the theme type color, point, bar graph, or pie graph and the data such as population, sales, or inventory so that users can easily recognize the available themes. To customize the labels of a map theme: 1. In the Structure Window, locate the map theme tag that you want to customize.

2. Right-click the tag node and choose Go to Properties.

3. In the Appearance attributes category of the Property Inspector, enter text in the

shortLabel attribute for display in the legend and in the menuLabel attribute for display in the Theme Selection Dialog. For example, you might want to enter the following text for a color theme that colors New England states according to population: shortLabel=Color - Population, NE Region

27.4.3 How to Customize Color Map Themes

When you create a color map theme, you can customize the colors used for the coloring of the background layer. You can specify the colors associated with the minimum and maximum ranges, and then specify the number of color ranges for the theme. For example, if the colors relate to the population on the map, the least populated areas display the minimum color and the most populated areas display the maximum color. Graduated colors between the minimum and maximum color are displayed for ranges between these values. To customize the colors of a color map theme: 1. In the Structure window, right-click the dvt:mapColorTheme node and choose Go to Properties .

2. In the Theme Data attributes category of the Property Inspector:

■ If you want to change the default colors associated with the minimum and maximum range of data values, then select the desired colors for the MinColor and MaxColor attributes respectively. ■ If you want to change the default number of color ranges for this theme, change the integer in the bucketCount attribute. For example, if dvt:mapColorTheme minColor=000000 maxColor= ffffff bucketCount=5, then the color for the five buckets are: 000000, 444444, 888888, bbbbbb, ffffff. Alternatively, you can specify the color for each bucket. To specify colors for multiple buckets, for the colorList attribute of dvt:mapColorTheme, bind a color array to the attribute or use a semicolon-separated string. Color can be specified using RGB hexadecimal. For example, if the value is colorList=ff0000;00ff00;0000ff, then the value of the first bucket is red, the second bucket is green, and the third bucket is blue. 27-10 Web User Interface Developers Guide for Oracle Application Development Framework

27.4.4 How to Customize Point Images in a Point Theme

A map point theme uses a default image to identify each point. However, you can specify multiple custom images for a point theme and identify the range of data values that each image should represent. You define a dvt:mapPointStyleItem tag for each custom image that you want to use in a map point theme. To customize the images for points in a map point theme: 1. In the Structure window, right-click the dvt:mapPointTheme node and select Insert inside dvt:mapPointTheme Point Style Item. 2. In the ensuing Insert Point Style Item wizard, provide settings for the data value range of this custom point by doing the following: a. In Step 1 of the wizard Common Properties, you must specify the URL for the image that should be displayed on the map for a point that falls in the data value range for this custom image. b. In Step 2 of the wizard Advanced Properties, specify the data value range that this custom image should represent by entering values in MaxValue and MinValue fields. c. In the Id field, enter a unique identifier for the custom image that you are defining. d. In the Short Label field, specify the descriptive text that you want to display in front of the actual data value when a user hovers the cursor over a point that falls in the range represented by this tag. For example, you might want to enter the following text for a custom point that falls in the lowest data value range: Low Inventory. e. Optionally, specify different image URLs for a hover image and a selected image.

f. Click Finish.

3. Repeat Step 1 and Step 2 for each custom image that you want to create for your point theme.

27.4.5 What Happens When You Customize the Point Images in a Map

When you use the Insert Point Style Item wizard to specify a custom image representing a range of data values for a point theme, a child dvt:mapPointStyleItem tag is defined inside the parent dvt:mapPointTheme tag. Example 27–2 shows the code generated on a JSF page for a map point theme that has three custom point images that represent ranges of inventory at each warehouse point. The initial point style setting ps0 applies to values that do not exceed 500. This point style displays an image for very low inventory and provides corresponding tooltip information. The second point style setting ps1 applies to values between 500 and 1000. This point style displays an image for low inventory and provides corresponding tooltip information. The final point style setting ps2 applies to values between 1000 and 1600. This point style displays an image for high inventory and provides corresponding tooltip information.