<dvt:mapColorTheme>

mapColorTheme map color theme


mapColorTheme is a child tag of the map that let developers to create a color theme. ADF map uses the value from the GeoMapModel to color regions on the map.

To use the mapColorTheme, a developer needs to specify the colors for the theme. This could be done by two ways. A developer can set "minColor", "maxColor" and "bucketCount" to set the colors of a mapColorTheme. For example, if a colorTheme has minColor = #000000, maxColor = #ffffff and bucketCount = 4, then the color for the four buckets are: #000000, #444444, #888888, #bbbbbb, #ffffff. Alternatively, a developer can use "colorList" to set the colors of a mapColorTheme. Developers can bind a String array, or use comma separated String to set the array of colors for the mapColorTheme.

Based on the colors that the developer specifies, ADF map will color each region according to its value. ADF map will calculate the minimum and maximum value from the GeoMapModel and divides the values into buckets. Each bucket is represented by a color from what the developer specifies. Then, ADF map will color the region based on the bucket its value belong.

Relationship with other tags

This component can have the following children:

Attributes

Name Type Supports EL? Description
id java.lang.String no The id for this component
themeName java.lang.String no Specifies the predefined theme on which this theme layer is based. The theme must come from the same data source as the base map. The theme is defined in mapbuilder. For detail, please refer to the documentation of mapviewer.
shortLabel java.lang.String no Specifies the label of this theme on the legend. If the attribute is not specified, the id of the theme will be used as the label on the legend.
menuLabel java.lang.String no Specifies the label of this theme on the ThemeSelectionDialog and SelectMenuItem that are displayed from the toolbar. If the attribute is not specified, the id of the theme will be used.
minZoom int no Specifies the minimum zoom scale where this theme will still be visible.
maxZoom int no Specifies the maximum zoom scale where this theme will still be visible.
legendLabels java.lang.String no Specifies the labels for each bucket on the legend. To specify labels for multiple buckets, developers can bind a string array to this attribute or use a semi-colon separated string. For example, if the value of this attribute is "item1;item2;item3", it means that the label in the legend for the first bucket will be "item1", the second bucket will be "item2" and the third bucket will be "item3"
minColor java.lang.String no Specifies the color for the bucket with the smallest value. Valid values are RGB hexadecimal. For example, color="#000000" specifies black color. The default value is #33FF33.
This attribute will be ignored if the user specifies a value for colorList.
The ADF map uses the value of minColor, maxColor and bucketCount to determine the color for each bucket. For example, if minColor = #000000, maxColor = #ffffff and bucketCount = 5, then the color for the four buckets are: #000000, #444444, #888888, #bbbbbb, #ffffff.
maxColor java.lang.String no Specifies the color for the bucket with the largest value. Valid values are RGB hexadecimal. For example, color="#000000" specifies black color. The default value is #FF3333.
This attribute will be ignored if the user specifies a value for colorList.
The ADF map uses the value of minColor, maxColor and bucketCount to determine the color for each bucket. For example, if minColor = #000000, maxColor = #ffffff and bucketCount = 5, then the color for the four buckets are: #000000, #444444, #888888, #bbbbbb, #ffffff.
bucketCount int no Specifies the number of buckets for the colorTheme. The ADF map will automatically divide data into a set of buckets based on the value of this attribute. For example, if the data in the theme has a minum value of 10 and a maximum value of 50, and the value of this attribute is 4, then the range for the four buckets will be: 10-20, 20-30, 30-40 and 40-50.
colorList java.lang.String no Specifies the color for each bucket. To specify colors for multiple buckets, developers can bind a color array to this attribute or use a semi-colon separated string. Color can be specified using RGB hexadecimal. For example, if the value of this attribue is "#ff0000;#00ff00;#0000ff", then the value of the first bucket is red, the second bucket is green and the third bucket is blue.
selectionListener java.lang.String no a method reference to a selection listener Refers to a backing bean method that takes MapSelectionEvent as an argument The MapSelectionEvent contains the information on the selected region. Sample code: public void processSelection(MapSelectionEvent mapSelectionEvent) { Iterator iterator = mapSelectionEvent.getIterator(); while (iterator.hasNext()) { DataContent dt = (DataContent)iterator.next(); String selectedLocation = dt.getLocationName(); System.out.println (selectedLocation); } }
locationColumn java.lang.String no Specifies the name of a polygon column in a column the underlying table of the theme. This column is used to join with the location column in the mapModel of the value attribute.
clickAction java.lang.String no Refers to a backing bean method that performs navigation processing for the map and returns an outcome String. Or a static outcome String can be specified. The JSF NavigationHandler selects the page to display next by matching the outcome String against the navigation rules in the application configuration resource file. The application writes the Navigation rules.
clickListener java.lang.String no a method reference to a click listener Refers to a backing bean method that takes MapClickActionEvent as an argument The MapClickActionEvent contains the information on the clicked point. Sample code: public void processMouseClick(MapClickActionEvent mapClickActionEvent) { if (mapClickActionEvent.getDataContent() != null) { DataContent dt = mapClickActionEvent.getDataContent(); System.out.println ("Location Name: " + dt.getLocationName()); } System.out.println("MouseX " + mapClickActionEvent.getMouseX()); System.out.println("MouseY " + mapClickActionEvent.getMouseY()); }
leftClickBehavior java.lang.String no Specifies the behavior when user left clicks on an element of a theme. Valid values for the theme are:
  • "Action" - An action event will be fired.
  • "Popup" - A popup will be shown. The content of the popup is defined in the popup facet of the map
  • "InfoWindow" - An InfoWindow will be shown. The user can further customize the content of the infoWindow through the infoWindowCallback
  • "None" - Nothing will be done.
rightClickBehavior java.lang.String no Specifies the behavior when user right clicks on an element of a theme. Valid value for the theme are:
  • "Popup" - A popup will be shown. The content of the popup is defined in the rtPopup facet of the map
  • "None" - Nothing will be done.
useWindow boolean no Specifies whether processes launched by this command should be launched in a secondary dialog window. 'useWindow' works only in the case of dialogs i.e, if the "action" starts with a "dialog:". Set useWindow to 'false' for the dialog to be opened in the existing window.
windowWidth int no Specifies the width of the window if useWindow is true
windowHeight int no Specifies the height of the window if useWindow is true
infoWindowCallback java.lang.String no Specifies a callback for overriding the default text in the info Window.
rendered boolean no Specifies whether the theme is rendered or not
opacity int no Specifies the opacity of the color of the theme. Valid values are 0 to 100. 0 means the color is totally tranparent while 100 means the color is not transparent. The default value is 40.
value java.lang.String no Specifies the data model for theme - have to be an instance of oracle.adf.view.faces.bi.model.GeoMapDataModel