style Element styles Element theme Element

MapViewer Map Request XML API 3-49 offset_y CDATA implied offset_y CDATA implied color1 CDATA implied color1_opacity CDATA implied color2 CDATA implied color2_opacity CDATA implied length_hint CDATA implied label_color CDATA implied label_font_family CDATA implied label_font_size CDATA implied label_halo_size CDATA implied label_position TOP|BOTTOM TOP All scale_bar attributes are optional. mode specifies if the scale bar should be in metric or US mode, or in both modes. The default is METRIC_MODE. position defines the relative location on the map to place the scale bar. The default is NORTH_EAST. offset_x and offset_y define the X and Y values to offset the scale bar position from the map margin. The default value for each is 0. color1, color1_opacity, color2, and color2_opacity define the colors to be used when rendering the scale bar. color1 and color2 have a default value for red, green, blue; color1_opacity has a default value of 0x44, 0x44, 0x44, 210; and color 2_opacity has a default value of 0xee, 0xee, 0xee, 210. length_hint defines the preferred number of pixels to be used to render the scale bar. The default is approximately 17 of the map width. label_color, label_font_family, label_font_size, and label_halo_size affect the scale bar text. The defaults are black color, Serif font family, 12pt font size, and no halo 0 halo size. label_position defines the position of the text relative to the scale bar TOP or BOTTOM. The default is TOP. Example 3–23 defines a scale bar. Example 3–23 Scale Bar scale_bar position=SOUTH_WEST mode=US_MODE color1=ff0000 color1_opacity=128 color2=00ffff label_font_family=Dialog label_font_size=15 label_font_style=italic label_font_weight=bold label_halo_size=2.8 label_position=bottom offset_y=5

3.2.18 style Element

The style element has the following definition: 3-50 Oracle Fusion Middleware Users Guide for Oracle MapViewer ELEMENT style svg | AdvancedStyle? ATTLIST style name CDATA REQUIRED The style element lets you specify a dynamically defined style. The style can be either of the following: ■ An SVG description representing a color, line, marker, area, or text style ■ An advanced style definition see Section A.6 representing a bucket, a color scheme, or a variable marker style The name attribute identifies the style name. The following example shows an excerpt that dynamically defines two styles a color style and an advanced style for a map request: map_request . . . . . . styles style name=color_red svg width=1in height=1in g class=color style=stroke:red;stroke-opacity:100;fill:red;fill-opacity:100 rect width=50 height=50 g svg style style name=ranged_bucket_style AdvancedStyle BucketStyle Buckets RangedBucket seq=0 label=less than 100k high=100000.0 style=C.RB13_13 RangedBucket seq=1 label=100k - 150k low=100000.0 high=150000.0 style=C.RB13_1 RangedBucket seq=2 label=150k - 250k low=150000.0 high=250000.0 style=C.RB13_4 RangedBucket seq=3 label=250k - 350k low=250000.0 high=350000.0 style=C.RB13_7 RangedBucket seq=4 label=350k - 450k low=350000.0 high=450000.0 style=C.RB13_10 Buckets BucketStyle AdvancedStyle style styles map_request

3.2.19 styles Element

The styles element has the following definition: ELEMENT styles style+ The styles element specifies one or more style elements described in Section 3.2.18 . MapViewer Map Request XML API 3-51

3.2.20 theme Element

