A XML Format for Styles, Themes, Base Maps, and Map Tile Layers
This appendix describes the XML format for defining style, themes, and base maps using the map visualization component metadata views.
These metadata views are described in Map Visualization Component Metadata Views.
The metadata views for map visualization component styles (USER_SDO_STYLES and related views) contain a column named DEFINITION. For each style, the DEFINITION column contains an XML document that defines the style to the rendering engine.
Each style is defined using a syntax that is similar to SVG (scalable vector graphics). In the map visualization component syntax, each style's XML document must contain a single <g>
element, which must have a class
attribute that indicates the type or class of the style. For example, the following defines a color style with a filling color component:
<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<desc> red </desc>
<g class="color" style="fill:#ff1100"/>
</svg>
The map visualization component XML parser looks only for the <g>
element in a style definition; other attributes such as the <desc>
element are merely informational and are ignored.
Note:
You can make the size of a style scalable by specifying a unit other than the default pixel (px
) -- for example, width:15.0km
or stroke-width:10.0m
. For information about using scalable styles, see Scaling the Size of a Style (Scalable Styles).
The metadata views for map visualization component themes (USER_SDO_THEMES and related views) contain a column named STYLING_RULES. For each theme in these views, the STYLING_RULES column contains an XML document (a CLOB value) that defines the styling rules of the theme.
The metadata views for MapViewer base maps (USER_SDO_MAPS and related views) contain a column named DEFINITION. For each base map in these views, the DEFINITION column contains an XML document (a CLOB value) that defines the base map.
The following sections describe the XML syntax for each type of mapping metadata.
- Color Styles
A color style has a fill color, a stroke color, or both. - Marker Styles
A marker style represents a marker to be placed on point features or on label points of area and linear features. - Line Styles
A line style is applicable only to a linear feature, such as a road, railway track, or political boundary. - Area Styles
An area style defines a pattern to be used to fill an area feature. - Text Styles
A text style defines the font and color to be used in labeling spatial features. - Advanced Styles
Advanced styles are structured styles made from simple styles. - Themes: Styling Rules
A theme definition contains one<styling_rules>
element, which may have several other elements depending on the theme type. - Base Maps
A base map definition consists of one or more themes. - Map Tile Layers
An Oracle Maps map tile layer which assembles and displays pregenerated map image tiles from the map tile server,