The theme element has the following definition: ELEMENT theme jdbc_query | jdbc_image_query | jdbc_georaster_query | jdbc_network_query | jdbc_topology_query | map_tile_theme?, operations? ATTLIST theme name CDATA REQUIRED datasource CDATA IMPLIED template_theme CDATA IMPLIED max_scale CDATA IMPLIED min_scale CDATA IMPLIED label_max_scale CDATA IMPLIED label_min_scale CDATA IMPLIED label_always_on TRUE|FALSE FALSE fast_unpickle TRUE|FALSE TRUE mode CDATA IMPLIED min_dist CDATA IMPLIED fixed_svglabel TRUE|FALSE FALSE visible_in_svg TRUE|FALSE TRUE selectable_in_svg TRUE|FALSE FALSE part_of_basemap TRUE|FALSE FALSE simplify_shapes TRUE|FALSE TRUE transparency CDATA IMPLIED minimum_pixels CDATA IMPLIED onclick CDATA IMPLIED onmousemove CDATA IMPLIED onmouseover CDATA IMPLIED onmouseout CDATA IMPLIED workspace_name CDATA IMPLIED workspace_savepoint CDATA IMPLIED workspace_date CDATA IMPLIED workspace_date_format CDATA IMPLIED fetch_size CDATA IMPLIED timeout CDATA IMPLIED The theme element lets you specify a predefined or dynamically defined theme. ■ For a predefined theme, whose definition is already stored in your USER_SDO_ THEMES view, only the theme name is required. ■ For a dynamically defined theme, you must provide the information in one of the following elements: jdbc_query described in Section 3.2.9 , jdbc_image_ query described in Section 3.2.7 , jdbc_georaster_query described in Section 2.3.4 , jdbc_network_query described in Section 2.3.5 , or jdbc_ topology_query described in Section 2.3.6 . ■ For a GeoRaster theme, you can define some image processing options described in Section 3.2.14 . The name attribute identifies the theme name. For a predefined theme, the name must match a value in the NAME column of the USER_SDO_THEMES view described in Section 2.9.2 . For a dynamically defined theme, this is just a temporary name for referencing the jdbc_query-based theme. datasource is an optional attribute that specifies a data source for the theme. If you do not specify this attribute, the data source for the map request is assumed see the datasource attribute explanation in Section 3.2.1.1 . By specifying different data sources for different themes, you can use multiple data sources in a map request. 3-52 Oracle Fusion Middleware Users Guide for Oracle MapViewer template_theme is an optional attribute that can be used to render two or more themes when a predefined theme has same name in multiple data sources. You cannot repeat theme names in a map request, but if you have two different data sources with same predefined theme name, you can use this attribute to render both themes. The following example specifies two themes that are based on a US_STATES theme that exists in two data sources, but that has a different content in each data source. themes theme name=US_STATES datasource=dsrc theme name=OTHER_US_STATES template_theme=US_STATES datasource=other_dsrc themes The max_scale and min_scale attributes affect the visibility of this theme. If max_ scale and min_scale are omitted, the theme is always rendered, regardless of the map scale. See Section 2.4.1 for an explanation of max_scale and min_scale. The label_max_scale and label_min_scale attributes affect the visibility of feature labels of this theme. If label_max_scale and label_min_scale are omitted, the theme feature labels are always rendered when the map scale is within the visible range of theme scales that is, within the max_scale and min_scale range. See Section 2.4.1 for an explanation of label_max_scale and label_min_ scale. label_always_on is an optional attribute. If it is set to TRUE, MapViewer labels all features of the theme even if two or more labels will overlap in the display. MapViewer always tries to avoid overlapping labels. If label_always_on is FALSE the default, when it is impossible to avoid overlapping labels, MapViewer disables the display of one or more labels so that no overlapping occurs. The label_always_ on attribute can also be specified for a map feature geoFeature element, described in Section 3.2.5 , thus allowing you to control which features will have their labels displayed if label_always_on is FALSE for a theme and if overlapping labels cannot be avoided. fast_unpickle is an optional attribute. If it is TRUE the default, MapViewer uses its own fast unpickling unstreaming algorithm instead of the generic JDBC conversion algorithm to convert SDO_GEOMETRY objects fetched from the database into a Java object accessible to MapViewer. This process improves performance, but occasionally the coordinates may lose some precision around 0.00000005, which can be significant in applications where all precision digits of each coordinate must be kept. If fast_unpickle is set to FALSE, MapViewer uses the generic JDBC conversion algorithm. This process is slower than MapViewer’s fast unpickling process, but there is never any loss of precision. mode is an optional attribute. For a topology theme, you can specify mode=debug to display edges, nodes, and faces, as explained in Section 2.3.6 . The mode attribute is ignored for other types of themes. min_dist is an optional attribute. It specifies the minimum on-screen distance number of pixels between two adjacent shape points on a line string or polygon for rendering of separate shape points. If the on-screen distance between two adjacent shape points is less than the min_dist value, only one shape point is rendered. The default value is 0.5. You can specify higher values to reduce the number of shape points rendered on an SVG map, and thus reduce the size of the resulting SVG file. You can specify different values in different theme definitions, to allow for customized levels of detail in SVG maps. fixed_svglabel is an optional attribute that specifies whether to display the labels on an SVG map using the original fixed labels, but having them appear larger or MapViewer Map Request XML API 3-53 smaller as the zoom level increases zoomin or decreases zoomout, or to use different labels with the same text but different actual sizes so that the apparent size of each label remains the same at all zoom levels. If the fixed_svglabel value is specified as TRUE, the same theme labels are displayed on the map at all zoom levels, with the labels zoomed in and out as the map is zoomed in and out. If the value is FALSE the default, different theme labels are displayed at different zoom levels so that the size of each displayed label appears not to change during zoomin and zoomout operations. visible_in_svg is an optional attribute that specifies whether or not to display the theme on an SVG map. If its value is TRUE the default, the theme is displayed; if it is set to FALSE, the theme is not displayed. However, even if this attribute is set to FALSE, the theme is still rendered to the SVG map: the theme is initially invisible, but you can make it visible later by calling the JavaScript function showTheme defined in the SVG map. For information about using JavaScript functions with SVG maps, see Appendix B . selectable_in_svg is an optional attribute that specifies whether or not the theme is selectable on an SVG map. The default is FALSE; that is, the theme is not selectable on an SVG map. If this attribute is set to TRUE and if theme feature selection is allowed, each feature of the theme displayed on the SVG map can be selected by clicking on it. If the feature is selected, its color is changed and its ID its rowid by default is recorded. You can get a list of the ID values of all selected features by calling the JavaScript function getSelectedIdList defined in the SVG map. For information about using JavaScript functions with SVG maps, see Appendix B . part_of_basemap is an optional attribute. If the map format is SVG and the value of this attribute is TRUE, MapViewer renders the theme as part of and on top of the base map, which is rendered as a raster image. simplify_shapes is an optional attribute that specifies whether or not the shapes are simplified before being rendered. Simplification is useful when you want a map display with less fine resolution than the original geometries. For example, if the display resolution cannot show the hundreds or thousands of turns in the course of a river or in a political boundary, better performance might result if the shapes were simplified to show only the major turns. The default is TRUE; that is, shapes are simplified before being rendered. If this attribute is set to FALSE, MapViewer attempts to render all vertices and line segments from the original geometries, and performance may be slower. transparency is an optional parameter to define the basic alpha composing value to be applied on themes during rendering. The value can be from 0 to 1, with 0 meaning completely transparent and 1 the default meaning completely opaque no transparency. minimum_pixels is an optional parameter that defines the level of resolution to be used on the spatial filter query. This may be useful to avoid rendering too many elements at the same position of the screen. See the Oracle Spatial documentation about the min_resolution and max_resolution options for the SDO_FILTER operator. The unit for minimum_pixels is screen pixels. For example, minimum_ pixels=1 means that the spatial filter query will not return features with a resolution less than the amount that 1 pixel represents for the current device window and current query window onclick is an optional attribute that specifies the name of the JavaScript function to be called when a user clicks on an SVG map and theme feature selection is allowed see the selectable_in_svg attribute explanation. The JavaScript function must be defined in the HTML document that has the SVG map embedded. This function must accept only four parameters: the theme name, the key of the feature, and x and y, 3-54 Oracle Fusion Middleware Users Guide for Oracle MapViewer which specify the coordinates in pixels of the clicked point on the SVG map. For information about using JavaScript functions with SVG maps, see Appendix B . onmousemove is an optional attribute that specifies the name of the JavaScript function to be called when a user moves the mouse on top of any feature of the theme on an SVG map. The JavaScript function must be defined in the HTML document that has the SVG map embedded. This function must accept only four parameters: the theme name, the key of the feature, and x and y, which specify the coordinates in pixels of the point for the move on the SVG map. For information about using JavaScript functions with SVG maps, see Appendix B . onmouseover is an optional attribute that specifies the name of the JavaScript function to be called when a user moves the mouse into a feature of the theme on an SVG map. Unlike the onmousemove function, which is called whenever the mouse moves inside the theme, the onmouseover function is called only once when the mouse moves from outside a feature of the theme to inside a feature of the theme. The JavaScript function must be defined in the HTML document that has the SVG map embedded. This function must accept only four parameters: the theme name, the key of the feature, and x and y, which specify the coordinates in pixels of the point at which the mouse moves inside a feature on the SVG map. For information about using JavaScript functions with SVG maps, see Appendix B . onmouseout is an optional attribute that specifies the name of the JavaScript function to be called when a user moves the mouse out of a feature of the theme on an SVG map. The JavaScript function must be defined in the HTML document that has the SVG map embedded. This function must accept only four parameters: the theme name, the key of the feature, and x and y, which specify the coordinates in pixels of the point at which the mouse moves out of a feature on the SVG map. For information about using JavaScript functions with SVG maps, see Appendix B . workspace_name, workspace_savepoint, workspace_date, and workspace_ date_format are optional attributes related to support for Workspace Manager in Mapviewer, which is explained in Section 2.8 . fetch_size is an optional attribute that specifies how many rows will be prefetched into memory. The default value is 100. timeout is an optional attribute that specifies the number of milliseconds to wait for the connection to the WMS or WFS server.

3.2.21 themes Element