PK v\Eoa,mimetypeapplication/epub+zipPKv\EiTunesMetadata.plista artistName Oracle Corporation book-info cover-image-hash 993878855 cover-image-path OEBPS/dcommon/oracle-logo.jpg package-file-hash 176599687 publisher-unique-id E10145-07 unique-id 194507751 genre Oracle Documentation itemName Oracle® Fusion Middleware User's Guide for Oracle MapViewer, 11g Release 1 (11.1.1) releaseDate 2012-02-17T00:09:35Z year 2012 PK9,faPKv\EMETA-INF/container.xml PKYuPKv\EOEBPS/vis_xml_styles.htm XML Format for Styles, Themes, Base Maps, and Map Tile Layers

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 MapViewer metadata views described in Section 2.9.

The metadata views for MapViewer 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 MapViewer 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 MapViewer 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.


Scalable Styles:

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 Section 2.2.1.

The metadata views for MapViewer 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:

A.1 Color Styles

A color style has a fill color, a stroke color, or both. When applied to a shape or geometry, the fill color (if present) is used to fill the interior of the shape, and the stroke color (if present) is used to draw the boundaries of the shape. Either color can also have an alpha value, which controls the transparency of that color.

For color styles, the class attribute of the <g> element must be set to "color". The <g> element must have a style attribute, which specifies the color components and their optional alpha value. For example:

You can specify a color value using either a hexadecimal string (such as #00ff00) or a color name from the following list: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow.

To specify transparency for a color style, you can specify fill-opacity and stroke-opacity values from 0 (completely transparent) to 255 (opaque). The following example specifies a fill component with half transparency:

<g class="color" style="fill:#ff00ff;fill-opacity:128">

The following example specifies both stroke and fill opacity:

<g class="color" style= "stroke:red;stroke-opacity:70;
                          fill:#ff00aa;fill-opacity:129">

The syntax for the style attribute is a string composed of one or more name:value pairs delimited by semicolons. (This basic syntax is used in other types of styles as well.)

For stroke colors, you can define a stroke width. The default stroke width when drawing a shape boundary is 1 pixel. To change that, add a stroke-width:value pair to the style attribute string. The following example specifies a stroke width of 3 pixels:

<g class="color" style="stroke:red;stroke-width:3">

A.2 Marker Styles

A marker style represents a marker to be placed on point features or on label points of area and linear features. A marker can be either a vector marker or raster image marker. A marker can also have optional notational text. For a vector marker, the coordinates of the vector elements must be defined in its XML document. For a marker based on a raster image, the XML document for the style indicates that the style is based on an external image.

The marker XML document specifies the preferred display size: the preferred width and height are defined by the width:value;height:value pairs in the style attribute of the <g> element. The class attribute must be set to "marker". Some markers must be overlaid with some notational text, such as a U.S. interstate highway shield marker, which, when rendered, must also have a route number plotted on top of it. The style for such notational text is a style attribute with one or more of the following name-value pairs: font-family:value, font-style:value, font-size:value, and font-weight:value.

The following example defines an image-based marker that specifies font attributes (shown in bold) for any label text that may be drawn on top of the marker:

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<desc></desc>
<g class="marker"           
  style="width:20;height:18;font-family:sans-serif;font-size:9pt;fill:#ffffff">
    <image x="0" y="0" width="9999" height="9999" type="gif" 
           href="dummy.gif"/>
</g>
</svg>

In the preceding example, when the marker is applied to a point feature with a labeling text, the label text is drawn centered on top of the marker, using the specified font family and size, and with the fill color (white in this case) as the text foreground. The label text (495) in Figure A-1 in Section A.2.4 has the text attributes specified in this example.

A.2.1 Vector Marker Styles

A vector marker can be a simple polygon, an optimized rectangle (defined using two points), a single polyline, or a circle, but not any combination of them. For each type of vector marker, its <g> element must contain a corresponding subelement that specifies the geometric information (coordinates for the polygon, optimized rectangle, or polyline, or radius for the circle):

  • A polygon definition uses a <polygon> element with a points attribute that specifies a list of comma-delimited coordinates. For example:

    <g class="marker">
       <polygon points="100,20,40,50,60,80,100,20"/>
    </g>
    
  • An optimized rectangle definition uses a <rect> element with a points attribute that specifies a list of comma-delimited coordinates. For example:

    <g class="marker">
      <rect points="0,0, 120,120"/>
    </g>
    
  • A polyline definition uses a <polyline> element with a points attribute that specifies a list of comma-delimited coordinates. For example:

    <g class="marker">
       <polyline points="100,20,40,50,60,80"/>
    </g>
    
  • A circle definition uses a <circle> element with an r attribute that specifies the radius of the circle. For example:

    <g class="marker">
       <circle r="50"/>
    </g>
    

You can specify a stroke or fill color, or both, for any vector-based marker. The syntax is the same as for the style attribute for a color style. The following example defines a triangle marker that has a black border and that is filled with a half-transparent yellow:

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<g class="marker"  style="stroke:#000000;fill:#ffff00;fill-opacity:128">
     <polygon points="201.0,200.0, 0.0,200.0, 101.0,0.0"/>
</g>
</svg>

A.2.2 Image Marker Styles

For an image marker, its XML document contains an <image> element that identifies the marker as based on an image. The image must be in GIF format, and is stored in the IMAGE column in the styles metadata views.

The following example is an XML document for an image marker:

<?xml version="1.0" standalone="yes"?>
<svg>
   <g class="marker"
             style="width:20;height:18;font-family:sansserif;font-size:9pt">
     <image x="0" y="0" width="9999" height="9999" type="gif" href="dummy.gif"/>
   </g>
</svg>

Note that in the preceding example, it would be acceptable to leave the <image> element empty (that is, <image/>) to create a valid definition with the image to be specified later.

A.2.3 TrueType Font-Based Marker Styles

For a TrueType font-based marker, its marker symbol is stored in a TrueType font file, which has the .ttf file extension and which typically contains many individual symbols or glyphs. Many GIS software packages come with TrueType font files that contain symbols useful for mapping.

Before MapViewer can use a symbol in a TrueType font file, you must do the following:

  1. Import the TrueType font file into the database, preferably by using the Map Builder tool (described in Chapter 9), which causes the symbols in the font file to be inserted into a single row in the system view USER_SDO_STYLES. In this new row, the TYPE column contains the string TTF, and the IMAGE column contains the contents of the TrueType font file. After the import operation, you can use the Map Builder tool to view all the glyphs or symbols contained inside the TrueType font file. Also, because the font file is now physically stored inside a database, it can be shared by all MapViewer users.

  2. Create a MapViewer marker style based on a glyph or symbol inside an imported TrueType font, preferably using the Map Builder tool.

The following example shows the use of a TrueType font-based marker (with TrueType-specific material in bold):

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<g class="marker"  style="fill:#ff0000;width:25;height:25">
  <ttfSymbol fontName="ERS_INCIDENTS" charCode="118" />
</g>
</svg>

A.2.4 Using Marker Styles on Lines

Marker styles are usually applied to point features, in which case the marker style is rendered on the point location that represents the feature. However, with line (line string) features such as highways, the marker must be placed at some point along the line to denote some information about the feature, such as its route number. For example, on maps in the United States, a shield symbol is often placed on top of a highway, with a route number inside the symbol, as shown with Route 495 in Figure A-1.

Figure A-1 Shield Symbol Marker for a Highway

Description of Figure A-1 follows

To achieve the result shown in Figure A-1, you must do the following:

  1. Choose a marker style, and add a text style definition (font family, font size, fill color, and so on), as shown in the example in Section A.2.

  2. Specify the marker style as the labeling style in the styling rules for the theme. The following example shows the XML document with the styling rules for a theme to show highways. A marker style (shown in bold in the example) is specified. The label text (495 in Figure A-1) is a value from the label column, which is named LABEL in this example.

    <?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="political">
    <rule>
       <features style="L.PH"> (name_class = 'I' and TOLL=0) </features>
       <label column="label" style="M.SHIELD1">1</label>
    </rule>
    <styling_rules>
    

MapViewer automatically determines the optimal position on the line for placement of the marker style (the shield in this example).

A.3 Line Styles

A line style is applicable only to a linear feature, such as a road, railway track, or political boundary. In other words, line styles can be applied only to Oracle Spatial geometries with an SDO_GTYPE value ending in 2 (line) or 6 (multiline). (For information about the SDO_GEOMETRY object type and SDO_GTYPE values, see Oracle Spatial Developer's Guide.)

When MapViewer draws a linear feature, a line style tells the rendering engine the color, dash pattern, and stroke width to use. A line style can have a base line element which, if defined, coincides with the original linear geometry. It can also define two edges parallel to the base line. Parallel line elements can have their own color, dash pattern, and stroke width. If parallel lines are used, they must be located to each side of the base line, with equal offsets to it.

To draw railroad-like lines, you need to define a third type of line element in a line style called hashmark. For a <line> element of class hashmark, the first value in the dash array indicates the gap between two hash marks, and the second value indicates the length of the hash mark to either side of the line. The following example defines a hash mark line with a gap of 8.5 screen units and a length of 3 screen units at each side of the base line:

<line class="hashmark" style="fill:#003333"  dash="8.5,3.0"/>

The following example defines a complete line style.

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
   <g class="line" style="fill:#ffff00;stroke-width:5">
      <line class="parallel" style="fill:#ff0000;stroke-width:1.0"/>
      <line class="base" style="fill:black;stroke-width:1.0" dash="10.0,4.0"/>
   </g>
</svg>

In the preceding example, class="line" identifies the style as a line style. The overall fill color (#ffff00) is used to fill any space between the parallel lines and the base line. The overall line width (5 pixels) limits the maximum width that the style can occupy (including that of the parallel lines).

The line style in the preceding example has both base line and parallel line elements. The parallel line element (class="parallel") is defined by the first <line> element, which defines its color and width. (Because the definition does not provide a dash pattern, the parallel lines or edges will be solid.) The base line element (class="base") is defined by the second <line> element, which defines its color, width, and dash pattern.

A marker (such as a direction marker) can be defined for a line style. The marker-name parameter specifies the name of a marker style, the marker-position parameter specifies the proportion (from 0 to 1) of the distance along the line from the start point at which to place the marker, and the marker-size parameter specifies the number of display units for the marker size. The marker orientation follows the orientation of the line segment on which the marker is placed.

The following example defines a line style with direction marker:

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
  <g class="line" style="fill:#33a9ff;stroke-width:4;
      marker-name:M.IMAGE105_BW;marker-position:0.15;marker-size=8">
    <line class="parallel" style="fill:red;stroke-width:1.0"/>
  </g>
</svg>

To get multiple markers, add the multiple-marker attribute to the style definition. In this case the marker-position will define the position for the first marker and the space in between markers. The following example defines a line style with a direction marker that starts at position 0.15 and that is repeated continually with a space of 0.15 between each occurrence.

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
 <g class="line" style="fill:#33a9ff;stroke-width:4;
     marker-name:M.IMAGE105_BW; marker-position:0.15;
     marker-size=8; multiple-marker=true">
   <line class="parallel" style="fill:red;stroke-width:1.0"/>
 </g>
</svg>

A.4 Area Styles

An area style defines a pattern to be used to fill an area feature. In the current release, area styles must be image-based. That is, when you apply an area style to a geometry, the image defining the style is plotted repeatedly until the geometry is completely filled.

The definition of an area style is similar to that of an image marker style, which is described in Section A.2.2.

The following example defines an area style:

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
   <g class="area"  style="stroke:#000000">
      <image/>
   </g>
</svg>

In the preceding example, class="area" identifies the style as an area style. The stroke color (style="stroke:#000000") is the color used to draw the geometry boundary. If no stroke color is defined, the geometry has no visible boundary, although its interior is filled with the pattern image.

You can also specify any line style to be used as the boundary for an area style. The following area style definition uses the line-style keyword (shown in bold in the example) to specify a line style to be used for the borders of features:

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
  <g class="area" style="line-style:L.DPH">
    <image x="0" y="0" width="9999" height="9999" type="gif" href="dummy.gif"/>
  </g>
</svg>

As with the image marker style, the image for an area style must be stored in a separate column (identified in the IMAGE column in the USER_SDO_STYLES and ALL_SDO_STYLES metadata views, which are described in Section 2.9.3).

A.5 Text Styles

A text style defines the font and color to be used in labeling spatial features. The class attribute must have the value "text". For the font, you can specify its style (plain, italic, and so on), font family, size, and weight. To specify the foreground color, you use the fill attribute.

The following example defines a text style:

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
   <g class="text" style="font-style:plain; font-family:Dialog; font-size:14pt;
             font-weight:bold; fill:#0000ff">
    Hello World!
   </g>
</svg>

In the preceding example, the text "Hello World!" is displayed only when the style itself is being previewed in a style creation tool, such as the Map Builder tool. When the style is applied to a map, it is always supplied with an actual text label that MapViewer obtains from a theme.

A text style can provide a floating white background around the rendered text, to make the labels easier to read on a map that has many features. Figure A-2 shows the label Vallejo with a white background wrapping tightly around the letters.

Figure A-2 Text Style with White Background

Description of Figure A-2 follows

To achieve the result shown in Figure A-2, you must specify the float-width attribute in the <g> element of the text style definition. The following example uses the float-width attribute (shown in bold in the example) to specify a white background that extends 3.5 pixels from the boundary of each letter. (The Hello World! text is ignored when the style is applied to the display of labels.)

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<desc></desc>
<g class="text"  float-width="3.5"  
   style="font-style:plain; font-family:Dialog; font-size:12pt; font-weight:bold;
     fill:#000000">
 Hello World!
</g>
</svg>

A.6 Advanced Styles

Advanced styles are structured styles made from simple styles. Advanced styles are used primarily for thematic mapping. The core advanced style is the bucket style (BucketStyle), and every advanced style is a form of bucket style. A bucket style is a one-to-one mapping between a set of primitive styles and a set of buckets. Each bucket contains one or more attribute values of features to be plotted. For each feature, one of its attributes is used to determine which bucket it falls into or is contained within, and then the style assigned to that bucket is applied to the feature.

Two special types of bucket styles are also provided: color scheme (described in Section A.6.2) and variable (graduated) marker (described in Section A.6.3).

Other advanced styles are dot density (described in Section A.6.4), bar chart (described in Section A.6.5), collection (described in Section A.6.6), and variable pie chart (described in Section A.6.7).

A.6.1 Bucket Styles

A bucket style defines a set of buckets, and assigns one primitive style to each bucket. The content of a bucket can be either of the following:

  • A collection of discrete values (for example, a bucket for all counties with a hurricane risk code of 1 or 2, a bucket for all counties with a hurricane risk code of 3, and so on).

  • A continuous range of values (for example, a bucket for all counties with average family income less than $30,000, a bucket for all counties with average family income from $30,000 through $39,999, and so on). In this case, the ranges of a series of buckets can be individually defined (each defined by an upper-bound value and lower-bound value) or equally divided among a master range.

The following code excerpt shows the basic format of a bucket style:

<?xml version="1.0" ?>
<AdvancedStyle>
  <BucketStyle>
    <Buckets>
    . . .
    </Buckets>
  </BucketStyle>
</AdvancedStyle>
 

In contrast with the other (primitive) styles, an advanced style always has a root element identified by the <AdvancedStyle> tag.

For bucket styles, a <BucketStyle> element is the only child of the <AdvancedStyle> element. Each <BucketStyle> element has one or more <Buckets> child elements, whose contents vary depending on the type of buckets.

A.6.1.1 Collection-Based Buckets with Discrete Values

If each bucket of a bucket style contains a collection of discrete values, use a <CollectionBucket> element to represent each bucket. Each bucket contains one or more values. The values for each bucket are listed as the content of the <CollectionBucket> element, with multiple values delimited by commas. The following example defines three buckets.

<?xml version="1.0" ?>
  <AdvancedStyle>
    <BucketStyle>
      <Buckets>
        <CollectionBucket  seq="0" label="commercial"
            style="10015">commercial</CollectionBucket>
        <CollectionBucket  seq="1" label="residential"
            style="10031">residential, rural</CollectionBucket>
        <CollectionBucket  seq="2" label="industrial"
            style="10045">industrial, mining, agriculture</CollectionBucket>
    </Buckets>
  </BucketStyle>
</AdvancedStyle>

In the preceding example:

  • The values for each bucket are one or more strings; however, the values can also be numbers.

  • The name of the style associated with each bucket is given.

  • The label attribute for each <CollectionBucket> element (commercial, residential, or industrial) is used only in a label that is compiled for the advanced style.

  • The order of the <CollectionBucket> elements is significant. However, the values in the seq (sequence) attributes are informational only; MapViewer determines sequence only by the order in which elements appear in a definition.

Although not shown in this example, if you want a bucket for all other values (if any other values are possible), you can create a <CollectionBucket> element with #DEFAULT# as its attribute value. It should be placed after all other <CollectionBucket> elements, so that its style will be rendered last.

To apply label styles to collection-based buckets with discrete values, see Section 2.2.2.

A.6.1.2 Individual Range-Based Buckets

If each bucket of a bucket style contains a value range that is defined by two values, use a <RangedBucket> element to represent each bucket. Each bucket contains a range of values. The following example defines four buckets.

<?xml version="1.0" ?>
 <AdvancedStyle>
   <BucketStyle>
     <Buckets>
          <RangedBucket high="10" style="10015"/>
          <RangedBucket low="10" high="40" style="10024"/>
          <RangedBucket low="40" high="50" style="10025"/>
          <RangedBucket low="50" style="10029"/>
     </Buckets>
   </BucketStyle>
</AdvancedStyle>

Note that for individual range-based buckets, the lower-bound value is inclusive, while the upper-bound value is exclusive (except for the range that has values greater than any value in the other ranges; its upper-bound value is inclusive). No range is allowed to have a range of values that overlaps values in other ranges.

For example, the second bucket in this example (low="10" high="40") will contain any values that are exactly 10, as well as values up to but not including 40 (such as 39 and 39.99). Any values that are exactly 40 will be included in the third bucket.

As with the <CollectionBucket> element, the style associated with each <RangedBucket> element is specified as an attribute.

To apply label styles to individual range-based buckets, see Section 2.2.2.

A.6.1.3 Equal-Ranged Buckets

If a bucket style contains a series of buckets that contain an equally divided range of a master range, you can omit the use of <RangedBucket> elements, and instead specify in the <Buckets> element the master upper-bound value and lower-bound value for the overall range, the number of buckets in which to divide the range, and a list of style names (with one for each bucket). The following example defines five buckets (nbuckets=5) of equal range between 0 and 29:

<?xml version="1.0" ?>
<AdvancedStyle>
   <BucketStyle>
      <Buckets low="0" high="29" nbuckets="5"
          styles="10015,10017,10019,10021,10023"/>
   </BucketStyle>
 </AdvancedStyle>

In the preceding example:

  • If all values are integers, the five buckets hold values in the following ranges: 0 to 5, 6 to 11, 12 to 17, 18 to 23, and 24 to 29.

  • The first bucket is associated with the style named 10015, the second bucket is associated with the style named 10017, and so on.

The number of style names specified must be the same as the value of the nbuckets attribute. The buckets are arranged in ascending order, and the styles are assigned in their specified order to each bucket.

A.6.2 Color Scheme Styles

A color scheme style automatically generates individual color styles of varying brightness for each bucket based on a base color. The brightness is equally spaced between full brightness and total darkness. Usually, the first bucket is assigned the brightest shade of the base color and the last bucket is assigned the darkest shade.

You can include a stroke color to be used by the color style for each bucket. The stroke color is not part of the brightness calculation. So, for example, if a set of polygonal features is rendered using a color scheme style, the interior of each polygon is filled with the color (shade of the base color) for each corresponding bucket, but the boundaries of all polygons are drawn using the same stroke color.

You can include an opacity value (0 to 255, for transparent to opaque) for the base color (using the basecolor_opacity attribute) and for the stroke color (using the strokecolor_opacity attribute).

The following example defines a color scheme style with a black stroke color and four buckets associated with varying shades of the base color of blue.

<?xml version="1.0" ?>
<AdvancedStyle>
 <ColorSchemeStyle basecolor="blue" strokecolor="black">
   <Buckets>
        <RangedBucket label="&lt;10"  high="10"/>
        <RangedBucket label="10 - 20" low="10" high="20"/>
        <RangedBucket label="20 - 30" low="20" high="30"/>
        <RangedBucket label="&gt;=30" low="30"/>
   </Buckets>
  </ColorSchemeStyle>
</AdvancedStyle>

Note:

For the following special characters, use escape sequences instead.

For <, use: &lt

For >, use: &gt;

For &, use: &amp;


A.6.3 Variable Marker Styles

A variable marker style generates a series of marker styles of varying sizes for each bucket. You specify the number of buckets, the start (smallest) size for the marker, and the size increment between two consecutive markers.

Variable marker styles are conceptually similar to color scheme styles in that both base buckets on variations from a common object: with a color scheme style the brightness of the base color varies, and with a variable marker style the size of the marker varies.

The following example creates a variable marker style with four buckets, each associated with different sizes (in increments of 4) of a marker (m.circle). The marker for the first bucket has a radius of 10 display units, the marker for the second bucket has a radius of 14 display units, and so on. This example assumes that the marker named m.circle has already been defined.

 <?xml version="1.0" ?>
<AdvancedStyle>
  <VariableMarkerStyle basemarker="m.circle" startsize="10" increment="4">
     <Buckets>
         <RangedBucket label="&lt;10"  high="10"/>
         <RangedBucket label="10 - 20" low="10" high="20"/>
         <RangedBucket label="20 - 30" low="20" high="30"/>
         <RangedBucket label="&gt;=30"   low="30"/>
     </Buckets>
  </VariableMarkerStyle>
</AdvancedStyle>

A.6.4 Dot Density Marker Styles

A dot density advanced marker style, when applied to an area feature such as states or counties, randomly draws a set of dots inside the area. The number of dots drawn inside each area is determined by the count value associated with the area. When you define a dot density style, you must specify a marker style that will be used for each of the dots.

The following example shows the XML definition of a simple dot density style:

<?xml version="1.0" ?>
<AdvancedStyle>
        <DotDensityStyle MarkerStyle="M.STAR" DotWidth="8" DotHeight="8">
        </DotDensityStyle>
</AdvancedStyle>

In the preceding example, the marker style M.STAR is used for each dot, and the size of each dot is 8 pixels wide and high.

When you use a dot density style, you should "scale" the count value to a proper range. For example, if you want to apply a dot density style based on the population count for each county, you would not want to use the population count directly (one dot for each person), because this will result in an unacceptable number of drawn dots (for example, if a county has 15,000 people). Instead, supply a scaled down value or expression, such as population/1000, when you define the styling rules for the theme. (MapViewer does not perform any scaling-down internally, so you must do it at the SQL query level.)

A.6.5 Bar Chart Marker Styles

A bar chart advanced marker style is similar to a pie chart style, except that it draws a bar graph for each feature to which it is applied. The following example shows the XML definition of a bar chart style:

<?xml version="1.0" ?>
<AdvancedStyle>
   <BarChartStyle width="30" height="25" show_x_axis="true">
       <Bar name="1990" color="#FF0000" />
       <Bar name="1995" color="#FFC800" />
       <Bar name="1998" color="#0000FF" />
       <Bar name="2000" color="#00FF00" />
       <Bar name="2002" color="#00FFFF" />
   </BarChartStyle>
</AdvancedStyle>

In the preceding example, width and height specify the overall size of the bar chart, including all individuals bars within it.

When a bar chart is drawn on a feature based on a set of values associated with that feature, the height of each bar can be determined by either of two approaches: locally scaled or globally scaled. A locally scaled bar chart determines the height of each bar only from the associated values for that feature; and thus, for example, you cannot compare the second bar of one chart to the second bar on another chart on the same theme. A globally scaled bar chart uses the same bar scale for all charts on the map; and thus, for example, you can compare the second bar of one chart to the second bar on another chart on the same theme.

So, if you want to compare bars not only within the same chart, but also among all the charts showing on the map, you must use globally scaled bar chart style by specifying share_scale="true" in the definition of the bar chart style, as shown in the following example:

<?xml version="1.0" ?>
<AdvancedStyle>
   <BarChartStyle width="40" height="30" share_scale="true"
      min_value="0.0" max_value="100">
       <Bar name="1990" color="#FF0000" />
       <Bar name="1995" color="#FFC800" />
       <Bar name="1998" color="#0000FF" />
       <Bar name="2000" color="#00FF00" />
       <Bar name="2002" color="#00FFFF" />
   </BarChartStyle>
</AdvancedStyle>

When the bar chart style in the preceding example is applied to a theme, MapViewer considers the global range of values of all features in that theme, and then determines the height of each bar based on where a specific value falls in the global range from the minimum value to the maximum value.

A.6.6 Collection Styles

A collection advanced style is simply a collection of other types of styles that are applied together to a feature. This can result in faster rendering of a collection theme compared to using multiple themes based on different styles.

For example, a bar chart style, when applied to a county, draws only the bar chart somewhere inside the county, but the county itself (its boundary and interior area) is not drawn. However, you probably want to see the underlying boundaries of the counties, to see which bar chart belongs to which county. To do this without a collection style, you would have to define a second theme in which each county is being associated with a color or area style. This approach would result in two rendering passes (because two themes are involved) for essentially the same group of features.

However, by using a collection style in this example, you can define a single style that refers to both the bar chart and the color or area style, and then apply the collection style to the theme for the counties. This theme, when rendered by MapViewer, will show both the bar charts and the boundaries on the map.

Another typical use of a collection style is for rendering collection type topology features, each of which can contain multiple types of geometries, such as polygons (areas), points, and lines. In such cases, a collection style can include styles that are most appropriate for each type of geometry in a collection topology feature.

The following example shows the XML definition of a collection style:

<?xml version="1.0" standalone="yes"?>
 <AdvancedStyle>
   <CollectionStyle>
     <style name="C.COUNTIES" shape="polygon" />
     <style name="L.PH" shape="line" />
     <style name="M.CIRCLE" shape="point" />
   </CollectionStyle>
  </AdvancedStyle>

A.6.7 Variable Pie Chart Styles

A variable pie chart generates a series of pie circles of varying sizes for each bucket. You specify the pie slice information, the start (smallest) radius size for a pie circle, and the radius size increment between two consecutive circles.

Variable pie chart styles are conceptually similar to variable marker styles. With a variable marker style the base marker size varies, whereas with the variable pie chart style the circle radius varies.

The following example creates a definition for a variable pie chart style with four buckets, each associated with different sizes (in increments of 4) of a circle with start radius of 5. The circle radius for the first bucket has a radius of 5 display units, the circle for the second bucket has a radius of 9 display units, and so on.

<?xml version="1.0" ?>
<AdvancedStyle>
  <VariablePieChartStyle startradius="5" increment="4">
    <PieSlice name="WHITE" color="#FFFFFF"/>
    <PieSlice name="BLACK" color="#000000"/>
    <PieSlice name="HISPANIC" color="#FF0000"/>
   <Buckets>
    <RangedBucket seq="0" label="0 - 6194757.2" low="0" high="6194757.2" />
    <RangedBucket seq="1" label="6194757.2 - 1.23895144E7" low="6194757.2" high="1.23895144E7"/>
    <RangedBucket seq="2" label="1.23895144E7 - 1.85842716E7" low="1.23895144E7" high="1.85842716E7"/>
    <RangedBucket seq="3" label="1.85842716E7 - 2.47790288E7" low="1.85842716E7" high="2.47790288E7"/>
    <RangedBucket seq="4" label="2.47790288E7 - 3.0973786E7" low="2.47790288E7" high="3.0973786E7"/>
   </Buckets>
  </VariablePieChartStyle>
</AdvancedStyle>

A.6.8 Heat Map Styles

A heat map style can be used to generate a two-dimensional (2D) color map of any point-type data set. The colors represent the distribution density or pattern of the points or events across the region. Internally, MapViewer creates a 2D matrix and assigns a value to each grid cell based on the result of a distance-weighted algorithm run against the point data set.

You can create a heat map style using the Map Builder tool, and assign it as the rendering style for a point-type geometry theme. You can then add this theme to a base map, or add it as a theme-based FOI layer to an interactive Oracle Maps application. Figure A-3 shows a map displayed using a theme based on a heat map style. This map shows the concentration of pizza restaurants: red areas have the highest concentration of pizza restaurants, with concentrations progressively lower for orange, yellow, dark green, lighter green, pale green, and white areas.

Figure A-3 Heat Map Showing Pizza Restaurant Concentration

Description of Figure A-3 follows

The following example creates a definition for a heat map style.

<?xml version="1.0" ?>
<AdvancedStyle>
     <HeatMapStyle>
          <color_stops num_steps="200" alpha="128">
            FFFFFF,00FF00, FFC800,FF0000
          </color_stops>
          <spot_light_radius>75.0mile</spot_light_radius>
          <grid_sample_factor>2.5</grid_sample_factor>
          <container_theme>THEME_DEMO_STATES</container_theme>
    </HeatMapStyle>
</AdvancedStyle>

The preceding example defines these essential aspects of the heat map:

  • Color stops. Color stops are used to generate a color gradient. In this example, the color gradient will go from white (maps to grid cells with a zero value) to green, to orange, and finally to full red (maps to grid cells with highest values). The gradient will have 200 colors that span these 4 color stops. All the colors will have an alpha value of 128 (half transparent, where 0 would be fully transparent and 255 would be opaque).

  • Spot light radius. The spot light radius defines the radius around each grid cell where events or points within this radius will be contributing to the final aggregated value of that cell. The contribution of each point decreases as its distance from the cell center increases, and becomes zero beyond this radius.

    You can specify the radius in pixels or in a real ground unit such as mile. When you specify the radius in pixels (the default if you do not specify a unit), the mapping from the color gradient to the grid cells will vary as the user zooms in and out on the map. This occurs because the number of points fall within the radius is constantly changing as the user zooms in and out. To achieve a fixed heat map regardless of map scale, you must specify the spotlight radius in a ground unit such as meter, km, or mile. The preceding example uses mile.

  • Grid sample factor. The grid sample factor is used to sample the current map window size when creating the internal matrix or grid for heat map calculation. For example, a sample factor of 4 means that the internal heat map grid will be one-fourth (0.25) the actual map window size. So, if the map is 1000x1000 pixels, the internal heat map grid is 250x250. Thus, the lower the grid sample factor value, the larger the internal heat map grid will be; and the higher the value, the smaller the internal heat map grid will be.

    The grid sample factor value probably has more effect on heat map rendering performance than any other attribute, because a large internal heat map grid (resulting from a low grid sample factor value) will significantly increase the overall computation time. A good general guideline is to specify a grid sample factor value high enough so that the internal heat map grid will be 512x512 pixels or smaller.

  • Container theme name. The container theme name specifies the name of a theme (predefined geometry theme in the same database schema) that defines the boundary of the map for the heat map theme. For example, if you are generating a heat map for a point data set that scatters all over the entire United States of America, choose a theme that represents the US national boundary or all the states as its container theme.

    The specified container theme does not affect how the heat map itself is calculated (which is solely based on the point distribution and the spotlight radius). Instead, the container theme it masks out all colored cells that are outside the boundary of the study region. This helps to ensure a "clean" look for the heat map.

After you create a heat map style, you can create a theme for point data and assign the new heat map style as the rendering style for the theme.

Unlike other types of advanced styles, heat map styles do not require any attribute or value columns.

Labels are not supported for themes rendered using heat map styles.

A.7 Themes: Styling Rules

A theme definition contains one <styling_rules> element, which may have several other elements depending on the theme type. This <styling_rules> element is specified in the STYLING_RULES column of the USER_SDO_THEMES metadata view, using the following DTD:

<!ELEMENT styling_rules (rule+, hidden_info?, operations?, bitmap_masks?, parameters?)>
<!ATTLIST styling_rules theme_type         CDATA #IMPLIED
                        key_column         CDATA #IMPLIED
                        caching            CDATA #IMPLIED "NORMAL"
                        image_format       CDATA #IMPLIED
                        image_column       CDATA #IMPLIED
                        image_resolution   CDATA #IMPLIED
                        image_unit         CDATA #IMPLIED
                        raster_id          CDATA #IMPLIED
                        raster_table       CDATA #IMPLIED
                        raster_pyramid     CDATA #IMPLIED
                        raster_bands       CDATA #IMPLIED
                        polygon_mask       CDATA #IMPLIED
                        transparent_nodata CDATA #IMPLIED
                        network_name       CDATA #IMPLIED
                        network_level      CDATA #IMPLIED
                        topology_name      CDATA #IMPLIED
                        service_url        CDATA #IMPLIED
                        srs                CDATA #IMPLIED
                        feature_ids        CDATA #IMPLIED
                        provider_id        CDATA #IMPLIED
                        srid               CDATA #IMPLIED>

<!ELEMENT rule (features, label?, rendering?)>
<!ATTLIST rule column CDATA #IMPLIED>
 
<!ELEMENT features (#PCDATA?, link?, node?, path?)>
<!ATTLIST features style CDATA #REQUIRED>
 
<!ELEMENT label (#PCDATA?, link?, node?, path?)>
<!ATTLIST label column CDATA #REQUIRED
                style  CDATA #REQUIRED>
 
<!ELEMENT link (#PCDATA)>
<!ATTLIST link style                CDATA #REQUIRED
               direction_style      CDATA #IMPLIED
               direction_position   CDATA #IMPLIED
               direction_markersize CDATA #IMPLIED
               column               CDATA #REQUIRED>
 
<!ELEMENT node (#PCDATA)>
<!ATTLIST node style      CDATA #REQUIRED
               markersize CDATA #IMPLIED
               column     CDATA #REQUIRED>
 
<!ELEMENT path (#PCDATA)>
<!ATTLIST path ids    CDATA #REQUIRED
               styles CDATA #REQUIRED
               style  CDATA #REQUIRED
               column CDATA #REQUIRED>

<!ELEMENT hidden_info (field+)>
 
<!ELEMENT field (#PCDATA)> 
<!ATTLIST field column CDATA #REQUIRED
                name   CDATA #IMPLIED>

<!ELEMENT rendering (style+)>
 
<!ELEMENT style (substyle?)>
<!ATTLIST style name          CDATA #REQUIRED
                value_columns CDATA #IMPLIED>
 
<!ELEMENT substyle (#PCDATA)>
<!ATTLIST substyle name          CDATA #REQUIRED
                   value_columns CDATA #REQUIRED
                   changes       CDATA #IMPLIED>
 
<!ELEMENT operations (operation?)>
 
<!ELEMENT operation (parameter?)>
<!ATTLIST operation name CDATA #REQUIRED>
 
<!ELEMENT parameters (parameter?)>
 
<!ELEMENT parameter (#PCDATA)>
<!ATTLIST parameter name  CDATA #REQUIRED
                    value DATA #REQUIRED>
 
<!ELEMENT bitmap_masks (mask+)>
 
<!ELEMENT mask (#PCDATA)>
<!ATTLIST mask raster_id    CDATA #REQUIRED
               raster_table CDATA #REQUIRED
               layers       CDATA #REQUIRED
               zeromapping  CDATA #IMPLIED
               onemapping   CDATA #IMPLIED>

The <styling_rules> element can have a theme_type attribute, which is used mainly for certain types of predefined themes. (The default theme_type attribute value is geometry, which indicates that the theme is based on spatial geometries.) The theme_type attribute values for these special types of predefined themes are as follows:

The <styling_rules> element can have a key_column attribute. This attribute is needed only if the theme is defined on a join view (a view created from multiple tables). In such a case, you must specify a column in the view that will serve as the key column to uniquely identify the geometries or images in that view. Without this key column information, MapViewer will not be able to cache geometries or images in a join view.

The <styling_rules> element can have a caching attribute, which specifies the caching scheme for each predefined theme. The caching attribute can have one of the following values: NORMAL (the default), NONE, or ALL.

For detailed information about the caching of predefined themes, see Section 2.3.1.5.

Each <rule> element must have a <features> element and can have a <label> element and a <rendering> element. The <rendering> element can be used to define multiple render styles, and in this case the render style in the <features> element may be undefined. If the render style in the <features> element is defined and <rendering> element is also defined, MapViewer will first render the style in the <features> element and then render the styles in <rendering> element. (The <rendering> element is explained later in this section.)

The optional column attribute of a <rule> element specifies one or more attribute columns (in a comma-delimited list) from the base table to be put in the SELECT list of the query generated by MapViewer. The values from such columns are usually processed by an advanced style for this theme. The following example shows the use of the column attribute:

<?xml version="1.0" standalone="yes"?>
<styling_rules >
  <rule column="TOTPOP">
    <features style="V.COUNTY_POP_DENSITY">  </features>
  </rule>
</styling_rules>

In the preceding example, the theme's geometry features will be rendered using an advanced style named V.COUNTY_POP_DENSITY. This style will determine the color for filling a county geometry by looking up numeric values in the column named TOTPOP in the base table for this theme.

Each <features> element for a network theme must have a <link>, <node>, or <path> element, or some combination of them. (The <link>, <node>, and <path> elements apply only to network themes, which are explained in Section 2.3.5.) The following example shows the styling rules for a network theme to render links and nodes.

<?xml version="1.0" standalone="yes"?>
<styling_rules theme_type="network"
           network_name="LRS_TEST" network_level="1">
 <rule>
   <features>
     <link style="C.RED"
           direction_style="M.IMAGE105_BW"
           direction_position="0.85"
           direction_markersize="8"></link>
     <node style="M.CIRCLE" markersize="5"></node>
   </features>
 </rule>
</styling_rules>

A <label> element must have a SQL expression as its element value for determining whether or not a label will be applied to a feature. The column attribute specifies a SQL expression for text values to label features, and the style attribute specifies a text style for rendering labels.

The <"=;rendering> element can be used to define multiple rendering styles. The styles are rendered in the order that they appear. Each style in a <rendering> element is defined by a <style> element, which must specify the name attribute and can specify the value_columns attribute. (The value_columns attribute is used with advanced styles, and the column names are added to the list of attributes defined in the column attribute of <rule> element.)

In the <rendering> element, each <style> element can have a <substyle> element that defines the attributes for filling the feature. A <substyle> element must specify the name attribute and can specify the value_columns and changes attributes. For the changes attribute, only the FILL_COLOR value is supported.

The following example shows the styling rules for a geometry theme using the <rendering> element. It defines an advanced style named V.POIVMK to render the feature shape and an advanced substyle named V.POIBKT to fill the feature shape.

<?xml version="1.0" standalone="yes"?>
<styling_rules>
  <rule>
    <features> </features>
    <label column="NAME" style="T.STREET2"> 1 </label>
    <rendering>
      <style name="V.POIVMK" value_columns="FEATURE_CODE">
        <substyle name="V.POIVBKT" value_columns="POINT_ID" changes="FILL_COLOR"/>
      </style>
    </rendering>
  </rule>
</styling_rules>

For more information about using the <rendering> element to apply multiple rendering styles in a single styling rule, see Section 2.3.1.4.

The <hidden_info> element specifies the list of attributes from the base table to be displayed when the user moves the mouse over the theme's features. The attributes are specified by a list of <field> elements.

Each <field> element must have a column attribute, which specifies the name of the column from the base table, and it can have a name attribute, which specifies the display name of the column. (The name attribute is useful if you want a text string other than the column name to be displayed.)

The <operations> element specifies the list of image processing operations to be applied on a GeoRaster theme. The operations are specified by a list of <operation> elements.

The <operation> element specifies the image processing operator and its parameters to be applied on a GeoRaster theme. Each <operation> element may have a list of <parameters> elements.

The <parameters> element defines a list of parameters to be used on a specific task. The parameters are specified by a list of <parameter> elements.

The <parameter> element must have the name and value attributes defined.

The <bitmap_masks> element defines the image mask attributes to be used with a GeoRaster theme. The bitmap masks are specified by a list of <mask> elements.

The <mask> element specifies a bitmap mask to be applied on a GeoRaster object. The raster_id, raster_table, and layers attributes must be defined, while the zeromapping and onemapping attributes are optional.

See Section 2.3.1.1 for more information about styling rules and for an example.

A.8 Base Maps

A base map definition consists of one or more themes. The XML definition of a base map is specified in the DEFINITION column of the USER_SDO_MAPS metadata view, using the following DTD:

<!ELEMENT map_definition (theme+)>

<!ELEMENT theme EMPTY>
<!ATTLIST theme name CDATA #REQUIRED
    name                  CDATA #REQUIRED
    datasource            CDATA #IMPLIED
    template_theme        CDATA #IMPLIED
    max_scale             CDATA #IMPLIED
    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 <map_definition> element contains one or more <theme> elements. Themes are rendered on a map on top of each other, in the order in which they are specified in the definition.

The <theme> element and its attributes are described in Section 3.2.20

See Section 2.4 for more information about defining base maps and for an example.

A.9 Map Tile Layers

An Oracle Maps map tile layer which assembles and displays pregenerated map image tiles from the map tile server, as described in Section 8.2.2.2. The XML configuration settings of a map tile layer is defined using the following DTD:

<!ELEMENT map_tile_layer ((internal_map_source|external_map_source), tile_storage, coordinate_system, tile_image, tile_bound, zoom_levels)>
<!ATTLIST map_tile_layer 
          name CDATA #REQUIRED
          image_format CDATA #IMPLIED>
 
<!ELEMENT internal_map_source EMPTY>
<!ATTLIST internal_map_source 
          data_source CDATA #REQUIRED
          base_map CDATA #REQUIRED
          bgcolor CDATA #IMPLIED
          antialias (TRUE|FALSE) "TRUE">
 
<!ELEMENT external_map_source (properties?)>
<!ATTLIST external_map_source 
          url CDATA #REQUIRED
          request_method CDATA #REQUIRED
          timeout CDATA #IMPLIED
          adapter_class CDATA #REQUIRED
          proxy_host CDATA #IMPLIED
          proxy_port CDATA #IMPLIED
          clipping_buffer CDATA #IMPLIED>
 
<!ELEMENT properties (property+) >
 
<!ELEMENT property EMPTY >
<!ATTLIST property
          name CDATA #REQUIRED 
          value CDATA #REQUIRED>
 
<!ELEMENT tile_storage EMPTY >
<!ATTLIST tile_storage 
          root_path CDATA #REQUIRED >
 
<!ELEMENT coordinate_system EMPTY >
<!ATTLIST coordinate_system 
          srid CDATA #REQUIRED
          minX CDATA #REQUIRED
          minY CDATA #REQUIRED
          maxX CDATA #REQUIRED
          maxY CDATA #REQUIRED>
 
<!ELEMENT tile_bound (coordinates)>
<!ELEMENT coordinates (#PCDATA)>
 
<!ELEMENT tile_image EMPTY >
<!ATTLIST tile_image
          width CDATA #REQUIRED 
          height CDATA #REQUIRED>
 
<!ELEMENT zoom_levels (zoom_level+)>
<!ATTLIST zoom_levels
          levels CDATA #REQUIRED 
          min_scale CDATA #IMPLIED 
          max_scale CDATA #IMPLIED
          min_tile_width CDATA #IMPLIED 
          min_tile_height CDATA #IMPLIED>
 
<!ELEMENT zoom_level (tile_bound?)>
<!ATTLIST zoom_level
          level CDATA #REQUIRED 
          level_name CDATA #IMPLIED
          description CDATA #IMPLIED
          scale CDATA #REQUIRED 
          tile_width CDATA #REQUIRED 
          tile_height CDATA #REQUIRED>
PK7V""PKv\EOEBPS/dcommon/oracle.gifJGIF87aiyDT2F'G;Q_oKTC[ 3-Bq{ttsoGc4I)GvmLZ).1)!ꑈ53=Z]'yuLG*)g^!8C?-6(29K"Ĩ0Яl;U+K9^u2,@@ (\Ȱ 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PEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPPK M'z"zPKv\EOEBPS/dcommon/cpyr.htmD Oracle Legal Notices

Oracle Legal Notices

Copyright Notice

Copyright © 1994-2014, Oracle and/or its affiliates. All rights reserved.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

License Restrictions Warranty/Consequential Damages Disclaimer

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

Hazardous Applications Notice

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Third-Party Content, Products, and Services Disclaimer

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

Alpha and Beta Draft Documentation Notice

If this document is in preproduction status:

This documentation is in preproduction status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.

Oracle Logo

PK0hPKv\EOEBPS/dcommon/blafdoc.cssc@charset "utf-8"; /* Copyright 2002, 2011, Oracle and/or its affiliates. All rights reserved. Author: Robert Crews Version: 2011.8.12 */ body { font-family: Tahoma, sans-serif; /* line-height: 125%; */ color: black; background-color: white; font-size: small; } * html body { /* http://www.info.com.ph/~etan/w3pantheon/style/modifiedsbmh.html */ font-size: x-small; /* for IE5.x/win */ f\ont-size: small; /* for other IE versions */ } h1 { font-size: 165%; font-weight: bold; border-bottom: 1px solid #ddd; width: 100%; text-align: left; } h2 { font-size: 152%; font-weight: bold; text-align: left; } h3 { font-size: 139%; font-weight: bold; text-align: left; } h4 { font-size: 126%; font-weight: bold; text-align: left; } h5 { font-size: 113%; font-weight: bold; display: inline; text-align: left; } h6 { font-size: 100%; font-weight: bold; font-style: italic; display: inline; text-align: left; } a:link { color: #039; background: inherit; } a:visited { color: #72007C; background: inherit; } a:hover { text-decoration: underline; } a img, img[usemap] { border-style: none; } code, pre, samp, tt { font-family: monospace; font-size: 110%; } caption { text-align: center; font-weight: bold; width: auto; } dt { font-weight: bold; } table { font-size: small; /* for ICEBrowser */ } td { vertical-align: top; } th { font-weight: bold; text-align: left; vertical-align: bottom; } li { text-align: left; } dd { text-align: left; } ol ol { list-style-type: lower-alpha; } ol ol ol { list-style-type: lower-roman; } td p:first-child, td pre:first-child { margin-top: 0px; margin-bottom: 0px; } table.table-border { border-collapse: collapse; border-top: 1px solid #ccc; border-left: 1px solid #ccc; } table.table-border th { padding: 0.5ex 0.25em; color: black; background-color: #f7f7ea; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; } table.table-border td { padding: 0.5ex 0.25em; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; } span.gui-object, span.gui-object-action { font-weight: bold; } span.gui-object-title { } p.horizontal-rule { width: 100%; border: solid #cc9; border-width: 0px 0px 1px 0px; margin-bottom: 4ex; } div.zz-skip-header { display: none; } td.zz-nav-header-cell { text-align: left; font-size: 95%; width: 99%; color: black; background: inherit; font-weight: normal; vertical-align: top; margin-top: 0ex; padding-top: 0ex; } a.zz-nav-header-link { font-size: 95%; } td.zz-nav-button-cell { white-space: nowrap; text-align: center; width: 1%; vertical-align: top; padding-left: 4px; padding-right: 4px; margin-top: 0ex; padding-top: 0ex; } a.zz-nav-button-link { font-size: 90%; } div.zz-nav-footer-menu { width: 100%; text-align: center; margin-top: 2ex; margin-bottom: 4ex; } p.zz-legal-notice, a.zz-legal-notice-link { font-size: 85%; /* display: none; */ /* Uncomment to hide legal notice */ } /*************************************/ /* Begin DARB Formats */ /*************************************/ .bold, .codeinlinebold, .syntaxinlinebold, .term, .glossterm, .seghead, .glossaryterm, .keyword, .msg, .msgexplankw, .msgactionkw, .notep1, .xreftitlebold { font-weight: bold; } .italic, .codeinlineitalic, .syntaxinlineitalic, .variable, .xreftitleitalic { font-style: italic; } .bolditalic, .codeinlineboldital, .syntaxinlineboldital, .titleinfigure, .titleinexample, .titleintable, .titleinequation, .xreftitleboldital { font-weight: bold; font-style: italic; } .itemizedlisttitle, .orderedlisttitle, .segmentedlisttitle, .variablelisttitle { font-weight: bold; } .bridgehead, .titleinrefsubsect3 { font-weight: bold; } .titleinrefsubsect { font-size: 126%; font-weight: bold; } .titleinrefsubsect2 { font-size: 113%; font-weight: bold; } .subhead1 { display: block; font-size: 139%; font-weight: bold; } .subhead2 { display: block; font-weight: bold; } .subhead3 { font-weight: bold; } .underline { text-decoration: underline; } .superscript { vertical-align: super; } .subscript { vertical-align: sub; } .listofeft { border: none; } .betadraft, .alphabetanotice, .revenuerecognitionnotice { color: #f00; background: inherit; } .betadraftsubtitle { text-align: center; font-weight: bold; color: #f00; background: inherit; } .comment { color: #080; background: inherit; font-weight: bold; } .copyrightlogo { text-align: center; font-size: 85%; } .tocsubheader { list-style-type: none; } table.icons td { padding-left: 6px; padding-right: 6px; } .l1ix dd, dd dl.l2ix, dd dl.l3ix { margin-top: 0ex; margin-bottom: 0ex; } div.infoboxnote, div.infoboxnotewarn, div.infoboxnotealso { margin-top: 4ex; margin-right: 10%; margin-left: 10%; margin-bottom: 4ex; padding: 0.25em; border-top: 1pt solid gray; border-bottom: 1pt solid gray; } p.notep1 { margin-top: 0px; margin-bottom: 0px; } .tahiti-highlight-example { background: #ff9; text-decoration: inherit; } .tahiti-highlight-search { background: #9cf; text-decoration: inherit; } .tahiti-sidebar-heading { font-size: 110%; margin-bottom: 0px; padding-bottom: 0px; } /*************************************/ /* End DARB Formats */ /*************************************/ @media all { /* * * { line-height: 120%; } */ dd { margin-bottom: 2ex; } dl:first-child { margin-top: 2ex; } } @media print { body { font-size: 11pt; padding: 0px !important; } a:link, a:visited { color: black; background: inherit; } code, pre, samp, tt { font-size: 10pt; } #nav, #search_this_book, #comment_form, #comment_announcement, #flipNav, .noprint { display: none !important; } body#left-nav-present { overflow: visible !important; } } PKr.hcPKv\EOEBPS/dcommon/doccd_epub.jsM /* Copyright 2006, 2012, Oracle and/or its affiliates. All rights reserved. Author: Robert Crews Version: 2012.3.17 */ function addLoadEvent(func) { var oldOnload = window.onload; if (typeof(window.onload) != "function") window.onload = func; else window.onload = function() { oldOnload(); func(); } } function compactLists() { var lists = []; var ul = document.getElementsByTagName("ul"); for (var i = 0; i < ul.length; i++) lists.push(ul[i]); var ol = document.getElementsByTagName("ol"); for (var i = 0; i < ol.length; i++) lists.push(ol[i]); for (var i = 0; i < lists.length; i++) { var collapsible = true, c = []; var li = lists[i].getElementsByTagName("li"); for (var j = 0; j < li.length; j++) { var p = li[j].getElementsByTagName("p"); if (p.length > 1) collapsible = false; for (var k = 0; k < p.length; k++) { if ( getTextContent(p[k]).split(" ").length > 12 ) collapsible = false; c.push(p[k]); } } if (collapsible) { for (var j = 0; j < c.length; j++) { c[j].style.margin = "0"; } } } function getTextContent(e) { if (e.textContent) return e.textContent; if (e.innerText) return e.innerText; } } addLoadEvent(compactLists); function processIndex() { try { if (!/\/index.htm(?:|#.*)$/.test(window.location.href)) return false; } catch(e) {} var shortcut = []; lastPrefix = ""; var dd = document.getElementsByTagName("dd"); for (var i = 0; i < dd.length; i++) { if (dd[i].className != 'l1ix') continue; var prefix = getTextContent(dd[i]).substring(0, 2).toUpperCase(); if (!prefix.match(/^([A-Z0-9]{2})/)) continue; if (prefix == lastPrefix) continue; dd[i].id = prefix; var s = document.createElement("a"); s.href = "#" + prefix; s.appendChild(document.createTextNode(prefix)); shortcut.push(s); lastPrefix = prefix; } var h2 = document.getElementsByTagName("h2"); for (var i = 0; i < h2.length; i++) { var nav = document.createElement("div"); nav.style.position = "relative"; nav.style.top = "-1.5ex"; nav.style.left = "1.5em"; nav.style.width = "90%"; while (shortcut[0] && shortcut[0].toString().charAt(shortcut[0].toString().length - 2) == getTextContent(h2[i])) { nav.appendChild(shortcut.shift()); nav.appendChild(document.createTextNode("\u00A0 ")); } h2[i].parentNode.insertBefore(nav, h2[i].nextSibling); } function getTextContent(e) { if (e.textContent) return e.textContent; if (e.innerText) return e.innerText; } } addLoadEvent(processIndex); PKo"nR M PKv\E OEBPS/toc.ncxm Oracle® Fusion Middleware User's Guide for Oracle MapViewer, 11g Release 1 (11.1.1) Cover Title and Copyright Information Contents List of Examples List of Figures List of Tables Preface New and Changed Features 1 Introduction to MapViewer 2 MapViewer Concepts 3 MapViewer Map Request XML API 4 MapViewer JavaBean-Based API 5 MapViewer JSP Tag Library 6 MapViewer PL/SQL API 7 MapViewer XML Requests: Administrative and Other 8 Oracle Maps 9 Oracle Map Builder Tool A XML Format for Styles, Themes, Base Maps, and Map Tile Layers B JavaScript Functions for SVG Maps C Creating and Registering a Custom Image Renderer D Creating and Registering a Custom Spatial Data Provider E OGC WMS Support in MapViewer Index Copyright PK"}brmPKv\EOEBPS/vis_preface.htm Preface

Preface

Oracle Fusion Middleware User's Guide for Oracle MapViewer describes how to install and use Oracle MapViewer (MapViewer), a tool that renders maps showing different kinds of spatial data.

Audience

This document is intended primarily for programmers who develop applications that require maps to be drawn. You should understand Oracle database concepts and the major concepts associated with XML, including DTDs. You should also be familiar with Oracle Spatial or Oracle Locator concepts, or at least have access to Oracle Spatial Developer's Guide.

This document is not intended for end users of Web sites or client applications.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Related Documentation

For more information, see the following documents in the Oracle Database documentation set:

See also the following document in the Oracle Fusion Middleware documentation set:

Conventions

The following text conventions are used in this document:

ConventionMeaning
boldfaceBoldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italicItalic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospaceMonospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

PKPKv\EOEBPS/content.opf'# Oracle® Fusion Middleware User's Guide for Oracle MapViewer, 11g Release 1 (11.1.1) en-US E10145-07 Oracle Corporation Oracle Corporation Oracle® Fusion Middleware User's Guide for Oracle MapViewer, 11g Release 1 (11.1.1) 2012-02-17T00:09:35Z Describes how to use Oracle MapViewer, a tool that renders maps showing different kinds of spatial data. PKz1,#'#PKv\EOEBPS/vis_beanapi.htm MapViewer JavaBean-Based API

4 MapViewer JavaBean-Based API

This chapter describes the JavaBean-based MapViewer API. This API exposes all capabilities of MapViewer through a single JavaBean, oracle.lbs.mapclient.MapViewer. This bean is a lightweight client that handles all communications with the actual MapViewer service running on the middle tier on behalf of a user making map requests.

All communications between the bean and the actual MapViewer service follow a request/response model. Requests are always sent as XML documents to the service. Depending on the type and nature of a request, the response received by the bean is either an XML document or some binary data. However, using the MapViewer bean is easier than manipulating XML documents for forming and sending MapViewer requests, as well as for extracting information from the responses.

The bean delegates most of map data processing and rendering to the MapViewer service. All the bean does is formulate user requests into valid MapViewer XML requests and send them to a MapViewer service for processing.

This chapter contains the following major sections:

4.1 Usage Model for the MapViewer JavaBean-Based API

The MapViewer bean can be created and used in either server-side objects such as JavaServer Pages (JSP) and servlets, or in client-side objects such as Java applets or standalone Java applications. The bean is a lightweight class that maintains an active HTTP connection to the MapViewer service and the current map request and map response objects. In most cases, you will create only one MapViewer bean and use it for all subsequent tasks; however, you can create more than one bean and use these beans simultaneously. For example, you may need to create a Web page where a small overview map displays the whole world and a large map image displays a more detailed map of the region that is selected on the overview map. In this case, it is probably easier to create two MapViewer beans, one dedicated to the smaller overview map, and the other to the larger detail map.

Figure 4-1 shows some possible usage scenarios for the MapViewer bean.

Figure 4-1 MapViewer Bean Usage Scenarios

Description of Figure 4-1 follows

The MapViewer bean can communicate through the HTTP protocol with the MapViewer service in several usage scenarios, the following of which are shown in Figure 4-1:

  • In a Java application

  • In a Java applet

  • In a servlet within a Java 2 Enterprise Edition (J2EE) container different from the J2EE container that contains the MapViewer service

  • In JavaServer Pages (JSP) code within the J2EE container that contains the MapViewer service

In all usage models, the same JavaBean class is used, and most of its methods apply. However, some methods work or are useful only in a JSP HTML-based context, and other methods work or are useful only in an interactive standalone Java application or applet context (thick clients). For example, consider the following methods of the bean:

  • java.awt.Image getGeneratedMapImage

  • String getGeneratedMapImageURL

Both methods extract the generated map image information from a response received from a MapViewer service; however, the first method returns the actual binary image data that is a java.awt.BufferedImage class, and the second method returns an HTTP URL string to the generated map image that is stored in the host running the MapViewer service. Clearly, if your application is a JavaServer Page, you should use the second method, because otherwise the JSP page will not know how to handle the BufferedImage. However, if you are programming a standalone Java application where you have a Java panel or window for displaying the map, you can use the first method to get the actual image and render it inside your panel or window, plus any other features that you may have created locally and want to render on top of the map.

The set of methods that are only applicable in the thick client context, which are designed to achieve optimal performance for such clients, are described in more detail in Section 4.3.10.

4.2 Preparing to Use the MapViewer JavaBean-Based API

Before you can use the MapViewer JavaBean, the MapViewer mvclient.jar library must be in a directory that is included in the CLASSPATH definition. After you deploy the mapviewer.ear file in OC4J or Oracle Fusion Middleware, the mvclient.jar file is located in the $MAPVIEWER/web/WEB-INF/lib directory. ($MAPVIEWER is the base directory that the mapviewer.ear file is unpacked into by OC4J. In a typical OC4J installation, if you placed the mapviewer.ear file in $OC4J_HOME/j2ee/home/applications, the base directory for unpacked MapViewer is $OC4J_HOME/j2ee/home/applications/mapviewer.)

Before you use the MapViewer JavaBean, you should examine the Javadoc-generated API documentation and try the JSP demo:

  • Javadoc documentation for the MapViewer bean API is available at a URL with the following format:

    http://host:port/mapviewer/mapclient
    

    In this format, host and port indicate where OC4J or Oracle Fusion Middleware listens for incoming requests.

  • A demo supplied with MapViewer shows how to use the bean. After you have set up the MapViewer demo data set (which can be downloaded from the Oracle Technology Network) by importing it into a database and running all necessary scripts, you can try the JSP demo. The URL for the JSP demo has the following format:

    http://host:port/mapviewer/demo/mapinit.jsp
    

    In this format, host and port indicate where OC4J or Oracle Fusion Middleware listens for incoming requests. This JSP page confirms the MapViewer service URL and then proceeds to the real demo page, map.jsp.

4.3 Using the MapViewer Bean

To use the MapViewer bean, you must create the bean (see Section 4.3.1), after which you can invoke methods to do the following kinds of operations:

  • Set up parameters of the current map request (see Section 4.3.2)

  • Add themes or features to the current map request (see Section 4.3.3)

  • Add dynamically defined styles to a map request (see Section 4.3.4)

  • Manipulate the themes in the current map request (see Section 4.3.5)

  • Send a request to the MapViewer service (see Section 4.3.6)

  • Extract information from the current map response (see Section 4.3.7)

  • Obtain information about data sources (see Section 4.3.8)

  • Query nonspatial attributes in the current map window (see Section 4.3.9)

  • Use optimal methods for thick clients (see Section 4.3.10)

The sections about methods for kinds of operations provide introductory information about what the bean can do. For detailed descriptions of each method, including its parameters and return type, see the Javadoc-generated API documentation (described in Section 4.2).

4.3.1 Creating the MapViewer Bean

The first step in any planned use of the MapViewer bean is to create the bean, as shown in the following example:

import oracle.lbs.mapclient.MapViewer;
MapViewer mv = new MapViewer("http://my_corp.com:8888/mapviewer/omserver");

The only parameter to the constructor is a URL to an actual MapViewer service. Unless you change it to something else using setServiceURL, the MapViewer service at this URL will receive all subsequent requests from this bean. When a MapViewer bean is created, it contains an empty current map request. There are a few parameters in the current request that are initialized with default values, such as the width and height of the map image and the background color for maps. These default values are explained in the XML API element and attribute descriptions in Chapter 3.

4.3.2 Setting Up Parameters of the Current Map Request

As explained in Chapter 3, a map request can have many parameters that affect the final look of the generated map image. When you use the MapViewer JavaBean, such parameters can be set through a group of methods whose names start with set. Many of these parameters have a corresponding method that starts with get. For example, setAntiAliasing sets antialiasing on or off, and getAntiAliasing returns the current antialiasing setting.

The methods for setting parameters of the current map request include the following:

  • setAntiAliasing(boolean aa) specifies whether or not the map should be rendered using the antialiasing technique.

  • setBackgroundColor(java.awt.Color bg) sets the background color for the map to be generated.

  • setBackgroundImageURL(java.lang.String bgImgUrl) sets the URL for the background image to be rendered in the map.

  • setBaseMapName(java.lang.String name) sets the name of the base map to be rendered before any explicitly added themes.

  • setBoundingThemes(String[] themeNames, double borderMargin, boolean preserveAspectRatio) sets the bounding themes for the current map request. Any previous center point and box settings will be cleared as a result of calling this method.

  • setBox(double xmin, double ymin, double xmax, double ymax) sets the map query window box in the data coordinate space. Any previous center point and size settings will be lost as a result of calling this method.

  • setCenter(double cx, double cy) sets the center point for this map request. The coordinates must be in the user data space.

  • setCenterAndSize(double cx, double cy, double size) sets the map center and size for the map to be generated. All data must be in the user data space.

  • setDataSourceName(java.lang.String name) sets the name of the data source to be used when loading data for the map.

  • setDefaultStyleForCenter(java.lang.String defRenderStyleName, java.lang.String defLabelStyleName, java.lang.String defLabel, double[] defRadii) sets the default styling and labeling information for the center (point) of the map. Each subsequent map generated will have its center point rendered and optionally labeled with circles of the specified radii.

  • setDeviceSize(java.awt.Dimension dsz) sets the image dimension of the map to be generated.

  • setFullExtent() tells the MapViewer server not to impose any center and size restriction for the next map request. This effectively removes the current map center and size settings. The resulting map will be automatically centered at the full extent of all features being displayed.

  • setImageFormat(int f) sets the image format that MapViewer should use when generating the map. For JSP pages, you should always set it to FORMAT_PNG_URL or FORMAT_GIF_URL.

  • setImageScaling(boolean is) specifies whether images in an image theme should automatically be rescaled to fit the current query window. The default is TRUE. If you specify FALSE, the images will be rendered without any scaling by MapViewer; however, the original query window may be slightly modified to allow other (vector) themes to overlay properly with the images. In all cases, the map center is not changed.

  • setMapLegend(java.lang.String legendSpec) sets the map legend (in XML format) to be plotted with current map. The legend must be specified in the legendSpec parameter, in the format for the <legend> element that is documented in Section 3.2.11.

  • setMapLegend(java.lang.String fill, java.lang.String fillopacity, java.lang.String stroke, java.lang.String profile, java.lang.String position, java.lang.String fontFamily, java.lang.String[][][] legenddata) sets the map request legend to be plotted with current map. The legenddata attribute contains the legend items, and its structure is String [x][y][z] legenddata, where x is the number of legend columns, y is the number of column items, and z is the legend attributes (index 0 = legend text, index 1 = style name, index 2 = is title or not, index 3 = tab, index 4 = is separator or not).

  • setMapLegend(java.lang.String fill, java.lang.String fillopacity, java.lang.String stroke, java.lang.String profile, java.lang.String position, java.lang.String[][][] legenddata) is the same as the preceding method, but without the fontFamily attribute.

  • setMapRequestSRID(int d) sets the map request output SRID, which must match an SRID value in the MDSYS.CS_SRS table. Themes whose SRID value is different from the map request SRID will be automatically converted to the output SRID if the theme SRID is not null or not equal to 0. If no map request SRID is defined (equal to zero), MapViewer will use the theme's SRID as reference, but no transformation will be performed if the themes have different SRID values.

  • setMapResultFileName(String mapFile) sets the name of the resulting map image file on the server side. If the name is set to null (the default), MapViewer will generate map image files based on the prefix omsmap and a counter value. You do not need to specify the extension (.gif or .png) when specifying a custom map file name.

  • setMapTitle(java.lang.String title) sets the map title for the map to be generated.

  • setServiceURL(java.lang.String url) sets the MapViewer service URL.

  • setSize(double size) sets the height (size) in the user data space for the map to be generated.

  • setShowSVGNavBar(boolean s) specifies whether or not to show the built-in SVG navigation bar. The default value is TRUE (that is, show the navigation bar).

  • setSVGOnClick(java.lang.String onClick) sets the onClick function for an SVG map. The onClick function is a JavaScript function defined in the Web page in which the SVG map is embedded. The onClick function is called whenever the SVG map is clicked if both theme feature selection and window selection are disabled. For information about using JavaScript functions with SVG maps, see Appendix B.

  • setSVGShowInfo(boolean info) specifies whether or not to display hidden information when the mouse moves over features for which hidden information is provided. If its value is TRUE (the default), hidden information is displayed when the mouse moves over such features; if it is set to FALSE, hidden information is not displayed when the mouse moves over such features. Regardless of the value, however, hidden information is always rendered in an SVG map; this method only controls whether hidden information can be displayed.

  • setSVGZoomFactor(double zfactor) sets the zoom factor for an SVG map. The zoom factor is the number by which to multiply the current zoom ratio for each integer increment (a zoomin operation) in the zoom level. The inverse of the zoom factor value is used for each integer decrement (a zoomout operation) in the zoom level. For example, if the zfactor value is 2 (the default), zooming in from zoom level 4 to 5 will enlarge the detail by two; for example, if 1 inch of the map at zoom level 4 represents 10 miles, 1 inch of the map at zoom level 5 will represent 5 miles. The zoom ratio refers to the relative scale of the SVG map, which in its original size (zoom level 0) has a zoom ratio of 1.

  • setSVGZoomLevels(int zlevels) sets the number of zoom levels for an SVG map.

  • setSVGZoomRatio(double s) sets the zoom factor to be used when an SVG map is initially loaded. The default value is 1, which is the original map size (zoom level 0). Higher zoom ratio values show the map zoomed in, and lower values show the map zoomed out.

  • setWebProxy(java.lang.String proxyHost, java.lang.String proxyPort) sets the Web proxy to be used when connecting to the MapViewer service. This is needed only if there is a firewall between the Web service and this bean.

You can remove the map legend from the current map request by calling the deleteMapLegend method.

4.3.3 Adding Themes or Features to the Current Map Request

Besides specifying a base map to be included in a map request, you can add themes or individual point and linear features, such as a point of interest or a dynamically generated route, to the current map request. The themes can be predefined themes whose definitions are stored in the database, or dynamic themes where you supply the actual query string when you add the theme to the current request.

There are several kinds of dynamic themes: to retrieve geometric data (JDBC theme), to retrieve image data (image theme), to retrieve GeoRaster data (GeoRaster theme), to retrieve network data (network theme), and to retrieve topology data (topology theme). For dynamic themes and features, you must explicitly specify the styles you want to be used when rendering them. Being able to add dynamic themes and features gives you flexibility in adapting to application development needs.

The methods for adding themes or features to the current map request have names that start with add, and they include the following:

  • addGeoRasterTheme and its variants add GeoRaster data to the current map request. In some cases you supply the query string to retrieve the raster data; in other cases you supply the necessary GeoRaster information to retrieve a specific image. (Section 2.3.4 explains GeoRaster themes.)

  • addImageTheme and its variants add an image theme, for which you must supply the query string for retrieving the image data to be rendered as part of the map. (Section 2.3.3 explains image themes.)

  • addJDBCTheme and its variants add a JDBC theme, for which you must supply the query string for retrieving the geometric data. (Section 2.3.2 explains JDBC themes.)

  • addLinearFeature and its variants add a single linear feature (line string) to the current map request. You must specify a rendering style. You can specify the labeling text and text style for drawing the label, and you can also specify if the label will always be present regardless of any overlapping. The coordinates must be in the user data space. There is no limit to the number of linear features that you can add.

  • addLinksWithinCost adds a network theme to the current map request; the theme will be a result of the within-cost analysis on network data. The within-cost analysis finds all nodes that are within a specified cost, and generates the shortest path to each node.

  • addNetworkLinks adds network links to the current map request as a network theme, for which you must supply the rendering styles.

  • addNetworkNodes adds the network nodes to the current map request as a network theme, for which you must supply the rendering styles.

  • addNetworkPaths adds the network paths to the current map request as a network theme, for which you must supply the rendering styles.

  • addNetworkTheme and its variants add the network links, nodes, and paths to the current map request as a network theme, for which you must supply the rendering styles. (Section 2.3.5 explains network themes.)

  • addPointFeature and its variants add a single feature that is a point to the current map request. This point will be rendered using the supplied rendering style on the map after all themes have been rendered. You can optionally supply a labeling text to be drawn alongside the point feature, and you can specify if the label will always be present regardless of any overlapping. You can also supply an array of radii (the units are always in meters), in which case a series of circles will be drawn centering on the point. The coordinates x and y must be in the user data space. You can assign attribute values to the point feature for use with an advanced style. For oriented point features, you can specify orientation parameters. There is no limit to the number of point features you can add.

  • addPredefinedTheme and its variants add a predefined theme to the current map request.

  • addShortestPath and its variants add a network theme to the current map request; the theme will be a result of the shortest-path analysis on a network data. You must supply the necessary parameters for the shortest-path algorithm.

  • addThemesFromBaseMap(java.lang.String basemap) adds all predefined themes in the specified base map to the current map request. This has an advantage over setBaseMapName, in that you can manipulate the themes for the current map request, as explained in Section 4.3.5.

  • addTopologyDebugTheme and its variants add the topology data structure as a topology debug-mode theme to the current map request. You must supply the rendering styles for the edges, nodes, and faces. (Section 2.3.6 explains topology themes, including the debug mode.)

  • addTopologyTheme adds the topology features as a topology theme to the current map request. You must supply the query string. (Section 2.3.6 explains topology themes.)

You can remove all added point and linear features by calling the removeAllPointFeatures and removeAllLinearFeatures methods, respectively.

4.3.4 Adding Dynamically Defined Styles to a Map Request

Besides the styles stored on the USER_SDO_STYLES view, you can also add dynamically defined (temporary) styles to a map request. These dynamically defined styles provide temporary information for the map request, and they should always be added to the map request before it is sent to the server.

The methods for adding dynamically defined styles to the map request have names that start with add. Effective with release 11g, you can add any kind of dynamically defined style to a map request with the single method addStyle, which has the following definition:

public void addStyle(java.lang.String name,
                     StyleModel tempStyle)

In the preceding definition, StyleModel is an interface defined in the Java client package oracle.mapviewer.share.style. This package and the oracle.mapviewer.share.stylex package also contain concrete style model classes that represent the definitions of all types of styles supported by MapViewer. See the Javadoc reference documentation for information about these packages.

The following code excerpt shows how to use the addStyle method and the ColorStyleModel class to add a dynamic color style to a map request:

import oracle.lbs.mapclient.*;
import oracle.mapviewer.share.*
…
ColorStyleModel csm = new ColorStyleModel();
csm.setFillColor(new Color(255, 0, 0, 100));
csm.setStrokeColor(new Color(0, 0, 255, 100));
mapViewer.addStyle("my_color", csm);

As an alternative to using the addStyle method, you can use the following methods for adding specific types of styles:

  • addBucketStyle(java.lang.String name, java.lang.String low, java.lang.String high, int nbuckets, java.lang.String []styleName) adds a bucket style with equal intervals, for which you specify the range values, the number of buckets, and the style name for each bucket.

  • addCollectionBucketStyle(java.lang.String name, java.lang.String []label, java.lang.String []styleName, java.lang.String [][]value) adds a collection bucket style, for which you specify the label, the style name, and the values for each bucket.

  • addColorSchemeStyle(java.lang.String name, java.lang.String baseColor, java.lang.String strokeColor, java.lang.String low, java.lang.String high, int nbuckets) adds a color scheme style with equal intervals, for which you specify the color parameters, the range values, and the number of buckets.

  • addColorSchemeStyle(java.lang.String name, java.lang.String baseColor, java.lang.String strokeColor, java.lang.String []label, java.lang.String []low, java.lang.String []high) adds a color scheme style, for which you specify the color parameters and the range values.

  • addColorStyle(java.lang.String name, java.lang.String stroke, java.lang.String fill, int strokeOpacity, int fillOpacity) adds a color style with the specifieY}d color parameters.

  • addImageAreaStyleFromURL(java.lang.String styleName, java.lang.String imgURL) adds a GIF or JPEG image as an area symbol to the MapViewer client.

  • addImageAreaStyleFromURL(java.lang.String styleName, java.lang.String imgURL, java.lang.String lineStyle) adds a GIF or JPEG image as an area symbol to the MapViewer client. You can also specify parameters for stroking the boundary of the area being filled.

  • addImageMarkerStyleFromURL(java.lang.String styleName, java.lang.String imgURL, java.lang.String strokeColor, float strokeWidth, int strokeOpacity) adds a GIF image as a marker symbol to the MapViewer client.

  • addImageMarkerStyleFromURL(java.lang.String styleName, java.lang.String imgURL) adds a GIF image as a marker symbol to the MapViewer client. You can also specify parameters for the desired width and height of the image when applied to features on a map, as well as the font properties of any text label that will go inside or on top of the marker.

  • addImageMarkerStyleFromURL(java.lang.String styleName, java.lang.String imgURL) adds a GIF image as a marker symbol to the MapViewer client.

  • addImageMarkerStyleFromURL(java.lang.String styleName, java.lang.String imgURL, int desiredWidth, int desiredHeight, java.lang.String fontName, int fontSize, java.lang.String fontStyle, java.lang.String fontWeight, java.lang.String fontColor) adds a GIF image as a marker symbol to the MapViewer client. You can also specify parameters for the desired width and height of the image when applied to features on a map, as well as the font properties of any text label that will go inside or on top of the marker.

  • addLineStyle(java.lang.String name, java.lang.String fill, java.lang.String strokeWidth, boolean hasBase, java.lang.String baseFill, java.lang.String baseStroke, java.lang.String baseDash, boolean hasParallel, java.lang.String fillParallel, java.lang.String strokeParallel, boolean hasHashMark, java.lang.String fillHash, java.lang.String dashHash) adds a line style to the MapViewer client.

  • addLineStyle(java.lang.String name, java.lang.String fill, java.lang.String strokeWidth, boolean hasBase, java.lang.String baseFill, java.lang.String baseStroke, java.lang.String baseDash, boolean hasParallel, java.lang.String fillParallel, java.lang.String strokeParallel, boolean hasHashMark, java.lang.String fillHash, java.lang.String dashHash, java.lang.String measureMarker, double measurePosition, int measureSize) adds a line style to the MapViewer client.

  • addMarkerStyle(java.lang.String name, int mktype, java.lang.String strokeColor, java.lang.String fillColor, java.lang.String markerWidth, java.lang.String markerHeight, java.lang.String coords, java.lang.String radius) adds a vector marker style with the given parameters. The available vector marker style types are MARKER_POLYGON, MARKER_POLYLINE, MARKER_CIRCLE, and MARKER_RECT.

  • addTextStyle(java.lang.String name, java.lang.String style, java.lang.String family, java.lang.String size, java.lang.String weight, java.lang.String fill) adds a text style with the specified parameters.

  • addVariableMarkerStyle(java.lang.String name, java.lang.String []label, java.lang.String baseMarker, int startSize,int increment, java.lang.String []low, java.lang.String []high) adds a variable marker style, for which you specify the parameters for the base marker, and also the label and the values for each bucket.

You can remove a dynamically defined style from the current map request by calling the deleteStyle(java.lang.String name) method, or you can remove all dynamically defined styles from the current map request by calling the removeAllDynamicStyles method.

4.3.5 Manipulating Themes in the Current Map Request

After you add themes using any of the methods that start with add, you can manipulate them, performing such operations as listing their names, moving them up or down in rendering order for the current request, and even disabling themes and enabling themes that had been disabled. However, you cannot manipulate themes that are implicitly included when you set a base map (using the setBaseMapName method), because the list of themes in the base map is not actually included until the MapViewer service processes the request.

The methods for manipulating themes in the current map request include the following:

  • deleteAllThemes deletes all added themes from the current map request.

  • deleteTheme(java.lang.String name) deletes an explicitly added theme from the current map request.

  • enableThemes(java.lang.String[] themes) enables all themes whose names appear in the supplied list.

  • getActiveTheme(double currentScale) gets the name of the active theme, that is, the top theme on the current display map.

  • getEnabledThemes gets a list of all themes that are currently enabled.

  • getThemeEnabled(java.land.String themeName) determines whether or not a specified theme is currently enabled.

  • getThemeNames returns an ordered list of names of themes that have been explicitly added to the current map request.

  • getThemePosition(java.lang.String name) returns the position in the rendering sequence of an explicitly added theme.

  • getThemeVisibleInSVG(java.lang.String name) determines whether or not a specified theme is currently visible in an SVG map. (If the theme is not visible, it is hidden.)

  • hasThemes checks to see if the current map request has any explicitly added themes. For example, if you have only set the name of the base map in the current request, but have not added any other theme through one of the add*Theme methods, this method returns FALSE.

  • moveThemeDown(int index) moves a theme down one position in the list of themes to be rendered, so that it is rendered later.

  • moveThemeUp(int index) moves a theme up one position in the list of themes to be rendered, so that it is rendered sooner.

  • setAllThemesEnabled(boolean v) sets all themes to be enabled or disabled.

  • setGeoRasterThemePolygonMask(java.lang.String name,double []coords) sets the polygon mask to be applied on the GeoRaster theme. The GeoRaster area outside the polygon mask will be transparent. The coordinates are defined as x1,y1,x2,y2, . . . . The mask coordinates must be in the data coordinate space.

  • setLabelAlwaysOn(boolean labelAlwaysOn, java.lang.String name) controls whether or not MapViewer labels all features in a theme even if two or more labels will overlap in the display of a theme. (MapViewer always tries to avoid overlapping labels.) If labelAlwaysOn is TRUE, MapViewer displays the labels for all features even if two or more labels overlap. If labelAlwaysOn is FALSE, when it is impossible to avoid overlapping labels, MapViewer disables the display of one or more labels so that no overlapping occurs.

  • setNetworkThemeLabels(java.lang.String name, java.lang.String linkLabelStyle, java.lang.String linkLabelColumn, java.lang.String nodeLabelStyle, java.lang.String nodeLabelColumn, java.lang.String pathLabelStyle, java.lang.String pathLabelColumn) sets network theme label parameters for links, nodes, and paths. The attribute column name must be an existing attribute of the link, node, and path tables.

  • setThemeAlpha(java.lang.String themeName, float alpha) sets the transparency value for an image theme.

  • setThemeEnabled(boolean v, java.lang.String themeName) sets a specified theme to be enabled or disabled in the current map request.

  • setThemeFastUnpickle(java.lang.String name, boolean noUnpickler) specifies whether to use the MapViewer fast unpickling algorithm (TRUE, the default) or the generic JDBC conversion algorithm (FALSE) to convert SDO_GEOMETRY objects fetched from the database into a Java object accessible to MapViewer. The MapViewer fast unpickling algorithm 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. The generic JDBC conversion algorithm is slower than the MapViewer fast unpickling process, but there is never any loss of precision.

  • setThemeOnClickInSVG (java.lang.String theme, java.lang.String onClickFunction) sets the theme's onClick function for an SVG map. The onClick function is a JavaScript function defined in the Web page in which the SVG map is embedded. The onClick function is called whenever the SVG map is clicked if both theme feature selection and window selection are disabled. For information about using JavaScript functions with SVG maps, see Appendix B.

  • setThemeScale(java.lang.String name, double minScale, double maxScale) sets the minimum and maximum scale values for displaying a theme.

  • setThemeSelectableInSVG (java.lang.String theme, boolean sel) sets the theme to be selectable (TRUE) or not selectable (FALSE) in an SVG map. If the theme is set to selectable, any feature of the theme can be selected in the SVG map 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.

  • setThemeUnitAndResolution(java.lang.String themeName, java.lang.String unit, double resolution) sets the unit and resolution values for an image theme.

  • setThemeVisible(java.lang.String name, boolean vis) sets the theme to be visible (TRUE) or hidden (FALSE) in an SVG map. If the theme is set to be hidden, the theme will be still rendered, but will be invisible.

4.3.6 Sending a Request to the MapViewer Service

As an application developer, you typically issue a new map request as a result of certain user input (such as a mouse click on the currently displayed map) or after you have modified some aspect of the map request (such as setting a new background color). In fact, you can issue a map request any time you want, as long as you do not overwhelm the middle-tier MapViewer service with too many rapid requests from the MapViewer bean or beans. The MapViewer service tries to process requests in the order in which they arrive; if you send a second request before receiving the response from the first one, MapViewer continues to process the first request completely before starting to process the second request.

Any modifications to the current map request, such as changing to a new background color or moving a theme down in the rendering sequence, do not take effect in the map display until you send the map request, at which time the MapViewer service actually receives the request and processes it.

The methods for sending a map request to the MapViewer service include the following:

  • run sends the current map request to the MapViewer service, and obtains a map response as sent back by the MapViewer service.

  • pan(int x, int y) pans to the specified device point. Each coordinate is in the screen or display unit, in this case, pixel.

  • zoomIn(double factor) zooms in on the map without changing the other map request parameters.

  • zoomIn(int x, int y, double factor) zooms in on the specified device point.

  • zoomIn(int x1, int y1, int x2, int y2) zooms in on the specified device rectangle.

  • zoomOut(double factor) zooms out on the current map without changing the other map request parameters.

  • zoomOut(int x, int y, double factor) zooms out and recenters the current map.

Each of these methods assembles a single XML map request document based on all properties of the current map request, and then sends it to the MapViewer service. After the MapViewer bean receives the response from the MapViewer service, the bean does any necessary postprocessing and makes the response ready for your use.

As an alternative to using these methods, you can formulate an XML request string outside the bean, and then use the sendXMLRequest(java.lang.String req) method to send the request to the MapViewer service. However, if you use this method, you are responsible for receiving and unpacking the response using the getXMLResponse method, and for parsing and interpreting the response string yourself. The state of the bean remains unchanged, because the methods are only making use of the bean's capability to open an HTTP connection to send and receive documents over the connection.

All methods described in this section throw an exception if any unrecoverable error occurs during the transmission of the request or response, or in the MapViewer service during processing. You are responsible for taking care of such exceptions in any way you consider appropriate, such as by trying the request again or by reporting the problem directly to the user.

4.3.7 Extracting Information from the Current Map Response

You can extract information, such as the generated map image or the URL for the image, from the current map response. The methods for extracting information from the map response include the following:

  • getGeneratedMapImage returns the actual map image data contained in the response from the MapViewer service. You must have set the image format to FORMAT_RAW_COMPRESSED using the setImageFormat method. The getGeneratedMapImage method is primarily used in thick clients, although you may also use it in a JavaServer Page or a servlet (for example, to save the image in a format that is not supported by MapViewer).

  • getGeneratedMapImageURL returns the URL to the currently generated map image in the application server. You must have set the image format to FORMAT_PNG_URL or FORMAT_GIF_URL using the setImageFormat method.

  • getMapMBR returns the MBR (minimum bounding rectangle) for the currently generated map, in the user's data space.

  • getMapResponseString returns the last map response in XML format.

4.3.8 Obtaining Information About Data Sources

The MapViewer bean has methods that you can use to obtain information about data sources. These methods include the following:

  • dataSourceExists(java.lang.String dsrc) checks if a given data source exists in (that is, is known to) the MapViewer service.

  • getDataSources() lists the currently available data sources in the server. This method lists only the names and no other details about each data source (such as database host or user login information).

4.3.9 Querying Nonspatial Attributes in the Current Map Window

It is often necessary to query nonspatial attributes that are associated with the spatial features being displayed in the current map image. For example, assume that you just issued a map request to draw a map of all customer locations within a certain county or postal code. The next logical step is to find more information about each customer being displayed in the resulting map image. In the JSP or HTML environment, because you get only an image back from the MapViewer service, you will need another round-trip to the service to fetch the nonspatial information requested by the user. This section describes a set of methods that can help you do just that. (You can, however, obtain both the nonspatial attribute values of a certain theme and the resulting map image in a single request when the bean is used in a standalone Java application or applet environment, as described in Section 4.3.10.)

A typical situation is that the user clicks on a feature on the displayed map and then wants to find out more (nonspatial attributes) about the feature. This action can be essentially implemented using a query with the desired nonspatial attributes in its SELECT list, and a spatial filter as its WHERE clause. The spatial filter is an Oracle Spatial SQL operator that checks if the geometries in a table column (the column of type SDO_GEOMETRY in the customer table) spatially interact with a given target geometry (in this case, the user's mouse-click point). The spatial filter in the WHERE clause of the query selects and returns only the nonspatial attributes associated with the geometries that are being clicked on by the user.

You will need to call an Oracle Spatial operator to perform the filtering; however, you can use the MapViewer bean-based API to obtain information, and to preassemble the spatial filter string to be appended to the WHERE clause of your query. The identify method simplifies the task even further.

The methods for querying nonspatial attributes in the current map window include the following:

  • doQuery and variants execute a supplied SQL query and return an array of strings representing the result set. These are convenient methods to issue your own query without manually opening a JDBC connection to the database from the bean.

  • doQueryInMapWindow and variants are extensions of doQuery and its variants. They automatically subject the user-supplied query to a spatial filtering process using the current map window.

  • getSpatialFilter(java.lang.String spatialColumn, int srid, boolean pre9i) returns a spatial filter string that can be used as a WHERE clause condition in formulating your own queries in the current map window context. The spatial filter evaluates to TRUE for any geometries that are being displayed in the entire map window. You can use this method to obtain information about every spatial feature of a theme that is being displayed.

  • getSpatialFilter(java.lang.String spatialColumn, int srid, double xl, double yl, double xh, double yh, boolean pre9i) returns a spatial filter string that can be used as a query condition in formulating your queries in the given window. This filter evaluates to TRUE for all geometries that interact with the supplied (xl,yl, xh,yh) data window. The window is not in device or screen coordinate space, but in the user's data space; therefore, you must first call the getUserPoint method to convert the user's mouse-click point to a point in the user data space before using the getSpatialFilter method.

  • getUserPoint(int x, int y) returns the user data space point corresponding to the mouse click.

  • getUserPoint(int x, int y, java.lang.String dataSource, int outSRID) returns the user data space point corresponding to the mouse click, using the specified coordinate system (SRID value).

  • getUserPoint(int x, int y, java.lang.String dataSource, java.lang.String themeName) returns the user data space point corresponding to the mouse click, using the coordinate system (SRID value) associated with the specified theme.

  • getWhereClauseForAnyInteract(java.lang.String spatialColumn, int srid, double x, double y) returns geometries that have any interaction with a specified point in the user's data space. This provides a WHERE clause string that will use a more precise spatial filtering method than the one provided by the getSpatialFilter method.

  • getWhereClauseForAnyInteract(java.lang.String spatialColumn, int srid, double xl, double yl, double xh, double yh) returns the WHERE clause that can be used to find geometries that have any interaction with the specified user space window. It is similar to the getSpatialFilter method, but uses a more precise version of the Oracle Spatial filtering method.

  • identify and variants provide a convenient method for identifying nonspatial attributes. This is desirable if you do not need more flexibility and control over how a nonspatial attribute query should be formulated. As with the doQuery methods, all identify methods return a double String array that contains the result set of the query.

4.3.10 Using Optimal Methods for Thick Clients

When you use the MapViewer bean in a JavaServer Page in an HTML file, a second round-trip to the MapViewer service is needed to obtain nonspatial attributes of features being displayed. It is also true that with a JavaServer Page in an HTML file, even if most themes remain unchanged from one map request to the next (such as when zooming in to the center of a map), all themes must still be reprocessed each time the MapViewer service processes the page, which causes the data for each theme to be retrieved again from the database. (This is mainly due to the stateless nature of the MapViewer service and the insufficient mechanism provided in the JSP context for handling user interaction, which must be based on the request/response model.)

However, when you are working in a thick client environment, such as with J2SE (Java 2 Platform Standard Edition) applications and applets, you can reduce the processing and bandwidth overhead when using the bean. This is primarily because in such environments you have greater control of how content (including the map) should be displayed, you can better respond to the user's interaction, and you can devote more resources to maintaining the states on the client side.

A key optimization available only to the thick client context is live features. Basically, a live feature is a spatial feature that originates from the MapViewer service but exists in the thick client. Each live feature contains the actual shape representing the geometry data, and a set of nonspatial attributes that the user might be interested in. To obtain live features, a thick client must set its parent theme to be clickable. When a map request is sent to the MapViewer service with a clickable theme, MapViewer does not attempt to render features for that theme in the resulting map. Rather, the set of features that would have been drawn as part of the map is returned to the requesting client as an array of live feature objects. The rest of the map is still rendered and transmitted as a single image to the client. After the client has received both the live features and the base image, it must render the live features on top of the accompanying map image, using one of the methods described later in this section.

One benefit of using live features is that the thick client will not need to issue a request for the clickable theme every time a map request is sent. For example, if the request is to zoom in to the current map, the client can determine for each live feature if it should be displayed in the zoomed-in map image. Another, and probably more significant, advantage is that the nonspatial attributes for all features displayed in the map are now readily available to the user. For example, as the user moves the mouse over a range of features on the map, the thick client can immediately get the corresponding nonspatial attributes and display them in a pop-up window that follows the mouse trail. No round-trip to the MapViewer service is needed for this type of action, and the feedback to the user is more responsive.

The methods that are optimal for thick clients include the following:

  • drawLiveFeatures(java.awt.Graphics2D g2, java.awt.Color stroke, java.awt.Color fill, double pointRadius, double strokeWidth) draws all live features that are returned to this client from MapViewer.

  • getLiveFeatureAttrs(int x, int y, int tol) gets the nonspatial attributes of the feature being clicked on by the user.

  • getNumLiveFeatures returns the number of live features currently available.

  • hasLiveFeatures checks if there are any live (clickable) features.

  • highlightFeatures and variants highlight all live features that are intersecting the user-specified rectangle. These methods also let you specify the style for highlighting features.

  • isClickable(java.lang.String themeName) checks if the specified theme is clickable (that is, if users can click on the theme to get its attributes).

  • setClickable(boolean v, java.lang.String themeName) sets the theme clickable (so that its features will be available to the client as live features that users can click on and get attributes of).

To obtain a set of features and keep them live at the thick client, you must first call setClickable to set the theme whose features you want to be live. Then, after you issue the current map request, the bean processes the response from the MapViewer service, which (if it succeeded) contains both a base map image and an array of LiveFeature instances. You can then call getGeneratedMapImage to get and draw the base image, and use drawLiveFeatures to render the set of live features on top of the base map. If the user clicks or moves the mouse over a certain position on the map, you can use the highlightFeatures method to highlight the touched features on the map. You can also use the getLiveFeatureAttrs method to obtain the associated nonspatial attributes of the features being highlighted. You do not have direct access to the LiveFeature instances themselves.

The behavior of calling the methods described in this section in the context of JSP pages is not defined.

PKȽ@7cYPKv\E OEBPS/lot.htm J List of Tables PKD# PKv\EOEBPS/vis_admin.htm MapViewer XML Requests: Administrative and Other

7 MapViewer XML Requests: Administrative and Other

The main use of MapViewer is for processing various map requests. However, MapViewer also accepts through its XML API various administrative (non-map) requests, such as to add a data source, as well as other (general-purpose) requests useful in developing applications, such as to list available themes and base maps. All MapViewer administrative requests require that you log in to the MapViewer administration (Admin) page, for which there is a link on the main MapViewer page; the general-purpose requests can be made from an application without the requirement to log in. This section describes the format for each request and its response.

All XML requests are embedded in a <non_map_request> element and all responses are embedded in a <non_map_response> element, unless an exception is thrown by MapViewer, in which case the response is an <oms_error> element (described in Section 3.5).

The administrative requests are described in sections according to the kinds of tasks they perform:

The section titles often indicate whether a request is administrative or general-purpose.

7.1 Managing Data Sources

You can add, remove, redefine, and list data sources. (For information about data sources and how to define them, see Section 1.5.2.14.)

7.1.1 Adding a Data Source (Administrative)


Note:

This request is typically used during development or testing, when you want to add a data source quickly and dynamically without creating a permanent one (which would involve editing the mapViewerConfig.xml file). For production use, or to take full advantage of what MapViewer provides with a data source, you should always use a permanent data source.

The <add_data_source> element has the following definition:

<!ELEMENT non_map_request  add_data_source>
<!ELEMENT add_data_source  EMPTY>
  <!ATTLIST add_data_source
   name              CDATA #REQUIRED
   container_ds      CDATA #IMPLIED
   jdbc_tns_name     CDATA #IMPLIED
   jdbc_host         CDATA #IMPLIED
   jdbc_port         CDATA #IMPLIED
   jdbc_sid          CDATA #IMPLIED
   jdbc_user         CDATA #IMPLIED
   jdbc_password     CDATA #IMPLIED
   jdbc_mode         (oci8 | thin) #IMPLIED
   number_of_mappers INTEGER #REQUIRED
               >

The name attribute identifies the data source name. The name must be unique among MapViewer data sources. (Data source names are not case-sensitive.)

You must specify a container data source name, a net service name (TNS name), or all necessary connection information. That is, you must specify only one of the following:

  • container_ds

  • jdbc_tns_name

  • jdbc_host, jdbc_port, jdbc_sid, jdbc_mode, jdbc_user, and jdbc_password

The container_ds attribute identifies a data source name that is defined in the J2EE container's Java Naming and Directory Interface (JNDI) namespace. For OC4J, it should be the ejb-location attribute of the data source defined in the data-source.xml file.

The jdbc_tns_name attribute identifies a net service name that is defined in the tnsnames.ora file.

The jdbc_host attribute identifies the database host system name.

The jdbc_port attribute identifies the TNS listener port number.

The jdbc_sid attribute identifies the SID for the database.

The jdbc_user attribute identifies the user to connect to (map).

The jdbc_password attribute identifies the password for the user specified with the jdbc_user attribute. Note that MapViewer does not change this password string in any way; no conversion to upper or lower case is performed. If the database uses case-sensitive passwords, the specified password must exactly match the password in the database.

The jdbc_mode attribute identifies the JDBC connection mode: thin or oci8. If you specify oci8, you must have Oracle Client installed in the middle tier in which MapViewer is running. You do not need Oracle Client if thin is used for all of your data sources.

The number_of_mappers attribute identifies the number of map renderers to be created (that is, the number of requests that MapViewer can process at the same time) for this data source. Any unprocessed map requests are queued and eventually processed. For example, if the value is 3, MapViewer will be able to process at most three mapping requests concurrently. If a fourth map request comes while three requests are being processed, it will wait until MapViewer has finished processing one of the current requests. The maximum number of mappers for a single data source is 64.

Example 7-1 adds a data source named mvdemo by specifying all necessary connection information.

Example 7-1 Adding a Data Source by Specifying Detailed Connection Information

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <add_data_source 
        name="mvdemo" 
        jdbc_host="elocation.us.oracle.com"
        jdbc_port="1521"
        jdbc_sid="orcl"
        jdbc_user="scott"
        jdbc_password="password"
        jdbc_mode="thin"
        number_of_mappers="5"/>
</non_map_request>

Example 7-2 adds a data source named mvdemo by specifying the container data source name.

Example 7-2 Adding a Data Source by Specifying the Container Data Source

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <add_data_source 
        name="mvdemo" 
        container_ds="jdbc/OracleDS"
        number_of_mappers="5"/>
</non_map_request>

The DTD for the response to an add_data_source request has the following format:

<!ELEMENT non_map_response add_data_source>
<!ELEMENT add_data_source  EMPTY>
<!ATTLIST add_data_source
   succeed   (true | false) #REQUIRED
   comment   CDATA #IMPLIED
>

The comment attribute appears only if the request did not succeed, in which case the reason is in the comment attribute. In the following example, succeed="true" indicates that the user request has reached the server and been processed without any exception being raised regarding its validity. It does not indicate whether the user's intended action in the request was actually fulfilled by the MapViewer server. In this example, the appearance of the comment attribute indicates that the request failed, and the string associated with the comment attribute gives the reason for the failure ("data source already exists").

<?xml version="1.0" ?> 
 <non_map_response> 
     <add_data_source succeed="true" comment="data source already exists"/> 
</non_map_response>

7.1.2 Removing a Data Source (Administrative)

The <remove_data_source> element can be used to remove a permanent data source or a dynamically added data source. This element has the following definition:

<!ELEMENT non_map_request remove_data_source>
<!ELEMENT remove_data_source  EMPTY>
<!ATTLIST remove_data_source
   data_source    CDATA #REQUIRED
   jdbc_password  CDATA #REQUIRED
>

The data_source attribute identifies the name of the data source to be removed.

The jdbc_password attribute identifies the login password for the database user in the data source. jdbc_password is required for security reasons (to prevent people from accidentally removing data sources from MapViewer).

Removing a data source only affects the ability of MapViewer to use the corresponding database schema; nothing in that schema is actually removed.

Example 7-3 removes a data source named mvdemo.

Example 7-3 Removing a Data Source

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <remove_data_source data_source="mvdemo" jdbc_password="password"/>
</non_map_request>

The DTD for the response to a remove_data_source request has the following format:

<!ELEMENT non_map_response remove_data_source>
<!ELEMENT remove_data_source  EMPTY>
<!ATTLIST remove_data_source
   succeed  (true | false) #REQUIRED
>

For example:

<?xml version="1.0" ?> 
 <non_map_response> 
    <remove_data_source succeed="true"/> 
</non_map_response>

7.1.3 Redefining a Data Source


Note:

You should use request only during development or testing, and not for production work.

For convenience, MapViewer lets you redefine a data source. Specifically, if a data source with the same name already exists, it is removed and then added using the new definition. If no data source with the name exists, a new data source is added. If an existing data source has the same name, host, port, SID, user name, password, mode, and number of mappers as specified in the request, the request is ignored.

The <redefine_data_source> element has the following definition:

<!ELEMENT non_map_request redefine_data_source>
<!ELEMENT redefine_data_source  EMPTY>
<!ATTLIST redefine_data_source
   name              CDATA #REQUIRED
   container_ds      CDATA #IMPLIED
   jdbc_tns_name     CDATA #IMPLIED
   jdbc_host         CDATA #IMPLIED
   jdbc_port         CDATA #IMPLIED
   jdbc_sid          CDATA #IMPLIED
   jdbc_user         CDATA #IMPLIED
   jdbc_password     CDATA #IMPLIED
   jdbc_mode         (oci8 | thin) #IMPLIED
   number_of_mappers INTEGER #REQUIRED
>

The attributes and their explanations are the same as for the <add_data_source> element, which is described in Section 7.1.1.

The DTD for the response to a redefine_data_source request has the following format:

<!ELEMENT non_map_response redefine_data_source>
<!ELEMENT redefine_data_source  EMPTY>
<!ATTLIST redefine_data_source
   succeed  (true | false) #REQUIRED
>

For example:

<?xml version="1.0" ?> 
 <non_map_response> 
   <redefine_data_source succeed="true"/> 
</non_map_response>

7.1.4 Listing All Data Sources (Administrative or General-Purpose)

The <list_data_sources> element lists all data sources known to the currently running MapViewer. It has the following definition:

<!ELEMENT non_map_request list_data_sources>
<!ELEMENT list_data_sources  EMPTY>

For example:

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <list_data_sources/>
</non_map_request>

The DTD for the response to a list_data_sources request has the following format:

<!ELEMENT non_map_response map_data_source_list>
<!ELEMENT map_data_source_list  (map_data_source*) >
<!ATTLIST map_data_source_list
   succeed      (true|false) #REQUIRED
>
<!ELEMENT map_data_source  EMPTY>
<!ATTLIST map_data_source
   name         CDATA #REQUIRED
   container_ds CDATA #IMPLIED
   host         CDATA #IMPLIED
   sid          CDATA #IMPLIED
   port         CDATA #IMPLIED
   user         CDATA #IMPLIED
   mode         CDATA #IMPLIED
   numMappers   CDATA #REQUIRED
   >

For each data source:

  • If the user issuing the request is logged in as a MapViewer administrator, all data source information except the password for the database user is returned.

  • If the user issuing the request is not logged in as a MapViewer administrator, only the data source name is returned.

The following example is a response that includes information about two data sources when the request is issued by a MapViewer administrator.

<?xml version="1.0" ?> 
<non_map_response> 
<map_data_source_list succeed="true"> 
   <map_data_source name="mvdemo" host="elocation.us.oracle.com"
       sid="orcl" port="1521" user="scott" mode="thin" numMappers="3"/> 
   <map_data_source name="geomedia" host="geomedia.us.oracle.com"
       sid="orcl" port="8160" user="scott" mode="oci8" numMappers="7"/> 
</map_data_source_list> 
</non_map_response>

The following example is a response when the same request is issued by a user that is not a MapViewer administrator.

<?xml version="1.0" ?> 
<non_map_response> 
<map_data_source_list succeed="true"> 
   <map_data_source name="mvdemo"/>
   <map_data_source name="geomedia"/>
</map_data_source_list> 
</non_map_response>

7.1.5 Checking the Existence of a Data Source (General-Purpose)

The <data_source_exists> element lets you find out if a specified data source exists. It has the following definition:

<!ELEMENT non_map_request data_source_exists>
<!ELEMENT data_source_exists  EMPTY>
<!ATTLIST data_source_exists
   data_source   CDATA #REQUIRED
>

For example:

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <data_source_exists data_source="mvdemo"/>
</non_map_request>

The DTD for the response to a data_source_exists request has the following format:

<!ELEMENT non_map_response data_source_exists>
<!ELEMENT data_source_exists  EMPTY>
<!ATTLIST data_source_exists
   succeed   (true | false) #REQUIRED
   exists    (true | false) #REQUIRED
>

The succeed attribute indicates whether or not the request was processed successfully.

The exists attribute indicates whether or not the data source exists.

For example:

<?xml version="1.0" ?> 
<non_map_response>
   <data_source_exists succeed="true" exists="true"/> 
</non_map_response>

7.2 Listing All Maps (General-Purpose)

The <list_maps> element lists all base maps in a specified data source. It has the following definition:

<!ELEMENT non_map_request list_maps>
<!ELEMENT list_maps  EMPTY>
<!ATTLIST list_maps
   data_source   CDATA #REQUIRED
>

The following example lists all base maps in the data source named mvdemo.

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <list_maps data_source="mvdemo"/>
</non_map_request>

The DTD for the response to a list_maps request has the following format:

<!ELEMENT non_map_response map_list>
<!ELEMENT map_list  (map*) >
<!ATTLIST map_list
   succeed   (true | false) #REQUIRED
>
<!ATTLIST map
   name      CDATA #REQUIRED
>

The succeed attribute indicates whether or not the request was processed successfully.

The name attribute identifies each map.

For example:

<?xml version="1.0" ?> 
<non_map_response>
<map_list succeed="true">
  <map name="DEMO_MAP"/> 
  <map name="DENSITY_MAP"/> 
</map_list>
</non_map_response>

7.3 Listing Themes (General-Purpose)

The <list_predefined_themes> element lists either all themes defined in a specified data source or all themes defined in a specified data source for a specified map.

The DTD for requesting all themes defined in a data source regardless of the map associated with a theme has the following definition:

<!ELEMENT non_map_request list_predefined_themes>
<!ELEMENT list_predefined_themes  EMPTY>
<!ATTLIST list_predefined_themes
   data_source   CDATA #REQUIRED
>

The following example lists all themes defined in the data source named mvdemo.

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <list_predefined_themes data_source="mvdemo"/>
</non_map_request>

The DTD for requesting all themes defined in a data source and associated with a specific map has the following definition:

<!ELEMENT non_map_request list_predefined_themes>
<!ELEMENT list_predefined_themes  EMPTY>
<!ATTLIST list_predefined_themes
   data_source CDATA #REQUIRED
   map         CDATA #REQUIRED
>

The following example lists all themes defined in the data source named tilsmenv and associated with the map named QA_MAP.

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <list_predefined_themes data_source="tilsmenv" map="QA_MAP"/>
</non_map_request>

The DTD for the response to a list_predefined_themes request has the following format:

<!ELEMENT non_map_response predefined_theme_list>
<!ELEMENT predefined_theme_list  (predefined_theme*) >
<!ATTLIST predefined_theme_list
   succeed   (true | false) #REQUIRED
>
<!ELEMENT predefined_theme  EMPTY>
<!ATTLIST predefined_theme
   name   CDATA #REQUIRED
>

The succeed attribute indicates whether or not the request was processed successfully.

The name attribute identifies each theme.

For example:

<?xml version="1.0" ?> 
<non_map_response>
<predefined_theme_list succeed="true">
  <predefined_theme name="THEME_DEMO_CITIES"/> 
  <predefined_theme name="THEME_DEMO_BIGCITIES"/> 
  <predefined_theme name="THEME_DEMO_COUNTIES"/> 
  <predefined_theme name="THEME_DEMO_COUNTY_POPDENSITY"/> 
  <predefined_theme name="THEME_DEMO_HIGHWAYS"/> 
  <predefined_theme name="THEME_DEMO_STATES"/> 
  <predefined_theme name="THEME_DEMO_STATES_LINE"/> 
</predefined_theme_list>
</non_map_response>

Note that the order of names in the returned list is unpredictable.

7.4 Listing Styles (General-Purpose)

The <list_styles> element lists styles defined for a specified data source. It has the following definition:

<!ELEMENT non_map_request list_styles>
<!ELEMENT list_styles  EMPTY>
<!ATTLIST list_styles
   data_source   CDATA #REQUIRED
   style_type   (COLOR|LINE|MARKER|AREA|TEXT|ADVANCED)  #IMPLIED
>

If you specify a value for style_type, only styles of that type are listed. The possible types of styles are COLOR, LINE, MARKER, AREA, TEXT, and ADVANCED. If you do not specify style_type, all styles of all types are listed.

The following example lists only styles of type COLOR:

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <list_styles data_source="mvdemo"  style_type="COLOR"/>
</non_map_request>

The DTD for the response to a list_styles request has the following format:

<!ELEMENT non_map_response style_list>
<!ELEMENT style_list  (style*) >
<!ATTLIST style_list
   succeed   (true | false) #REQUIRED
>
<!ELEMENT style  EMPTY>
<!ATTLIST style
   name   CDATA #REQUIRED
>

The following example shows the response to a request for styles of type COLOR:

<?xml version="1.0" ?> 
 <non_map_response> 
 <style_list succeed="true"> 
   <style name="SCOTT:C.BLACK"/> 
   <style name="SCOTT:C.BLACK GRAY"/> 
   <style name="SCOTT:C.BLUE"/> 
   <style name="SCOTT:C.CRM_ADMIN_AREAS"/> 
   <style name="SCOTT:C.CRM_AIRPORTS"/> 
</style_list> 
</non_map_response>

Each style name in the response has the form OWNER:NAME (for example, SCOTT:C.BLACK), where OWNER is the schema user that owns the style.

7.5 Listing Styles Used by a Predefined Theme (General-Purpose)

The <list_theme_styles> element lists all the rendering styles that are referenced in a predefined theme. This is particularly useful if you want to build a legend for a theme yourself, where you need to know which styles are actually being used in that theme. This element has the following definition:

<!ELEMENT non_map_request list_theme_styles>
<!ELEMENT list_theme_styles  EMPTY>
<!ATTLIST list_styles
   data_source   CDATA #REQUIRED
   theme CDATA #REQUIRED
>

The following example requests the styles used by the THEME_DEMO_STATES predefined theme:

<non_map_request>
   <list_theme_styles data_source="mvdemo" theme="THEME_DEMO_STATES"  />
</non_map_request>

The following example shows the response to the preceding request:

<non_map_response>
  <theme_style name="C.US MAP YELLOW" type="COLOR" render="true" label="false" 
    highlight="false" description="Primary color for US maps."/>
  <theme_style name="T.STATE NAME" type="TEXT" render="false" label="true" 
    highlight="false" description="name for states"/>
</non_map_response>

The DTD for the response to a list_theme_styles request has the following format:

<!ELEMENT non_map_response (theme_style*)>
<!ELEMENT theme_style EMPTY>
<!ATTLIST theme_style
    name CDATA #REQUIRED
    type   CDATA (COLOR|LINE|MARKER|AREA|TEXT|ADVANCED)  #REQUIRED
    render CDATA (true|false)  #REQUIRED
    label CDATA (true|false)  #REQUIRED
    highlight CDATA (true|false) #REQUIRED
    description CDATA #IMPLIED
>

In the preceding DTD:

  • The name attribute identifies the name of the style.

  • The type attribute identifies the MapViewer style type.

  • The render attribute indicates whether or not the style is used as a rendering style by the theme.

  • The label attribute indicates whether or not the style is used as a labeling style.

  • The highlight attribute indicates whether or not the style is used as only a highlight style.

  • The description attribute identifies the description as specified in the style definition.

7.6 Managing In-Memory Caches

MapViewer uses two types of in-memory cache:

  • Metadata cache for mapping metadata, such as style, theme, and base map definitions, and the SRID value for SDO_GEOMETRY columns in tables in the cache

  • Spatial data cache for predefined themes (the geometric and image data used in generating maps)

The use of these caches improves performance by preventing MapViewer from accessing the database for the cached information; however, the MapViewer displays might reflect outdated information if that information has changed in the database since it was placed in the cache.

If you want to use the current information without restarting MapViewer, you can clear (invalidate) the content of either or both of these caches. If a cache is cleared, the next MapViewer request will retrieve the necessary information from the database, and will also store it in the appropriate cache.

7.6.1 Clearing Metadata Cache for a Data Source (Administrative)

As users request maps from a data source, MapViewer caches such mapping metadata as style, theme, and base map definitions for that data source, as well as the SRID value for SDO_GEOMETRY columns in tables (such as when rendering a theme for the first time). This prevents MapViewer from unnecessarily accessing the database to fetch the mapping metadata. However, modifications to the mapping metadata, such as those you make using the Map Builder tool, do not take effect until MapViewer is restarted.

If you want to use the changed definitions without restarting MapViewer, you can request that MapViewer clear (that is, remove from the cache) all cached mapping metadata and cached table SRID values for a specified data source. Clearing the metadata cache forces MapViewer to access the database for the current mapping metadata.

The <clear_cache> element clears the MapViewer metadata cache. It has the following definition:

<!ELEMENT non_map_request clear_cache>
<!ELEMENT clear_cache  EMPTY>
<!ATTLIST clear_cache
   data_source  CDATA #REQUIRED
>

The data_source attribute specifies the name of the data source whose metadata is to be removed from the MapViewer metadata cache.

The following example clears the metadata for the mvdemo data source from the MapViewer metadata cache:

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <clear_cache data_source="mvdemo"/>
</non_map_request>

The DTD for the response to a clear_cache request has the following format:

<!ELEMENT non_map_response clear_cache>
<!ELEMENT clear_cache  EMPTY>
<!ATTLIST clear_cache
   succeed   (true | false) #REQUIRED
>

For example:

<?xml version="1.0" ?> 
<non_map_response>
 <clear_cache succeed="true"/> 
</non_map_response>

7.6.2 Clearing Spatial Data Cache for a Theme (Administrative)

MapViewer caches spatial data (geometries or georeferenced images) for a predefined theme as it loads the data from the database into memory for rendering, unless it is told not to do so. (MapViewer does not cache the data for dynamic or JDBC themes.) Thus, if a predefined theme has been frequently accessed, most of its data is probably in the cache. However, if the spatial data for the theme is modified in the database, the changes will not be visible on maps, because MapViewer is still using copies of the data from the cache. To view the modified theme data without having to restart MapViewer, you must first clear the cached data for that theme.

The <clear_theme_cache> element clears the cached data of a predefined theme. It has the following definition:

<!ELEMENT non_map_request clear_theme_cache>
<!ELEMENT clear_theme_cache  EMPTY>
<!ATTLIST clear_theme_cache
   data_source CDATA #REQUIRED
   theme       CDATA #REQUIRED
>

The data_source attribute specifies the name of the data source. The theme attribute specifies the name of the predefined theme in that data source.

The following example clears the cached spatial data for the predefined theme named STATES in the mvdemo data source:

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <clear_theme_cache data_source="mvdemo" theme="STATES"/>
</non_map_request>

The DTD for the response to a clear_theme_cache request has the following format:

<!ELEMENT non_map_response clear_theme_cache>
<!ELEMENT clear_theme_cache  EMPTY>
<!ATTLIST clear_theme_cache
   succeed  (true | false) #REQUIRED
>

For example:

<?xml version="1.0" ?> 
<non_map_response>
 <clear_theme_cache succeed="true"/> 
</non_map_response>

7.7 Editing the MapViewer Configuration File (Administrative)

The <edit_config_file> element lets you edit the MapViewer configuration file (mapViewerConfig.xml). It has the following definition:

<!ELEMENT non_map_request edit_config_file>
<!ELEMENT edit_config_file  EMPTY>

Note:

Use the <edit_config_file> element only if you are running MapViewer in the standalone OC4J environment or in a nonclustered OC4J instance with only one process started. Otherwise, the modifications that you make will be applied only to one MapViewer instance, and inconsistencies may occur.

Specify the request as follows:

<?xml version="1.0" standalone="yes">
<non_map_request>
  <edit_config_file/>
</non_map_request>

After you submit the request, you are presented with an HTML form that contains the current contents of the MapViewer configuration file. Edit the form to make changes to the content, and click the Save button to commit the changes. However, the changes will not take effect until you restart the MapViewer server (see Section 7.8).

7.8 Restarting the MapViewer Server (Administrative)

In general, the safest method for restarting the MapViewer server is to restart its containing OC4J instance. However, if you are running MapViewer in a standalone OC4J environment, or if the OC4J instance is not clustered and it has only one Java process started, you can use the <restart> element to restart MapViewer quickly without restarting the entire OC4J instance. The <restart> element has the following definition:

<!ELEMENT non_map_request edit_config_file>
<!ELEMENT restart  EMPTY>

Specify the request as follows:

<?xml version="1.0" standalone="yes">
<non_map_request>
  <restart/>
</non_map_request>
PK(PKv\EOEBPS/vis_spatial_provider.htm5 Creating and Registering a Custom Spatial Data Provider

D Creating and Registering a Custom Spatial Data Provider

This appendix shows a sample implementation of a spatial data provider, and explains how to register this provider to be used with MapViewer. The complete implementation can be found under the MapViewer web/demo/spatialprovider directory. The implementation uses then following files:

  • us_bigcities.xml: sample XML file that the provider parses

  • customSpatialProviderSample.java: Java implementation of the spatial data provider

  • spatialprovider.jar: jar file with the compiled version of the customSpatialProviderSample.java source file

The us_bigcities.xml file has sections to define the data attributes, the data extents, and the feature information, including the geometry (in GML format) and the attribute values. This file includes the following:

<?xml version="1.0" standalone="yes"?>
<spatial_data>
 
<data_attributes>
  <attribute name="city" type="string" />
  <attribute name="state_abrv" type="string" />
  <attribute name="pop90" type="double" />
</data_attributes>
 
<data_extents>
   <xmin> -122.49586 </xmin>
   <ymin> 29.45765 </ymin>
   <xmax> -73.943849 </xmax>
   <ymax> 42.3831 </ymax>
</data_extents>
 
<geoFeature>
  <attributes> New York,NY,7322564 </attributes>
  <geometricProperty>
    <Point>
      <coordinates>-73.943849, 40.6698</coordinates>
    </Point>
   </geometricProperty>
 </geoFeature>
 
. . .
</spatial_data>

This appendix contains the following major sections:

D.1 Implementing the Spatial Provider Class

The provider must implement the class interface shown in Section 2.3.8. Example D-1 contains the partial code for the spatial provider in the supplied demo. Note that this sample code is deliberately simplified; it is not optimized, and the provider does not create any spatial indexing mechanism.

Example D-1 Implementing the Spatial Provider Class

package spatialprovider.samples;
 
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.io.File;
import java.util.ArrayList;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.Vector;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import oracle.mapviewer.share.Field;
import oracle.mapviewer.share.ext.SDataProvider;
import oracle.mapviewer.share.ext.SDataSet;
import oracle.mapviewer.share.ext.SObject;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import oracle.spatial.geometry.JGeometry;
import oracle.spatial.util.GML;
 
public class CustomSpatialProviderSample implements SDataProvider
{
 ...
 
 /**
  * Constructor.
  */
 public CustomSpatialProviderSample()
 {
   ...
 }
 
 /**
  * Returns the initialization parameters for the provider.
  * The "datadir" parameter should be registered on MapViewer
  * configuration file and can be used to access the data.
  * @return
  */
 public String[] getInitParameterNames()
 {
   return new String[]{ "datadir" };
 }
 
 /**
  * Returns runtime parameter names. Runtime parameters are additional parameters
  * that the provider may use when retrieving the data objects.
  * @return
  */
 public String[] getRuntimeParameterNames()
 {
   return new String[]{ "filename" };
 }
 
 /**
  * Initializes the provider
  * @param params  init properties
  * @return
  */
 public boolean init(Properties params)
 {
   dataDirectory = null;
     if(params == null)
     return true;
     dataDirectory = params.getProperty("datadir");
   if(dataDirectory == null || dataDirectory.trim().length() == 0)
   {
     // try upper case
     dataDirectory = params.getProperty("DATADIR");
     if(dataDirectory == null || dataDirectory.trim().length() == 0)
       System.out.println("FINE: Init properties does not define \"datadir\" parameter.");
   }
       return true;
 }
 
 /**
  * Returns the data set (geometries plus attributes) that intersects the
  * query window. In this sample the data is parsed just once and
  * there is no spatial index for searching. The search is sequential.
  * @param queryWin  search area
  * @param nonSpatialColumns   attribute columns
  * @param params      runtime properties
  * @return
  */
 public SDataSet buildDataSet(Rectangle2D queryWin,
                              String []nonSpatialColumns,
                              Properties params)
 {
   if(!dataParsed)
   {
     dataParsed = parseData(params);
     if(!dataParsed)
       return null;
   }
     if(geometries.size() == 0)
     return null;
 
   SDataSet dataset = new SDataSet();
     boolean fullExtent = isFullExtent(queryWin);
     if(fullExtent)
   {
     for(int i=0;i<geometries.size();i++)
     {
       JGeometry geom = (JGeometry)geometries.get(i);
       SObject obj = new SObject(geom,getGeometryAttributes(nonSpatialColumns,i));
       dataset.addObject(obj);      }
   }
   else
   {
     for(int i=0;i<geometries.size();i++)
     {
       JGeometry geom = (JGeometry)geometries.get(i);
       double []mbr = geom.getMBR();
       if(mbr == null)
         continue;
       Rectangle2D.Double rect = new Rectangle2D.Double(mbr[0],mbr[1],
                                   mbr[2]-mbr[0],
                                   mbr[3]-mbr[1]);
             if(rect.getWidth() == 0. && rect.getHeight() == 0.)
       {
         Point2D.Double pt = new Point2D.Double(mbr[0],mbr[1]);
         if(queryWin.contains(pt))
         {
           SObject obj = new SObject(geom,getGeometryAttributes(nonSpatialColumns,i));
           dataset.addObject(obj);                    }
       }
       else if(queryWin.contains(rect) || queryWin.intersects(rect))
       {
         SObject obj = new SObject(geom,getGeometryAttributes(nonSpatialColumns,i));
         dataset.addObject(obj);
       }
     }        }
     if(dataset.getSize() == 0)
     return null;
       return dataset;
 }
 
 /**
  * Returns the data provider attribute list.
  * @return
  */
 public Field[] getAttributeList(Properties params)
 {
   if(!dataParsed)
   {
     dataParsed = parseData(params);
     if(!dataParsed)
       return null;
   }
     if(attributes.size() == 0)
     return null;
 
   return (Field[])attributes.toArray(new Field[attributes.size()]);
 }
 
 /**
  * Returns the data extents.
  * @return
  */
 public Rectangle2D getDataExtents(Properties params)
 {
   if(!dataParsed)
   {
     dataParsed = parseData(params);
     if(!dataParsed)
       return null;
   }
     if(extents == null || extents.length < 4)
     return null;
   else
     return new Rectangle2D.Double(extents[0],extents[1],
                                   extents[2]-extents[0],
                                   extents[3]-extents[1]);
 }
 
 /**
  * Builds a spatial index for the data. In this sample there is no
  * spatial index. The data is loaded into memory when data is parsed.
  * @return
  */
 public boolean buildSpatialIndex(Properties params)
 {
   return true;
 }
 
}

After you have implemented the provider code, compile it and generate a jar file with this compiled class. The file spatialprovider.jar in the demo directory contains the compiled version of this sample code, and you can use it directly. Copy this jar file to a directory that is part of MapViewer's CLASSPATH definition, such as the web/WB-INF/lib directory.

D.2 Registering the Spatial Provider with MapViewer

To register the spatial provider with MapViewer, add the following in the spatial provider section of the MapViewer configuration file, and then restart MapViewer:

<s_data_provider
  id="xmlProvider"
  class="spatialprovider.samples.CustomSpatialProviderSample"
  >
  <parameters>
    <parameter name="datadir" value="/temp/data" />
  </parameters>
</s_data_provider>

When you restart MapViewer, you should see a console message that the spatial provider has been registered. For example:

2007-10-01 14:30:31.109 NOTIFICATION Spatial Provider xmlProvider has been registered.

D.3 Rendering the External Spatial Data

To enable you to render the sample external spatial data that comes with MapViewer kit., create a data source pointing to this data Example D-2 is an XML request that contains a dynamic custom geometry theme.

Example D-2 Map Request to Render External Spatial Data

<?xml version="1.0" standalone="yes"?>
<map_request
 title="Custom Geometry Theme"
 datasource="mvdemo"
 width="500"
 height="400"
 bgcolor="#a6caf0"
 antialiase="true"
 format="PNG_STREAM"
>
 <center size="40">
   <geoFeature>
     <geometricProperty typeName="center">
       <Point>
         <coordinates>-90,32</coordinates>
       </Point>
     </geometricProperty>
   </geoFeature>
 </center>
 
 <themes>
   <theme name="custom_theme" >
      <custom_geom_theme
        provider_id="xmlProvider"
        srid="8307"
        render_style="M.CIRCLE"
        label_column="city"
        label_style="T.CITY NAME"
        datasource="mvdemo">
      <parameters>
       <parameter name="filename" value="/lbs/demo/spatialprovider/us_bigcities.xml"/>
      </parameters>
     </custom_geom_theme>
   </theme>
 </themes>
</map_request>

In Example D-2, the file name in the <parameter> element points to /lbs/demo/spatialprovider/us_bigcities.xml. If the file path is not accessible to MapViewer, the map request may generate error messages in the log file, such as the following:

07/09/28 10:26:47 ParseData: Can not access file: /lbs/demo/spatialprovider/us_bigcities.xml
07/09/28 10:26:47 ParseData: File to be parsed: /temp/data\us_bigcities.xml
07/09/28 10:26:47 ParseData: File can not be accessed on provider data directory. Copy files there.

When MapViewer searches for the file, it first tries to access the file using the original theme definition parameter; and if that fails, it tries the data directory defined in the MapViewer configuration file (/temp/data in the preceding example error messages). Therefore, if the original theme definition data path is not accessible to MapViewer, copy the data files to the directory defined in the configuration file before you issue the map request.

If MapViewer can find the data file, the map request inExample D-2 should generate an image like the one in Figure D-1.

Figure D-1 Map Image Using Custom Geometry Theme and External Spatial Data

Description of Figure D-1 follows

PK0\55PKv\EOEBPS/vis_start.htm Introduction to MapViewer

1 Introduction to MapViewer

Oracle Mapviewer (MapViewer) is a programmable tool for rendering maps using spatial data managed by Oracle Spatial or Oracle Locator (also referred to as Locator). MapViewer provides tools that hide the complexity of spatial data queries and cartographic rendering, while providing customizable options for more advanced users. These tools can be deployed in a platform-independent manner and are designed to integrate with map-rendering applications.

This chapter contains the following major sections:

1.1 Overview of MapViewer

MapViewer is shipped as part of Oracle Fusion Middleware. Its main deliverable is a J2EE application that can be deployed to a J2EE container, such as that for Oracle Fusion Middleware. MapViewer includes the following main components:

  • A core rendering engine (Java library) named SDOVIS that performs cartographic rendering. A servlet is provided to expose the rendering functions to Web applications.

  • A suite of application programming interfaces (APIs) that allow programmable access to MapViewer features. These APIs include XML, Java, PL/SQL, and an AJAX-based JavaScript API.

  • A graphical Map builder tool that enables you to create map symbols, define spatial data rendering rules, and create and edit MapViewer objects.

  • Oracle Map, which includes map cache and FOI (feature of interest) servers that facilitate the development of interactive geospatial Web applications.

The core rendering engine connects to the Oracle database through Java Database Connectivity (JDBC). It also reads the map metadata (such as map definitions, styling rules, and symbologies created through the Map Builder tool) from the database, and applies the metadata to the retrieved spatial data during rendering operations.

The XML API provides application developers with a versatile interface for submitting a map request to MapViewer and retrieving the map response. The JavaBean-based API and the PL/SQL API provide access to MapViewer's rendering capabilities. The JavaScript API enables you to create highly interactive web applications that use the Oracle Maps feature of MapViewer.

The Map Builder tool simplifies the process of creating and managing map, theme, and symbology metadata in a spatial database. For information about this tool, see Chapter 9.

Oracle Maps, built on core MapViewer features, uses a map tile server that caches map image tiles, and a feature of interest (FOI) server that streams live data out of a database to be displayed as interactive features on a map. You can use the AJAX-based JavaScript API with Oracle Maps to provide sophisticated mapping solutions. Oracle Maps also allows for advanced customization and querying capabilities.

The primary benefit of MapViewer is its integration with Oracle Spatial, Oracle Locator, and Oracle Fusion Middleware. MapViewer supports two-dimensional vector geometries stored in Oracle Spatial, as well as GeoRaster data and data in the Oracle Spatial topology and network data models. Oracle MapViewer is also an Open Geospatial Consortium (OGC)-compliant Web Map Service (WMS) server.

1.1.1 Basic Flow of Action with MapViewer

With MapViewer, the basic flow of action follows a two-step request/response model, whether the client requests a map or some MapViewer administrative action.

For a map request:

  1. The client requests a map, passing in the map name, data source, center location, map size, and, optionally, other data to be plotted on top of a map.

  2. The server returns the map image (or a URL for the image) and the minimum bounding rectangle (MBR) of the map, and the status of the request.

For a MapViewer administrative request:

  1. The client requests a MapViewer administrative action, passing in the specific type of request and appropriate input values.

  2. The server returns the status of the request and the requested information.

Figure 1-1 shows the basic flow of action with MapViewer.

Figure 1-1 Basic Flow of Action with MapViewer

Description of Figure 1-1 follows

1.1.2 MapViewer Architecture

Figure 1-2 illustrates the architecture of MapViewer.

Figure 1-2 MapViewer Architecture

Description of Figure 1-2 follows

As shown in Figure 1-2:

  • MapViewer is part of the Oracle Fusion Middleware middle tier.

  • MapViewer includes a rendering engine.

  • MapViewer can communicate with a client Web browser or application using the HTTP protocol.

  • MapViewer performs spatial data access (reading and writing Oracle Spatial and Oracle Locator data) through JDBC calls to the database.

  • The database includes Oracle Spatial or Oracle Locator, as well as mapping metadata.

1.2 Getting Started with MapViewer

To get started using MapViewer, follow these steps:

  1. Either before or after you install and deploy MapViewer, read Chapter 2 to be sure you understand important terms and concepts.

  2. Ensure that you have the prerequisite software (see Section 1.3).

  3. Install (if necessary) and deploy MapViewer (see Section 1.4).

  4. Use MapViewer for some basic tasks. For example, create an Oracle Maps application (see Chapter 8.

  5. Optionally, use the Map Builder tool (described in Chapter 9) to familiarize yourself with styles, themes, and maps, and the options for each, and optionally to preview spatial data.

1.3 Prerequisite Software for MapViewer

To use MapViewer, you must have the following software:

  • A J2EE server supported by Oracle MapViewer (see http://www.oracle.com/technetwork/middleware/mapviewer/j2ee-server-support-097757.html)

  • Oracle Database with Spatial or Locator (Release 9i or later)

  • Oracle Client (Release 9i or later), if you need to use JDBC Oracle Call Interface (OCI) features. Note that in general, the JDBC thin driver is recommended for use with MapViewer, in which case Oracle Client is not required.

  • Java SDK 1.5 or later

MapViewer also supports the headless AWT mechanism in J2SE SDK, which enables MapViewer to run on Linux or UNIX systems without setting any X11 DISPLAY variable. To enable AWT headless mode on Linux or UNIX systems, specify the following in the command line to start MapViewer:

-Djava.awt.headless=true

1.4 Installing and Deploying MapViewer

This section describes how to install (if necessary) and deploy MapViewer to run in the middle tier. As mentioned previously, MapViewer runs as a J2EE Web application and listens for incoming map requests on the container's HTTP port.

You can deploy MapViewer either in a full Oracle Fusion Middleware environment or to a standalone installation of OC4J. Choose the procedure that applies to your needs:

  • If you have already installed WebLogic Server 10 or later and you want deploy MapViewer to it, follow the instructions in Section 1.4.1.

  • If you have already installed Oracle Fusion Middleware and you want to deploy MapViewer to that instance, follow the instructions in Section 1.4.2.

  • If you have not installed Oracle Fusion Middleware, but have installed the OC4J standalone kit and now want to install and deploy MapViewer, follow the instructions in Section 1.4.3. OC4J standalone is a small footprint J2EE container and Web server provided by Oracle.

  • Alternatively, you can download the latest MapViewer Quick Start kit from the MapViewer page on the Oracle Technology Network (OTN). This kit includes a standalone OC4J with MapViewer already deployed and configured. It takes only minutes to get MapViewer running, and is convenient for testing and basic development.

Regardless of where and how MapViewer is deployed, the application server (or standalone OC4J) will create a home directory for MapViewer during deployment. This directory is typically located under the following directory:

$ORACLE_HOME/j2ee/<oc4j_instance_name>/applications

$ORACLE_HOME is the top directory of either the Application Server or standalone OC4J install. The value for <oc4j_instance_name> is typically home if deployed to standalone OC4J, or the name of the target OC4J instance if deployed to a full Oracle Fusion Middleware installation. This MapViewer directory is typically named mapviewer (or the same as the context path under which MapViewer is deployed), and has many subdirectories. You may wish to familiarize yourself with some of the subdirectories in case you want to perform debugging, administration, or manual configuration.

The following are the main subdirectories of a MapViewer deployment:

/mapviewer
   sql/
   web/
       fsmc/
       WEB-INF/
            lib/
            conf/
            log/
            mapcache/
            classes/
            admin/

The /mapviewer/sql directory contains several SQL scripts that are necessary for installing the MapViewer PL/SQL API package into the database. The /mapviewer/web/fsmc directory contains the JavaScript API library and several tutorials for Oracle Maps. The /mapviewer/web/WEB-INF directory and its subdirectories contain libraries and MapViewer administration and configuration files.

If you want to use GeoRaster themes to view GeoRaster data, after successfully deploying MapViewer you may need to ensure that certain JAI (Java Advanced Imaging) library files are in the MapViewer Java classpath. The library files are jai_core.jar, jai_codec.jar, and jai_imageio.jar, and they can be found in a full Oracle Fusion Middleware or Oracle Database installation, usually under the directory for Oracle Multimedia (formerly called Oracle interMedia) files. You can copy them into the MapViewer WEB-INF/lib directory.

For annotation themes, MapViewer uses the JAXB 2.x libraries jsr173_api.jar, jaxb-api.jar, jaxb-impl.jar, and activation.jar. If you deploy MapViewer with a 10g OC4J instance, you must copy these files to a directory in the MapViewer CLASSPATH definition, such as the WEB-INF/lib directory.

1.4.1 Deploying MapViewer in a WebLogic Server Environment

This section explains how to deploy MapViewer to WebLogic Server Version 10 or 10.3. (Deployment to earlier WebLogic versions has not been tested.) For the deployment:

  • MapViewer must be deployed from an exploded directory.

  • The WebLogic console is used in this section, although you could also use the WLS command line instead.

  • A new WebLogic domain is created to host MapViewer. This approach is recommend because MapViewer is a resource-intensive application, and it is better to run it in a separate environment such as its own domain. However, it is also possible (although not recommended) to deploy MapViewer to an existing WebLogic domain.

The main steps for deploying MapViewer to WebLogic Server are the following:

  1. Unpack the MapViewer EAR Archive.

  2. Configure WebLogic Server.

  3. Deploy and Start MapViewer in WebLogic Server.

  4. As needed, use the MapViewer Administration Page.

1.4.1.1 Unpacking the MapViewer EAR Archive

You must deploy MapViewer from an exploded directory, that is, a directory where mapviewer.ear has already been unpacked. (If you instead, and incorrectly, deploy from the unpacked mapviewer.ear file, MapViewer will fail at run time.)

You can unpack the mapveiwer.ear archive to any directory on the server where WebLogic is running. This directory will become the working folder of your MapViewer installation, in that MapViewer will (by default) read the configuration file from this location, and will save generated map images to a folder under this directory. It is recommended that the directory be a permanent (not temporary) one. It can be a shared directory if you want the same MapViewer binaries to be deployed to multiple WebLogic servers running on multiple hosts.

In the following instructions, assume that you have created a directory named /ul/mapviewer as the top MapViewer directory. (If you create another directory, adapt the instructions accordingly.) Follow these steps:

  1. Copy mapviewer.ear into /ul/mapviewer.

  2. If /ul/mapviewer is not already your current directory, go there.

  3. Rename mapviewer.ear to mapviewer1.ear.

  4. Create a subdirectory named mapviewer.ear.

  5. Unpack mapviewer1.ear into mapviewer.ear (that is, into /ul/mapviewer/mapviewer.ear).

  6. Go to mapviewer.ear.

  7. Rename web.war to web1.war.

  8. Create a subdirectory named web.war.

  9. Unzip web1.war into web.war (that is, into /ul/mapviewer/mapviewer.ear/web.war).

  10. Modify the Mapviewer configuration file (/ul/mapviewer/mapviewer.ear/web.war/WEB-INF/conf/mapViewerConfig.xml) as needed, such as to change its logging level or to add permanent data source definitions. You can also modify this configuration file at any time later.

MapViewer is now unpacked and configured. You must next ensure that WebLogic Server is properly configured for MapViewer, so that you will be able to deploy and run MapViewer in WebLogic Server.

1.4.1.2 Configuring WebLogic Server

To configure WebLogic Server, follow these steps:

  1. Create a new WebLogic domain to host MapViewer by running the following script:

    $BEA_HOME/wlserver_10.0/common/bin/config.sh
    

    This script starts a configuration wizard. It is suggested that you name the administration user weblogic; although if you use a different name, you can specify it when you configure MapViewer. You will use the administration user to log in to the MapViewer Administration page.

  2. Start the domain by running the following script:

    $BEA_HOME/user_projects/domains/map-domain/startWebLogic.sh
    

    where map-domain is the name of the domain that you created in step 1.

1.4.1.3 Deploying and Starting MapViewer in WebLogic Server

After the new domain is running, you can log in to its console to start deploying MapViewer. Follow these steps.

  1. Log in to the console, which is typically accessed at:

    http://<host>:7001/console
    

    where <host> is the host name or IP address of the system running WebLogic server.

  2. In the Change Center, if a Lock & Edit button is visible, click it.

    If a Lock & Edit button is not visible, go to the next step. If this button is not visible, it probably means that the WebLogic server has been configured with the Automatically Acquire Lock and Activate Changes option enabled.

  3. Under Domain Structure, click Deployments.

    The administration console page will look similar to Figure 1-3.

    Figure 1-3 WebLogic Administration Console (Deployments)

    Description of Figure 1-3 follows

  4. Under Deployments, click Install.

    The next page is displayed, as shown in Figure 1-4. Note that the location of the MapViewer directory (/ul/mapviewer/mapviewer.ear in this case) is the name of the directory, not the name of the .ear file.

    Figure 1-4 WebLogic Administration Console (Location)

    Description of Figure 1-4 follows

  5. Click Next.

  6. Select Install this deployment as an application, and click Next.

    A page with the Source Accessibility section is displayed, as shown in Figure 1-5

    Figure 1-5 WebLogic Administration Console (Source Accessibility)

    Description of Figure 1-5 follows

  7. In the Source Accessibility section, select I will make the deployment accessible from the following location.

    This option causes the unpacked MapViewer location to becomes the "working" directory of MapViewer. It also makes it easier if you want to upgrade MapViewer in the future, in which case you simply unpack the new mapviewer.ear file to this directory and restart WebLogic Server.

  8. Click Finish, to start the deployment of MapViewer.

  9. If the WebLogic server has been configured with the Automatically Acquire Lock and Activate Changes option enabled, skip the rest of this step and go to the next step when the deployment is finished.

    If the WebLogic server has not been configured with the Automatically Acquire Lock and Activate Changes option enabled, when the deployment is finished, go to the Change Center, and click Activate Changes and then Release Configuration to complete the deployment process.

  10. Start MapViewer by selecting mapviewer from Deployments, clicking Start, and selecting Servicing all requests, as shown in Figure 1-6

    Figure 1-6 WebLogic Administration Console (Starting MapViewer)

    Description of Figure 1-6 follows

  11. Go to the following location to access MapViewer.

    http://<host>:7001/mapviewer
    

    where <host> is the host name or IP address of the system running WebLogic server.

1.4.1.4 Using the MapViewer Administration Page

When you first click the Admin button on the MapViewer home page, you are prompted for login information. You can use the default WebLogic administration account user name of weblogic to log in; however, if your WebLogic domain administration account uses a different user name, you must change the MapViewer weblogic.xml file, located in $MAPVIEWER_HOME/mapviewer.ear/web.war/WEB-INF/.

To change the weblogic.xml file, open it is a text editor and replace the two occurrences of weblogic with the actual administration account name. The following except shows the lines with the name to be replaced:

<security-role-assignment>
    <role-name>map_admin_role</role-name>
    <principal-name>weblogic</principal-name>
</security-role-assignment>
 
<security-role-assignment>
    <role-name>secure_maps_role</role-name>
    <principal-name>weblogic</principal-name>
</security-role-assignment>

1.4.2 Deploying MapViewer in an Oracle Fusion Middleware 10gR3 Environment

If you have already successfully installed Oracle Fusion Middleware 10gR3, you can deploy the MapViewer using the Oracle Enterprise Manager Server Control web interface. The main steps are the following:

  1. Select an OC4J instance as the target for deploying MapViewer. You can select an existing OC4J instance, or create a new instance specifically for MapViewer. It is suggested that you create a new instance for MapViewer, but it is not required.

  2. Locate the mapviewer.ear file. This file is either shipped with the Oracle Fusion Middleware 10gR3 software or can be downloaded from OTN.

  3. Deploy the mapviewer.ear file to the selected OC4J instance using the Server Control web interface, or use Oracle Fusion Middleware 10gR3 command-line admin tool to deploy MapViewer (or any other J2EE application). For information about using the admin tool, see the Oracle Fusion Middleware Administration Guide.

To start deploying MapViewer, navigate to the Oracle Fusion Middleware 10gR3 Server Control page and select the desired OC4J instance, as shown in Figure 1-7, where the default home OC4J instance is selected.

Figure 1-7 Starting MapViewer Deployment

Description of Figure 1-7 follows

Click Deploy to display a page (shown in Figure 1-8) in which you enter the location of the mapviewer.ear file (a directory named tmp in this figure).

Figure 1-8 Specifying the mapviewer.ear Location

Description of Figure 1-8 follows

Click Next to display a page (shown in Figure 1-9) in which you specify the name of the application.

Figure 1-9 Specifying the Application Name

Description of Figure 1-9 follows

For Application Name, specify mapviewer. The Context Root will be set to /mapviewer by default. Do not use any other value for Context Root. Using any other value will prevent MapViewer from operating.

Click Next to display the Deployment Setting page. You usually do not need to change any of the settings on this page.

Click Deploy on the Deployment Setting page to start the deployment of MapViewer. If the deployment is successful, the Confirmation page is displayed indicating that deployment of the application was successful.

After you complete the deployment, see Section 1.4.4.

1.4.3 Installing MapViewer with a Standalone Installation of OC4J

To install and deploy MapViewer with a standalone installation of OC4J, you must have installed OC4J on your system. The standalone OC4J installation kit is a single zip file that you can download from OTN. It contains the Oracle Container for J2EE and also a lightweight Web server. After you unzip this file, you can start the OC4J instance up by entering the command java –jar oc4j.jar from the $OC4J_HOME/j2ee/home directory, where $OC4J_HOME is the top directory into which you unzipped the installation file.

Note that you must have the Java 1.5 SDK installation, not the JRE installation, in your environment path in order for OC4J to start up and function properly.

Because standalone OC4J version 10.1.3 (or later) comes with its own Server Control Web interface, the deployment of MapViewer is almost exactly as described in Section 1.4.2 once you log in to its Server Control Web page. The only difference is that you will not be able to choose a different OC4J instance, because you are running in a single standalone OC4J instance.

After you complete the deployment, see Section 1.4.4.

1.4.4 After Deploying MapViewer

After successfully deploying MapViewer to Oracle Fusion Middleware 10gR3, standalone OC4J, or WebLogic Server, you may want to verify whether it is actually working, as described in Section 1.4.4.1. It is also a good idea to become familiar with its Web interface, particularly the administration pages.

You must also run at least one, and perhaps several, SQL scripts, as explained in Section 1.4.4.2.

1.4.4.1 Verifying That the Deployment Was Successful

To test if the MapViewer server has started correctly, point your browser to that OC4J instance. For example, if MapViewer is installed on a system named www.example.com and the HTTP port is 8888, enter the following URL to invoke the MapViewer server with a simple get-version request:

http://www.example.com:8888/mapviewer/omserver?getv=t

If MapViewer is running correctly, it should immediately send back a response text string indicating the version and build number, such as the following:

Ver10131_B060225

The actual version and build number will reflect the version that you installed.

If the server has not been started and initialized correctly, there will be no response, or the message 500 internal server error will be displayed.

If the response message includes wording like MapServer is not ready. Please try again later, it could mean that the MapViewer server is initializing, but the process will take some additional time (for example, because the system is slow or because multiple predefined data sources are specified in the configuration file and MapViewer is attempting to connect to these databases). In this case, you can wait at least a few seconds and try the preceding request again.

However, if you continue to get this response message, there may be a problem with the deployment. Check for any error messages, either in the OC4J console for a standalone OC4J deployment or in the redirected output/errors log file of the OC4J instance for a full Oracle Fusion Middleware 10gR3 deployment. The following are common causes of this problem:

  • On a UNIX or Linux operating system, the Java virtual machine (JVM) was not started with the –Djava.awt.headless=true option, and no DISPLAY environment variable is set. This causes the MapViewer server to fail because the server accesses the Java graphics library, which on UNIX and Linux systems relies on the X11 windowing system.

  • You deployed the mapviewer.ear file to an incompatible version of Oracle Fusion Middleware or standalone OC4J. Note that the MapViewer 10.1.3.1 must be deployed to Application Server 10gR3 (or standalone OC4J) 10.1.3 or later. It will not work properly with earlier versions of Oracle Application Server or OC4J.

1.4.4.2 Running SQL Scripts

This section describes SQL scripts, one or more of which you must run while connected as the MDSYS user. For each script that you run, you must run it on each target Oracle database from which MapViewer will render spatial data.

MapViewer uses a set of system views to store necessary mapping metadata in a target database. A target database is a database with Oracle Spatial or Oracle Locator (Release 8.1.6 or later) installed and from which you want MapViewer to be able to render maps. MapViewer requires following system views:

  • USER_SDO_MAPS

  • USER_SDO_THEMES

  • USER_SDO_STYLES

  • USER_SDO_CACHED_MAPS

The USER_SDO_CACHED_MAPS view is used by the Oracle Maps feature. It stores definitions of map tile cache instances. You must create this view manually by running the following script while connected as the SYS user:

$MV_HOME/web/WEB-INF/admin/mcsdefinition.sql

If the target database is release 9.2 or later, the other three views (USER_SDO_MAPS, USER_SDO_THEMES, and USER_SDO_STYLES) are created and populated automatically. However, if the target database has a release number lower than 9.2, you must manually create and populate these views by running the following scripts while connected as the MDSYS user:

$MV_HOME/web/WEB-INF/admin/mapdefinition.sql

$MV_HOME/web/WEB-INF/admin/defaultstyles.sql

1.4.4.3 Creating MapViewer Array Types, if Necessary

For each database schema that it connects to, MapViewer checks for the existence of the following SQL array types that support array-type binding variables that might exist in some predefined themes:

  • MV_STRINGLIST

  • MV_NUMBERLIST

  • MV_DATELIST

If these types do not exist, MapViewer attempts to create them in the database schema associated with the MapViewer data source. However, if the user associated with that schema does not have sufficient privileges to create new types, a privileged user must create the types by connecting to the data source schema and entering the following statements:

CREATE or REPLACE type MV_STRINGLIST as TABLE of VARCHAR2(1000);
CREATE or REPLACE type MV_NUMBERLIST as TABLE of NUMBER;
CREATE or REPLACE type MV_DATELIST as TABLE of DATE;

1.5 Administering MapViewer

This section introduces the MapViewer Administration page and some administrative and configuration tasks that you can perform, such as adding new data sources, managing map tile layers used by Oracle Maps, and setting logging levels.

1.5.1 Logging in to the MapViewer Administration Page

After you have verified that MapViewer is running properly, it is suggested that you log in to the MapViewer Administration page. To do this, go first to the MapViewer Welcome page, which is typically http://<host>:<port>/mapviewer, where <host> and <port> should be replaced by the correct value for your installation. Figure 1-10 shows the MapViewer Welcome page

Figure 1-10 MapViewer Welcome Page

Description of Figure 1-10 follows

Click the Admin icon at the top right or text link at the bottom. A login prompt is displayed, asking for user name and password for the MapViewer administration page.

User Name: Enter oc4jadmin.

Password: Enter the password that you use to log in to the Server Control page of the Oracle Fusion Middleware or OC4J standalone installation.

After you log in, the MapViewer administration page is displayed, as shown in Figure 1-11.

Figure 1-11 MapViewer Administration Page

Description of Figure 1-11 follows

You can use this page to perform administrative tasks, such as configuring MapViewer to your site's specific requirements, adding predefined data sources so that MapViewer will automatically connect to the specified target database whenever it is started, and managing map tile layers. For detailed about configuration tasks, see Section 1.5.2; for information about administrative tasks, see Section 1.5.3.

1.5.2 Configuring MapViewer

If the default configuration settings for running MapViewer are not adequate, you can configure MapViewer by editing the MapViewer configuration file, mapViewerConfig.xml, which is located in the $ORACLE_HOME/lbs/mapviewer/web/WEB-INF/conf directory. To modify this file, you can use a text editor, or you can use the MapViewer Administration page.

After you modify this file, you must restart OC4J to have the changes take effect; however, you can instead use the MapViewer Administration page to restart only the MapViewer servlet (instead of the entire OC4J instance, which may have other applications deployed and running) if either of the following applies:

  • You installed MapViewer with a standalone OC4J instance.

  • The MapViewer OC4J instance with Oracle Fusion Middleware is configured to have only one OC4J process running (the default) and not to be clustered (that is, not to be in an island).

    If you deployed MapViewer to an OC4J instance with multiple processes (thus with multiple physical JVMs on the same host), or if you deployed to an OC4J instance that is in a clustered island (with multiple OC4J instances running on multiple hosts), you must restart the OC4J instance itself for the changes to the MapViewer configuration file to take effect in all MapViewer servers. In the latter case (clustered OC4J instances), you may also need to modify the MapViewer configuration file in the MapViewer directory hierarchy for each host's OC4J instance in the cluster. For more information about repository-based middle-tier clustering, see Oracle Fusion Middleware High Availability Guide.

The MapViewer configuration file defines the following information in XML format:

  • Logging information, defined either through container-controlled logging (recommended) or in the <logging> element (see Section 1.5.2.1)

  • Map image file information, defined in the <save_images_at> element (see Section 1.5.2.2)

  • Administrative request restrictions, defined in the <ip_monitor> element (see Section 1.5.2.3)

  • Web proxy information for accessing external information across a firewall, defined in the <web_proxy> element (see Section 1.5.2.4)

  • Global map "look and feel" configuration, defined in the <global_map_config> element (see Section 1.5.2.5)

  • Internal spatial data cache settings, defined in the <spatial_data_cache> element (see Section 1.5.2.6)

  • Custom image renderer registration, defined in the <custom_image_renderer> element (see Appendix C)

  • Permanent map data sources, defined in the <map_data_source> element (see Section 1.5.2.14)

  • Security configurations, defined in the <security_config> element

  • WMS services configurations, defined in the <wms_config> element

  • External attribute data provider registration, defined in <ns_data_provider> elements

  • Map tile server configurations, defined in the <map_tile_server> element

All path names in the mapViewerConfig.xml file are relative to the directory in which the file is stored, unless otherwise specified.

Example 1-1 shows a sample mapViewerConfig.xml file.

Example 1-1 Sample MapViewer Configuration File

<?xml version="1.0" ?>
<!-- This is the configuration file for MapViewer. -->
<!-- Note: All paths are resolved relative to this directory (where 
           this config file is located), unless specified as an absolute 
           path name.
 -->
 
<MapperConfig>
 
  <!-- ****************************************************************** -->
  <!-- ************************ Logging Settings ************************ -->
  <!-- ****************************************************************** -->
 
  <!-- Uncomment the following to modify logging. Possible values are:
       log_level = "fatal"|"error"|"warn"|"info"|"debug"|"finest"  
                 default: info) ;
       log_thread_name = "true" | "false" ;
       log_time = "true" | "false" ;
       one or more log_output elements.
  -->
  <!--
    <logging log_level="info" log_thread_name="false"
             log_time="true">
       <log_output name="System.err" />
       <log_output name="../log/mapviewer.log" />
    </logging>
  -->
 
  <!-- ****************************************************************** -->
  <!-- ********************** Map Image Settings ************************ -->
  <!-- ****************************************************************** -->
 
  <!-- Uncomment the following only if you want generated images to 
       be stored in a different directory, or if you want to customize
       the life cycle of generated image files.
 
       By default, all maps are generated under 
       $ORACLE_HOME/lbs/mapviewer/web/images. 
 
       Images location-related attributes:
       file_prefix: image file prefix, default value is "omsmap"
       url:  the URL at which images can be accessed. It must match the 'path'
             attribute below. Its default value is "%HOST_URL%/mapviewer/images"
       path: the corresponding path in the server where the images are
             saved; default value is "%ORACLE_HOME%/lbs/mapviewer/web/images"
 
       Images life cycle-related attributes:
       life: the life period of generated images, specified in minutes. 
             If not specified or if the value is 0, images saved on disk will 
             never be deleted. 
       recycle_interval:  this attribute specifies how often the recycling 
             of generated map images will be performed. The unit is minute.
             The default interval (when not specified or if the value is 0) 
             is 8*60, or 8 hours.
             
   -->
  <!--
   <save_images_at  file_prefix="omsmap"
                   url="http://mypc.mycorp.com:8888/mapviewer/images"
                   path="../web/images"
   /> 
  -->
 
  <!-- ****************************************************************** -->
  <!-- ********************* IP Monitoring Settings ********************* -->
  <!-- ****************************************************************** -->
 
  <!-- Uncomment the following to enable IP filtering for administrative 
        requests.
    Note:
    - Use <ips> and <ip_range> to specify which IPs (and ranges) are allowed.
      Wildcard form such as 20.* is also accepted. Use a comma-delimited 
      list in <ips>.
 
    - Use <ips_exclude> and <ip_range_exclude> for IPs and IP ranges
      prohibited from accessing eLocation.
 
    - If an IP falls into both "allowed" and "prohibited" categories, it is
      prohibited.
 
    - If you put  "*" in an <ips> element, then all IPs are allowed, except
      those specified in <ips_exclude> and <ip_range_exclude>.
      On the other hand, if you put "*" in an <ips_exclude> element, no one
      will be able to access MapViewer (regardless of whether an IP is in
      <ips> or <ip_range>).
 
    - You can have multiple <ips>, <ip_range>, <ips_exclude>, and
      <ip_range_exclude> elements under <ip_monitor>.
 
    - If no <ip_monitor> element is present in the XML configuration
      file, then no IP filtering will be performed (all allowed).
 
    - The way MapViewer determines if an IP is allowed is:
 
          if(IP filtering is not enabled) then allow;
          if(IP is in exclude-list) then not allow;
          else if(IP is in allow-list) then allow;
          else not allow;  
   -->
 
  <!--
     <ip_monitor>
          <ips> 138.1.17.9, 138.1.17.21, 138.3.*, 20.* </ips>
          <ip_range> 24.17.1.3 - 24.17.1.20 </ip_range>
          <ips_exclude> 138.3.29.* </ips_exclude>
          <ip_range_exclude>20.22.34.1 - 20.22.34.255</ip_range_exclude>
     </ip_monitor>
   -->
 
  <!-- ****************************************************************** -->
  <!-- ********************** Web Proxy Setting  ************************ -->
  <!-- ****************************************************************** -->
  <!-- Uncomment and modify the following to specify the Web proxy setting.
       This is only needed for passing background image URLs to
       MapViewer in map requests or for setting a logo image URL, if
       such URLs cannot be accessed without the proxy.
   -->
 
  <!--
    <web_proxy host="www-proxy.my_corp.com"  port="80" />
  -->
 
  <!-- ****************************************************************** -->
  <!-- *********************** Security Configuration ******************* -->
  <!-- ****************************************************************** -->
  <!-- Here you can set various security related configurations of MapViewer.
  -->
 
  <security_config>
    <disable_direct_info_request> false </disable_direct_info_request>
  </security_config>
 
  <!-- ****************************************************************** -->
  <!-- *********************** Global Map Configuration ***************** -->
  <!-- ****************************************************************** -->
  <!-- Uncomment and modify the following to specify systemwide parameters
       for generated maps. You can specify your copyright note, map title, and
       an image to be used as a custom logo shown on maps. The logo image must 
       be accessible to this MapViewer and in either GIF or JPEG format.
       Notes:
         -  To disable a global note or title, specify an empty string ("") for
            the text attribute of <note> and <title> element.
         - position specifies a relative position on the map where the
                  logo, note, or title  will be displayed. Possible values are
                  NORTH, EAST, SOUTH, WEST, NORTH_EAST, SOUTH_EAST,
                  SOUTH_WEST, NORTH_WEST, and CENTER.
         - image_path specifies a file path or a URL (starts with "http://")
                    for the image.
 
       <rendering> element attributes:
       - Local geodetic data adjustment: If allow_local_adjustment="true",
         MapViewer automatically performs local data
         "flattening" with geodetic data if the data window is less than
         3 decimal degrees. Specifically, MapViewer performs a simple
         mathematical transformation of the coordinates using a tangential
         plane at the current map request center.
         If allow_local_adjustment="false" (default), no adjustment is
         performed.
       - Automatically applies a globular map projection (geodetic data only): 
         If use_globular_projection="true", MapViewer will 
         apply a globular projection on the fly to geometries being displayed. 
         If use_globular_projection="false" (the default), MapViewer does no map 
         projection to geodetic geometries. This option has no effect on 
         non-geodetic data.
   -->
 
  <!--
    <global_map_config>
        <note text="Copyright 2009, Oracle Corporation" 
              font="sans serif" 
              position="SOUTH_EAST"/>
        <title  text="MapViewer Demo" 
                font="Serif"
                position="NORTH" />
        <logo image_path="C:\\images\\a.gif"  
              position="SOUTH_WEST" />
 
        <rendering allow_local_adjustment="false" 
                   use_globular_projection="false" />
    </global_map_config>
  -->
 
  <!-- ****************************************************************** -->
  <!-- ****************** Spatial Data Cache Setting  ******************* -->
  <!-- ****************************************************************** -->
  <!-- Uncomment and modify the following to customize the spatial data cache
       used by MapViewer. The default is 64 MB for in-memory cache.
 
       To disable the cache, set max_cache_size to 0.
 
       max_cache_size:  Maximum size of in-memory spatial cache of MapViewer.
                        Size must be specified in megabytes (MB).
       report_stats:    If you would like to see periodic output of cache
                        statistics, set this attribute to true. The default
                        is false.
   -->
 
  <!--
    <spatial_data_cache   max_cache_size="64"
                          report_stats="false" 
    />
  -->
 
  <!-- ****************************************************************** -->
  <!-- ******************** Custom Image Renderers ********************** -->
  <!-- ****************************************************************** -->
  <!-- Uncomment and add as many custom image renderers as needed here, 
       each in its own  <custom_image_renderer> element. The "image_format"
       attribute specifies the format of images that are to be custom 
       rendered using the class with full name specified in "impl_class". 
       You are responsible for placing the implementation classes in the
       MapViewer's classpath.
  -->
  <!-- 
  <custom_image_renderer image_format="ECW" 
                         impl_class="com.my_corp.image.ECWRenderer" />
  -->
 
  <!-- ****************************************************************** -->
  <!-- ****************** Custom WMS Capabilities Info ****************** -->
  <!-- ****************************************************************** -->
  <!-- Uncomment and modify the following tag if you want MapViewer to
       use the following information in its getCapabilities response.
       Note: all attributes and elements of <wms_config> are optional.
  -->
  <!--
  <wms_config host="www.my_corp.com" port="80">
    <title>
        WMS 1.1 interface for Oracle Mapviewer
    </title>
    <abstract>
        This WMS service is provided through MapViewer.
    </abstract>
    <keyword_list>
       <keyword>bird</keyword>
       <keyword>roadrunner</keyword>
       <keyword>ambush</keyword>
    </keyword_list>    
    <sdo_epsg_mapfile>
      ../config/epsg_srids.properties
    </sdo_epsg_mapfile>
  </wms_config>
  -->
 
  <!-- ****************************************************************** -->
  <!-- **************** Custom Non-Spatial Data Provider **************** -->
  <!-- ****************************************************************** -->
  <!-- Uncomment and add as many custom non-spatial data provider as
       needed here, each in its own <ns_data_provider> element.
       You must provide the id and full class name here. Optionally you
       can also specify any number of global parameters, which MapViewer
       will pass to the data provider implementation during initialization. 
       The name and value of each parameter is interpreted only by the 
       implementation.
  -->
 
  <!-- this is the default data provider that comes with MapViewer; please
       refer to the MapViewer User's Guide for instructions on how to use it.
 
  <ns_data_provider
    id="defaultNSDP" 
    class="oracle.sdovis.NSDataProviderDefault" 
  />
  -->
 
  <!-- this is a sample NS data provider with prameters:
  <ns_data_provider
    id="myProvider1" class="com.mycorp.bi.NSDataProviderImpl" >
 
    <parameters>
      <parameter name="myparam1" value="value1" />
      <parameter name="p2"       value="v2"     />
    </parameters>
 
  </ns_data_provider>
  -->
 
  <!-- ****************************************************************** -->
  <!-- *******************  Map Tile Server Setting  ******************* -->
  <!-- ****************************************************************** -->
  <!-- Uncomment and modify the following to customize the map tile server. 
 
       <tile_storage> specifies the default root directory under which the 
       cached tile images are to be stored if the cache instance configuration
       does not specify the root directory for the cache instance. If the 
       default root directory is not set or not valid, the default root 
       direcotry will be set to be $MAPVIEWER_HOME/web/tilecache
       
          default_root_path:  The default root directory under which the cached 
                              tile images are stored. 
  -->
 
  <!--
     <map_tile_server>
       <tile_storage default_root_path="/scratch/tilecachetest/"/>
    </map_tile_server>
  -->
 
  <!-- ****************************************************************** -->
  <!-- ******************** Predefined Data Sources  ******************** -->
  <!-- ****************************************************************** -->
  <!-- Uncomment and modify the following to predefine one or more data 
       sources.
       Note: You must precede the jdbc_password value with a '!' 
             (exclamation point), so that when MapViewer starts the next
             time, it will encrypt and replace the clear text password. 
  -->
 
  <!-- 
  <map_data_source name="mvdemo"
                   jdbc_host="elocation.us.oracle.com"
                   jdbc_sid="orcl"
                   jdbc_port="1521"
                   jdbc_user="scott"
                   jdbc_password="!password" 
                   jdbc_mode="thin"
                   number_of_mappers="3"
   />
   -->
 
</MapperConfig>

1.5.2.1 Specifying Logging Information

MapViewer provides a flexible logging mechanism to record run-time information and events. You can configure the granularity, volume, format, and destination of the log output. You can also configure the maximum size of log files as well as automatic log file rotation.

There are two ways to configure MapViewer's logging, the container-controlled approach and legacy logging using the <logging> element in the configuration file:

  • Container-controlled logging: Use Oracle Fusion Middleware 10gR3 Control if MapViewer is deployed to an Oracle Fusion Middleware 10gR3 instance, or directly edit the $OC4J_HOME/j2ee/home/config/j2ee-logging.xml file if MapViewer is deployed to a standalone OC4J instance. This approach takes full advantage of the Fusion Middleware 10gR3 diagnostic logging mechanisms and allows such advanced features such as maximum log file size and log file rotation.

  • Legacy logging: Involves using the <logging> element in the mapViewerConfig.xml file. When MapViewer is deployed to WebLogic Server, legacy logging is the only supported way of configuring MapViewer logging behavior.

Container-Controlled Logging


Note:

For container-controlled logging to work, you must comment out or remove the <logging> element in the mapViewerConfig.xml file. By default that element is commented out (disabled), so that container-controlled logging settings will function properly. If you enable the <logging> element (even if you make no other changes to its attributes), then the container-controlled logging settings are ignored by MapViewer.

To configure MapViewer logging when it is deployed to an OC4J 11g standalone instance, edit the $OC4J_HOME/j2ee/home/config/j2ee-logging.xml file. For example, the following code in that file logs all messages from MapViewer at the FINEST level to the default OC4J log file (j2ee/home/log/oc4j/diagnostic.log):

<log_handler name='oc4j-handler' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
      <property name='path' value='../log/oc4j'/>
      <property name='maxFileSize' value='10485700'/>
      <property name='maxLogSize' value='1048576'/>
      <property name='encoding' value='UTF-8'/>
      <property name='supplementalAttributes' value='J2EE_APP.name,J2EE_MODULE.name,WEBSERVICE.name,WEBSERVICE_PORT.name'/>
 </log_handler>

The preceding code defines the default OC4J log handler. It specifies where the log file will be saved, its maximum file size, and other information. A log handler like this can be associated with multiple actual loggers that are created by OC4J components and applications (such as MapViewer).

The following example associates a MapViewer logger, in this case one that is responsible for generating all internal log messages, with the preceding log handler:

<logger name="oracle.mapviewer.logger" level="FINEST" useParentHandlers='false'>
    <handler name='oc4j-handler'/>
</logger>

The preceding example tells OC4J that all log records produced by the logger named oracle.mapviewer.logger should be handled by the log handler named oc4j-handler. It sets the logging level to FINEST so that all messages generated by MapViewer will be visible in the log file. The possible logging levels supported here are the following standard Java logging levels: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST.

The following loggers are used by MapViewer for container-controlled logging:

  • oracle.mapviewer.logger is used by all server side components of MapViewer to generate diagnostic records.

  • oracle.mapviewer.access is used by MapViewer for logging only user access records.

The preceding example associated an existing log handler named oc4j-handler, which is already defined in the j2ee-logging.xml file. You can also define your own log handler in the j2ee-logging.xml file and specify a different log file location and name, as well as the maximum file size and the file rotation. The following example creates a new log handler to store only MapViewer access records:

<log_handler name='mv-handler' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
      <property name='path' value='../log/mapaccess/access.log'/>
      <property name='maxFileSize' value='600000'/>
      <property name='maxLogSize' value='10000'/>
      <property name='format' value='ODL-TEXT'/>
      <property name='encoding' value='UTF-8'/>
      <property name='supplementalAttributes' value='J2EE_APP.name'/>
</log_handler>

The following example associates this new log handler to the MapViewer access logger named oracle.mapviewer.access:

<logger name='oracle.mapviewer.access' level='FINEST' useParentHandlers='false'>
    <handler name='mv-handler'/>
</logger>

Note that the level must be FINEST or FINER in order for the access log messages to appear in the log file. Now, if you restart OC4J and make map requests, you should see a new log file (access.log) in the OC4J log/mapaccess directory that contains records of users accessing MapViewer.

For more information about logging configuration, specifically how to configure logging using Fusion Middleware 10gR3 Control, see Oracle Containers for J2EE Configuration and Administration Guide

Legacy Logging

If you do not use container-controlled logging, you can use the legacy approach, which is to uncomment-out and modify the <logging> element in the MapViewer configuration file.

You can specify the following information as attributes or subelements of the <logging> element:

  • The log_level attribute controls the levels of information that are recorded in the log, which in turn affect the log output volume. Set the log_level attribute value to one of the following, listed from most restrictive logging to least restrictive logging: FATAL, ERROR, WARN, INFO, DEBUG, and FINEST. The FATAL level outputs the least log information (only unrecoverable events are logged), and the other levels are progressively more inclusive, with the FINEST level causing the most information to be logged. For production work, a level of WARN or more restrictive (ERROR or FATAL) is recommended; however, for debugging you may want to set a less restrictive level.

  • The log_thread_name attribute controls whether or not to include the name of the thread that encountered and logged the event.

  • The log_time attribute controls whether or not the current time is included when a logging event occurs.

  • The log_output subelement identifies output for the logging information. By default, log records are written to the system error console. You can change this to the system output console or to one or more files, or some combination. If you specify more than one device through multiple log_output subelements, the logging records are sent to all devices, using the same logging level and attributes.

1.5.2.2 Specifying Map File Storage and Life Cycle Information

Map image file information is specified in the <save_images_at> element. By default, images are stored in the $ORACLE_HOME /lbs/mapviewer/web/images directory. You do not need to modify the <save_images_at> element unless you want to specify a different directory for storing images.

A mapping client can request that MapViewer send back the URL for an image file instead of the actual map image data, by setting the format attribute of the <map_request> element (described in Section 3.2.1.1) to GIF_URL or PNG_URL. In this case, MapViewer saves the requested map image as a file on the host system where MapViewer is running and sends a response containing the URL of the image file back to the map client.

You can specify the following map image file information as attributes of the <save_images_at> element:

  • The file_prefix attribute identifies the map image file prefix. A map image file name will be a fixed file prefix followed by a serial number and the image type suffix. For example, if the map image file prefix is omsmap, a possible GIF map image file could be omsmap1.gif.

    Default value: file_prefix=omsmap

  • The url attribute identifies the map image base URL, which points to the directory under which all map image files are saved on the MapViewer host. The map image URL sent to the mapping client is the map image base URL plus the map image file name. For example, if the map image base URL is http://dev04.example.com:1521/mapviewer/images, the map image URL for omsmap1.gif will be http://dev04.example.com:1521/mapviewer/images/omsmap1.gif.

    Default value: url=$HOST_URL/mapviewer/images

  • The path attribute identifies the path of the directory where all map image files are saved on the MapViewer host system. This directory must be accessible by HTTP and must match the map image URL. Map image files saved in the directory specified by the path attribute should be accessible from the URL specified by the url attribute.

    However, if you are deploying MapViewer to WebLogic Server, the default value for the path attribute (../web/images) is not correct. The path attribute value in this case should be ../../images, because the physical "images" directory is mapviewer.ear/web.war/images; so using relative path, the value should be ../../images for the path attribute to resolve to the physical directory.

  • The life attribute specifies the number of minutes that a generated map image is guaranteed to stay on the file system before the image is deleted. If the life attribute is specified, the recycle_interval attribute controls how frequently MapViewer checks for possible files to delete.

    Default: MapViewer never deletes the generated map images.

  • The recycle_interval attribute specifies the number of minutes between times when MapViewer checks to see if it can delete any image files that have been on the file system longer than the number of minutes for the life attribute value.

    Default value: 480 (8 hours)

1.5.2.3 Restricting Administrative (Non-Map) Requests

In addition to map requests, MapViewer accepts administrative (non-map) requests, such as requests to list all data sources and to add and delete data sources. (Chapter 7 describes the administrative requests.) By default, all MapViewer users are permitted to make administrative requests.

However, if you want to restrict the ability to submit administrative requests, you can edit the MapViewer configuration file to allow administrative requests only from users with specified IP addresses.

To restrict administrative requests to users at specified IP addresses, add the <ip_monitor> element to the MapViewer configuration file (or uncomment and modify an existing element, if one is commented out). Example 1-2 shows a sample <ip_monitor> element excerpt from a configuration file.

Example 1-2 Restricting Administrative Requests

<MapperConfig>
   . . .
   <ip_monitor>
      <ips> 138.1.17.9, 138.1.17.21, 138.3.*, 20.* </ips>
      <ip_range> 24.17.1.3 - 24.17.1.20 </ip_range>
      <ips_exclude> 138.3.29.* </ips_exclude>
      <ip_range_exclude>20.22.34.1 - 20.22.34.255</ip_range_exclude>
   </ip_monitor>
   . . .
</MapperConfig>

In Example 1-2:

  • The following IP addresses are explicitly included as able to submit administrative requests (unless excluded by an <ips_exclude> element): 138.1.17.9, 138.1.17.21, all that start with 138.3., all that start with 20., and all in the range (inclusive) of 24.17.1.3 to 24.17.1.20.

  • The following IP addresses are explicitly excluded from submitting administrative requests: all starting with 138.3.29., and all in the range (inclusive) of 20.22.34.1 to 20.22.34.255.

  • All other IP addresses that are not explicitly included cannot submit administrative requests.

Syntax notes for the <ip_monitor> element:

  • Use <ips> and <ip_range> elements to specify which IP addresses (and ranges) are allowed. Asterisk wildcards (such as 20.*) are acceptable. Use a comma-delimited list for addresses.

  • Use <ips_exclude> and <ip_range_exclude> elements to exclude IP addresses and address ranges from submitting administrative requests. If an address falls into both the included and excluded category, it is excluded.

  • If you specify the asterisk wildcard in an <ips> element, all associated IP addresses are included except any specified in <ips_exclude> and <ip_range_exclude> elements.

1.5.2.4 Specifying a Web Proxy

Sometimes the MapViewer server needs to make HTTP connections to external Web servers, such as to obtain a background image through a URL or to contact an external WMS server to fetch its map images. In such cases, if there is a firewall between the MapViewer server and the target Web server, you may need to specify the HTTP proxy information to MapViewer so that it will not be blocked by the firewall. The following example specifies Web proxy information:

<web_proxy host="www-proxy.mycorp.com" port="80" />

1.5.2.5 Specifying Global Map Configuration Options

You can specify the following global "look and feel" options for the display of each map generated by MapViewer:

  • Title

  • Note (such as a copyright statement or a footnote)

  • Logo (custom symbol or corporate logo)

  • Local geodetic data adjustment

  • Splitting geometries along the 180 meridian

To specify any of these options, use the <global_map_config> element. For example:

<global_map_config>
    <note text="Copyright (c) 2009, Example Corporation"
              font="sans serif"
              position="SOUTH_EAST"/>
    <title  text="Map Courtesy of Example Corp."
              font="Serif"
              position="NORTH"/>
    <logo image_path="C:\\images\\a.gif"
              position="SOUTH_WEST"/>

    <rendering allow_local_adjustment="false"
               use_globular_projection="false"/>
</global_map_config>

Set the map title through the <title> element of the <global_map_config> element. You can also set the map title in an individual map request by specifying the title attribute with the <map_request> element, and in this case, the title in the map request is used instead of the global title in the MapViewer configuration file. Note the following information about the attributes of the <title> element:

  • The text attribute specifies the title string.

  • The font attribute specifies a font. The font must exist on the system where MapViewer is running.

  • The position attribute provides a positioning hint to MapViewer when determining where the map title will be drawn on a map. Possible values are: NORTH, EAST, SOUTH, WEST, NORTH_EAST, SOUTH_EAST, SOUTH_WEST, NORTH_WEST, and CENTER.

    Default value: NORTH

Set the map note through the <note> element of the <global_map_config> element. Note the following information about the attributes of the <note> element:

  • The text attribute specifies the note string.

  • The font attribute specifies a font. The font must exist on the system where MapViewer is running.

  • The position attribute provides a positioning hint to MapViewer when determining where the map note will be drawn on a map. Possible values are: NORTH, EAST, SOUTH, WEST, NORTH_EAST, SOUTH_EAST, SOUTH_WEST, NORTH_WEST, and CENTER.

    Default value: SOUTH_EAST

Set the map logo through the <logo> element of the <global_map_config> element. The map logo image must be in either JPEG or GIF format. The image can be stored in a local file system where the MapViewer instance will have access to it, or it can be obtained from the Web by specifying its URL. To specify a map logo, uncomment the <map_logo> element in the MapViewer configuration file and edit its attributes as needed.

Note the following information about the attributes of the <logo> element:

  • The image_path attribute must specify a valid file path name, or a URL starting with http://.

  • The position attribute provides a positioning hint to MapViewer when determining where the map logo will be drawn on a map. Possible values are: NORTH, EAST, SOUTH, WEST, NORTH_EAST, SOUTH_EAST, SOUTH_WEST, NORTH_WEST, and CENTER.

    Default value: SOUTH_WEST

If the logo image is obtained through a URL that is outside your firewall, you may need to set the Web proxy in order for MapViewer to retrieve the logo image. For information about specifying a Web proxy, see Section 1.5.2.4.

If you also specify a map legend, be sure that its position is not the same as any position for a map title, note, or logo. (Map legends are explained in Section 2.4.2 and Section 3.2.11. The default position for a map legend is SOUTH_WEST.)

To have MapViewer automatically project geodetic data to a local non-geodetic coordinate system before displaying it if the map data window is less than 3 decimal degrees, specify allow_local_adjustment="true" in the <rendering> element.

To have MapViewer automatically apply a globular map projection (that is, a map projection suitable for viewing the world, and specifically the azimuthal equidistant projection for MapViewer), specify use_globular_projection="true" in the <rendering> element. This option applies to geodetic data only.

1.5.2.6 Customizing the Spatial Data Cache

You can customize the in-memory cache that MapViewer uses for spatial data by using the <spatial_data_cache> element. For example:

<spatial_data_cache   max_cache_size="64"
                      report_stats="true"
/>

You can specify the following information as attributes of the <spatial_data_cache> element:

  • The max_cache_size attribute specifies the maximum number of megabytes (MB) of in-memory cache.

    Default value: 64

  • The report_stats attribute, if set to true, instructs the MapViewer server to periodically (every 5 minutes) output cache statistics, such as the number of objects cached, the total size of cache objects, and data relating to the efficiency of the internal cache structure. The statistics are provided for each data source and for each predefined theme. They can help you to determine the optimal setting of the in-memory cache. For example, if you want to pin all geometry data for certain themes in the memory cache, you need to specify a max_cache_size value that is large enough to accommodate these themes.

    Default value: false

The spatial data cache is always enabled by default, even if the element is commented out in the configuration file. To completely disable the caching of spatial data, you must specify the max_cache_size attribute value as 0 (zero).


Note:

The disk-based spatial cache, which was supported in the previous release, is no longer supported, because performance tests have shown that disk-based spatial caching was often less efficient than fetching spatial objects directly from the database when needed (that is, in cases where the cached objects frequently did not need to be retrieved again after caching).

For detailed information about the caching of predefined themes, see Section 2.3.1.5.

1.5.2.7 Specifying the Security Configuration

You can use the <security_config> element to specify whether MapViewer should reject <info_request> elements in requests. An <info_request> element is a type of request from a client that asks MapViewer to execute a simple SQL statement and return the result rows in plain text or XML format. This request is often used by MapViewer applications written in JSP to identify features displayed on a map, or to run simple spatial search queries.

However, if the MapViewer data source information is exposed, malicious attackers might be able to abuse this capability and obtain sensitive information. To prevent this from happening, you can make sure MapViewer always connects to a database schema that has very limited access rights and hosts only non-sensitive information, and you can also reject all <info_request> requests by specifying the <security_config> element as follows:

<security_config>
  <disable_direct_info_request> true </disable_direct_info_request>
</security_config>

Note, however, that this setting affects some Mapviewer features. For example, the identify() method of the MapViewer Java API will no longer work, and applications will need to implement their own identify() method through other means.

1.5.2.8 Registering a Custom Image Renderer

MapViewer can display images stored in a database BLOB through its image theme capability. When the image data stored in the BLOB is in a format unknown to MapViewer, such as ECW, you can register a custom image renderer so that MapViewer can use it to display such images. For information about creating and registering a custom image renderer, see Appendix C.

To specify a custom image renderer, use the <custom_image_renderer> element, as shown in the following example:

<custom_image_renderer image_format="ECW" 
                       impl_class="com.my_corp.image.ECWRenderer" />

The image_format attribute specifies the image format name with which this custom image renderer should be associated.

The impl_class attribute specifies the name of the class that implements the custom image renderer.

1.5.2.9 Registering a Custom Spatial Provider

MapViewer can render spatial data that is in an external (non-Oracle Spatial) native format, such as Shapefile, if there is a spatial provider implementation registered for the format. For information about implementing an external spatial data provider (in connection with custom geometry themes), see Section 2.3.8.

To register an external spatial data provider, use the <s_data_provider> element, as shown in the following example:

<s_data_provider
  id="shapefileSDP"
  class="oracle.sdovis.ShapefileDataProvider"
  >
  <parameters>
    <parameter name="datadir" value="/temp/data" />
  </parameters>
</s_data_provider>

The class attribute specifies the name of the class that implements the external spatial data provider.

The <parameters> element specifies a set of initialization parameters that are used by the data provider during its initialization process. In this example, the Shapefile provider has a data directory ("datadir") parameter that points to directory where MapViewer can look for the data.

1.5.2.10 Registering Custom Nonspatial Data Providers

When generating thematic map layers, MapViewer can dynamically join nonspatial attribute data (such as sales for each region) that originates from an external source with the base geometries (boundaries of all the regions) that are stored in the database. For information about thematic mapping using external attribute data from nonspatial data providers, see Section 2.3.10.1.

To register a nonspatial data provider, use the <ns_data_provider> element, as shown in the following example:

<ns_data_provider id="testProvider"
                  class="com.mycorp.GetSalesData" >
  <parameters>
    <parameter name="bi_database" value="stadb32.mycorp.com" />
    <parameter name="sid" value="bidata"  />
  </parameters>
</ns_data_provider>

The id attribute uniquely identifies a nonspatial data provider. Use this id value in any map request that involves the provider.

The class attribute specifies the name of the class that implements the nonspatial data provider.

The <parameters> element specifies a set of initialization parameters that are used by the nonspatial data provider during its initialization process.

1.5.2.11 Customizing SRS Mapping

You can use the <srs_mapping> element to specify an SDO to EPSG SRID mapping file, which define mappings between Oracle Spatial SDO_SRID values and EPSG codes. As explained in Section E.1.3, each line in the specified mapping file must contain an SDO_SRID value and the corresponding EPSG code. The <srs_mapping> element can be used with WMS and WFS themes.

The following example uses the <srs_mapping> element to specify an SDO to EPSG SRID mapping file:

<srs_mapping>
  <sdo_epsg_mapfile>
    ../config/epsg_srids.properties
  </sdo_epsg_mapfile>
</srs_mapping>

1.5.2.12 Customizing WMS GetCapabilities Responses

MapViewer can be used as an Open Geospatial Consortium WMS (Web Map Server) 1.1.1 compliant server. As such, a WMS client can send MapViewer the GetCapabilities request. In response, MapViewer will send back the list of themes that it hosts and other important information, such as the data provider's name and a list of keywords, that might of interest to the requesting client.

You can use the <wms_config> element to customize the descriptive information sent back to the client as part of the GetCapabilities response, as shown in the following example:

<wms_config host="www.my_corp.com" port="80"
            protocol="http" default_datasource="dsrc1"
            public_datasources="dsrc1,dsrc2">
  <title>
    WMS 1.1 interface for Oracle Application Server 10g MapViewer
  </title>
  <abstract>
    This WMS service is provided through Oracle MapViewer.
  </abstract>
  <keyword_list>
    <keyword>bird</keyword>
    <keyword>roadrunner</keyword>
    <keyword>ambush</keyword>
  </keyword_list>
  <sdo_epsg_mapfile>
    ../config/epsg_srids.properties
  </sdo_epsg_mapfile>
</wms_config>

The host attribute specifies the host part of the service request URL that the client should use for future WMS requests made to this MapViewer server.

The port attribute specifies the port part of the service request URL that the client should use for future WMS requests made to this MapViewer server.

The protocol attribute specifies the protocol part of the service request URL that the client should use for future WMS requests made to this MapViewer server.

The default_datasource attribute specifies the base data source used to retrieve the capabilities response. If this attribute is not defined, the data source WMS is used, and that data source must exist in this MapViewer server.

The public_datasources attribute specifies which data source contents are to be listed in the GetCapabilities response. If this attribute is not defined, all data source contents will be listed.

The <title> element specifies the service title to be included as part of the response.

The <abstract> element specifies the abstract to be included as part of the response.

The <keyword_list> element specifies a list of keywords that best describe the types of layers served by this MapViewer server.

The <sdo_epsg_mapfile> element specifies a text file that defines mappings from Oracle Spatial (SDO) SRID values to the corresponding EPSG SRID values that are typically used in most WMS requests and responses. For information about this mapping file, see Section E.1.3.

1.5.2.13 Configuring the Map Tile Server for Oracle Maps

The Oracle Maps feature of MapViewer can pre-generate base map image tiles and cache them through the map tile server. You can use the <map_tile_server> element to provide configuration information to the map tile server, such as default location for map tile file storage, and logging information, as shown in the following example:

<map_tile_server>
   <tile_storage default_root_path="/scratch/tilecache/" />
   <logging log_level="finest" log_thread_name="false" log_time="true">
      <log_output name="System.err"/>
   </logging>
</map_tile_server>

The <tile_storage> element specifies the default root directory where all map image tiles generated by this MapViewer server will be stored.

The <logging> element specifies logging information specific to the map tile server.

1.5.2.14 Defining Permanent Map Data Sources

Every map request must have a data source attribute that specifies a map data source, which is a database user with geospatial data. You can predefine available map data sources by using the <map_data_source> element. For example:

<map_data_source name="mvdemo"
                 jdbc_host="mapsrus.us.oracle.com"
                 jdbc_sid="orcl"
                 jdbc_port="1521"
                 jdbc_user="scott"
                 jdbc_password="!password"
                 jdbc_mode="thin"
                 number_of_mappers="5"
                 max_connections="100"
                 allow_jdbc_theme_based_foi="true"
                 plsql_package="web_user_info"
/>

You can specify the following information as attributes of the <map_data_source> element:

  • The name attribute specifies a unique data source name to MapViewer. You must specify the data source name in all map requests that identify a data source.

  • You must specify all necessary connection information, or a container data source name, or a net service name (TNS name). That is, you must specify only one of the following, which are described in this section: jdbc_host, jdbc_sid, jdbc_port, and jdbc_user; or container_ds; or jdbc_tns_name.

    Note that if the database on which you defined a data source on is restarted, and if the data source is created from jdbc_host/jdbc_sid/jdbc_port or jdbc_tns_name attributes, MapViewer will resume normal operation (for example responding to map requests with properly created maps) as soon as the database is back online.

  • The jdbc_host, jdbc_sid, jdbc_port, and jdbc_user attributes specify the database connection information and the database user name. (As an alternative to specifying these attributes and the jdbc_password and jdbc_mode attributes, you can specify the container_ds attribute, described later in this section.)

  • The jdbc_password attribute specifies the database user's login password. It must be prefixed with an exclamation point (!) when you specify the password for the first time. When MapViewer next restarts, it will automatically obfuscate and replace the clear text password.

    Note that MapViewer does not change this password string in any way; no conversion to upper or lower case is performed. If the database uses case-sensitive passwords, the specified password must exactly match the password in the database.

  • The jdbc_mode attribute tells MapViewer which Oracle JDBC driver to use when connecting to the database. The default is thin (for the "thin" driver). The other possible value is oci8, which requires that you also have the Oracle Database client installed on the same host on which MapViewer is running.

  • The container_ds attribute lets you specify the J2EE container name (from the ejb-location attribute value) instead of specifying the jdbc_host, jdbc_sid, jdbc_port, jdbc_user, jdbc_password, and jdbc_mode attributes. For example, assume that the <data_source> element in the data-source.xml file for the standalone OC4J instance contains ejb-location="jdbc/OracleDS". In this case, instead of using the example at the beginning of this section, you can define the permanent MapViewer data source as follows:

    <map_data_source name="mvdemo"
                     container_ds="jdbc/OracleDS"
                     number_of_mappers="5"
                     max_connections="100"
    />
    

    To use the container_ds attribute in the MapViewer configuration file, you must start the OC4J instance with the -userThreads option. MapViewer processes its configuration file in a separate user thread; if the -userThreads option is not specified, the container's context information is not available to user threads. However, if you are dynamically defining a data source through the MapViewer Administration page, you can use the container_ds attribute regardless of whether you started the OC4J instance with the -userThreads option.

    If you use the container_ds attribute, and if you want MapViewer to resume normal operation (for example responding to map requests with properly created maps) automatically after the database on which you defined a data source on is restarted, you must instruct the container data source to always validate a connection before it can be returned to the application. Check your middleware documentation for whether this option is supported and, if it is supported, how to enable it.

  • The jdbc_tns_name attribute identifies a net service name that is defined in the tnsnames.ora file.

  • The number_of_mappers attribute identifies the maximum number of map renderers available (and thus the maximum number of map requests that MapViewer can process in parallel for the data source) for this data source. Any unprocessed map requests are queued and eventually processed. For example, if the value is 3, MapViewer will be able to process at most three mapping requests concurrently. If a fourth map request comes while three requests are being processed, it will wait until MapViewer has finished processing one of the current requests.

    Specifying a large number_of_mappers value (such as 50 or 100) can improve the overall throughput, but it will also increase run-time memory and CPU usage at times of peak loads, since MapViewer will attempt to process more concurrent map requests. It will also increase the number of active database sessions. Therefore, be sure that you do not set too large a number for this attribute.

  • The max_connections attribute specifies the maximum number of database connections or sessions open for the data source at any given time. In most cases you should not specify this attribute, and accept the default value of 100.

    If you specify a value that is too small, the effect on performance can be significant. For example, if you specify max_connections="5" for a map request with 12 predefined themes, 12 connections will still be created temporarily to meet the demand, but 7 of them will be closed immediately upon the completion of the request (leaving only 5 open connections). MapViewer will then dynamically create database connections whenever it needs more than 5 to meet the demand when processing map requests, because the number of permanently open database connections will never exceed the specified max_connections attribute value. Specifying a value that is too small will almost certainly increase the time it takes to process a map request, because opening a new database connection involves significant processing overhead.

  • The allow_jdbc_theme_based_foi attribute lets you specify whether to allow JDBC theme-based FOI requests to be performed against this data source. A JDBC theme-based FOI request is based on a dynamic SQL query constructed by the JavaScript client application.

    By default, such FOI requests are not allowed unless you set this attribute to true. Due to the potential security threat, JDBC theme-based FOI requests should be used with caution. You should only allow JDBC theme-based FOI requests on database connections that are granted very low privilege and contain only data that you want to expose. See Section 8.3.1.3 for more information about JDBC theme-based FOI requests.

  • The plsql_package attribute lets you specify a PL/SQL package to be used for secure map rendering, as explained in Section 1.8.

  • The web_user_type attribute (not shown in the example in this section) lets you specify the source for the authenticated user's name. It is especially useful for getting the authenticated user's name from a cookie, in conjunction with specifying a PL/SQL package to be used for secure map rendering. For more information about the web_user_type attribute and an example of its use, see Section 1.8.2.

1.5.3 Performing MapViewer Administrative Tasks

Besides knowing how to configure MapViewer, you should also know how to perform other important administrative tasks using the MapViewer administration page. To log in to this page, see the instructions in Section 1.5.1.

The tasks you can do as a MapViewer administrator include the following:

  • Editing the configuration file

    Click Manage MapViewer, then Configuration.

  • Creating dynamic data sources

    Click Manage MapViewer, then Datasources. Enter the appropriate parameters, then click Submit.

  • Refreshing the list of data sources

    Click Manage MapViewer, then Datasources. Click Refresh.

  • Clearing cached definitions of MapViewer styles, themes, and base maps

    Click Manage MapViewer, then Datasources. Select the data source, then click Purge Cached Metadata.

  • Clearing cached geometry data for predefined themes

    Click Manage MapViewer, then Geometry Cache. Under Purge Cached Geometries, select the data source and theme, and click Submit.

  • Creating map tile layers for Oracle Maps

    Click Manage Map Caches, then Create. Select Internal or External for the map source type, and click Continue.

    Internal map source: Enter the map cache name, then select the data source and base map. Also define parameters for cache storage (where tiles will be stored), zoom levels, minimum and maximum scale, spatial reference ID (SRID), data bounding box (MBR), and tile size and format. Click Submit to create the map tile layer. You can also define the map cache properties in XML by clicking XML.

    External map source: Enter the map cache name, then select the data source. To provide access to the external source, define parameters such as the map service URL, the request method (GET or POST), the proxy information (if needed), the java adapter class name and its location on the server, and additional adapter properties. Also define parameters for cache storage (where tiles will be stored), zoom levels, minimum and maximum scale, spatial reference ID (SRID), data bounding box (MBR), and tile size and format. Click Submit to create the map tile layer. You can also define the map cache properties in XML by clicking XML.

  • Managing map tile layers for Oracle Maps

    Click Manage Map Caches, then Manage. Then do any of the following:

    To refresh map caches, click Refresh.

    To edit a map tile layer, under Existing Map Tile Layers, select the data source. At the cache level, you can delete the cache, view cache details, and place the cache offline or online. At the tile level, you can perform operations such as clearing, prefetching, and refreshing the tiles, specifying the zoom level, and specifying the bounding box.

    To check the status of a request, enter the request ID and click Submit.

1.6 Oracle Real Application Clusters and MapViewer

When the database is an Oracle Real Application Cluster (Oracle RAC), you cannot create MapViewer data sources that directly connect to it. Instead, MapViewer must connect to an Oracle RAC database through the data source of the J2EE container. To enable MapViewer to connect to an Oracle RAC database, you must do the following:

  1. Create a JDBC data source that connects to the Oracle RAC database at the OC4J level, as explained in Section 1.6.1. The data source can then be used by applications such as MapViewer through JNDI lookup.

  2. Configure the OC4J instance so that it publishes the JNDI location of the Oracle RAC data source so that MapViewer can access it, as explained in Section 1.6.2.

  3. Define a MapViewer data source that reuses the container data source through the JNDI location in its configuration file, as explained in Section 1.6.3.

  4. Restart MapViewer.

1.6.1 Creating a Container Oracle RAC Data Source

With either a full Oracle Fusion Middleware or standalone OC4J installation, use Oracle Enterprise Manager to create a data source that connects to the Oracle RAC database. For example, if using Oracle Application Server release 10.1.3 or later, you can log in to Enterprise Manager, navigate to the OC4J instance that contains the MapViewer server, click the Administration tab, and click the JDBC Resources Go to Task link to start creating a new data source, as shown in Figure 1-12.

Figure 1-12 Administration Tab for Creating Oracle RAC Container Data Source

Description of Figure 1-12 follows

For more information about creating a data source to connect to an Oracle RAC database, see Oracle Application Server Administrator's Guide.

After creating the data source, you should test the connection using Enterprise Manager, by clicking the Test Connection icon for the connection, as shown in Figure 1-13.

Figure 1-13 Testing the Connection for the Data Source

Description of Figure 1-13 follows

Be sure to note the JNDI Location value (which is jdbc/mvdemods in Figure 1-13), because you will need this value when you create the MapViewer data source (explained in Section 1.6.3).

1.6.2 Adding the userThreads Option to the OC4J Container

You must specify the userThreads option to tell the OC4J instance to publish the JNDI locations, such as the one for the newly created data source, to all user threads. Without this option, MapViewer cannot access the JNDI location that references the data source, because by default OC4J makes such JNDI locations available only to the main thread within which OC4J itself is running. MapViewer, however, is started in a separate user thread.

The mechanism for specifying the userThreads option depends on whether you re using a standalone OC4J instance or a full Oracle Fusion Middleware installation.

1.6.2.1 Adding userThreads for a Standalone OC4J Instance

With a standalone OC4J instance, you must start the OC4J instance with the -userThreads option, as in the following example:

java –jar oc4j.jar –userThreads

1.6.2.2 Adding userThreads for a Full Oracle Fusion Middleware 10gR3 Installation

With a full Oracle Fusion Middleware 10gR3 installation, the Java startup parameters are defined in the $OAS_HOME/opmn/conf/opmn.xml configuration file. (opmn is the master process that starts and stops various Oracle Fusion Middleware 10gR3 components, such as OC4J instances.)

In this file you can specify Java JVM startup parameters for the OC4J instance running MapViewer. For example, if you deployed MapViewer to the home OC4J instance, add the text -Doc4j.userThreads=true, as shown in the following example:

          <ias-component id="OC4J">
             <process-type id="home" module-id="OC4J" status="enabled">
                <module-data>
                   <category id="start-parameters">
                      <data id="java-options" value="-server
 -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy
 -Djava.awt.headless=true -Dhttp.webdir.enable=false
 -Doc4j.userThreads=true"/>
                   </category>
                   ...

After editing and saving the opmn.xml file, you must restart the OC4J instance for the userThreads option to take effect; and if that does not work, restart Oracle Fusion Middleware 10gR3. For information about restarting the OC4J instance or Oracle Fusion Middleware 10gR3, see Oracle Application Server Administrator's Guide.

1.6.3 Creating a MapViewer Data Source

Create a new MapViewer data source that enables it to connect to the Oracle RAC database, by using the container_ds attribute of the MapViewer data source. Specifically, you must add an entry like the following in the mapViewerConfig.xml file:

<map_data_source  name="mvdemo"
                  container_ds="jdbc/mvdemods"
                  number_of_mappers="7" />

In the preceding example:

  • The name attribute specifies the MapViewer data source name, which is needed for map requests.

  • The value for the container_ds attribute must match the JNDI Location string that you noted when you created the container Oracle RAC data source (see Section 1.6.1).

  • The number_of_mappers attribute specifies the maximum number of supported concurrent map requests that can target this data source.

For more information about the name and number_of_mappers attributes, see Section 1.5.2.14.

After adding the data source definition, you must restart MapViewer to have the new data source created. After you do this, whenever you request a map from this data source, MapViewer obtains the necessary database connections from the container before proceeding.

1.7 High Availability and MapViewer


Note:

This section is intended for advanced users who want to take full advantage of the high availability features of Oracle Fusion Middleware with MapViewer. You must have a strong understanding of high availability features, which are described in Oracle Fusion Middleware High Availability Guide.

MapViewer users can benefit from the high availability features of Oracle Database and Oracle Fusion Middleware.

1.7.1 Deploying MapViewer on a Multiprocess OC4J Instance

You can safely deploy MapViewer in an OC4J instance of Oracle Fusion Middleware that has multiple processes. Oracle Fusion Middleware lets you configure the number of actual processes (JVMs) that can be started for each OC4J instance. On a multiprocessor host, starting multiple processes for a single OC4J can better utilize the system resources. (Releases of MapViewer before 10g Release 2 (10.1.2) could not take advantage of this feature and thus could not be deployed on such OC4J instances.)

When MapViewer is deployed to an OC4J instance with multiple processes, each process has a MapViewer server running inside it. These MapViewer servers all reside on the same host but in different Java processes. Map requests sent to this OC4J instance are automatically dispatched to the individual MapViewer servers. Each MapViewer server generates map image files according to a unique naming scheme, with the names coordinated when the different MapViewer servers are first started (that is, when the containing OC4J instance is started). This avoids the possibility of two MapViewer servers generating map files in the same sequence with the same file names.

1.7.2 Deploying MapViewer on a Middle-Tier Cluster

OC4J instances in different Oracle Fusion Middleware 10gR3 installations can be clustered into an island. This provides a middle-tier fail-safe option. MapViewer can be deployed to an OC4J island. You must take care, however, about how the generated image files on each host are named and referenced through URLs by client applications.

Consider the following sample scenario. When a map request is sent to the front Web server, it reaches the MapViewer server running on host A. MapViewer on host A then sends back the URL for the generated map image, and the client then sends a second request to fetch the actual image. This second request might be received by the OC4J container running on host B, which has no such image (or which will send back an incorrect image with the same name).

There is no single best solution for this problem in all environments. One option is to have the hosts share common networked storage, so that the map images are deposited in the same virtual (networked) file system by different MapViewer servers running on different hosts. You must configure the map file storage information (see Section 1.5.2.2) for each MapViewer instance so that the images are deposited in different subdirectories or so that they have different file prefixes. Otherwise, the image files generated by the multiple MapViewer servers might overwrite each other on the disk. By properly configuring the map file storage information, you ensure that each URL sent back to the client uniquely identifies the correct map on the network drive.

If you cannot use networked drives, consider using a load balancer. You may first need to configure the map file storage information for each MapViewer instance (as explained in the preceding paragraph), so that each MapViewer instance names its generated images using an appropriate scheme to ensure uniqueness. You can then specify rules in the load balancer to have it redirect image requests to a certain host if the URL matches a certain pattern, such as containing a specified map image file prefix.

1.8 Secure Map Rendering

This section describes how to implement secure map rendering based on a Web user's identity. Users with different roles or permissions will see different feature sets when viewing the same theme. The basic idea is that MapViewer will always invoke a specified PL/SQL package to set the Web user's identity in the database whenever accessing the database for any themes. This user information can be used by the database to enforce data access control.


Note:

In this section, the terms user and authenticated user refer to the application or Web user that logs into Oracle Fusion Middleware or Oracle Single Sign-On (SSO). It is not the same as the database user. MapViewer itself will connect directly to a database schema that stores all the geospatial data.

MapViewer will connect directly to a database schema that stores all the geospatial data. To enforce access control for MapViewer on the data in this schema, you must perform the following steps:

  1. Create a PL/SQL package in the database schema. The package must have at least two named procedures: set_user(username) and clear_user().

  2. Create views, set access rights on database objects, and perform other tasks, based on the user identity stored in the PL/SQL package (which is set by MapViewer through the set_user procedure for each database session).

  3. Create a MapViewer data source to the schema, providing the name of the PL/SQL package as part of the data source definition. This is considered a secured data source.

  4. Create MapViewer themes that are based on the views created in step 2.

  5. Establish Web authentication for users accessing your MapViewer application page or pages, so that when a map request reaches the MapViewer servlet, the Web session object should contain an authenticated user's identity.

  6. Issue map and FOI (feature of interest) requests that view the themes defined in step 4, either directly or through the use of base maps and Oracle Maps.

    MapViewer will automatically pass the user identity to the database using the PL/SQL package before it executes any query for these themes. Only those rows that are visible to the identified user will be returned from the database and rendered by MapViewer.

Section 1.8.1 explains how secure map rendering works and provides implementation details and examples. Section 1.8.3 describes some options for authenticating users and refers to a supplied demo.

1.8.1 How Secure Map Rendering Works

MapViewer, as a J2EE application, can obtain the identity of a web user that has been authenticated to Oracle Fusion Middleware or Oracle Single Sign-On (SSO). This user information can then be preserved and propagated to the database, where secure access to map layers and tables can be set up based on the user identity. For example, a database administrator (DBA) can create a view of a base table that selects only those spatial features visible to a specific user.

To pass the Web user identity from Oracle Fusion Middleware or Oracle Single Sign-On (SSO) to the database, use a secure PL/SQL package that sets the user identity in the database. This PL/SQL package is created by a DBA or application developer and installed in the data source schema. Such a package can have any number of procedures and functions, but it must contain at least the following two procedures:

  • set_user(username)

  • clear_user()

Whenever a theme is requested from a secured data source, MapViewer invokes the set_user procedure in the associated PL/SQL package before it executes any data query for the theme, and it invokes the clear_user procedure when the querying process is complete for the theme.

Example 1-3 shows a PL/SQL package that you can use for secure map rendering. You can create this package in the example MVDEMO schema.

Example 1-3 PL/SQL Package for Secure Map Rendering

CREATE OR REPLACE PACKAGE web_user_info
AS
    PROCEDURE set_user (p_name IN VARCHAR2);
    PROCEDURE clear_user;
    FUNCTION  get_user
        RETURN VARCHAR2;
END;
CREATE OR REPLACE PACKAGE BODY web_user_info
AS
    w_name VARCHAR2 (32767);
 
  PROCEDURE set_user (p_name IN VARCHAR2)
  AS
  BEGIN
     w_name := LOWER (p_name);
  END;
 
  PROCEDURE clear_user
  AS
  BEGIN
      w_name := null;
  END;
 
  FUNCTION get_user
    RETURN VARCHAR2
  AS
  BEGIN
    RETURN w_name;
  END;
END;
/

In Example 1-3, set_user and clear_user are two required methods, and get_user is a convenience function that can be used in creating views or for other data access control purposes

After you create the package (which essentially contains the user identity for the current database session), you can set up an elaborate virtual private database that uses this user information (see Oracle Database Security Guide for information about using Oracle Virtual Private Database, or VPD). For simplicity, however, this section does not discuss VPD creation, but shows that you can create views that use this user information to enforce data access control.

For example, in the example MVDEMO schema you can add a column named ACCOUNT_MGR to the existing CUSTOMERS table, and assign an account manager to each customer stored in this table. You can then create a view that returns only customer rows for a specific account manager, as shown in Example 1-4.

Example 1-4 View for Secure Map Rendering

CREATE OR REPLACE VIEW customers_view
AS
  SELECT * FROM customers
  WHERE account_mgr = web_user_info.get_user;

You can now define a MapViewer theme based on this view, so that whenever account managers log in and want to view customer data on a map, each will only see his or her own customers.

After you have installed the PL/SQL package, you can pass the name of this package to MapViewer as part of the definition of a data source by using the plsql_package attribute, as shown in Example 1-5.

Example 1-5 Data Source Definition for Secure Map Rendering

<map_data_source name="mvdemo"
                 jdbc_host="stadb32.us.oracle.com"
                 jdbc_sid="mv"
                 jdbc_port="15214"
                 jdbc_user="mvdemo"
                 jdbc_password="password"
                 jdbc_mode="thin"
                 number_of_mappers="3"
                 allow_jdbc_theme_based_foi="true"
                 plsql_package="web_user_info"
   />

When you specify a PL/SQL package name in a data source definition, MapViewer flags the data source as a secure data source, and it automatically invokes the package's set_user and clear_user procedures whenever performing any theme queries on the data source.

1.8.2 Getting the User Name from a Cookie

Sometimes the authenticated user's name is not passed to MapViewer through a J2EE or OSSO session. such as when you integrate MapViewer within Application Express (APEX), where authentication is carried out by APEX and the user name is not available through a J2EE or OSSO session. To enable you to work around this issue, MapViewer also supports getting the user name from a cookie. Note that it is your responsibility to set up the cookie within APEX to hold the authenticated user name.

To ensure that MapViewer picks up the user name from a named cookie, you must specify the web_user_type attribute in the data source definition (in addition to the mandatory plsql_package attribute). For example, if you want MapViewer to pick up the user name from a cookie named MON_USER, your secure data source definition should look like Example 1-6.

Example 1-6 Data Source Definition Specifying Cookie Name

<map_data_source name="mvdemo"
                  jdbc_host="stadb32.us.oracle.com"
                  jdbc_sid="mv"
                  jdbc_port="25650"
                  jdbc_user="mvdemo"
                  jdbc_password="LfCDQ6NH59nuV7zbeY5QY06sqN7XhiUQ"
                  jdbc_mode="thin"
                  number_of_mappers="3"
                  allow_jdbc_theme_based_foi="true"
                  plsql_package="web_user_info"
                  web_user_type="MON_USER"
  />

The possible values for the web_user_type attribute are:

  • J2EE_USER: tells MapViewer to get the authenticated user name from a J2EE session

  • OSSO_USER: tells MapViewer to get the authenticated user from an OSSO session.

  • <cookie-name>: tells MapViewer to get the authenticated user from a cookie with the specified name. The cookie name is not case sensitive.

If web_user_type is not specified, MapViewer first looks for the user name in the J2EE session; and if none is found, it looks for the user name in the OSSO session (if present).

1.8.3 Authenticating Users: Options and Demo

How, when, and where users are authenticated depend on the requirements of your application and the setup of your installation. For example, your options include the following:

  • Deploy MapViewer as part of an enterprise portal site, so that end users always first log onto the portal before performing any mapping functions through MapViewer.

  • Deploy MapViewer on a separate system, and have users authenticate to a central Oracle SSO server.

As long as the HTTP requests reaching MapViewer contain the authenticated user information, MapViewer will be able to pass the requests on to the database, and the secure data access approach will work as expected.

The demo files supplied with MapViewer (see Section 1.9) include an explanation, plus related files, for restricting a single mapping page to be accessible only by authenticated users. This demo involves making simple changes to MapViewer's own deployment files. In this case, this protected page is the entry point that causes users to be authenticated, and the authentication is performed by the OC4J instance running MapViewer.

1.9 MapViewer Demos and Tutorials

Several demos and tutorials are supplied with MapViewer. For information about them, go to:

http://host:port/mapviewer/fsmc/tutorial/demos.html
PKҮ>%PKv\E OEBPS/lof.htma List of Figures

List of Figures

PK]faPKv\EOEBPS/index.htm Index

Index

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

A

accelerator keys
for Map Builder tool menus, 9.2
active theme
getting, 4.3.5
add_data_source element, 7.1.1
addBucketStyle method, 4.3.4
addCollectionBucketStyle method, 4.3.4
addColorSchemeStyle method, 4.3.4, 4.3.4
addColorStyle method, 4.3.4
addGeoRasterTheme method, 4.3.3
addImageAreaStyleFromURL method, 4.3.4, 4.3.4
addImageMarkerStyleFromURL method, 4.3.4, 4.3.4, 4.3.4, 4.3.4
addImageTheme method, 4.3.3
adding themes to a map, 2.4
addJDBCTheme method, 4.3.3
addJDBCTheme tag, 5.2.1
addLinearFeature method, 4.3.3
addLineStyle method, 4.3.4, 4.3.4
addLinksWithinCost method, 4.3.3
addMarkerStyle method, 4.3.4
addNetworkLinks method, 4.3.3
addNetworkNodes method, 4.3.3
addNetworkPaths method, 4.3.3
addNetworkTheme method, 4.3.3
addPointFeature method, 4.3.3
addPredefinedTheme method, 4.3.3
addPredefinedTheme tag, 5.2.2
addShortestPath method, 4.3.3
addStyle method, 4.3.4
addTextStyle method, 4.3.4
addThemesFromBaseMap method, 4.3.3
addTopologyDebugTheme method, 4.3.3
addTopologyTheme method, 4.3.3
addVariableMarkerStyle method, 4.3.4
addWMSMapTheme method, E.3.4
administrative requests, 7
restricting, 1.5.2.3
Workspace Manager support, 2.8
advanced style, 2.2
pie chart example, 3.1.9
thematic mapping and, 2.3.10
XML format for defining, A.6
advanced styles
example, 3.1.12
ALL_SDO_MAPS view, 2.9, 2.9.1
ALL_SDO_STYLES view, 2.9, 2.9.3
ALL_SDO_THEMES view, 2.9, 2.9.2
allow_jdbc_theme_based_foi attribute, 1.5.2.14
allow_local_adjustment attribute, 1.5.2.5
animated loading bar, B.2
annotation text themes, 2.3.9
antialiasing
attribute of map request, 3.2.1.1
setAntiAliasing method, 4.3.2
setParam tag parameter, 5.2.10
APIs
JavaScript for Oracle Maps, 8.4
MapViewer JavaBean, 4
adding a WMS map theme, E.3.4
MapViewer JavaScript for SVG maps, B
MapViewer XML, 3
adding a WMS map theme, E.3.1
PL/SQL, 6
appearance
attributes affecting theme appearance, 2.3.11
area style, 2.2
XML format for defining, A.4
asis attribute, 3.2.9
aspect ratio
preserving, 3.2.2, 3.2.3
authentication
WMS map themes, E.3.3
automatic legends, 2.4.2
AWT headless mode support, 1.3
azimuthal equidistant projection
used by MapViewer for globular map projection, 1.5.2.5

B

background color
for WMS requests, E.2.1.3
setting, 4.3.2
background image URL
setting, 4.3.2
bar chart marker style
XML format for defining, A.6.5
base maps, 2.4
adding themes from base map to current map request, 4.3.3
definition (example), 2.4
for WMS requests, E.2.1.1
importing, 5.2.6
listing for a data source, 7.2
part_of_basemap attribute for theme, 3.2.20
setting name of, 4.3.2
use_cached_basemap attribute, 3.2.1.1
XML format, A
XML format for defining, A.8
basemap
attribute of map request, 3.2.1.1
setParam tag parameter, 5.2.10
BASEMAP parameter (WMS), E.2.1.1
BBOX parameter (WMS), E.2.1.2
bean
MapViewer API for, 4
bgcolor
attribute of map request, 3.2.1.1
setParam tag parameter, 5.2.10
BGCOLOR parameter (WMS), E.2.1.3
bgimage
attribute of map request, 3.2.1.1
setParam tag parameter, 5.2.10
binding parameters, 2.3.1.3
example, 3.1.11
Bing Maps
built-in map tile layers, 8.6
displaying tile layer using Oracle Maps, 8.1.3.1
transforming data to the Microsoft Bing Maps coordinate system, 8.7
bitmap masks
with GeoRaster themes, 2.3.4.2
border margin
for bounding themes, 3.2.2
bounding box
for WMS requests, E.2.1.2
specifying for map, 3.2.3
bounding themes
specifying for map, 3.2.2, 4.3.2
bounding_themes element, 3.2.2
box element, 3.2.3
bucket style
adding to map request, 4.3.4, 4.3.4
specifying labels for buckets, 2.2.2
XML format for defining, A.6.1
built-in map tile layers, 8.6

C

cache
metadata, 2.5, 7.6.1
spatial data, 1.5.2.6, 7.6.2
with predefined themes, 2.3.1.5
caching attribute
for predefined theme, 2.3.1.5, A.7
center element, 3.2.4
center point
setting, 4.3.2
centerX
setParam tag parameter, 5.2.10
centerY
setParam tag parameter, 5.2.10
classgen.jar file, E.1.1
clear_cache element, 7.6.1
clear_theme_cache element, 7.6.2
clickable (live) features, 4.3.10
client handle, 6.2.2
cluster
deploying MapViewer on middle-tier cluster, 1.7.2
collection bucket style
adding to map request, 4.3.4
with discrete values, A.6.1.1
collection style
XML format for defining, A.6.6, A.6.7
color scheme style
adding to map request, 4.3.4, 4.3.4
XML format for defining, A.6.2
color stops (heat map), A.6.8
color style, 2.2
adding to map request, 4.3.4
XML format for defining, A.1
configuring MapViewer, 7.7
connection information
for adding a data source, 7.1.1
connections, maximum number of, 1.5.2.14
container data source, 1.5.2.14, 7.1.1
container theme name (heat map), A.6.8
container_ds attribute, 1.5.2.14, 7.1.1, 7.1.1
container-controlled logging, 1.5.2.1
cookie
getting authenticated user’s name from, 1.8.2
coordinate system, 2.4
conversion by MapViewer for map request, 3.1.8
coordinate system ID
See SRID
cost analysis
of network nodes, 4.3.3
cross-schema map requests, 2.7
custom image renderer
creating and registering, C
custom_image_renderer element, 1.5.2.8
custom spatial provider
creating and registering, D
s_data_provider element, 1.5.2.9

D

data providers
nonspatial, 1.5.2.10
data source methods
using, 4.3.8
data sources
adding, 7.1.1
checking existence of, 4.3.8, 7.1.5
clearing metadata cache, 7.6.1
container_ds attribute, 1.5.2.14, 7.1.1
explanation of, 2.5
for WMS requests, E.2.1.4
listing, 7.1.4
listing base maps in, 7.2
listing names of, 4.3.8
listing themes in, 7.3
permanent, 1.5.2.14
redefining, 7.1.3
removing, 7.1.2
setting name of, 4.3.2
using multiple data sources in a map request (datasource attribute for theme), 3.2.20, 3.2.20
data_source_exists element, 7.1.5
datasource
attribute of map request, 3.2.1.1
attribute of theme specification in a map request, 3.2.20, 3.2.20
DATASOURCE parameter (WMS), E.2.1.4
dataSourceExists method, 4.3.8
DBA_SDO_STYLES view, 2.9.3
debug mode
topology themes, 2.3.6
adding theme, 4.3.3
decorative aspects
attributes affecting theme appearance, 2.3.11
deleteAllThemes method, 4.3.5
deleteMapLegend method, 4.3.2
deleteStyle method, 4.3.4
deleteTheme method, 4.3.5
demo
MapViewer JavaBean API, 4.2
deploying MapViewer, 1.4
disableFeatureSelect function, B.3.1
disablePolygonSelect function, B.3.1
disableRectangleSelect function, B.3.1
doQuery method, 4.3.9
doQueryInMapWindow method, 4.3.9
dot density marker style
XML format for defining, A.6.4
drawLiveFeatures method, 4.3.10
DTD
exception, 3.5
Geometry (Open GIS Consortium), 3.6
information request, 3.3
map request, 3.2
examples, 3.1
map response, 3.4
dynamic themes
adding to map request, 4.3.3
DYNAMIC_STYLES parameter (WMS), E.2.1.5
dynamically defined styles, 2.2, 3.2.18
adding to map request, 4.3.4
for WMS requests, E.2.1.5
removing, 4.3.4
dynamically defined themes, 2.3.2, 3.2.9, 3.2.20
See also JDBC themes

E

edit_config_file element, 7.7
enableFeatureSelect function, B.3.1
enablePolygonSelect function, B.3.1
enableRectangleSelect function, B.3.1
enableThemes method, 4.3.5
EPSG
in SRS parameter (WMS), E.2.1.14
example programs using MapViewer
Java, 3.1.15
PL/SQL, 3.1.16
exception DTD, 3.5
EXCEPTIONS parameter (WMS)
for GetFeatureInfo request, E.2.3.2
for GetMap request, E.2.1.6
external attribute data, 2.3.10.1

F

fast_unpickle attribute, 3.2.20
feature labels
support for translation, 2.3.1.6
feature of interest (FOI), 8.3
feature selection
enabling and disabling, B.3.1
FEATURE_COUNT parameter (WMS), E.2.3.3
features
new, Preface
features of interest (FOIs)
allow_jdbc_theme_based_foi attribute, 1.5.2.14
field element
for hidden information, 3.2.9, A.7
filter (spatial)
getting, 4.3.9, 4.3.9
fixed_svglabel attribute, 3.2.20
FOI (feature of interest), 8.3
FOIs
allow_jdbc_theme_based_foi attribute, 1.5.2.14
footnote attribute, 3.2.1.1, 3.2.1.1
map request, 3.2.1.1
footnote_style attribute, 3.2.1.1, 3.2.1.1
map request, 3.2.1.1
format
attribute of map request, 3.2.1.1
FORMAT parameter (WMS), E.2.1.7

G

geodetic data
projecting to local non-geodetic coordinate system, 1.5.2.5
geoFeature element, 3.2.5
Geometry DTD (Open GIS Consortium), 3.6
GeoRaster themes, 2.3.4
adding to current map request, 4.3.3
bitmap masks, 2.3.4.2
defining with jdbc_georaster_query element, 3.2.6
library files needed, 1.4
reprojection, 2.3.4.3
setting polygon mask, 2.3.4, 4.3.5
theme_type attribute in styling rules, A.7
getActiveTheme method, 4.3.5
getAntiAliasing method, 4.3.2
GetCapabilities request and response, E.2.2
getDataSources method, 4.3.8
getEnabledThemes method, 4.3.5
GetFeatureInfo request
specifying attributes to be queried, E.2.3.10
supported features, E.2.3
getGeneratedMapImage method, 4.3.7
getGeneratedMapImageURL method, 4.3.7
getInfo function, B.3.1
getLiveFeatureAttrs method, 4.3.10
GetMap request
parameters, E.2.1
getMapMBR method, 4.3.7
getMapResponseString method, 4.3.7
getMapURL tag, 5.2.3
getNumLiveFeatures method, 4.3.10
getParam tag, 5.2.4
getScreenCoordinate function, B.4
getSelectedIdList function, B.3.1
getSelectPolygon function, B.3.1
getSelectRectangle function, B.3.1
getSpatialFilter method, 4.3.9, 4.3.9
getThemeEnabled method, 4.3.5
getThemeNames method, 4.3.5
getThemePosition method, 4.3.5
getThemeVisibleInSVG method, 4.3.5
getUserCoordinate function, B.4
getUserPoint method, 4.3.9, 4.3.9, 4.3.9
getWhereClauseForAnyInteract method, 4.3.9, 4.3.9
getXMLResponse method, 4.3.6
GIF format, 3.2.1.1
GIF_STREAM format, 3.2.1.1
GIF_URL format, 3.2.1.1
globular map projection, 1.5.2.5
Google Maps
built-in map tile layers, 8.6
displaying tile layer using Oracle Maps, 8.1.3.1
transforming data to the Google Maps coordinate system, 8.7
grid sample factor (heat map), A.6.8

H

hasLiveFeatures method, 4.3.10
hasThemes method, 4.3.5
headless AWT mode support, 1.3
heat map style
XML format for defining, A.6.8
height
attribute of map request, 3.2.1.1
setParam tag parameter, 5.2.10
HEIGHT parameter (WMS), E.2.1.8
hidden information (SVG maps)
displaying when mouse moves over, 3.2.1.1, 4.3.2
hidden_info element, 3.2.9, 3.2.9, A.7
hidden themes
getThemeVisibleInSVG method, 4.3.5
setThemeVisible method, 4.3.5
hidden_info attribute, 3.2.5
hidden_info element, 3.2.9, 3.2.9, A.7
hideTheme function, B.2
high availability
using MapViewer with, 1.7
highlightFeatures method, 4.3.10

I

identify method, 4.3.9
identify tag, 5.2.5
image area style
adding to map request, 4.3.4, 4.3.4
image format
for WMS requests, E.2.1.7
setting, 4.3.2
image marker style
adding to map request, 4.3.4, 4.3.4
XML format for defining, A.2.2
image renderer
creating and registering, C
custom_image_renderer element, 1.5.2.8
image scaling
setting automatic rescaling, 4.3.2
image themes, 2.3.3
adding, 4.3.3
defining with jdbc_image_query element, 3.2.7
example, 3.1.6
setting scale values, 4.3.5
setting transparency value, 4.3.5
setting unit and resolution values, 4.3.5
theme_type attribute in styling rules, A.7
images
getting sample image for a style, 2.2.5
imagescaling
attribute of map request, 3.2.1.1
setParam tag parameter, 5.2.10
importBaseMap tag, 5.2.6
indexed PNG format support, 3.2.1.1
INFO_FORMAT parameter (WMS), E.2.3.4
info_request element, 3.3
infoon attribute, 3.2.1.1
information request DTD, 3.3
init tag, 5.2.7
initial scale, 3.2.1.1
initscale attribute, 3.2.1.1
installing MapViewer, 1.4
internationalization
translation of feature labels, 2.3.1.6
isClickable method, 4.3.10

J

jai_codec.jar file, 1.4
jai_core.jar file, 1.4
Java example program using MapViewer, 3.1.15
JAVA_IMAGE format, 3.2.1.1
JavaBean-based API for MapViewer, 4
demo, 4.2
Javadoc, 4.2
Javadoc
MapViewer JavaBean API, 4.2
JavaScript API for Oracle Maps, 8.4
JavaScript functions for SVG maps, B
JavaServer Pages (JSP)
tag library for MapViewer, 5
JDBC theme-based features of interest, 1.5.2.14
JDBC themes, 2.3.2
adding, 4.3.3, 5.2.1
saving complex SQL queries, 2.3.2.2
using a pie chart style, 3.1.9
jdbc_georaster_query element, 3.2.6
jdbc_host attribute, 7.1.1
jdbc_image_query element, 3.2.7
jdbc_mode attribute, 7.1.1
jdbc_network_query element, 3.2.8
jdbc_password attribute, 7.1.1
jdbc_port attribute, 7.1.1
jdbc_query element, 3.2.9
jdbc_sid attribute, 7.1.1
jdbc_tns_name attribute, 7.1.1
jdbc_topology_query element, 3.2.10
jdbc_user attribute, 7.1.1
join view
key_column styling rule attribute required for theme defined on join view, A.7
JPEG image format support, 3.2.1.1
JSP tag library for MapViewer, 5

K

keepthemesorder attribute, 3.2.1.1
key_column attribute
for theme defined on a join view, A.7

L

label attribute, 2.3.10
label_always_on attribute, 3.2.20
label_max_scale attribute, 2.4.1
label_min_scale attribute, 2.4.1
labeling of spatial features, 2.3.1.1
label styles for individual buckets, 2.2.2
translation of feature labels, 2.3.1.6
LAYERS parameter (WMS), E.2.1.9
legend, 2.4.2
automatic, 2.4.2
creating, 5.2.8
deleting, 4.3.2
element, 3.2.11
example, 2.4.2
for WMS requests, E.2.1.10
setting, 4.3.2, 4.3.2, 4.3.2
LEGEND_REQUEST parameter (WMS), E.2.1.10
legendSpec parameter, 4.3.2
line style, 2.2
adding to map request, 4.3.4, 4.3.4
XML format for defining, A.3
linear features
adding, 4.3.3
removing, 4.3.3
list_data_sources element, 7.1.4
list_maps element, 7.2
list_predefined_themes element, 7.3
list_styles element, 7.4
list_theme_styles element, 7.5
list_workspace_name element, 2.8
list_workspace_session element, 2.8
live features, 4.3.10
load balancer
using MapViewer with, 1.7.2
loading bar, B.2
local geodetic data adjustment
specifying for map, 1.5.2.5
logging element, 1.5.2.1
logging information, 1.5.2.1
container-controlled, 1.5.2.1
logo
specifying for map, 1.5.2.5
longitude/latitude coordinate system, 2.4

M

makeLegend tag, 5.2.8
Map Builder tool, 9, 9
running, 9.1
user interface (UI), 9.2
map image file information, 1.5.2.2
map legend, 2.4.2
creating, 5.2.8
deleting, 4.3.2
example, 2.4.2
legend element, 3.2.11
setting, 4.3.2, 4.3.2, 4.3.2
map logo, 1.5.2.5
map note, 1.5.2.5
map rendering, 1.8
map request DTD, 3.2
examples, 3.1
map requests
cross-schema, 2.7
getting parameter value, 5.2.4
sending to MapViewer service, 4.3.6
setting parameters for, 5.2.10
submitting using run JSP tag, 5.2.9
XML API, 3
map response
extracting information from, 4.3.7
map response DTD, 3.4
map response string
getting, 4.3.7
map result file name
setting, 4.3.2
map size
setting, 4.3.2
map tile layers
built-in, 8.6
XML format for defining, A.9
map tile server, 8.2
configuring, 1.5.2.13
map title, 1.5.2.5
setting, 4.3.2
map URL
getting, 5.2.3
map_data_source element, 1.5.2.14
map_request element, 3.2.1
attributes, 3.2.1.1
map_tile_server element, 1.5.2.13
map_tile_theme element, 3.2.12
mapbuilder.jar file, 9.1
mapdefinition.sql file, 2.9
map-level mouse-click event control functions, B.3.2.1
mappers (renderers), 2.5
number of, 1.5.2.14, 7.1.1
mapping profile, 2.1
maps, 1.8, 2.4
creating by adding themes and rendering, 2.4
explanation of, 2.4
how they are generated, 2.6
listing, 7.2
metadata view, 2.9
scale, 2.4.1
size, 2.4.1
MapViewer
Quick Start kit, 1.4
MapViewer bean
creating, 5.2.7
MapViewer client handle, 6.2.2
MapViewer configuration file
editing, 7.7
sample, 1.5.2
MapViewer exception DTD, 3.5
MapViewer information request DTD, 3.3
MapViewer server
restarting, 7.8
mapViewerConfig.xml configuration file
editing, 7.7
sample, 1.5.2
marker style, 2.2
adding to map request, 4.3.4, 4.3.4, 4.3.4
orienting, 2.2.3.2
using on lines, A.2.4
XML format for defining, A.2
masks
bitmap (GeoRaster themes), 2.3.4.2
max_connections attribute, 1.5.2.14
max_scale attribute, 2.4.1
MBR
getting for map, 4.3.7
metadata cache, 2.5
clearing, 7.6.1
metadata views, 2.9
mapdefinition.sql file, 2.9
Microsoft Bing Maps
built-in map tile layers, 8.6
displaying tile layer using Oracle Maps, 8.1.3.1
transforming data to the Microsoft Bing Maps coordinate system, 8.7
middle-tier cluster
deploying MapViewer on, 1.7.2
min_dist attribute, 3.2.20
min_scale attribute, 2.4.1
minimum bounding rectangle (MBR)
getting for map, 4.3.7
minimum_pixels attribute, 3.2.20
mixed theme scale mode, 3.1.10
mode attribute, 3.2.20
mouse click
event control functions for SVG maps, B.3
getting point associated with, 4.3.9, 4.3.9, 4.3.9
mouse-click event control function, 3.2.20, B.3.2.2
mouse-move event control function, 3.2.20, B.3.2.2
mouse-out event control function, 3.2.20, B.3.2.2
mouse-over event control function, 3.2.20, B.3.2.2
moveThemeDown method, 4.3.5
moveThemeUp method, 4.3.5
multiprocess OC4J instance
deploying MapViewer on, 1.7.1
MV_DATELIST type, 1.4.4.3
MV_NUMBERLIST type, 1.4.4.3
MV_STRINGLIST type, 1.4.4.3
mvclient.jar file, 5.1
mvtaglib.tld file, 5.1
MVTHEMES parameter (WMS), E.2.1.11

N

navbar attribute, 3.2.1.1
navigation bar (SVG map), 3.2.1.1, 4.3.2
network analysis
shortest-path, 2.3.5.2, 4.3.3
within-cost, 2.3.5.2, 4.3.3
network connection information
for adding a data source, 7.1.1
network themes, 2.3.5
adding, 4.3.3
defining with jdbc_network_query element, 3.2.8
library files needed, 1.4
setting labels, 4.3.5
theme_type attribute in styling rules, A.7
networked drives
using MapViewer with, 1.7.2
new features, Preface
non_map_request element, 7
non_map_response element, 7
non-map requests
See administrative requests
nonspatial attributes
getting values, 5.2.5
identifying, 4.3.9
querying, 4.3.9
nonspatial data provider, 2.3.10.1
nonspatial data providers
registering, 1.5.2.10
north_arrow element, 3.2.13
note
specifying for map, 1.5.2.5
ns_data_provider element, 1.5.2.10
number_of_mappers attribute, 1.5.2.14, 2.5, 7.1.1

O

OGC (Open GIS Consortium)
Geometry DTD, 3.6
WMS support by MapViewer, E
oms_error element, 3.5
omserver (in URL)
getting a sample image of a style, 2.2.5
onclick attribute, 3.2.5, 3.2.20
map request, 3.2.1.1
onClick function (SVG map), 4.3.2, 4.3.5
onmousemove attribute, 3.2.20
map request, 3.2.1.1
onmouseout attribute, 3.2.20
onmouseover attribute, 3.2.20
onpolyselect attribute, B.3.2.3
map request, 3.2.1.1
onrectselect attribute, B.3.2.3
map request, 3.2.1.1
Open GIS Consortium
Geometry DTD, 3.6
WMS support by MapViewer, E
operation element, 3.2.14
operations element, 3.2.15
Oracle Map Builder tool, 9
Oracle Maps, 8
feature of interest server, 8.3
JavaScript API, 8.4
map tile server, 8.2
Oracle Real Application Clusters (RAC)
using MapViewer with, 1.6
orientation vector, 3.2.5
using with an oriented point, 2.2.3
oriented points
pointing label or marker in direction of orientation vector, 2.2.3

P

pan method, 4.3.6
parameter element, 3.2.16
parameter value for map request
getting, 5.2.4
parameters
binding, 2.3.1.3
parameters for map request
setting, 5.2.10
part_of_basemap attribute, 3.2.20
PDF image format support, 3.2.1.1
permanent data sources
defining, 1.5.2.14
pickling
fast_unpickle theme attribute, 3.2.20
setThemeFastUnpickle method, 4.3.5
pie chart
map request using, 3.1.9
PL/SQL
API for MapViewer, 6
PL/SQL example program using MapViewer, 3.1.16
plsql_package attribute, 1.5.2.14
PNG image format support, 3.2.1.1
PNG8 (indexed) image format support, 3.2.1.1
point features
adding, 4.3.3
removing, 4.3.3
polygon mask
setting for GeoRaster theme, 2.3.4, 4.3.5
polygon selection
enabling and disabling, B.3.1
polygon_mask attribute, 2.3.4
predefined mouse-click event control functions, B.3.1
predefined themes, 2.3.1, 3.2.20
adding, 4.3.3, 5.2.2
binding parameters example, 3.1.11
caching of, 2.3.1.5
LAYERS parameter (WMS), E.2.1.9
listing, 7.3
listing styles used by, 7.5
WMS map, E.3.2
prerequisite software for using MapViewer, 1.3
preserve_aspect_ratio attribute, 3.2.2, 3.2.3
progress indicator
loading of map, B.2
projection of geodetic data to local non-geodetic coordinate system, 1.5.2.5
proxy (Web) for MapViewer service
setting, 4.3.2

Q

query type
for WMS requests, E.2.3.6
query window
setting, 4.3.2
QUERY_LAYERS parameter (WMS), E.2.3.5
QUERY_TYPE parameter (WMS), E.2.3.6
Quick Start kit, 1.4

R

RAC (Oracle Real Application Clusters)
using MapViewer with, 1.6
radius
for WMS requests, E.2.3.7
RADIUS parameter (WMS), E.2.3.7
rasterbasemap attribute, 3.2.1.1
ratio scale mode
example, 3.1.10
Real Application Clusters (Oracle RAC)
using MapViewer with, 1.6
recenter function, B.1
rectangle selection
enabling and disabling, B.3.1
redefine_data_source element, 7.1.3
redlining, 8.4
remove_data_source element, 7.1.2
removeAllDynamicStyles method, 4.3.4
removeAllLinearFeatures method, 4.3.3
removeAllPointFeatures method, 4.3.3
renderer
creating and registering custom image renderer, C
custom_image_renderer element, 1.5.2.8
renderers (mappers), 2.5
number_of_mappers attribute, 1.5.2.14, 7.1.1
rendering a map, 2.4
secure map rendering, 1.8
rendering rules
example, 3.1.12
reprojection
with GeoRaster themes, 2.3.4.3
REQUEST parameter (WMS)
GetMap or GetCapabilities, E.2.1.12
required software for using MapViewer, 1.3
resolution
setThemeUnitAndResolution method, 4.3.5
response string for map
getting, 4.3.7
restart element, 7.8
restarting the MapViewer server, 7.8
rotation attribute, 3.2.1.1
rules
styling, 2.3.1.1
run method, 4.3.6
run tag, 5.2.9

S

sample image
getting for a style, 2.2.5
save_images_at element, 1.5.2.2
scalable styles, 2.2.1
scale bar, 3.2.17
scale mode
mixed theme example, 3.1.10
ratio example, 3.1.10
scale of map, 2.4.1
setting for theme, 4.3.5
scale_bar element, 3.2.17
scaling
of image, 3.2.1.1, 5.2.10
SDO_MVCLIENT package, 6
sdonm.jar file, 1.4
secure, 1.8
secure map rendering, 1.8
plsql_package attribute, 1.5.2.14
web_user_type attribute, 1.5.2.14
secure rendering, 1.8
security
security_config element, 1.5.2.7
security_config element, 1.5.2.7
selectable themes (SVG map), 4.3.5
selectable_in_svg attribute, 3.2.5, 3.2.20
selectFeature function, B.3.1
selection event mouse-click event control functions, B.3.2.3
sendXMLRequest method, 4.3.6
seq attribute, 2.3.10
SERVICE parameter (WMS), E.2.1.13
setAllThemesEnabled method, 4.3.5
setAntiAliasing method, 4.3.2
setBackgroundColor method, 4.3.2
setBackgroundImageURL method, 4.3.2
setBaseMapName method, 4.3.2
setBoundingThemes method, 4.3.2
setBox method, 4.3.2
setCenter method, 4.3.2
setCenterAndSize method, 4.3.2
setClickable method, 4.3.10
setDataSourceName method, 4.3.2
setDefaultStyleForCenter method, 4.3.2
setDeviceSize method, 4.3.2
setFullExtent method, 4.3.2
setGeoRasterThemePolygonMask method, 4.3.5
setImageFormat method, 4.3.2
setImageScaling method, 4.3.2
setLabelAlwaysOn method, 4.3.5
setMapLegend method, 4.3.2, 4.3.2, 4.3.2
setMapRequestSRID method, 4.3.2
setMapResultFileName method, 4.3.2
setMapTitle method, 4.3.2
setNetworkThemeLabels method, 4.3.5
setParam tag, 5.2.10
setSelectPolygon function, B.3.1
setSelectRectangle function, B.3.1
setServiceURL method, 4.3.2
setShowSVGNavBar method, 4.3.2
setSize method, 4.3.2
setSVGOnClick method, 4.3.2
setSVGShowInfo method, 4.3.2
setSVGZoomFactor method, 4.3.2
setSVGZoomLevels method, 4.3.2
setSVGZoomRatio method, 4.3.2
setThemeAlpha method, 4.3.5
setThemeEnabled method, 4.3.5
setThemeFastUnpickle method, 4.3.5
setThemeOnClickInSVG method, 4.3.5
setThemeScale method, 4.3.5
setThemeSelectableInSVG method, 4.3.5
setThemeUnitAndResolution method, 4.3.5
setThemeVisible method, 4.3.5
setWebProxy method, 4.3.2
setZoomRatio function, B.1
shortcut keys
for Map Builder tool menus, 9.2
shortest-path analysis, 2.3.5.2
addShortestPath method, 4.3.3
showLoadingBar function, B.2
showTheme function, B.2
simplify_shapes attribute, 3.2.20
size (map)
setting, 4.3.2
size of map, 2.4.1
size_hint attribute, 3.2.2
snap_to_cache_scale attribute, 3.2.1.1
spatial data cache
clearing, 7.6.2
customizing, 1.5.2.6
spatial data provider
custom, 1.5.2.9
spatial filter
getting, 4.3.9, 4.3.9
spatial reference ID
See SRID
spatial_data_cache element, 1.5.2.6
spot light radius (heat map), A.6.8
SRID
conversion by MapViewer for map request, 3.1.8
setting, 4.3.2
srid
attribute of map request, 3.2.1.1
SRS mapping
customizing, 1.5.2.11
SRS parameter (WMS), E.2.1.14
srs_mapping element, 1.5.2.11
stacked styles
example, 3.1.13
sticky attribute for text style, 2.2.4
style element, 3.2.18
styles, 2.2
adding to map request, 4.3.4
advanced, 2.2
pie chart example, 3.1.9
thematic mapping and, 2.3.10
XML format for defining, A.6
area, 2.2
XML format for defining, A.4
bar chart
XML format for defining, A.6.5
bucket
adding to map request, 4.3.4
specifying labels for buckets, 2.2.2
XML format for defining, A.6.1
collection
XML format for defining, A.6.6, A.6.7
color, 2.2
adding to map request, 4.3.4
XML format for defining, A.1
color scheme
adding to map request, 4.3.4
XML format for defining, A.6.2
dot density
XML format for defining, A.6.4
dynamically defined, 2.2, 3.2.18
adding to map request, 4.3.4
getting sample image, 2.2.5
heat map
XML format for defining, A.6.8
image marker
adding to map request, 4.3.4, 4.3.4, 4.3.4, 4.3.4
XML format for defining, A.2.2
label styles for buckets, 2.2.2
line, 2.2
adding to map request, 4.3.4, 4.3.4
XML format for defining, A.3
listing, 7.4
listing those used by a predefined theme, 7.5
marker, 2.2
adding to map request, 4.3.4
XML format for defining, A.2
metadata view, 2.9
removing, 4.3.4
scaling size of, 2.2.1
stacked
example, 3.1.13
text, 2.2
adding to map request, 4.3.4
XML format for defining, A.5
TrueType font-based marker
XML format for defining, A.2.3
variable marker
adding to map request, 4.3.4
XML format for defining, A.6.3
vector marker
adding to map request, 4.3.4
XML format for defining, A.2.1
XML format, A
styles element, 3.2.19
STYLES parameter (WMS), E.2.1.15
styling rules, 2.3.1.1, A
XML format for specifying, A.7
SVG Basic (SVGB) image format support, 3.2.1.1
SVG Compressed (SVGZ) image format support, 3.2.1.1
SVG maps
display control functions, B.2
fixed_svglabel attribute, 3.2.20
hidden themes, 4.3.5
hidden_info attribute, 3.2.5
infoon attribute, 3.2.1.1
initscale attribute, 3.2.1.1
JavaScript functions, B
mouse-click event control functions, B.3
navbar attribute, 3.2.1.1
navigation bar, 4.3.2
navigation control functions, B.1
onclick attribute, 3.2.1.1, 3.2.5, 3.2.20
onClick function, 4.3.2, 4.3.5
onmousemove attribute, 3.2.1.1, 3.2.20
onmouseout attribute, 3.2.20
onmouseover attribute, 3.2.20
onpolyselect attribute, 3.2.1.1, B.3.2.3
onrectselect attribute, 3.2.1.1, B.3.2.3
other control functions, B.4
part_of_basemap attribute, 3.2.20
rasterbasemap attribute, 3.2.1.1
selectable themes, 4.3.5
selectable_in_svg attribute, 3.2.5, 3.2.20
setSVGShowInfo method, 4.3.2
setSVGZoomFactor method, 4.3.2
setSVGZoomLevels method, 4.3.2
setSVGZoomRatio method, 4.3.2
setThemeOnClickInSVG method, 4.3.5
setThemeSelectableInSVG method, 4.3.5
setThemeVisible method, 4.3.5
SVG_STREAM and SVG_URL format attribute values, 3.2.1.1
SVGTINY_STREAM and SVGTINY_URL format attribute values, 3.2.1.1
SVGZ_STREAM and SVGZ_URL format attribute values, 3.2.1.1
visible themes, 4.3.5
visible_in_svg attribute, 3.2.20
zoomfactor attribute, 3.2.1.1
zoomlevels attribute, 3.2.1.1
zoomratio attribute, 3.2.1.1
SVG Tiny (SVGT) image format support, 3.2.1.1
switchInfoStatus function, B.2
switchLegendStatus function, B.2

T

taglib directive, 5.1
templated themes, 2.3.1.3
temporary styles
See dynamically defined styles
text style, 2.2
adding to map request, 4.3.4
orienting, 2.2.3.1
sticky attribute, 2.2.4
XML format for defining, A.5
thematic mapping, 2.3.10
using external attribute data, 2.3.10.1
theme element, 3.2.20
theme_modifiers element, 3.2.22
theme_type attribute
for certain types of predefined themes, A.7
theme-level mouse-event control functions, B.3.2.2
themes, 2.3
adding to a map, 2.4
annotation text, 2.3.9
attributes affecting appearance, 2.3.11
checking for, 4.3.5
clearing spatial data cache, 7.6.2
deleting, 4.3.5, 4.3.5
disabling, 4.3.5, 4.3.5
dynamic
adding to map request, 4.3.3
dynamically defined, 2.3.2, 3.2.9, 3.2.20
enabling, 4.3.5, 4.3.5, 4.3.5
fast unpickling, 3.2.20, 4.3.5
feature selection
enabling and disabling, B.3.1
fixed SVG label, 3.2.20
for WMS requests, E.2.1.11
GeoRaster, 2.3.4
adding to current map request, 4.3.3
defining with jdbc_georaster_query element, 3.2.6
setting polygon mask, 2.3.4, 4.3.5
theme_type attribute in styling rules, A.7
getting, 4.3.5
hidden information display, 3.2.1.1
image, 2.3.3
adding, 4.3.3
defining with jdbc_image_query element, 3.2.7
setting transparency value, 4.3.5
setting unit and resolution values, 4.3.5
theme_type attribute in styling rules, A.7
ini3.2.1.1
JavaScript function to call on click, 3.2.5, 3.2.20
JavaScript function to call on mouse-move event, 3.2.20
JavaScript function to call on mouse-out event, 3.2.20
JavaScript function to call on mouse-over event, 3.2.20
JavaScript function to call on polygon selection, B.3.2.3
JavaScript function to call on rectangle selection, B.3.2.3
JDBC, 2.3.2
keeping in order, 3.2.1.1
listing, 4.3.5, 7.3
map_tile_theme element, 3.2.12
metadata view, 2.9
minimum distance, 3.2.20
moving down, 4.3.5
moving up, 4.3.5
navigation bar, 3.2.1.1
network, 2.3.5
adding, 4.3.3
defining with jdbc_network_query element, 3.2.8
setting labels, 4.3.5
theme_type attribute in styling rules, A.7
north_arrow element, 3.2.13
part of base map, 3.2.20
predefined, 2.3.1, 3.2.20
raster base map, 3.2.1.1
resolution value
setting, 4.3.5
selectable in SVG maps, 3.2.5, 3.2.20, 4.3.5
setting GeoRaster theme polygon mask, 2.3.4, 4.3.5
setting labels always on, 3.2.20, 4.3.5
setting network theme labels, 4.3.5
setting scale values, 4.3.5
setting visible or hidden, 4.3.5
styling rules, A.7
templated, 2.3.1.3
topology, 2.3.6
adding, 4.3.3
debug mode, 2.3.6
debug mode (adding theme), 4.3.3
defining with jdbc_topology_query element, 3.2.10
theme_type attribute in styling rules, A.7
unit value
setting, 4.3.5
visibility in SVG maps, 3.2.20
WFS, 2.3.7
WMS map
adding, E.3
adding (JavaBean-based API), E.3.4
adding (XML API), E.3.1
authentication with, E.3.3
Workspace Manager support, 2.8
XML format, A
zoom factor, 3.2.1.1
zoom levels, 3.2.1.1
zoom ratio, 3.2.1.1
themes element, 3.2.21
thick clients
using optimal MapViewer bean methods for, 4.3.10
tiny SVG images
SVG Tiny (SVGT) image format support, 3.2.1.1
tips
specifying using hidden_info attribute, 3.2.5
title
attribute of map request, 3.2.1.1
setParam tag parameter, 5.2.10
specifying for map, 1.5.2.5
title_style attribute, 3.2.1.1, 3.2.1.1
map request, 3.2.1.1
topology themes, 2.3.6
adding, 4.3.3
debug mode, 2.3.6
adding theme, 4.3.3
defining with jdbc_topology_query element, 3.2.10
theme_type attribute in styling rules, A.7
translation
of feature labels, 2.3.1.6
transparency
setThemeAlpha method, 4.3.5
transparency attribute, 3.2.20
transparent
attribute of map request, 3.2.1.1
TRANSPARENT parameter (WMS)
supported for PNG format, E.2.1.16
TrueType font-based marker style
XML format for defining, A.2.3

U

unit
setThemeUnitAndResolution method, 4.3.5
unit of measurement
for WMS requests, E.2.3.8
UNIT parameter (WMS), E.2.3.8
unpickling
fast_unpickle theme attribute, 3.2.20
setThemeFastUnpickle method, 4.3.5
use_cached_basemap attribute, 3.2.1.1
use_globular_projection option, 1.5.2.5
USER_SDO_CACHED_MAPS view, 2.9
USER_SDO_GEOM_METADATA view
entry for predefined theme based on a view, 2.3.1
inserting row into, 2.3.1
USER_SDO_MAPS view, 2.9, 2.9.1
USER_SDO_STYLES view, 2.9, 2.9.3
USER_SDO_THEMES view, 2.9, 2.9.2
USER_SDO_TILE_ADMIN_TASKS view, 2.9
user-defined mouse event control functions, B.3.2
theme-level, B.3.2.2
user-defined mouse-click event control functions
map-level, B.3.2.1
selection event, B.3.2.3

V

variable marker style
adding to map request, 4.3.4
XML format for defining, A.6.3
vector marker style
adding to map request, 4.3.4
XML format for defining, A.2.1
VERSION parameter (WMS), E.2.1.17
views
key_column styling rule attribute required for theme defined on join view, A.7
metadata, 2.9
visible themes
getThemeVisibleInSVG method, 4.3.5
setThemeVisible method, 4.3.5
visible_in_svg attribute, 3.2.20

W

Web Map Service (WMS) protocol, E
adding a WMS map theme, E.3
setting up for MapViewer, E.1
See also entries starting with "WMS"
Web proxy for MapViewer service
setting, 4.3.2
web_user_type attribute, 1.5.2.14
WFS map requests
examples, 3.1.14
WFS themes, 2.3.7
WGS 84 coordinate system, 2.4
WHERE clause
getting, 4.3.9, 4.3.9
width
attribute of map request, 3.2.1.1
setParam tag parameter, 5.2.10
WIDTH parameter (WMS), E.2.1.18
within-cost analysis, 2.3.5.2
addLinksWithinCost method, 4.3.3
WMS Capabilities responses
customizing, 1.5.2.12
WMS data source
default for GetMap requests, E.2.1
WMS map themes
adding, E.3
JavaBean-based API, E.3.4
XML API, E.3.1
authentication with, E.3.3
predefined, E.3.2
wms_config element, 1.5.2.12
wms_getmap_request element, E.3.1
WMSFilter.jar file, E.1.1
Workspace Manager
support in MapViewer, 2.8
workspace_date attribute, 2.8
workspace_date_format attribute, 2.8
workspace_date_nlsparam attribute, 2.8
workspace_date_tswtz attribute, 2.8
workspace_name attribute, 2.8
workspace_savepoint attribute, 2.8

X

X parameter (WMS), E.2.3.9
X11 DISPLAY variable
no need to set when using AWT headless mode, 1.3
XML
API for MapViewer, 3
format for base maps, map tile layers
XML format, A
format for map tile layers, A
format for styles, A
format for themes, A
xmlparserv2.jar file, E.1.1

Y

Y parameter (WMS), E.2.3.9

Z

zoom factor, 3.2.1.1, 4.3.2
zoom levels, 3.2.1.1, 4.3.2
zoom ratio, 3.2.1.1, 4.3.2
setting, B.1
zoomfactor attribute, 3.2.1.1
zoomIn method, 4.3.6, 4.3.6, 4.3.6
zoomlevels attribute, 3.2.1.1
zoomOut method, 4.3.6, 4.3.6
zoomratio attribute, 3.2.1.1
PKVP<PKv\EOEBPS/vis_mapbuilder.htm Oracle Map Builder Tool

9 Oracle Map Builder Tool

This chapter briefly describes the MapViewer Map Builder tool, also referred to as Oracle Map Builder. It does not provide detailed information about the tool's interface; for that you should use see online help available when you use Oracle Map Builder.

Oracle Map Builder is a standalone application that lets you create and manage the mapping metadata (about styles, themes, and base maps) that is stored in the database. For example, use this tool to create a style or to modify the definition of a style. Besides handling the metadata, the tool provides interfaces to preview the metadata (for example, to see how a line style will appear on a map) and also spatial information.

Whenever possible, you should use Oracle Map Builder instead of directly modifying MapViewer metadata views to create, modify, and delete information about styles, themes, and maps. For any modifications made outside Oracle Map Builder, such as with SQL statements, you should refresh the database connection in Oracle Map Builder to get the current items.

To use Oracle Map Builder effectively, you must understand the MapViewer concepts explained in Chapter 2 and the information about map requests in Chapter 3.

This chapter contains the following major sections:

9.1 Running Oracle Map Builder

Oracle Map Builder is shipped as a JAR file (mapbuilder.jar). You can run it as a standalone Java application in a Java Development Kit (J2SE SDK) 1.5 or later environment, as follows:

% java –jar mapbuilder.jar [Options]

Options:

-cache <cache_size> specifies the size of the in-memory geometry cache. Example: -cache 64M

-config <config-file> specifies the location of the file containing Map Builder configuration and preference information. If you do not specify this option, Map Builder looks for a file named oasmapbuilder.xml in your home Java directory. For more information about the configuration and preference file, see Section 1.5.2.

-connect causes Map Builder at startup to register connections for all data sources specified in the oasmapbuilder.xml preferences file or the file specified with the -config option, and it automatically connects to the first available data source. This option increases the application startup time. If this option is not defined, startup is faster, but you must then use the File menu or an icon to connect to any data sources that you want to use (see Section 9.2, "Oracle Map Builder User Interface").

-help displays information about the available options.

9.2 Oracle Map Builder User Interface

Oracle Map Builder generally uses the left side for navigation to find and select objects, and the right side to display information about selected objects. Figure 9-1 shows the main window of Oracle Map Builder, with the metadata navigation tree on the left and a detail pane for a selected area style on the right.

Figure 9-1 Oracle Map Builder Main Window

Description of Figure 9-1 follows

The menus at the top contain standard entries, plus entries for features specific to Oracle Map Builder.

You can use shortcut keys to access menus and menu items: for example Alt+F for the File menu and Alt+E for the Edit menu; or Alt+H, then Alt+A for Help, then About.

Icons under the menus perform the following actions:

  • Add new connection creates a new database connection for Oracle Map Builder to use.

  • Load/Add/Remove connection loads or adds database connection for Oracle Map Builder to use, or removes a database connection from the available connections that Oracle Map Builder can use.

  • Create new metadata creates a new base map, theme, or style.

  • Open opens a base map, theme, or style.

  • Save saves any changes to the currently selected object.

  • Save All saves any changes to all open objects.

The left side of the Oracle Map Builder window has the Metadata navigator, including a database connection selector, icons for performing actions, and a hierarchical tree display for the MapViewer metadata objects (categorized by object type) accessible to the currently selected database connection. To select an object, expand the appropriate tree node or nodes, then double-click the object.

The right side of the Oracle Map Builder window has tabs and panes for detail views of objects that you select or open

To switch among objects, click the desired tabs; to close a tab, click the X in the tab. If you make changes to an object and click the X, you are asked if you want to save the changes.

The Messages area is used for feedback information as appropriate (for example, results of an action, or error or warning messages).

Detailed help is available within the Oracle Map Builder interface. See the online help for more information about Oracle Map Builder, including information about specific panes and dialog boxes.

PK$IrPKv\EOEBPS/vis_omaps.htm Oracle Maps

8 Oracle Maps

Oracle Maps is the name for a suite of technologies for developing high-performance interactive Web-based mapping applications. Oracle Maps is included with MapViewer.

This chapter contains the following major sections:

8.1 Overview of Oracle Maps

Oracle Maps consists of the following main components:

  • A map tile server that caches and serves pregenerated map image tiles

  • A feature of interest (FOI) server that renders geospatial features that are managed by Oracle Spatial

  • An Ajax-based JavaScript mapping client. (Ajax is an acronym for asynchronous JavaScript and XML.) This client provides functions for browsing and interacting with maps, as well as a flexible application programming interface (API).

The map tile server (map image caching engine) automatically fetches and caches map image tiles rendered by Oracle MapViewer or other Web-enabled map providers. It also serves cached map image tiles to the clients, which are Web applications developed using the Oracle Maps client API. The clients can then automatically stitch multiple map image tiles into a seamless large map. Because the map image tiles are pregenerated and cached, the application users will experience fast map viewing performance.

The feature of interest (FOI) server (rendering engine) renders spatial feature layers managed by Oracle Spatial, as well as individual geospatial features of point, line, or polygon type that are created by an application. Such FOIs, which typically include both an image to be rendered and a set of associated attribute data, are then sent to the client where a user can interact with them. Unlike the cached image tiles, which typically represent static content, FOIs are dynamic and represent real-time database or application contents. The dynamic FOIs and the static cached map tiles enable you to build Web mapping applications.

The JavaScript mapping client is a browser side map display engine that fetches map content from the servers and presents it to client applications. It also provides customizable map-related user interaction control, such as map dragging and clicking, for the application. The JavaScript mapping client can be easily integrated with any Web application or portal.

8.1.1 Architecture for Oracle Maps Applications

Figure 8-1 shows the architecture of Web mapping applications that are developed using Oracle Maps.

Figure 8-1 Architecture for Oracle Maps Applications

Description of Figure 8-1 follows

Referring to Figure 8-1, applications interact with the Oracle Maps architecture as follows:

  • The application is developed using JavaScript, and it runs inside the JavaScript engine of the Web browser.

  • The application invokes the JavaScript map client to fetch the map image tiles from the map tile server, and then it displays the map in the Web browser.

  • The application invokes the JavaScript map client to fetch dynamic spatial features from the FOI server and display them on top of the map tiles.

  • The JavaScript map client controls map-related user interaction for the application.

  • When the map tile server receives a map image tile request, it first checks to see if the requested tile is already cached. If the tile is cached, the cached tile is returned to the client. If the tile is not cached, the map tile server fetches the tile into the cache and returns it to the client. Tiles can be fetched either directly from the MapViewer map rendering engine or from an external Web map services provider.

  • When the FOI server receives a request, it uses the MapViewer map rendering engine to generate the feature images and to send these images, along with feature attributes, to the client.

8.1.2 Simple Example Using Oracle Maps

Figure 8-2 shows the interface of a simple application created using Oracle Maps. This example is shipped with MapViewer, and can be accessed at http://host:port/mapviewer/fsmc/sampleApp.html. To run this application, follow the instructions in http://host:port/mapviewer/fsmc/tutorial/setup.html to set up the database schema and the necessary map tile layers.

Figure 8-2 Application Created Using Oracle Maps

Description of Figure 8-2 follows

The application shown in Figure 8-2 displays customers on the map. The map consists of two layers:

  • The map tile layer displays the ocean, county boundaries, cities, and highways. The whole map tile layer displayed in the Web browser consists of multiple map image tiles that are rendered by the map tile server.

  • The FOI layer displays customers as red dot markers on top of the map tile layer. If the user clicks on the marker for a customer, an information window is displayed showing some attributes for that customer. The customer markers and attributes are rendered by the FOI server.

In addition to these two layers, a scale bar is displayed in the lower-left corner of the map, and a navigation panel is displayed in the upper-right corner.

The application user can use the mouse to drag the map. When this happens, new image tiles and FOIs are automatically fetched for the spatial region that the map currently covers. The user can also use the built-in map navigation tool to pan and zoom the image, and can show or hide the customers (red dot markers) by checking or unchecking the Show customers box.

Example 8-1 shows the complete source code for the simple application shown in Figure 8-2.

Example 8-1 Source Code for the Simple Application

<html>
<head>
<META http-equiv="Content-Type" content="text/html" charset=UTF-8">
<TITLE>A sample Oracle Maps Application</TITLE>
<script language="Javascript" src="jslib/loadscript.js"></script>
<script language=javascript>
var themebasedfoi=null
function on_load_mapview() 
{        
  var baseURL  = "http://"+document.location.host+"/mapviewer";
  // Create an MVMapView instance to display the map
  var mapview = new MVMapView(document.getElementById("map"), baseURL);
  // Add a map tile layer as background.
  mapview.addMapTileLayer(new MVMapTileLayer("mvdemo.demo_map"));
  // Add a theme-based FOI layer to display customers on the map
  themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','mvdemo.customers');
  themebasedfoi.setBringToTopOnMouseOver(true);
  mapview.addThemeBasedFOI(themebasedfoi);
  // Set the initial map center and zoom level
  mapview.setCenter(MVSdoGeometry.createPoint(-122.45,37.7706,8307));   
  mapview.setZoomLevel(4);    
  // Add a navigation panel on the right side of the map
  mapview.addNavigationPanel('east');
  // Add a scale bar
  mapview.addScaleBar();
  // Display the map.
  mapview.display();
}
function setLayerVisible(checkBox)
{
  // Show the theme-based FOI layer if the check box is checked and
  // hide the theme-based FOI layer otherwise.
  if(checkBox.checked)
    themebasedfoi.setVisible(true) ;
  else
    themebasedfoi.setVisible(false);
}
</script>
</head>
<body onload= javascript:on_load_mapview() >
<h2> A sample Oracle Maps Application</h2>
<INPUT TYPE="checkbox" onclick="setLayerVisible(this)" checked/>Show customers
<div id="map" style="width: 600px; height: 500px"></div> 
</body>
</html>

The components of this sample application and the process for creating a client application are described in Section 8.5.3.

8.1.3 How Map Content Is Organized

This section describes how the JavaScript client internally organizes various map contents when displayed a map inside a Web browser. An application typically places one master HTML DIV object on a Web page, and the JavaScript client adds various content layers inside this DIV object.

The map content displayed by the map client is organized by layers. When the application script invokes appropriate map client API, map layers are created inside a map container. The map container is a user-defined HTML DIV object. You can customize the size and the positioning of the map container inside the Web page. Figure 8-3 shows the layout of the map layers.

Figure 8-3 Layers in a Map

Description of Figure 8-3 follows

As shown in Figure 8-3, there are five different types of map content layers: map tiles, theme-based FOI, user-defined FOI or redline, information window, and fixed figures. All layers except the fixed figures layer are moved as a whole when the user drags the map. These movable layers are automatically updated by the map client when the map is dragged or zoomed. (The fixed figures layer is never moved.).

8.1.3.1 Map Tile Layers

A typical Oracle Maps application has at least one map tile layer, which assembles and displays pregenerated map image tiles from the map tile server. The map tile layer displays static map content that does not change very often, and it is typically used as the background map by the client application. For example, in the sample application described in Section 8.1.2 and illustrated in Figure 8-2, the ocean, county boundaries, cities, and highways are all displayed as a map tile layer. Only limited user interaction, such as map dragging, can be performed with a map tile layer.

A map tile layer is usually associated with a MapViewer base map, and is managed by the MapViewer server. However, you can configure a map tile layer to cache map image tiles served by an external (non-MapViewer) map provider.

The Oracle Maps client can also display a custom or built-in external tile layer served directly by an external tile server. The built-in Google Maps and Microsoft Bing Maps tile layers are examples. For more information, see Section 8.6, "Using Google Maps and Bing Maps" and the JavaScript API documentation for class MVGoogleTileLayer and MVBingTileLayer. (If you need to overlay your own spatial data on top of the Google Maps or Bing Maps tile layer, see also Section 8.7, "Transforming Data to a Spherical Mercator Coordinate System".)

Map tile layers are always placed at the bottom of the layer hierarchy. These layers display static and background map contents. When multiple such layers are included, they must all have the same coordinate system and zoom level definitions.

Internally, the map tile layers are usually larger than the size of the map DIV container window. This allows additional tiles to be fetched and cached by the browser. As a result, these tiles will be immediately visible when the map layers are dragged around by the user.

8.1.3.2 Theme-Based FOI Layers

There can be one or more theme-based FOI layers. Each theme-based FOI layer consists of a collection of interactive FOIs that meet certain query criteria defined in a MapViewer predefined theme. FOIs can be points, lines, or polygons. For example, all stores with a sales volume greater than $100,000 can be displayed as a point theme-based FOI layer.

Users can interact with the FOIs by moving the mouse over them or clicking on them. The application can customize how the map client reacts to such user interaction.

All features (geographic and non-geographic) of a theme-based FOI layer are stored in the database. Features are queried and rendered by the FOI server when client applications request them. The query window for the theme-based FOI layers can be customized to be larger than the map DIV window, so that it gives some extra room for dragging the map without refreshing the theme-based FOI layers from server. For more information about theme-based FOI layers, see Section 8.3.1.

8.1.3.3 User-Defined FOI Layers

A user-defined FOI is an interactive feature defined on the client side. The FOI can be a point, line, or polygon feature. Users can interact with a user-defined FOIs in the same way they can with a theme-based FOIs. However, in contrast with a theme-based FOI layer which is rendered as a collection of features, each user-defined FOI is requested and rendered individually. All attributes of the user-defined FOI, including the geometry representation and rendering style, must be provided by the application. For example, a route geometry based on user specified start and end addresses should be displayed as a user-defined line FOI on the map.

The handling of user-defined FOI layers depends on Web browser in which the application is running:

  • With Microsoft Internet Explorer, all user-defined individual FOIs added by the application are placed inside a layer directly above the theme-based FOI layers. There can be at most one such layer.

  • With Opera and Mozilla-based browsers such as Netscape and Firefox, all user-defined individual FOIs are placed inside two layers, one for point features and the other for non-point features such as polylines and polygons. The non-point feature layer is placed under the point feature layer.

8.1.3.4 Information Window Layer

An information window is a small pop-up window that displays customizable content in the map. All information windows, when displayed, are placed inside a layer directly above the user-defined individual FOI layer or layers. There can be at most one information window layer.

8.1.3.5 Fixed Figures Layer

The topmost layer contains any fixed figures, which are immovable elements such as copyright notes, a scale bar, a navigation panel, and user-defined map decoration features. (A user-defined map decoration feature is an application defined element that can contain any custom HTML content, such as a map title or a custom control button.) The fixed figures layer is displayed on top of everything else, and it is not moved when the user drags the map.

8.2 Map Tile Server

The map tile server is a map image caching engine that caches and serves pregenerated, fixed-size map image tiles. It is implemented as a Java servlet that is part of the MapViewer server. The map tile server accepts requests that ask for map image tiles specified by tile zoom level and tile location (mesh code), and it sends the requested tiles back to clients.

Figure 8-4 shows the basic workflow of the map tile server.

Figure 8-4 Workflow of the Map Tile Server

Description of Figure 8-4 follows

As shown in Figure 8-4, when the map tile server receives a request for a map tile, it searches for the tile in the cache storage system. If the tile is cached, the map tile server sends the tile to the client. If the tile is not cached, the map tile server fetches the tile, saves in the cache, and sends it to the client.

You can use the MapViewer administration tool to manage the map tile server.

8.2.1 Map Tile Server Concepts

This section explains map tile server concepts that you need to know to be able to use Oracle Maps effectively.

8.2.1.1 Map Tile Layers and Map Tile Sources

All map tile layers are managed by the map tile server. The map tile server fetches and stores the map image tiles that belong to the map tile layer and returns map image tiles to the client. The map tile server can manage multiple map tile layers.

Each map tile layer can have multiple predefined zoom levels. Each zoom level is assigned a zoom level number ranging from 0 to n-1, where n is the total number of zoom levels. Zoom level 0 is the most zoomed out level and zoom level n-1 is the most zoomed in level.

The map is evenly divided into same-sized small map image tiles on each zoom level. Clients specify a map tile by its zoom level and tile mesh code.

A map tile layer can come from two different types of sources:

  • Internal MapViewer base maps rendered by the MapViewer map rendering engine. A MapViewer base map consists of a set of predefined themes and must be predefined in the database view USER_SDO_MAPS.

  • Maps rendered by an external Web map services providers. An external Web map services provider is a server that renders and serves maps upon client requests over the web. If you properly configure an adapter that can fetch maps from the external map services provider, the map tile server can fetch and cache map tiles generated by the external map services provider. (A MapViewer instance other than the MapViewer inside which the map tile server is running is also considered an external map services provider.)

8.2.1.2 Storage of Map Image Tiles

Oracle Maps uses the local file system to store cached image tiles. You can customize the path that is used for this storage as part of the map tile server configuration settings.

8.2.1.3 Coordinate System for Map Tiles

Map images are cached and managed by the map tile server as small same-size rectangular image tiles. Currently we support tiling on any two-dimensional Cartesian coordinate system. A geodetic coordinate system can also be supported when it is mapped as if it is a Cartesian coordinate system, where longitude and latitude are treated simply as two perpendicular axes, as shown in Figure 8-5.

Figure 8-5 Tiling with a Longitude/Latitude Coordinate System

Description of Figure 8-5 follows

On each zoom level, the map tiles are created by equally dividing the whole map coordinate system along the two dimensions (X and Y, which inFigure 8-5 represent latitude and longitude). The map tile server needs this dimensional information of the map coordinate system in order to create map image tiles, and therefore you must include this information in the map tile layer configuration settings.

The whole map coordinate system can be represented by a rectangle, and its boundary is specified by (Xmin, Ymin) and (Xmax, Ymax), where Xmin is the minimum X value allowed in the coordinate system, Ymin is the minimum Y value allowed, Xmax is the maximum X value allowed and Ymax is the maximum Y value allowed. In Figure 8-5, Xmin is –180, Ymin is –90, Xmax is 180, and Ymax is 90.

You must also specify the spatial referencing ID (SRID) of the coordinate system to enable the map tile server to calculate map scales.

8.2.1.4 Tile Mesh Codes

Each map tile is specified by a mesh code, which is defined as a pair of integers (Mx, My), where Mx specifies the X dimension index of the tile and My specifies the Y dimension index of the tile. If the tile is the ith tile on X dimension starting from Xmin, then Mx should be i-1. If the tile is the jth tile on Y dimension starting from Ymin, then My should be j-1. Figure 8-6 shows the mesh codes of the tiles on a map.

Figure 8-6 Tile Mesh Codes

Description of Figure 8-6 follows

The JavaScript map client automatically calculates which tiles it needs for displaying the map in the Web browser, and it sends requests with the mesh codes to the server. Mesh codes are transparent to the application, and application developers do not need to deal with mesh codes directly.

8.2.1.5 Tiling Rules

You must create tiling rules that determine how the map is divided and how tiles are created. The map tile server uses these tiling rules to divide the map into small map image tiles that are stored in the tile storage system. These rules are also used by the JavaScript map client.

Because all tiles on a given zoom level are the same size, the map tile server needs to know the following information to perform the tile division:

  • The map tile image size (width and height), specified in screen pixels. This is the physical size of the tile images.

  • The tile size specified according to the map coordinate system. For example, if the map uses a geodetic coordinate system, the tile width and height should be defined in degrees. The size can be specified either explicitly by tile width and height or implicitly by map scale. (Map scale, combined with tile image size, can be used to derive the tile width and height according to the map coordinate system.)

The preceding information constitutes the tiling rule for a given zoom level. Each zoom level must have its own tiling rule. You must define the tiling rules when you specify the configuration settings for the map tile server, as described in Section 8.2.2.

8.2.2 Map Tile Server Configuration

Map tile server configuration settings are stored in local configuration files and in database views. You can customize these settings.

8.2.2.1 Global Map Tile Server Configuration

Global map tile server settings, such as logging options and the default cache storage directory, are stored in the MapViewer configuration file mapViewerConfig.xml, which is under the directory $MAPVIEWER_HOME/web/WEB-INF/conf.

The map tile server configuration settings are defined in element <map_tile_server> inside the top-level <mapperConfig> element, as shown in the following example:

<map_tile_server>
   <tile_storage default_root_path="/scratch/tilecache/"/>
</map_tile_server>

The <tile_storage> element specifies the map tiles storage settings. The default_root_path attribute specifies the default file system directory under which the cached tile images are to be stored. If the default root directory is not set or not valid, the default root directory is $MAPVIEWER_HOME/web/tilecache. A subdirectory under this directory will be created and used for a map tile layer if the map tile layer configuration does not specify the map tiles storage directory for itself. The name of the subdirectory will be the same as the name of the map tile layer.

8.2.2.2 Map Tile Layer Configuration

The configuration settings for a map tile layer are stored in the USER_SDO_CACHED_MAPS metadata view. You should normally not manipulate this view directly, but should instead use the MapViewer administration tool, which uses this view to configure map tile layers.

Each database user (schema) has its own USER_SDO_CACHED_MAPS view. Each entry in this view stores the configuration settings for one map tile layer. If the map tile layer is based on an internal MapViewer base map, the base map associated with the map tile layer must be defined in the same database schema where the map tile layer configuration settings are stored.

The map tile server obtains the map source configuration by querying the USER_SDO_CACHED_MAPS view using the database connections specified by MapViewer data sources. This happens when the map tile server is started or a new data source is added to MapViewer as the result of a MapViewer administration request.

The USER_SDO_CACHED_MAPS view has the columns listed in Table 8-1.

Table 8-1 USER_SDO_CACHED_MAPS View

Column NameData TypeDescription

NAME

VARCHAR2

Unique name of the cached map source

DESCRIPTION

VARCHAR2

Optional descriptive text about the cached map source

TILES_TABLE

VARCHAR2

(Not currently used)

IS_ONLINE

VARCHAR2

YES if the map tile layer is online, or NO if the map tile layer is offline. When a tile is missing from the cache and the map tile layer is online, the map tile server will fetch the tile and return the fetched tile to the client. When a tile is missing and the map tile layer is offline, the map tile server will not fetch the tile but will return a blank image to the client.

IS_INTERNAL

VARCHAR2

YES if the map source is an internal map source, or NO if the map source is an external map source

DEFINITION

CLOB

XML definition of the map tile layer, as described later in this section.

BASE_MAP

VARCHAR2

Name of the cached MapViewer base map, if the map source is an internal map source

MAP_ADAPTER

BLOB

The jar file that contains the adapter Java classes of the external map services provider, as described later in this section.


For the DEFINITION column, the map source definition has the following general format:

  <map_tile_layer 
     name = “map tile layer name”
     image_format ="tile-image-format">
    <internal_map_source 
      data_source=”name-of-data-source”
      base_map="name-of-MapViewer-base-map"
      bgcolor="base-map-background-color"
      antialias=”whether-to-turn-on-antialiasing”
      />
    </internal_map_source>
    <external_map_source 
       url="external-map-service-url" 
       adapter_class="name-of-adapter-class"
       proxy_host=" proxy-server-host "
       proxy_port="proxy-server-port"
       timeout="request-timeout"
       request_method="http-request-method: 'GET'|'POST'">
      <properties>
        <property name="property-name" value="property-value"/>
        …
      </properties>
    </external_map_source>
    <tile_storage 
       root_path="disk-path-of-cache-root-directory"
    </tile_storage>
    <coordinate_system
       srid="coordinate-system-srid" 
       minX="minimum-allowed-X-value" 
       maxX="maximum-allowed-X-value"
       minY="minimum-allowed-Y-value" 
       maxY="maximum-allowed-Y-value">
    </coordinate_system>
    <tile_image
       width="tile-image-width-in-screen-pixels" 
       height="tile-image-height-in-screen-pixels" >
    </tile_image>
    <tile_bound>
       <coordinates> … </coordinates>
    </tile_bound>
    <zoom_levels
       levels="number-of-zoom-levels"
       min_scale="map-scale-at-highest-zoom-level" 
       max_scale="map-scale-at-lowest-zoom-level"
       min_tile_width="tile-width-specified-in-map-data-units-at-
                       highest-zoom-level" 
       max_tile_width="tile-width-specified-in-map-data-units-at-
                       lowest-zoom-level">
      <zoom_level 
         description="zoom-level-description"
         level_name="zoom-level-name"
         scale="map-scale-of-zoom-level"
         tile_width ="tile-width-specified-in-map-data-units"
         tile_height ="tile-height-specified-in-map-data-units">
        <tile_bound>
          <coordinates> … </coordinates>
        </tile_bound>
      </zoom_level>
      …
    </zoom_levels>
  </map_tile_layer>

The DTD of the map tile layer definition XML is listed in Section A.9.

Example 8-2 shows the XML definition of an internal map tile layer, and Example 8-3 shows the XML definition of an external map tile layer. Explanations of the <map_tile_layer> element and its subelements follow these examples.

Example 8-2 XML Definition of an Internal Map Tile Layer

<?xml version = '1.0'?>
<!-- XML definition of an internal map tile layer.
-->
   <map_tile_layer image_format="PNG">
      <internal_map_source base_map="demo_map"/>
      <tile_storage root_path="/scratch/mapcache/"/>
      <coordinate_system 
         srid="8307"
         minX="-180" maxX="180" 
         minY="-90" maxY="90"/>
      <tile_image width="250" height="250"/>
      <zoom_levels>
         <zoom_level description="continent level" scale="10000000"/>
         <zoom_level description="country level" scale="3000000"/>
         <zoom_level description="state level" scale="1000000"/>
         <zoom_level description="county level" scale="300000"/>
         <zoom_level description="city level" scale="100000"/>
         <zoom_level description="street level" scale="30000"/>
         <zoom_level description="local street level" scale="10000"/>
      </zoom_levels>
   </map_tile_layer>

Example 8-3 XML Definition of an External Map Tile Layer

<?xml version = '1.0'?>
<!-- XML definition of an external map tile layer.
-->
   <map_tile_layer image_format="PNG">
      <external_map_source  
         url="http://elocation.oracle.com/elocation/lbs" 
         adapter_class="mcsadapter.MVAdapter">
         <properties>
            <property name="data_source" value="elocation"/>
            <property name="base_map" value="us_base_map"/>
         </properties>
      </external_map_source>
      <tile_storage root_path="/scratch/mapcache"/>
      <coordinate_system 
         srid="8307" 
         minX="-180" maxX="180" 
         minY="-90" maxY="90"/>
      <tile_image width="250" height="250"/>
     <!—
         The following <zoom_levels> element does not have any 
         <zoom_level> element inside it. But since it has its levels, 
         min_scale and max_scale attributes set, map tile server will 
         automatically generate the <zoom_level> elements for the 10 
         zoom levels.
      -->
      <zoom_levels levels="10" min_scale="5000" max_scale="10000000" />
   </map_tile_layer>

The top-level element is <map_tile_layer>. The image_format attribute specifies the tile image format; the currently supported values for this attribute are PNG, GIF, and JPG. PNG and GIF images are generally better for vector base maps, while JPG images are generally better for raster maps, such as satellite imagery, because of a better compression ratio. Currently, only tile images in PNG format can have transparent background.

The <internal_map_source> element is required only if the map tiles are rendered by the local MapViewer instance. The base_map attribute is required and specifies the predefined MapViewer base map that is cached by the map tile server; its value should match an entry in the BASE_MAP column in the USER_SDO_CACHED_MAPS view. The bgcolor attribute is optional and specifies the background color of the map. If the value of this attribute is set to NONE, the background will be transparent. (Currently MapViewer can only render transparent PNG map tiles.)

The <external_map_source> element is required only if the map tiles are rendered by an external map services provider. This element has the following attributes:

  • The url attribute is required and specifies the map service URL from which the map tiles can be fetched (for example, http://myhost/mapviewer/omserver).

  • The adapter_class attribute is required and specifies the full name of the map adapter class, including the package names (for example, mcsadapter.MVAdapter).

  • The proxy_host and proxy_port attributes are needed only if the external map provider server must be accessed through a proxy server; these attributes specify the host name and port number, respectively, of the proxy server. If proxy_host is specified as NONE, all map tile requests will be sent directly to the remote server without going through any proxy server. If proxy_host is omitted or specifies an empty string, the global MapViewer proxy setting defined in the mapViewerConfig.xml file will be used when map tile requests are sent.

  • The timeout attribute is optional and specifies the number of milliseconds for which the map tile server must wait for an external map tile image before giving up the attempt. The default timeout value is 15000.

  • The request_method attribute is optional and the HTTP request method for sending map tile requests; its value can be POST (the default) or GET.

The <properties> element in the <external_map_source> element can include multiple <property> elements, each of which specifies a user-defined parameter for use by the map adapter when it fetches map tiles. The same map source adapter can use different set of parameters to fetch different map tile layers. For example, the sample MapViewer adapter mcsadapter.MVAdapter shipped with MapViewer accepts parameters defined as follows:

<properties>
   <property name="data_source" value="elocation"/>
   <property name="base_map" value="us_base_map"/>
</properties>

However, by changing the value attribute values, you can use this adapter to fetch a different base map from the same data source or a different data source.

The <tile_storage> element specifies storage settings for the map tile layer. The optional root_path attribute specifies the file system directory to be used as the root directory of the tile storage. If this attribute is omitted or invalid, the default root directory defined in the mapViewerConfig.xml file is used.

The <coordinate_system> element specifies the map coordinate system, and it has several required attributes. The srid attribute specifies the spatial reference ID of the coordinate system. The minX attribute specifies the lower bound of the X dimension; the minY attribute specifies the lower bound of the Y dimension; the maxX attribute specifies the upper bound of the X dimension; and the maxY attribute specifies the upper bound of the Y dimension. For the standard longitude/latitude (WGS 84) coordinate system, the srid value is 8307; and the minX, minY, maxX, and maxY values are -180, -90, 180, and 90, respectively.

For an internal map tile layer, the map coordinate system can be different from the data coordinate system. If the two are different, the map tile server transforms the map data into the coordinate system defined in the <coordinate_system> element and renders map tile images using this coordinate system.

The <tile_image> element specifies the tile image size settings, and it has the following required attributes: width specifies the width of the tile images in screen pixels, and height specifies the height of the tile images in screen pixels.

The optional <tile_bound> element specifies the bounding box of the cached map tiles. The map tile server only fetches tiles inside this box, and returns a blank tile if the requested tile is outside this box. The bounding box is specified by a rectangle in the map data coordinate system. The rectangle is specified by a <coordinates> element in the following format:

<coordinates>minX, minY, maxX, maxY</coordinates>

The default cache bounding box is the same bounding box specified in the <coordinate_system> element.

The <zoom_levels> element specifies the predefined zoom levels. Only image tiles at predefined zoom levels will be cached and served by the map tile server. The <zoom_levels> element can have multiple <zoom_level> elements, each of which specifies one predefined zoom level. If there are no <zoom_level> elements, the map tile server automatically generates the <zoom_level> elements by using the following attributes inside the <zoom_levels> element. (These attributes can be omitted and will be ignored if any <zoom_level> elements exist.)

  • levels specifies the total number of zoom levels.

  • min_scale specifies the scale of map images at the highest (zoomed in the most) zoom level.

  • max_scale specifies the scale of map images at the lowest (zoomed out the most) zoom level.

  • min_tile_width specifies the width of map tiles at the highest zoom level. The width is specified in map data units.

  • max_tile_width specifies the width of the map tiles at the lowest zoom level. The width is specified in map data units.

For the map tile server to be able to generate the definitions of individual zoom levels automatically, you must specify either of the following combinations of the preceding attributes:

  • levels, min_scale, and max_scale

  • levels, min_tile_width, and max_tile_width

When the zoom levels are defined this way, the map tile server automatically derives the definition of all the individual zoom levels and updates the XML definition with the <zoom_level> elements generated for the zoom levels. You can then make adjustments to each zoom level if you want.

Each zoom level is assigned a zoom level number by the map tile server based on the order in which the zoom levels are defined. The first zoom level defined in the <zoom_levels> element is zoom level 0, the second zoom level is zoom level 1, and so on. These zoom level numbers are used in the tile requests to refer to the predefined zoom levels.

The <zoom_level> element specifies a predefined zoom level, and it has several attributes. The description attribute is optional and specifies the text description of the zoom level. The level_name attribute is optional and specifies the name of the zoom level. The scale attribute specifies the map scale of the zoom level; it is required if the attributes tile_width and tile_height are not defined. The tile_width and tile_height attributes specify the tile width and height, respectively, in map data units. The fetch_larger_tiles attribute is optional and specifies whether to fetch larger map images instead of the small map image tiles; a value of TRUE (the default) means that larger map images that may consist multiple map tiles will be fetched and broken into small map image tiles, which might save network round trips between the map tile server and the map services provider.

In the <zoom_level> element, you must specify either the scale attribute or both the tile_width and tile_height elements.

The <tile_bound> element within the <zoom_level> element optionally specifies the bounding box of the cached map tiles for the zoom level. The map tile server only fetches tiles inside this box, and returns a blank tile if the requested tile is outside this box. The bounding box is specified by a rectangle specified in map data coordinate system. The rectangle is specified by a <coordinates> element (explained earlier in this section) If you specify the <tile_bound> element within the <zoom_level> element, it overrides the overall cache bounding box settings specified by the <tile_bound> element that is above it in the XML hierarchy.

8.2.3 External Map Source Adapter

An external map source adapter is the interface between a map tile server and an external map services provider. When a map image tile needs to be fetched from the external map services provider, the map tile server calls the adapter with information about the zoom level, size, and location of the tile. The adapter then constructs a provider-specific request, sends the request to the external map services provider, and return the resulting image tile to the map tile server.

The external map source adapter is a Java class that must extends the abstract Java class oracle.mapviewer.share.mapcache.MapSourceAdapter, which is defined as follows:

public abstract class MapSourceAdapter
{
   public abstract String getMapTileRequest(TileDefinition tile);
   public byte[] getTileImageBytes(TileDefinition tile) ;
   public Properties getProperties() ;
}

An adapter that extends this class must implement the following method:

  • public String getMapTileRequest(TileDefinition tile)

    This method should implement the logic to construct the HTTP request string that can be sent to the map services provider to fetch the map image tile. For example, if the URL of a map tile is http://myhost/mymapserver?par1=v1&par2=v2&par3=v3, the HTTP request string returned by this method should be par1_v1&par2=v2&par3=v3.

    When the map tile server cannot find a specific map tile, it calls the getTileImageBytes method to fetch the binary data of the tile image, and that method calls the getMapTileRequest method to construct the map tile request before fetching the tile. The getMapTileRequest method takes one parameter: a TileDefinition object that specifies the zoom level, bounding box, image size and image format of the requested tile. This method returns the HTTP request string.

The map source adapter also inherits all methods implemented in class MapSourceAdapter. Among them, the following methods are more important than the others:

  • public byte[] getTileImageBytes(TileDefinition tile)

    This method fetches the actual binary map tile image data from the external map service provider. This method is already implemented. It calls the abstract method getMapTileRequest to construct the map tile request and sends the request to the external map services provider. If the map tiles cannot be fetched by sending HTTP requests, you can override this method to implement the appropriate logic to fetch an image tile from the map source. This method takes one parameter: a TileDefinition object that specifies the zoom level, bounding box, image size, and image format of the requested tile. This method returns the binary tile image data encoded in the image format specified in the map tile layer configuration settings.

  • public Properties getProperties()

    This method returns the provider-specific parameters defined in the map tile layer configuration settings explained in Section 8.2.2.2.

The MapSourceAdapter and TileDefinition classes are packaged inside mvclient.jar, which can be found under the directory $MAPVIEWER_HOME/web/WEB/lib.

Example 8-4 shows an external map source adapter.

Example 8-4 External Map Source Adapter

/**
 * This is a sample map source adapter that can be used to fetch map 
 * tiles from a MapViewer instance.
 */
package mcsadapter ;
 
import java.awt.Dimension;
import java.net.URL;
import java.util.Properties;
import oracle.lbs.mapclient.MapViewer;
import oracle.lbs.mapcommon.MapResponse;
import oracle.mapviewer.share.mapcache.*;
 
/**
 * The map source adapter must extend class
 * oracle.lbs.mapcache.cache.MapSourceAdapter.
 */
 
public class MVAdapter extends MapSourceAdapter
{
  /**
   * Gets the map tile request string that is to be sent to the map 
   * service provider URL.
   * @param tile tile definition
   * @return request string
   */
  public String getMapTileRequest(TileDefinition tile)
  {
    // Get map source specified parameters
    Properties props = this.getProperties() ;
    String dataSource = props.getProperty("data_source") ;
    String baseMap = props.getProperty("base_map") ;
    // Use oracle.lbs.mapclient.MapViewer to construct the request string
    MapViewer mv = new MapViewer(this.getMapServiceURL()) ;
    mv.setDataSourceName(dataSource);
    mv.setBaseMapName(baseMap);
    mv.setDeviceSize(new Dimension(tile.getImageWidth(), 
                                   tile.getImageHeight()));
    mv.setCenterAndSize(tile.getBoundingBox().getCenterX(), 
                        tile.getBoundingBox().getCenterY(),
                        tile.getBoundingBox().getHeight());
    int format = MapResponse.FORMAT_PNG_STREAM ;
    String req = null ;
    switch(tile.getImageFormat())
    {
      case TileDefinition.FORMAT_GIF:
        mv.setImageFormat(MapResponse.FORMAT_GIF_URL);
        req = mv.getMapRequest().toXMLString().replaceFirst(
                        "format=\"GIF_URL\"", "format=\"GIF_STREAM\"") ;
        break ;
      case TileDefinition.FORMAT_PNG:
        mv.setImageFormat(MapResponse.FORMAT_PNG_URL);
        req = mv.getMapRequest().toXMLString().replaceFirst(
                        "format=\"PNG_URL\"", "format=\"PNG_STREAM\"") ;
        break ;
      case TileDefinition.FORMAT_JPEG:
        mv.setImageFormat(MapResponse.FORMAT_JPEG_URL);
        req = mv.getMapRequest().toXMLString().replaceFirst(
                        "format=\"JPEG_URL\"", "format=\"JPEG_STREAM\"");
        break ;
    }
    
    byte[] reqStr = null ;
    try
    {
      reqStr = req.getBytes("UTF8") ;
    }
    catch(Exception e)
    {}
    // Return the request string.
    return "xml_request="+ new String(reqStr);
  }
}

Example 8-5 shows the implementation of the MapSourceAdapter.getTileImageBytes method.

Example 8-5 MapSourceAdapter.getTileImageBytes Implementation

/**
 * Fetches the map image tile from the external map service provider by 
 * sending the HTTP map tile request to the map service provider, and 
 * return the binary tile image data. You can rewrite this method so that 
 * the adapter can fetch the tile from an external map service provider 
 * that does not accept HTTP requests at all. 
 * @param tile the tile definition
 * @return the binary tile image data. 
 * @throws Exception
 */
public byte[] getTileImageBytes(TileDefinition tile)
  throws Exception
{
  // construct request string
  String request = getMapTileRequest(tile) ;
  
  if(request == null) 
  {
    throw new Exception("Null map tile request string in map source adapter!") ;
  }
 
  // set proxy settings
    Proxy proxy = null ;
 
  /* If the proxyHost is "NONE", the request is sent directly to the 
   * external server. If the proxyHost is a valid host, that host will 
   * be used as the proxy server. If the proxyHost is empty of omitted,  
   * the global proxy setting in mapViewerConfig.xml will be in effect.
   */
  boolean noProxy = "NONE".equalsIgnoreCase(getProxyHost()) ;
  if(getProxyHost()!=null && !noProxy)
  {
    SocketAddress addr = new InetSocketAddress(proxyHost, proxyPort);
    proxy = new Proxy(Proxy.Type.HTTP, addr);
  }
    
  // send the request and get the tile image binary  
  PrintWriter wr = null ;
  BufferedInputStream bis = null;
  try 
  {
    String urlStr = mapServiceURL ;
    if("GET".equalsIgnoreCase(httpMethod))
      urlStr = mapServiceURL + "?" + request ;
    log.finest("http "+httpMethod+": "+urlStr);
      
    URL url = new URL(urlStr);
    // Open a URL connection based on current proxy setting
    URLConnection conn = 
      proxy!=null? url.openConnection(proxy):
                   (noProxy? url.openConnection(Proxy.NO_PROXY):
                             url.openConnection()) ;
    conn.setConnectTimeout(timeOut);
    if("GET".equalsIgnoreCase(getHTTPMethod()))
      conn.connect();
    else
    {
      conn.setDoOutput(true);
      wr = new PrintWriter(conn.getOutputStream());
      wr.print(request);
      wr.flush();
      wr.close();
      wr = null ;
    }
    bis = new BufferedInputStream(conn.getInputStream());
    byte[] result = toBytes(bis) ;
    bis.close();
    bis = null ;
    return result;
  }
  catch(Exception ioe) 
  {
    throw new Exception("Failed to fetch external map tile.", ioe);
  }
  finally 
  {
    try 
    {
      if(bis != null) 
      {
        bis.close();
        bis = null;
      }
      if(wr != null) 
      {
        wr.close();
        wr = null;
      }
    }
    catch(IOException ioee) 
    {
      throw ioee;
    }
  }
} 

8.3 Feature of Interest (FOI) Server

A feature of interest (FOI) is a business entity or geographical feature that can be manipulated or interacted with by a JavaScript map client running in the Web browser. FOI data is dynamically displayed and is not part of the map tile layer. FOIs can be any spatial geometry type, such as points, line strings, and polygons. The ability to search, browse, inspect, and interact with FOIs is essential for location-based services.

The FOI server is a Java servlet running inside MapViewer. It responds to FOI requests from a JavaScript map client by querying the database, rendering FOI images, and sending the FOI images along with FOI attribute data to the client. The JavaScript map client displays the FOI images to the end user and provides interaction with the images.

The FOI server accepts the following types of FOI requests: theme-based and user-defined. Each type of FOI request returns a data layer appropriate for the request type.

8.3.1 Theme-Based FOI Layers

A theme-based FOI layer is a collection of spatial features that have similar characteristics and that are stored in the database. The client fetches a theme-based FOI layer by sending a theme-based FOI layer request to the FOI server. The result of this request is a collection of FOI data entries that meets certain query criteria. Each FOI data entry contains the FOI image, as well as FOI attributes that can be used by the JavaScript map client to implement client-side interactivity.

A theme-based FOI layer is based on a predefined MapViewer theme (see Section 8.3.1.1) or a dynamic JDBC query theme (see Section 8.3.1.3, which defines all information necessary for FOI data rendering. The information includes the table in which the geometry features are stored, the criteria to use during the database query, the attributes that are part of the FOI data, and the style to use when rendering the FOI images. Predefined themes can be defined and configured using the Map Builder tool, which is described in Chapter 9.

8.3.1.1 Predefined Theme-Based FOI Layers

When the client requests FOI data using a predefined theme-based FOI request, it must specify the name of a predefined theme, the scale of the feature images, and the query window used to query the geometry features. The theme name must be defined by the application, while the scale of the feature images and the query window are automatically calculated by the JavaScript map client.

For example, a predefined theme named CUSTOMERS could be defined on a table named CUSTOMERS, which has the following definition:

SQL> DESCRIBE CUSTOMERS
 Name                              Null?  Type
 --------------------------------- ------ ----------------------------
 NAME                                      VARCHAR2(64 CHAR)
 CITY                                      VARCHAR2(64 CHAR)
 COUNTY                                    VARCHAR2(64 CHAR)
 STATE                                       VARCHAR2(64 CHAR)
 LOCATION                                  SDO_GEOMETRY
 SALES                                     NUMBER

The LOCATION column is the spatial column that is used for rendering the customer markers.

The XML styling rules for the CUSTOMERS theme are shown in Example 8-6.

Example 8-6 XML Styling Rules for Predefined Theme Used for FOI Layer

<?xml version="1.0" standalone="yes"?>
<styling_rules>
  <hidden_info>
    <field column="CITY" name="City"/>
    <field column="SALES" name="Sales"/>
  </hidden_info>
  <rule>
    <features style="M.CIRCLE"> </features>
    <label column="NAME" style="T.TEXT"> 1 </label>
  </rule>
</styling_rules>

The styling rules in Example 8-6 specify the following. To see how these specifications affect the map display, see Figure 8-2, "Application Created Using Oracle Maps" in Section 8.1.2.

  • The marker style M.CIRCLE is used to render the customers.

  • The NAME column is used as the labeling attribute (label column="NAME"). The value in the NAME column (the name of the customer) is included in the information window that the JavaScript map client displays when the user moves the mouse over the customer marker.

  • The information window also includes the values in columns specified in the <hidden_info> element (CITY and SALES in this example) for that customer. Each <field> element specifies two attributes: column to identify the database column and name to identify a text string to be used in the information window.

8.3.1.2 Templated Predefined Themes

The predefined MapViewer theme can be a standard predefined theme or a templated predefined theme. Both types of predefined themes are defined in the USER_SDO_THEMES view. However, the query conditions of a standard predefined theme are fixed, whereas the query conditions of a templated predefined theme can contain dynamic binding variables whose values can be changed when the theme request is issued.

Example 8-7 shows the XML styling rules for a templated predefined theme that uses two binding variables (with the relevant text shown in bold in the <features> element).

Example 8-7 XML Styling Rules for a Templated Predefined Theme

<?xml version="1.0" standalone="yes"?>
<styling_rules>
  <hidden_info>
    <field column="NAME" name="Name"/>
    <field column="CITY" name="City"/>
    <field column="SALES" name="Sales"/>
  </hidden_info>
  <rule>
    <features style="M.CIRCLE">(city=:1 and sales>:2)</features>
    <label column="NAME" style="T.TEXT"> 1 </label>
  </rule>
</styling_rules>

In Example 8-7, the binding variable :1 specifies the name of the city in which the qualifying features must be located, and the binding variable :2 specifies the minimum sales volume of the qualifying features. (That is, only customers in a specified city and with sales above a certain minimum will have store markers displayed.) The values of these two binding variables are not fixed when the theme is defined; instead, they are provided in the requests that the client sends to the server.

8.3.1.3 Dynamic JDBC Query Theme-Based FOI Layers

When the client requests FOI data using a dynamic JDBC theme-based FOI request, it must specify the complete definition of the JDBC theme. The theme definition must specify the rendering style and the SQL query that is to be used to query FOI data, including all geometry and non-geometry attributes.

Example 8-8 shows some JavaScript client code to create an FOI layer that displays a buffer around each customer location.

Example 8-8 Theme for Dynamic JDBC Query

var theme = '<themes><theme name="JDBC_THEME" >' +
   '<jdbc_query asis="true" spatial_column="location" 
        jdbc_srid="8307" render_style="C.RED" 
        datasource="mvdemo">' + 
   'select sdo_geom.sdo_buffer(A.location,1,0.005,'+
   '\'unit=mile arc_tolerance=0.005\') location '+
   ' from customers A' +
   '</jdbc_query></theme></themes>' ;      
buffertheme = new MVThemeBasedFOI('buffertheme',theme);

8.3.2 User-Defined FOI Requests

A user-defined FOI is a feature defined on the client side. Unlike the theme-based FOI layer, which is rendered as a collection of features, the user-defined FOI is requested and rendered on an individual basis.

All attributes of the user-defined FOI, including the geometry representation and rendering style, must be provided by the application. The JavaScript map client sends the request, with the geometry representation and rendering style information, to the FOI server. The FOI server renders the FOI image and returns it to the client. The rendering style must be predefined in the USER_SDO_STYLES view.

8.4 Oracle Maps JavaScript API

The Oracle Maps JavaScript client is a browser-based map visualization engine that works on top of the map tile server and the FOI server. It implements the following functions:

  • Fetching map tiles from the map tile server and displaying them as a map tile layer in the Web browser.

  • Sending FOI requests to the FOI server, and overlaying user-defined features and Oracle Spatial query-based features on top of the map tile layer.

  • Controlling user interaction, such as dragging for map navigation, clicking FOIs, drawing rectangles, and redlining.

    Drawing a rectangle refers to the application user creating a rectangle by clicking and holding the mouse button at one corner of the rectangle, dragging the mouse to the diagonally opposite corner, and releasing the mouse button.

    Redlining refers to the application user creating a polygon or polyline by clicking the mouse button and then moving the mouse and clicking multiple times, with each click extending the redline by a straight line. (Redline drawings are often rendered in red, although you can specify a line style that uses any color.)

To access these functions, use the JavaScript API, which consists of several JavaScript classes, including the following:

  • The MVMapView class is the main entry point of the API. It implements most of the map control interfaces.

  • The MVMapTileLayer class (formerly called the MVBaseMap class) defines a map tile layer that displays map tiles rendered by the map tile server.

  • The MVThemeBasedFOI class defines and controls the theme based FOI layers.

  • The FOI class defines and controls user-defined FOIs.

  • The MVSdoGeometry class defines a geometry object. The geometry can be in any geometry type that is supported by Oracle Spatial.

  • The MVRedLineTool class defines and controls the redline utility.

  • The MVRectangleTool class defines and controls the rectangle tool.

  • The MVOverviewMap class defines and controls the overview map that displays the miniature overview of the main map as a small rectangle (which is itself inside a rectangle tool).

  • The MVMapDecoration class defines and controls map decorations.

MVMapView is the main entry class for all map operations inside the Web browser. MVMapView and the other classes provide all essential interfaces for adding logic to your Web mapping applications. These logical operations can include the following:

  • Create a map client instance and associate it with the map container DIV object created in the Web page.

  • Configure map parameters such as map center and map zoom level.

  • Create and manipulate map tile layers.

  • Create and manipulate theme-based FOI layers.

  • Create and manipulate user-defined individual FOIs.

  • Display an information window on the map.

  • Create fixed map decorations, such as a map title, custom copyright notes, and control buttons.

  • Access built-in utilities such as the navigation bar, scale bar, rectangle tool, redline tool, and overview map.

  • Use event listeners to customize the event handling. You can add event listeners to the MVMapView, MVThemeBasedFOI, and MVFOI classes using the appropriate API methods.

For detailed information about all classes in the Oracle Maps JavaScript API, see the Javadoc-style reference documentation, which is included with MapViewer and is available at the following location:

http://host:port/mapviewer/fsmc/apidoc

8.5 Developing Oracle Maps Applications

If you have all your map data stored in an Oracle database and have MapViewer deployed in Oracle Fusion Middleware, you can develop a Web-based mapping application using Oracle Maps by following the instructions in this section.

8.5.1 Creating One or More Map Tile Layers

For each map tile layer displayed on the client side that is served by MapViewer, you must create the corresponding map tile layer on the MapViewer server side. For example, for the sample application described in Section 8.1.2, you must create a map tile layer on the server side to display oceans, county boundaries, cities and highways as a map tile layer on the client. However, if the tile layer is a custom or built-in eternal tile layer, you do not need to define the tile layer on the server side.

Before you can create a map tile layer, you must ensure that the map source from which the map tiles images are to be rendered is ready. If the map tile images are rendered based on map data stored in the database, you must create a MapViewer base map that consists of a set of predefined themes. (You can create the base map using the Map Builder tool, which is described in Chapter 9.) If the map tiles images are rendered by an external map provider, you must write a map source adapter that can fetch map images from the external server using the tile image definition specified by the map tile server.

When the map source is ready, you can create the map tile layer using the MapViewer administration page, as described in Section 1.5.3. When you create the map tile layer, you must provide proper coordinate system definition, map source definition (internal or external), and zoom level definition (number of zoom levels and map scales).

After you create the map tile layer, you can test it by using a JavaServer Page (JSP) demo application shipped with MapViewer. The JSP demo application can be accessed at http://host:port/mapviewer/fsmc/omaps.jsp. Based on your input, this application can display maps served by any map tile layer defined with the MapViewer instance.

8.5.2 Defining FOI Metadata

If your application needs to display dynamic features based on database query results as theme-based FOI layers, you must create a predefined MapViewer theme for each theme-based FOI layer. If your application needs to display individual dynamic features as user-defined FOIs, you must define the rendering style or styles used by the FOI server to render the FOI images. You can use the Map Builder tool (described in Chapter 9) to create predefined themes and rendering styles.

8.5.3 Creating the Client Application

Oracle Maps client applications running inside Web browsers are pure HTML and JavaScript pages that do not require any plug-ins. Therefore, you can build the application using any Web technology that delivers content as pure HTM. Such technologies include JavaServer Pages, Java Servlets, ASP, and .NET C#. This section discusses client application development only in pure HTML format, but you can easily apply this information to other Web technologies.

As shown in Example 8-1 in Section 8.1.2, the source code for an Oracle Maps application is typically packaged in an HTML page, which consists of the following parts:

  • A <script> element that loads the Oracle Maps client library into the browser JavaScript engine. In Example 8-1, this element is:

    <script language="Javascript" src="jslib/loadscript.js"></script>
    
  • An HTML DIV element that is used as the map container in the Web page. The size and positioning of the DIV element can be customized to suit your needs. In Example 8-1, this element is:

    <div id="map" style="left:10; top:60;width: 600px; height: 500px"></div>
    
  • JavaScript code that creates and initializes the map client instance. It creates the map client instance, sets up the initial map content (map tile layer, FOI layers, and so on), sets the initial map center and zoom level, implements application-specific logic, displays the map, and implements other application-specific logic.

    This code should be packaged inside a JavaScript function, which is executed when the HTML page is loaded from the server to the client Web browser. In Example 8-1, this function is named on_load_mapview:

    function on_load_mapview() 
    {        
      var baseURL  = "http://"+document.location.host+"/mapviewer";
      // Create an MVMapView instance to display the map
      var mapview = new MVMapView(document.getElementById("map"), baseURL);
      // Add a map tile layer as background.
      mapview.addMapTileLayer(new MVMapTileLayer("mvdemo.demo_map"));   
      // Add a theme-based FOI layer to display customers on the map
      var themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','mvdemo.customers');
      themebasedfoi.setBringToTopOnMouseOver(true);
      mapview.addThemeBasedFOI(themebasedfoi);
      // Set the initial map center and zoom level
      mapview.setCenter(MVSdoGeometry.createPoint(-122.45,37.7706,8307));   
      mapview.setZoomLevel(4);    
      // Add a navigation panel on the right side of the map
      mapview.addNavigationPanel('east');
      // Add a scale bar
      mapview.addScaleBar();
      // Display the map.
      mapview.display();
    }
    

    This function is specified in the onload attribute of the <body> element, so that it is executed after the Web page is loaded. In Example 8-1, this code is as follows:

    <body onload= JavaScript:on_load_mapview() >
    
  • Additional HTML elements and JavaScript code implement other application-specific user interfaces and control logic. In Example 8-1 in Section 8.1.2, a JavaScript function setLayerVisible is implemented to show or hide the theme-based FOI layer when the user checks or unchecks the Show customers check box. The setLayerVisible function is coded as follows:

    function setLayerVisible(checkBox)
    {
            // Show the theme-based FOI layer if the check box is checked
            // and hide the theme-based FOI layer otherwise.
      if(checkBox.checked)
        themebasedfoi.setVisible(true) ;
      else
        themebasedfoi.setVisible(false);
    }
    

    This function is specified in the onclick attribute of the <INPUT> element that defines the check box, so that it is executed whenever the user clicks on the check box. In Example 8-1, this code is as follows:

    <INPUT TYPE="checkbox" onclick="setLayerVisible(this)" checked/>Show customers
    

8.6 Using Google Maps and Bing Maps

Applications can display Google Maps tiles or Microsoft Bing Maps tiles as a built-in map tile layer, by creating and adding to the map window an instance of MVGoogleTileLayer or MVBingTileLayer, respectively. Internally, the Oracle Maps client uses the official Google Maps or Bing Maps API to display the map that is directly served by the Google Maps or Microsoft Bing Maps server.

If you need to overlay your own spatial data on top of the Google Maps or Microsoft Bing Maps tile layer, see also Section 8.7, "Transforming Data to a Spherical Mercator Coordinate System".)

The following sections describe the two options for using built-in map tile layers:

8.6.1 Defining Google Maps and Bing Maps Tile Layers on the Client Side

To define a built-in map tile layer on the client side, you need to create a MVGoogleTileLayer or MVBingTileLayer object, and add it to the MVMapView object. (As of Oracle Fusion Middleware Release 11.1.1.6, MVGoogleTileLayer uses the Google Maps Version 3 API by default, and MVBingTileLayer uses the Bing Maps Version 7 API by default.)

For example, to use Google tiles, add the Google tile layer to your map:

mapview = new MVMapView(document.getElementById("map"), baseURL);
tileLayer = new MVGoogleTileLayer() ;
mapview.addMapTileLayer(tileLayer);

In your application, you can invoke the method MVGoogleTileLayer.setMapType or MVBingTileLayer.setMapType to set the map type to be one of the types supported by the map providers, such as road, satellite, or hybrid.

For usage examples and more information, see the JavaScript API documentation for MVGoogleTileLayer and MVBingTileLayer, and the tutorial demos Built-in Google Maps Tile Layer and Built-in Bing Maps Tile Layer.

8.6.2 Defining the Built-In Map Tile Layers on the Server Side

You can define a built=-in map tile layer on the server side and use it as a regular MapViewer tile layer on the client side. To define a built-in map tile layer on the server side, follow these steps:

  1. Log into the MapViewer Administration Page (explained in Section 1.5.1).

  2. Select the Manage Map Tile Layers tab and click Create.

  3. When you are asked to select the type of map source, choose Google Maps or Bing Maps and click Continue.

  4. Select the data source where the tile layer is to be defined.

  5. Set the license key that you have obtained from the map provider.

  6. Click Submit to create the tile layer.

After you have created the built-in map tile layer on the server side, you can use it like any other tile layer served by MapViewer. You do not need to add any <script> tag to load the external JavaScript library.

The following example shows a Bing Maps tile layer defined on the server side:

mapview = new MVMapView(document.getElementById("map"), baseURL);
// The Bing tile layer is defined in data source “mvdemo”.
tileLayer = new MVMapTileLayer("mvdemo.BING_MAP") ; 
mapview.addMapTileLayer(tileLayer);

In your application, you can invoke the method MVMapTileLayer.setMapType to set the map type to be one of the types supported by the map providers, such as road, satellite, or hybrid.

8.7 Transforming Data to a Spherical Mercator Coordinate System

Popular online map services such as Google Maps and Microsoft Bing Maps use a spherical Mercator projection for their maps. If you are using an Oracle Database release earlier than 11.1.0.7, and if you need to overlay your own spatial data on top of such a tile layer, such as a Google Maps or Microsoft Bing Maps tile layer, you must set up the database to properly handle coordinate system transformation between the coordinate system of that tile layer and your own data coordinate system, if the two coordinate systems are not the same.


Note:

To perform the actions in this section, your database must be Release 10.2.0.1 or later.

Google Maps uses a Spherical Mercator coordinate system (EPSG: 3785), which is also widely used among commercial API providers such as Yahoo! Maps and Microsoft Bing Maps. This coordinate system (SRID 3785) was not provided with Oracle Spatial before Release 11.1.0.7. In order to enable MapViewer and Oracle Spatial to transform your own data to this coordinate system, you must first add this coordinate system definition into your Oracle database if it is not already defined.

To check if this coordinate system is defined, you can enter the following statement:

SELECT srid FROM mdsys.cs_srs WHERE srid=3785;

If the preceding statement returns a row, you do not need to perform the actions in this section. If the preceding statement does not return a row, you must perform the actions in this section in order to be able to overlay your own spatial data on top of the tile layer.

Follow these steps:

  1. Connect to the database as a privileged user, such as one with the DBA role.

  2. Run the csdefinition.sql script, as follows. (Replace $OC4J_HOME with the root directory of the OC4J instance where your MapViewer is deployed, and enter the command on a single line.)

    • Linux: $OC4J_HOME/j2ee/home/applications/mapviewer/web/WEB-INF/admin/csdefinition.sql

    • Windows: $OC4J_HOME\j2ee\home\applications\mapviewer\web\WEB-INF\admin\csdefinition.sql

  3. If necessary, create a transformation rule to cause Oracle Spatial to skip datum conversion when transforming data from a specified coordinate system to the Spherical Mercator system. To find out if you need to create such a transformation rule, see Section 8.7.1.

  4. Either pre-transform your spatial data for better performance, or let MapViewer transform the data at run time ("on the fly"). Note that if your database release is earlier than 10.2.0.4, pre-transforming is the only option.

    • To pre-transform all your data into the Spherical Mercator coordinate system, use the SDO_CS.TRANSFORM_LAYER procedure on all the data, and use the transformed data for mapping. (See the SDO_CS.TRANSFORM_LAYER reference section in Oracle Spatial Developer's Guide.)

    • To let MapViewer transform the data at run time, do not transform the data before using it for mapping.

8.7.1 Creating a Transformation Rule to Skip Datum Conversion

Spatial data is often in a coordinate system based on an ellipsoid datum, such as WGS84 or BNG. In such cases, Oracle Spatial by default applies datum conversion when transforming the data into the Spherical Mercator system. This will introduce a small amount of mismatch or error between your data and the Google Maps other map service tiles. If you want to address this issue, you can create transformation rules that tell Oracle Spatial to skip datum conversion when transforming data from a specified coordinate system to the Spherical Mercator system.

Example 8-9 shows SQL statements that are included in the csdefinition.sql script and that create such transformations rules. However, if the coordinate system of your spatial data is not covered by the rules shown in Example 8-9, you can create your own rule if the coordinate system of your data is not covered by these rules. (For more information about creating coordinate system transformation rules, see Oracle Spatial Developer's Guide.)

Example 8-9 Transformation Rules Defined in the csdefinition.sql Script

-- Create the tfm_plans, that is, the transformation rules.
-- Note: This will result in an incorrect conversion since it ignores a datum
-- datum between the ellipsoid and the sphere. However, the data will match
-- up better on Google Maps.
 
-- For wgs84 (8307)
call sdo_cs.create_pref_concatenated_op( 83073785, 'CONCATENATED OPERATION 8307 3785', TFM_PLAN(SDO_TFM_CHAIN(8307, 1000000000, 4055, 19847, 3785)), NULL);
 
-- For 4326, EPSG equivalent of 8307
call sdo_cs.create_pref_concatenated_op( 43263785, 'CONCATENATED_OPERATION_4326_3785', TFM_PLAN(SDO_TFM_CHAIN(4326, 1000000000, 4055, 19847, 3785)), NULL); 
 
-- For OS BNG, Oracle SRID 81989
call sdo_cs.create_pref_concatenated_op( 819893785, 'CONCATENATED OPERATION 81989 3785', TFM_PLAN(SDO_TFM_CHAIN(81989, -19916, 2000021, 1000000000, 4055, 19847, 3785)), NULL); 
 
-- For 27700, EPSG equivalent of 81989
call sdo_cs.create_pref_concatenated_op( 277003785, 'CONCATENATED_OPERATION_27700_3785', TFM_PLAN(SDO_TFM_CHAIN(27700, -19916, 4277, 1000000000, 4055, 19847, 3785)), NULL);
commit;

8.8 Dynamically Displaying an External Tile Layer

The Oracle Maps JavaScript API supports dynamically defining an external tile layer without needing any server-side storage of either the definition or the tile images. Basically, you can use the class MVCustomTileLayer to reference and display tile layers served directly from any external map tile server on the Web, such as the ESRI ArcGIS tile server, the OpenStreet map tile server, or other vendor-specific map tile servers.

To do so, you need to do the following when creating a new MVCustomTileLayer instance:.

  • Know the configuration of the map tile layer, specifically its coordinate system, boundary, and zoom level.

  • Supply a function that can translate a tile request from Oracle Maps into a tile URL from the external tile server.

The configuration of a tile layer takes the form of a JSON object, and is generally in the format illustrated by the following example:

var mapConfig = {mapTileLayer:"custom_map", format:"PNG", 
coordSys:{srid:8307,type:"GEODETIC",distConvFactor:0.0, minX:-180.0,minY:-90.0,maxX:180.0,maxY:90.0}, 
zoomLevels: 
[{zoomLevel:0,name:"level0",tileWidth:15.286028158107968,tileHeight:15.286028158107968,tileImageWidth:256,tileImageHeight:256},
{zoomLevel:1,name:"level1",tileWidth:4.961746909541633,tileHeight:4.961746909541633,tileImageWidth:256,tileImageHeight:256},
{zoomLevel:2,name:"level2",tileWidth:1.6105512127664132,tileHeight:1.6105512127664132,tileImageWidth:256,tileImageHeight:256},
{zoomLevel:3,name:"level3",tileWidth:0.5227742142726501,tileHeight:0.5227742142726501,tileImageWidth:256,tileImageHeight:256},
{zoomLevel:4,name:"level4",tileWidth:0.16968897570090388,tileHeight:0.16968897570090388,tileImageWidth:256,tileImageHeight:256},
{zoomLevel:5,name:"level5",tileWidth:0.05507983954154727,tileHeight:0.05507983954154727,tileImageWidth:256,tileImageHeight:256},
{zoomLevel:6,name:"level6",tileWidth:0.017878538533723076,tileHeight:0.017878538533723076,tileImageWidth:256,tileImageHeight:256},
{zoomLevel:7,name:"level7",tileWidth:0.005803187729944108,tileHeight:0.005803187729944108,tileImageWidth:256,tileImageHeight:256},
{zoomLevel:8,name:"level8",tileWidth:0.0018832386690789012,tileHeight:0.0018832386690789012,tileImageWidth:256,tileImageHeight:26},
{zoomLevel:9,name:"level9",tileWidth:6.114411263243185E-4,tileHeight:6.114411263243185E-4,tileImageWidth:256,tileImageHeight:256} ]
};

For the a function that can translate a tile request from Oracle Maps into a tile URL from the external tile server, specify a function such as the following example:

function getMapTileURL(minx, miny, width, height, level) 
{
 var x = (minx-mapConfig.coordSys.minX)/mapConfig.zoomLevels[level].tileWidth ; 
var y = (miny-mapConfig.coordSys.minY)/mapConfig.zoomLevels[level].tileHeight ; 
return “http://localhost:8888/mapviewer/mcserver?request=gettile&format=" + mapConfig.format + "&zoomlevel="+level+"&mapcache=mvdemo.demo_map&mx=" + Math.round(x) + "&my=" + Math.round(y) ;
}

In the preceding example, the function getMapTileURL() is implemented by the application to supply a valid URL from the external tile server that fetches a map tile image whose top-left corner will be positioned at the map location (minx,miny) by the Oracle Maps client. Each map tile image is expected to have the specified size (width,height), and it should be for the specified zoom level (level). This specific example is actually returning a gettile URL from the local MapViewer tile server; however the approach also applies to any non-MapViewer tile servers.

The new custom tile layer is added to the client mapViewer just like a built-in map tile layer.

iv> PK* R>PKv\EOEBPS/vis_svg_javascript.htmiL JavaScript Functions for SVG Maps

B JavaScript Functions for SVG Maps

This appendix describes the MapViewer JavaScript application programming interface (API) for SVG maps. This API contains predefined functions that can be called from outside the SVG map, typically from the HTML document in which the SVG map is embedded. In addition, you can create JavaScript functions to be called when certain mouse-click actions occur. The predefined and user-defined functions can be used to implement sophisticated client-side interactive features, such as customized navigation.

If you use any of the JavaScript functions described in this appendix, end users must use Microsoft Internet Explorer to view the SVG maps, and Adobe SVG Viewer 3.0 or a later release must be installed on their systems.

This appendix contains the following major sections:

B.1 Navigation Control Functions

The MapViewer JavaScript functions for controlling navigation include the following:

  • recenter(x, y) sets the center point of the current SVG map.

    The input x and y values specify the coordinates (in pixels) of the new center point, which is the point inside the SVG map to be displayed at the center of the SVG viewer window. The SVG viewer window is the graphical area in the Web browser displayed by the SVG viewer. The coordinates of the center point are defined in the SVG map screen coordinate system, which starts from (0, 0) at the upper-left corner of the map and ends at (width, height) at the lower-right corner.

  • setZoomRatio(zratio) sets the current map display zoom ratio.

    This function can be used to zoom in or zoom out in the SVG map. (It does not change the center point of the map.) The original map zoom ratio without any zooming is 1, and higher zoom ratio values show the SVG map zoomed in. The map zoom ratio should be set to those values that fit predefined zoom levels. For example, if the zoomlevels value is 4 and zoomfactor value is 2, map zoom ratios at zoom level 0, 1, 2, and 3 will be 1, 2, 4, and 8, respectively; thus, in this example the zratio parameter value should be 1, 2, 4, or 8. For more information about predefined zoom levels, see the descriptions of the zoomlevels, zoomfactor, and zoomratio attributes in Section 3.2.1.1.

B.2 Display Control Functions

MapViewer provides functions to enable and disable the display of informational tips, the map legend, hidden themes, and the animated loading bar. The display control functions include the following:

  • switchInfoStatus() enables or disables the display of informational tips. (Each call to the function reverses the previous setting.)

    You can control the initial display of informational tips by using the <hidden_info> element in theme styling rule definition (see Section A.7) and the infoon attribute in a map request (see Section 3.2.1.1). The switchInfoStatus() function toggles (reverses) the current setting for the display of informational tips.

  • switchLegendStatus() enables or disables the display of the map legend. (Each call to the function reverses the previous setting.) The legend is initially hidden when the map is displayed.

  • showTheme(theme) sets the specified theme to be visible on the map, and hideTheme(theme) sets the specified theme to be invisible on the map.

  • showLoadingBar() displays the animated loading bar. The animated loading bar provides a visible indication that the loading of a new map is in progress. The bar is removed from the display when the loading is complete.

B.3 Mouse-Click Event Control Functions

MapViewer provides several predefined mouse-click event control functions, which are explained in Section B.3.1. You can also create user-defined mouse event control functions, as explained in Section B.3.2.

B.3.1 Predefined Mouse-Click Control Functions

MapViewer provides functions to enable and disable theme feature, rectangle, and polygon selection in SVG maps. It also provides functions to get information about selections and to toggle the selection status on and off. The functions for customizing mouse-click event control on an SVG map include the following:

  • enableFeatureSelect() enables theme feature selection, and disableFeatureSelect() disables theme feature selection.

    Theme feature selection can be enabled if the selectable_in_svg attribute in the <theme> element is TRUE either in the map request (see Section 3.2.20) or in the base map (see Section A.8) definition. If the theme is selectable and theme feature selection is enabled, 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 (rowid by default) is recorded. Clicking on an already selected feature deselects the feature. The list of IDs of all selected features can be obtained by calling the getSelectedIdList() function, described in this section.

    When theme feature selection is enabled, polygon selection and rectangle selection are automatically disabled.

  • enablePolygonSelect() enables polygon selection, and disablePolygonSelect() disables polygon selection.

    If polygon selection is enabled, a polygon selection area can be defined by clicking and moving the mouse on the SVG map. Each click creates a shape point for the polygon. The coordinates of the polygon are recorded, and can be obtained by calling the getSelectPolygon() function, described in this section.

    When polygon selection is enabled, theme feature selection and rectangle selection are automatically disabled.

  • enableRectangleSelect() enables rectangle selection, and disableRectangleSelect() disables rectangle selection.

    If rectangle selection is enabled, a rectangular selection window can be defined by clicking and dragging the mouse on the SVG map. The coordinates of the rectangle are recorded, and can be obtained by calling the getSelectRectangle() function, described in this section.

    When rectangle selection is enabled, theme feature selection and polygon selection are automatically disabled.

  • getInfo(theme, key) returns the informational note or tip string of the feature identified by theme name and key.

  • getSelectedIdList(theme) returns an array of all feature IDs that are selected on the SVG map.

  • getSelectPolygon() returns an array of the coordinates of all shape points of the selection polygon, using the coordinate system associated with the original user data.

  • getSelectRectangle() returns an array of the coordinates of the upper-left corner and the lower-right corner of the selection rectangle, using the coordinate system associated with the original user data.

  • selectFeature(theme, key) toggles the selection status of a feature (identified by its key value) in a specified theme.

  • setSelectPolygon(poly) sets the coordinates of all shape points of the selection polygon, using the coordinate system associated with the original user data. The coordinates are stored in the array poly. Calling this function after enablePolygonSelect() draws a polygon on the SVG map.

  • setSelectRectangle(rect) sets the coordinates of the upper-left corner and the lower-right corner of the selection rectangle, using the coordinate system associated with the original user data. The coordinates are stored in the array rect. Calling this function after enableRectangleSelect() draws a rectangle on the SVG map.

B.3.2 User-Defined Mouse Event Control Functions

User-defined JavaScript mouse-event control functions can be combined with predefined JavaScript functions (described in Section B.3.1) to implement further interactive customization. You can create map-level, theme-level, and selection event control functions.

B.3.2.1 Map-Level Functions

Map-level mouse event control functions can be defined for mouse-click events and mouse-move events.

A mouse-click event function is called whenever a click occurs anywhere in the SVG map, if both theme feature selection and window selection are disabled. The name of the function is defined by the onclick attribute in the map request (see Section 3.2.1.1).

A mouse-move event function is called whenever the mouse moves anywhere in the SVG map. The name of the function is defined by the onmousemove attribute in the map request (see Section 3.2.1.1).

These JavaScript functions must be defined in the Web page that has the SVG map embedded. Mouse-click and mouse-move event functions must accept two parameters, x and y, which specify the coordinates inside the SVG viewer window where the mouse click or move occurred. The coordinate is defined in the local SVG viewer window coordinate system, which starts from (0,0) at the upper-left corner and ends at (width, height) at the lower-right corner.

B.3.2.2 Theme-Level Functions

Theme-level mouse event control functions can be defined for mouse-click, mouse-move, mouse-over, and mouse-out events.

A mouse-click event control function is called when theme feature selection is enabled and a feature of the theme is clicked. Each theme in the map can have its own mouse-click event control function. A theme-level mouse-click event control function is specified by the onclick attribute in the <theme> element in the map request or base map definition.

A mouse-move event control function is called whenever the mouse moves inside any feature of the theme. Each theme in the map can have its own mouse-move event control function. A theme-level mouse-move event control function is specified by the onmousemove attribute in the <theme> element in the map request or base map definition.

A mouse-over event control function is called whenever the mouse moves from outside a feature of the theme to inside a feature of the theme. Each theme in the map can have its own mouse-over event control function. A theme-level mouse-over event control function is specified by the onmouseover attribute in the <theme> element in the map request or base map definition.

A mouse-out event control function is called whenever the mouse moves out of a feature of the theme. Each theme in the map can have its own mouse-out event control function. A theme-level mouse-out event control function is specified by the onmouseout attribute in the <theme> element in the map request or base map definition.

These JavaScript functions must be defined in the Web page that has the SVG map embedded. They take the following parameters:

  • Theme name

  • Key of the feature

  • X-axis value of the point in the SVG viewer window where the mouse click occurred

  • Y-axis value of the point in the SVG viewer window where the mouse click occurred

The key of the feature is the value of the key column from the base table, which is specified by the key_column attribute of the <theme> element in the map request or base map definition. ROWID is used as the default key column. For example, if the onclick attribute is set to selectCounty for the COUNTY theme, the following JavaScript function call is executed if the feature with rowid AAAHQDAABAAALk6Abm of the COUNTY theme is clicked on the SVG map at (100,120): selectCounty('COUNTY', 'AAAHQDAABAAALk6Abm', 100, 120).

The x-axis and y-axis values specify the coordinates inside the SVG viewer window where the mouse event occurred. The coordinate is defined in the local SVG viewer window coordinate system, which starts from (0,0) at the upper-left corner and ends at (width, height) at the lower-right corner.

B.3.2.3 Selection Event Control Functions

You can define a selection event control function for rectangle selection or polygon selection, or for both.

A rectangle selection event control function is called whenever rectangle selection is enabled and a rectangular selection area has been created by clicking and dragging the mouse (to indicate two diagonally opposite corners) on an SVG map. The function is called immediately after the selection of the rectangle is completed and the mouse key is released. The function name is specified with the onrectselect attribute in the map request (see Section 3.2.1.1).

A polygon selection event control function is called whenever polygon selection is enabled and a polygon-shaped selection area has been created by clicking and dragging the mouse at least four times on an SVG map, with the last click on the same point as the first click to complete the polygon. The function is called immediately after the selection of the polygon is completed. The function name is specified with the onpolyselect attribute in the map request (see Section 3.2.1.1).

B.4 Other Control Functions

MapViewer provides other useful functions for working with SVG maps. These functions include the following:

  • getUserCoordinate(x,y) converts the screen coordinates into the original map data coordinates. This function returns the converted result in an array. The first element of the array is the converted X coordinate, and the second element of the array is the converted Y coordinate.

  • getScreenCoordinate(x,y) converts the original map data coordinates into the screen coordinates. This function returns the converted result in an array. The first element of the array is the converted X coordinate, and the second element of the array is the converted Y coordinate.

PKM,nLiLPKv\EOEBPS/vis_concepts.htm MapViewer Concepts

2 MapViewer Concepts

This chapter explains concepts that you should be familiar with before using MapViewer.

Some fundamental concepts include style, theme, base map, mapping metadata, and map.

  • Styles define rendering properties for features that are associated with styles. For example, a text style determines how such a feature is labeled on a map, while a line style determines the rendition of a linear feature such as a road.

  • A theme is a collection of features (entities with spatial and nonspatial attributes) that are associated with styles through the use of styling rules.

  • A base map consists of one or more themes.

  • Mapping metadata consists of a repository of styles, themes, and base maps stored in a database.

  • A map is one of the components that MapViewer creates in response to a map request. The map can be an image file, the object representation of an image file, or a URL referring to an image file.

This chapter contains the following major sections:

2.1 Overview of MapViewer

When an application uses MapViewer, it applies specific styles (such as colors and patterns) to specific themes (that is, collections of spatial features, such as cities, rivers, and highways) to render a map (such as a GIF image for display on a Web page). For example, the application might display a map in which state parks appear in green and restaurants are marked by red stars. A map typically has several themes representing political or physical entities, or both. For example, a map might show national and state boundaries, cities, mountain ranges, rivers, and historic sites. When the map is rendered, each theme represents a layer in the complete image.

MapViewer lets you define styles, themes, and base maps, including the rules for applying one or more styles to each theme. These styles, themes, base maps, and associated rules are stored in the database in map definition tables under the MDSYS schema, and they are visible to you through metadata views. All styles in a database instance are shared by all users. The mapping metadata (the set of styles, themes, and base maps) that you can access is determined by the MapViewer metadata views described in Section 2.9 (for example, USER_SDO_STYLES, USER_SDO_THEMES, and USER_SDO_MAPS). The set of map definition objects that a given user can access is sometimes called that user's mapping profile. You can manage styles, themes, and base maps with the standalone Map Builder tool, described in Chapter 9.

2.2 Styles

A style is a visual attribute that can be used to represent a spatial feature. The basic map symbols and labels for representing point, line, and area features are defined and stored as individual styles. Each style has a unique name and defines one or more graphical elements in an XML syntax.

Each style is of one of the following types:

  • Color: a color for the fill or the stroke (border), or both.

  • Marker: a shape with a specified fill and stroke color, or an image. Markers are often icons for representing point features, such as airports, ski resorts, and historical attractions.

    When a marker style is specified for a line feature, the rendering engine selects a suitable point on the line and applies the marker style (for example, a shield marker for a U.S. interstate highway) to that point.

  • Line: a line style (width, color, end style, join style) and optionally a center line, edges, and hash mark. Lines are often used for linear features such as highways, rivers, pipelines, and electrical transmission lines. You can also use cased line styles, which are useful for drawing streets and highways.

  • Area: a color or texture, and optionally a stroke color. Areas are often used for polygonal features such as counties and census tracts.

  • Text: a font specification (size and family) and optionally highlighting (bold, italic) and a foreground color. Text is often used for annotation and labeling (such as names of cities and rivers).

  • Advanced: a composite used primarily for thematic mapping, which is described in Section 2.3.10. The key advanced style is BucketStyle, which defines the relationship between a set of simple rendering (and optionally labeling) styles and a set of buckets. For each feature to be plotted, a designated value or set of values from that feature is used to determine which bucket the feature falls into, and then the style associated with that bucket is used to plot the feature. Bucket styles are described in Section A.6.1.

    Two special types of bucket styles are also provided: color scheme (described in Section A.6.2) and variable (graduated) marker (described in Section A.6.3). Other advanced styles are dot density (described in Section A.6.4), bar chart (described in Section A.6.5), collection (described in Section A.6.6), variable pie chart (described in Section A.6.7), and heat map (described in Section A.6.8).

Table 2-1 lists the applicable geometry types for each type of style.

Table 2-1 Style Types and Applicable Geometry Types

Style TypeApplicable Geometry Types

Color

(any type)

Marker

point, line

Line

line

Area

polygon

Text

(any type)

Advanced

(any type)


All styles for a database user are stored in that user's USER_SDO_STYLES view, which is described in Section 2.9 and Section 2.9.3.

You can also create dynamically defined styles (that is, temporary styles) of any style type as part of a map request. The way to create them depends on which API you are using:

  • With the native XML API, define the style using its XML elements within the <map_request> element.

  • With the JavaBean API, add a dynamically defined style to a map request, as explained in Section 4.3.4.

  • With the Oracle Maps JavaScript API, use classes and methods to create all types of styles dynamically.

In each case, what you are actually creating is the XML definition of the styles; it is the MapViewer server that actually creates such dynamically defined styles from the definitions when it processes the map request, and it discards the dynamically created styles when the request is completed.

For more detailed information about the types of styles, including information about the XML format for defining each type, see Appendix A.

2.2.1 Scaling the Size of a Style (Scalable Styles)

If you specify a unit other than the default of pixels (px) in a style definition, the style becomes scalable: that is, the size of features associated with the style is scaled as users zoom in or out on a map. For example, if you specify a marker style's width and height as 100m, the marker is displayed as a square 100 meters on each side according to the map scale at the current zoom level.

The following are style types and the attributes that can have an associated size unit:

  • Marker styles: marker size (height and width) and text attributes (font size, label offsets)

  • Line styles: overall line width, center line width and dash pattern, wing line width and dash pattern, hash mark, and marker pattern (size, offset, interval)

  • Text styles: font size, halo width

  • Bar chart styles: bar width and height

  • Dot density styles: dot width and height

  • Pie chart styles: pit radius

Example 2-1 defines a star-shaped marker within a bounding box 15 kilometers (15.0km) on each size. This definition might be useful for identifying capital cities of states on a map showing all or a large part of a country; however, it would not be useful for a display zoomed in on a specific city and its local surrounding area.

Example 2-1 Scalable Marker Style

<style name="M.STAR_CAPITAL_CITY">
  <svg width="1in" height="1in">
    <desc/>
    <g class="marker" style="stroke:#000000;fill:#FF0000;fill-opacity:0;width:15.0km;height:15.0km;font-family:Dialog;font-size:12;font-fill:#FF0000">
        <polyline points="138.0,123.0,161.0,198.0,100.0,152.0,38.0,198.0,61.0,123.0,0.0,76.0,76.0,76.0,100.0,0.0,123.0,76.0,199.0,76.0"/>
    </g>
  </svg>
</style>

Example 2-2 defines a line style with an overall line width of 10 meters (10.0m) and a border line width of 1 meter (1.0m). This definition might be useful for identifying capital cities of primary highways.

Example 2-2 Scalable Line Style

<style name="L.PRIMARY_HIGHWAY">
  <svg width="1in" height="1in">
    <desc></desc>
    <g class="line" cased="true" style="fill:#33a9ff;stroke-width:10.0m">
      <line class="parallel" style="fill:#aa55cc;stroke-width:1.0m"/>
    </g>
  </svg>
</style>

When MapViewer renders or labels styles that have size units other than pixel, it first transforms the size units into screen pixels based on the current map area and display area, and it then renders the or labels the style. The size of a scalable style changes as users zoom in or out on a map. If zooming out results in an overall style size less than or equal to zero, the style is not rendered or labeled.

Size units can be used only with data associated with a known spatial reference system (SRS). If the data has no SRS or an unknown SRS, pixels are used for all size values. Note also that pixel values are used instead of any specified size unit in legends and in previews rendered by the Map Builder utility. (Legends are explained in Section 2.4.2.)

Scalable styles work with MapViewer Release 11g (11.1.1) or later; they cannot be used with earlier releases of MapViewer.

2.2.2 Specifying a Label Style for a Bucket

For collection-based bucket styles and individual range-based bucket styles (described in Section A.6.1.1 and Section A.6.1.2, respectively), you can specify a labeling style by using the label_style attribute in each bucket element. Example 2-3 creates an advanced style named V.RB1 in which each bucket is assigned a text label style (using the label_style attribute), with some styles being used for several buckets.

Example 2-3 Advanced Style with Text Label Style for Each Bucket

<?xml version="1.0" ?>
<AdvancedStyle>
  <BucketStyle>
     <Buckets>
      <RangedBucket seq="0"  label="10k or less"  high="10000" 
        style="c.rb13_1"  label_style="T.AIRPORT NAME"/>
      <RangedBucket seq="1"  label="10k - 20k" low="10000" high="20000" 
        style="c.rb13_2"  label_style="T.CITY NAME"/>
      <RangedBucket seq="2"  label="20k - 30k" low="20000" high="30000" 
        style="c.rb13_3"  label_style="T.CITY NAME"/>
      <RangedBucket seq="4"  label="30k - 40k" low="30000" high="40000" 
        style="c.rb13_4"  label_style="T.CITY NAME"/>
      <RangedBucket seq="5"  label="40k - 50k" low="40000" high="50000" 
        style="c.rb13_5"  label_style="T.CITY NAME"/>
      <RangedBucket seq="6"  label="50k - 75k" low="50000" high="75000" 
        style="c.rb13_6"  label_style="T.ROAD NAME"/>
      <RangedBucket seq="7"  label="75k - 100k" low="75000" high="100000" 
        style="c.rb13_7"  label_style="T.PARK NAME"/>
      <RangedBucket seq="8"  label="100k - 125k" low="100000" high="125000" 
        style="c.rb13_8"  label_style="T.RED STREET"/>
      <RangedBucket seq="9"  label="125k - 250k" low="125000" high="250000" 
        style="c.rb13_9"  label_style="T.ROAD NAME"/>
      <RangedBucket seq="10"  label="250k - 450k" low="250000" high="450000" 
        style="c.rb13_10"  label_style="T.ROAD NAME"/>
      <RangedBucket seq="11"  label="450k - 650k" low="450000" high="650000" 
        style="c.rb13_11"  label_style="T.ROAD NAME"/>
      <RangedBucket seq="12"  label="650k up"   low="650000" style="c.rb13_13"/>
      </Buckets>
  </BucketStyle>
</AdvancedStyle>

For individual range-based buckets, the lower-bound value is inclusive, while the upper-bound value is exclusive (except for the range that has values greater than any value in the other ranges; its upper-bound value is inclusive). No range is allowed to have a range of values that overlaps values in other ranges.

If the V.RB1 style in Example 2-3 is used in a map request, it displays a map that might look like the display in Figure 2-1, where the county names are shown with labels that reflect various text styles (in this case depending on the county's total population).

Figure 2-1 Varying Label Styles for Different Buckets

Description of Figure 2-1 follows

In Example 2-3, all buckets except the last one specify a label style. For any features that fall into a bucket that has no specified label style, the label style (if any) applied to the feature depends on the following:

  • If the <label> element of the theme's styling rules specifies a label style other than the advanced style itself, the specified label style is used to label the feature. In the following example, because the <label> element's style specification (T.STATE_NAME) is different from the <features> element's style specification (V.RB1), features that fall into a bucket with no specified label style are labeled using the T.STATE_NAME style:

    <?xml version="1.0" standalone="yes"?>
    <styling_rules>
      <rule column="TOTPOP">
        <features style="V.RB1">
        </features>
        <label column="county" style="T.STATE NAME">
            1
        </label>
      </rule>
    </styling_rules>
    
  • If the <label> element of the theme's styling rules specifies the advanced style as its label style, the feature is not labeled. (This is why some counties in Figure 2-1 are not labeled.) In the following example, because the <features> and <label> elements both specify the advanced style V.RB1, features that fall into a bucket with no specified label style are not labeled:

    <?xml version="1.0" standalone="yes"?>
    <styling_rules>
      <rule column="TOTPOP">
        <features style="V.RB1">
        </features>
        <label column="county" style="V.RB1">
            1
        </label>
      </rule>
    </styling_rules>
    

2.2.3 Orienting Text Labels and Markers

You can control the orientation of text labels and markers on a map by using oriented points. The oriented point is a special type of point geometry introduced in Oracle Spatial for Oracle Database 10g Release 1 (10.1). In an oriented point, the coordinates represent both the location of the point and a virtual end point, to indicate an orientation vector. The text is aligned or the marker symbol is rotated according to the orientation vector, which is explained in Section 3.2.5 and illustrated in Figure 3-3 in that section. For more information about oriented points, see Oracle Spatial Developer's Guide.

2.2.3.1 Controlling Text Style Orientation

To orient the text label of a point in the direction of an orientation vector, you can specify the point as an Oracle Spatial oriented point in the map request. When MapViewer labels an oriented point, it automatically centers the text label on the point position, and aligns the label so that it points in the direction of the orientation vector.

For each feature to be so labeled, you must specify its location as an oriented point. You can group these oriented points in a single table and create a spatial index on the column containing the point geometries. You can then create a theme based on the table, specifying a desired text style as the labeling, and specifying transparent color style as the rendering style so that the points themselves are not displayed on the map.

Example 2-4 is a map request that labels a single oriented point with coordinates (12,14, 0.3,0.2), where (12,14) represents the X and Y coordinates of the point and (0.3,0.2) represents the orientation vector. It renders the point using a dynamically defined transparent color style (named transparent_color) to ensure that the text is displayed but the underlying point is not displayed.

Example 2-4 Labeling an Oriented Point

<map_request
  title="Labeling Oriented Points"
  datasource="my_datasource"   width="400"  height="300"
  antialiase="true"
  format="PNG_STREAM">
 
  <themes>
    <theme name="theme1">
       <jdbc_query
         spatial_column="geom"  jdbc_srid="8265"
         render_style="transparent_color" 
         label_column="label" label_style="t.street name"
         datasource="tilsmenv">
         SELECT SDO_GEOMETRY(2001, 8265, NULL, 
                      SDO_ELEM_INFO_ARRAY(1, 1, 1, 3, 1, 0), 
                      SDO_ORDINATE_ARRAY(12, 14, .3, .2))
         geom, 'Oriented Point' label FROM dual
       </jdbc_query>
     </theme>
  </themes>
 
  <styles>
    <style name="transparent_color">
      <svg width="1in" height="1in">
        <g class="color" style="stroke:#ff0000;stroke-opacity:0">
          <rect width="50" height="50"/>
        </g>
      </svg>
    </style>
  </styles>
</map_request>

Figure 2-2 shows part of the map generated by the request in Example 2-4. (The label is the phrase Oriented Point.)

Figure 2-2 Map Display of the Label for an Oriented Point

Description of Figure 2-2 follows

2.2.3.2 Controlling Marker Orientation

When a marker style is applied to an oriented point, MapViewer automatically rotates the marker style so that it points to the orientation vector. Any necessary rotation of the marker style is around the center of the marker.

Figure 2-3 shows how you can use an oriented point to control the orientation of marker styles. In this figure, the original marker style is first shown without any rotation. However, when the marker is applied to the same oriented point shown in Example 2-4 in Section 2.2.3.1, the marker style is rotated accordingly (in this case about 34 degrees counterclockwise) to reflect the orientation vector.

Figure 2-3 Oriented Marker

Description of Figure 2-3 follows

2.2.4 Making a Text Style Sticky

You can specify that a text style is "sticky," which means that any feature that uses it as a label style will always have its text label drawn on a map. Example 2-5 shows an XML definition of a style with the sticky attribute set to true.

Example 2-5 Text Style with Sticky Attribute

<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<desc></desc>
 <g class="text" sticky="true" style = "font-style:plain;font-family:Serif;font-size:11pt;font-weight:bold;fill:#000000">
    Hello World!
</g>
</svg>

2.2.5 Getting a Sample Image of Any Style

To get a sample image for any pre-defined style stored in a database, you can issue a simple HTTP request to the MapViewer server. This request can specify the size of the sample image, the background color, and the format of the returned image. Such requests are useful if you want to display a visual list of styles on a Web page, to build a custom map legend, or just to see how various styles will appear.

The HTTP request has the following parameters, all of which are optional except for sty:

  • sty (required) specifies the name of the style.

  • ds specifies the data source where the style can be accessed. By default, the default MapViewer data source is used.

  • w specifies the width of the sample image in pixels. The default value is 20.

  • h specifies the height of the sample image in pixels. The default value is 20.

  • f specifies the format of the sample image. Possible values are png for direct PNG image stream, png_url for the URL of a PNG image, gif for direct GIF image stream, or gif_url for the URL of a GIF image. The default value is png, which means the MapViewer server will directly stream the generated PNG image data back to the client without first saving it to the server disk.

  • bg specifies the background color of the sample image. The format must be a hexadecimal string in the form of 0xrrggbb, such as 0x808080 for a gray color. The default value is 0xffffff (white).

    For a transparent background, specify bg as an extended hexadecimal string to include the alpha values, in the format of 0xaarrggbb. For example, 0x00ffffff will make the style image's background completely transparent, while 0x55ffffff is a white background with a transparency value of 0x55 (decimal value 80). The alpha value can range from 0x00 (completely transparent) to 0xff (completely opaque).

  • aa specifies whether the sample image should be rendered in antialiasing mode. The default value is the string true. Specify the string false if you do not want to use antialiasing.

The following example generates an antialiased PNG image with a gray background with the default size of 20x20 pixels, displaying the marker style named M.STAR from the MapViewer default data source:

http://www.mycorp.com/mapviewer/omserver?sty=m.star&bg=808080

The preceding request generates a display similar to that in Figure 2-4.

Figure 2-4 Sample Image of a Specified Marker Style

Description of Figure 2-4 follows

The following example generates an antialiased GIF image with the default white background, a width of 60 pixels, and a height of 25 pixels, displaying the line style named L.PH from the MapViewer data source named mvdemo:

http://www.mycorp.com/mapviewer/omserver?sty=l.ph&ds=mvdemo&f=gif&w=60&h=25&aa=true

The preceding request generates a display similar to that in Figure 2-5.

Figure 2-5 Sample Image of a Specified Line Style

Description of Figure 2-5 follows

2.3 Themes

Theme is perhaps the most important concept in MapViewer. A theme is a visual representation of a particular data layer. Conceptually, a theme is a collection of geographic features that share similar attributes, plus the rendering and labeling rules that tell MapViewer what styles to use to render and label the features. To be more exact, when you define a theme, you are actually providing MapViewer with the following information: where and how to get the data, and how to render and label the data.

Depending on how a theme is created, it can also be categorized as either a predefined theme or a dynamic (JDBC) theme. For a predefined theme, the theme's definition is created in the standalone Map Builder tool and stored in the database. For a dynamic theme, the theme's definition (XML) is created in real time by an application. Dynamic themes typically employee a custom SQL query constructed by the application to get its data.

Typically, the data for a theme comes from a spatially enabled table, that is, a database table or view with a column of type SDO_GEOMETRY. For example, a theme named US_STATES might be based on a STATES table that has a column named GEOMETRY, plus any other nonspatial attribute columns. This type of theme is often called a geometry theme. Besides geometric data, other types of database-managed geographic data can be associated with corresponding types of themes; for example:

  • Georeferenced images stored in BLOBs (image themes)

  • Oracle Spatial GeoRaster data (GeoRaster themes)

  • Oracle Spatial network data model (network themes)

  • Oracle Spatial topology data model (topology themes)

  • Cartographic annotation text (annotation themes)

MapViewer themes can be used to render not only geographic data stored in a database, but also data originating from other sources, such as Web services (WFS and WMS) or the local file system (through the custom spatial data provider interface).

Regardless of what type of data is associated with a theme (except for WMS themes, which represent externally rendered map layers), the MapViewer styling rules still need to be defined for each theme, and the styles referenced by the styling rules must exist and be stored in the database as part of the mapping metadata.

2.3.1 Predefined Themes

A predefined theme is a theme whose definition is stored in a user's database schema. All predefined themes for a database user are stored in that user's USER_SDO_THEMES view (described in Section 2.9, especially Section 2.9.2). When you include a predefined theme in a map request, you need to specify only the theme name. MapViewer automatically finds the theme's definition, constructs a query based on it, retrieves the relevant spatial and attribute data, and renders the data according to the styling rules for the theme.

Each predefined theme must have an associated base table or view. If you base a theme on a view, you must insert a row in the view owner's USER_SDO_GEOM_METADATA view (described in Oracle Spatial Developer's Guide) specifying the view and its spatial column. If the view is a join view (that is, if it is based on multiple tables), you must specify the key_column attribute (described in Section A.7) in the theme's styling rules. The reason for this requirement is that MapViewer by default caches geometries for a predefined theme based on the rowid in the base table; however, for a join view there is no ROWID pseudocolumn, so you must specify a key column.

For most types of predefined themes (but not WMS themes), you can use the Map Builder tool to create and preview themes. For information about the Map Builder tool, see Chapter 9.

2.3.1.1 Styling Rules in Predefined Spatial Geometry Themes

Each predefined theme is always associated with one or more styling rules, specifications in XML format that control aspects of how the theme is displayed. This section describes styling rules for predefined spatial geometry themes, such as the airport theme shown in Example 2-6. Other types of themes, such as image, GeoRaster, network, and topology themes, have their own distinct styling rules requirements, and these are discussed in sections that explain these themes. However, the styling rules for all types of themes are grouped under the <styling_rules> element in an XML document, which is stored in the STYLING_RULES column for each predefined theme in the USER_SDO_THEMES view. (The <styling_rules> DTD is described in Section A.7.)


Note:

The following naming conventions are used for prefixes in style names in the examples in this chapter: v. indicates variable (advanced style), m. indicates marker, c. indicates color, l. indicates line, and t. indicates text. (If the style is not under the current user's schema, you must specify the owner's schema name followed by a colon. For example: mdsys:c.red.)

In the content (character data) of an XML document, &lt; and &gt; must be used to represent < and >, respectively. Otherwise, < or >, such as in WHERE CATEGORY > 'B', will be interpreted by the XML parser as part of an XML tag.


Example 2-6 XML Definition of Styling Rules for an Airport Theme

<?xml version="1.0" standalone="yes"?>
<styling_rules>
  <rule>
    <features style="c.black gray">
    runway_number &gt; 1
    </features>
    <label column="name" style="t.airport name">
      1
    </label>
  </rule>
  <rule>
    <features style="m.airplane">
    runway_number = 1
    </features>
  </rule>
</styling_rules>

Each styling rule has a required <features> element and an optional <label> element. The <features> element specifies which row or rows (features) in the table or view will be selected based on the user-defined predicate and on the style to be used for the selected features. You can specify any valid SQL predicate as the value of this element. The <label> element specifies whether or not to annotate the selected features, and if so, which column in the table or view to use for text labels.

In Example 2-6, there are two styling rules associated with the Airport theme:

  • The first rule specifies that only those rows that satisfy the condition runway_number &gt; 1 (that is, runway number greater than 1) will be selected, and these will be rendered using the style named c.black gray. If no value is supplied, no WHERE clause condition is applied. For example, assume that the definition had been the following (that is, omitting the runway_number &gt; 1 condition):

    <?xml version="1.0" standalone="yes"?>
    <styling_rules>
      <rule>
        <features style="c.black gray"/>
        <label column="name" style="t.airport name">
          1
        </label>
      </rule>
    </styling_rules>
    

    In this case, all airport features would be selected and would be rendered using the color style named c.black gray.

    The first rule also has a <label> element, which specifies that the NAME column in the table or view will be used to annotate each airport, using the text style t.airport name. The value of the <label> element, which can be any SQL expression that evaluates to a numeric value, is used to determine whether or not a feature will be annotated. If the numeric value is greater than zero, the feature will be annotated. In this case, because the value is the constant 1, all features specified by the <features> element will be annotated, using the values in the NAME column. If the value is less than or equal to zero for a feature, that feature will not be annotated.

  • The second rule, which applies to those airports with only one runway, does not have a <label> element, thus preventing all such airports from being annotated. In addition, the features that satisfy the second rule will be rendered using a different style (m.airplane), as specified in its <features> element.

You can think of each styling rule as a filter into the base table or view of the theme, because it selects only a subset of the rows and applies the rendering and labeling styles of that rule. In fact, MapViewer formulates a complete SQL query for each styling rule. This query string follows a fixed format, as described in Section 2.3.1.2.

2.3.1.2 How MapViewer Formulates a SQL Query for a Styling Rule

To see how MapViewer formulates a SQL query for a styling rule, consider the first styling rule from the airport theme example (Example 2-6 in Section 2.3.1.1):

<styling_rules>
  <rule>
    <features style="c.black gray">
    runway_number &gt; 1
    </features>
    <label column="name" style="t.airport name">
      1
    </label>
  </rule>
  . . .
</styling_rules>

When MapViewer processes this theme, it formulates a query string for this styling rule that looks like this:

SELECT ROWID, GEOMETRY, 'C.BLACK GRAY', NAME, 'T.AIRPORT NAME', 1, 'rule#0' 
  FROM AIRPORT_POINT 
  WHERE MDSYS.SDO_FILTER(GEOMETRY, 
    MDSYS.SDO_GEOMETRY(2003, 8265, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
    MDSYS.SDO_ORDINATE_ARRAY(:mvqboxxl, :mvqboxyl, :mvqboxxh, :mvqboxyh)), 
    'querytype=WINDOW') = 'TRUE'

In the preceding query string:

  • The base table name of the theme, AIRPORT_POINT, appears in the FROM clause

  • The SELECT list includes ROWID as the first column. ROWID is the default key_column attribute of a predefined theme.

  • The next column in the SELECT list is GEOMETRY. This is the geometry column of this theme.

  • The next column in the SELECT list is the literal string 'C.BLACK GRAY', which is the rendering style name for this rule.

  • The next column in the SELECT list is the column NAME, which will provide the label text. It is specified in the <label> element of this styling rule.

  • The next column in the SELECT list is the literal string 'T.AIRPORT NAME', which is the labeling style name specified in the <label> element.

  • The next column in the SELECT list is the literal value 1, which is the value of the <label> element itself.

  • The next column in the SELECT list is the literal string 'rule#0'. This is used internally by MapViewer only.

  • The large WHERE clause is essentially an Oracle Spatial filtering operator, SDO_FILTER. This WHERE clause is automatically added by MapViewer (and is not something you need to specify when defining a theme). It ensures that only those geographic features that are in contact with the current map viewing window will be fetched from the base table. The four binding variables, mvqboxxl, mvqboxyl, mvqboxxh and mvqboxyh, will be automatically filled in with the coordinates for the current map viewing window.

MapViewer always uses the preceding format when constructing SQL queries for the styling rules of a predefined geometry theme's styling rules. It uses different formats for the queries for other types of themes, such as a topology or GeoRaster theme. The formats for these other queries are not described here; however, if you are interested, you can set the logging level of your MapViewer instance to FINEST, submit a map request containing a particular type of theme, and check the MapViewer log file to see the exact query that MapViewer constructs.

Each row (or feature) in the query's result set now contains all the information MapViewer needs: the spatial data, the rendering and labeling style names, the label text, and the labeling conditions. MapViewer then constructs an in-memory feature object for each row and sends them to the rendering pipeline to be displayed on the map.

If two or more styling rules are specified for a theme, a UNION ALL operation is performed on the SQL queries for the rules (from first to last) to fetch the qualified features from the table or view.

If an advanced style is specified in a rule, the SELECT list of the query for that rule will include the additional attribute column or columns that are required by the advanced style.

2.3.1.3 Styling Rules with Binding Parameters

As explained in Section 2.3.1.2, the <features> element of a styling rule can define a query condition to select features from the base table or view. This query condition typically contains hard-coded SQL expressions, such as runway_num > 1 in the airport theme. However, you can instead include binding variables in the query predicate. Such a theme is often called a templated theme, because it is essentially defining a template for how to display certain features, and the exact set of features is determined at run time by providing a binding value to the query predicate.

The concept of templated theme allows you to define a single theme and to have the binding values change between map requests. For example, consider the following styling rule:

<?xml version="1.0" standalone="yes"?>
<styling_rules>
  <rule>
    <features style="C.RED"> (state_abrv=:1) </features>
    <label column="STATE" style="T.STATE NAME"> 1 </label>
  </rule>
</styling_rules>

The preceding styling rule defines a <features> element with a query condition based on the value of the state_abrv attribute, which the application must supply. In MapViewer requests, the binding parameter must be defined on the theme section, and each binding parameter is defined by a value and by a SQL type. In the following theme definition on a map request, the state abbreviation value is ME and the variable SQL type is String. The value ME will be used with the predefined theme styling rule.

<theme name="THEME_US_DYN_STATES" >
   <binding_parameters>
      <parameter value="ME" type="String"/>
   </binding_parameters>
</theme>

2.3.1.4 Applying Multiple Rendering Styles in a Single Styling Rule

The <feature> element of a styling rule allows you to specify only one rendering style using the style attribute. If you want to apply multiple rendering styles to a feature without using multiple themes, you cannot specify multiple styling rules, because each rule selects a different subset of features. To apply multiple rendering styles to a feature without using multiple themes, you must use the <rendering> element instead of the style attribute of the <features> element.

The <rendering> element has the format shown in the following example:

<rendering>
 <style name="V.POIVMK" value_columns="FEATURE_CODE">
  <substyle name="V.POIVBKT" value_columns="POINT_ID" changes="FILL_COLOR"/>
 </style>
</rendering>

In the <rendering> element, the <style> element specifies the name of the style to use when rendering features, and one or more value columns (comma-delimited) for use with advanced styles. In the preceding example, the style name is V.POIMVK and the value column is FEATURE_CODE.

In the <style> element, the <substyle> element enables rendering of a feature using a combination of two attribute values.,such as defining the feature shape by the <style> element and the feature color by the <substyle> element. This is useful for rendering point features once but based on two attribute values. You can specify one or more value columns (comma-delimited), and the change to be applied (only FILL_COLOR is currently supported).

You can specify multiple <style> elements with a <rendering> element, to achieve the following goals:

  • To create an advanced style in which a base advanced style, associated with some attributes (columns), can have its rendering affected by some other attributes through the use of a substyle. For example, an advanced style can display markers of different sized based on one value column, while using a secondary color style to change the fill color of those markers based on another value column.

  • To use multiple styles to render a feature (achieving the effect of stacked styles).

Example 2-7 shows a predefined theme styling rule that uses the <rendering> element. The <features> element is part of the rules and must be define, because it also specified the query condition, but no style attribute is specified. The <rendering> element defines how to render the features.


Note:

The use of styling rules with the <rendering> element, as shown in Example 2-7, is not compatible with MapViewer release 10.1.3.1 and earlier releases.

Example 2-7 Styling Rules Using the <rendering> Element

<?xml version="1.0" standalone="yes"?>
<styling_rules>
 <rule>
   <features> </features>
   <label column="NAME" style="T.STREET2"> 1 </label>
   <rendering>
      <style name="V.POIVMK" value_columns="FEATURE_CODE">
        <substyle name="V.POIVBKT" value_columns="POINT_ID" changes="FILL_COLOR"/>
      </style>
   </rendering>
 </rule>
</styling_rules>

See also Section 3.1.12, which contains an example that uses the <rendering> element.

The <rendering> element can also be used with dynamic themes, geometry themes, and topology themes.

2.3.1.5 Caching of Predefined Themes

By default, MapViewer automatically caches the spatial data for a predefined theme when it is fetched from the database for processing by the MapViewer rendering engine. By contrast, data for dynamic (JDBC) themes is never cached in MapViewer. If you do not want any data for a predefined theme to be cached (such as for a theme whose underlying base table is constantly being updated), you can set the caching attribute to NONE in the <styling_rules> element for the theme. (The <styling_rules> element, including the caching attribute, is described in Section A.7.)

For frequently used themes whose base data is static or read-only, specify caching ALL for the best performance. This causes MapViewer, when it first accesses the theme definition, to fetch all the features (including spatial data, attribute data, and styling information associated with them) and cache them in the MapViewer memory, creating an in-memory R-tree for the theme's spatial data. All subsequent requests requiring that theme occur locally instead of going to the database.

If the caching attribute value is NORMAL (the default), each time a map involving that theme is requested, MapViewer queries the database to get the spatial data and any associated attribute data. However, if any of the spatial geometry data, as referenced by rowid or a user-specified key column, has already been cached, the unpickling process (the conversion from the raw database geometry format to a Java geometry object) is skipped. Still, if memory is not an issue and if a frequently used theme can completely fit in the cache, you should specify caching ALL, to eliminate virtually all database access for that theme after the initial loading.

Because the MapViewer spatial data cache is global, all predefined themes that are accessed by MapViewer compete for a global fixed-sized memory cache. The cache resides completely in memory, and you can specify the maximum size of the cache as explained in Section 1.5.2.6. When the cache limit is reached, older cached data is removed from the cache to make room for the most recently accessed data, except that data for themes specified with caching ALL is not removed from the cache, and MapViewer does not requery the database for these themes.

Caching is currently disabled for predefined annotation and custom geometry themes. For custom geometry themes, you can implement a caching mechanism in your provider implementation. However, for each request, a new instance of your provider is created; and if you implement a local caching mechanism, it will be lost.

2.3.1.6 Feature Labels and Internationalization

MapViewer includes support for translated theme labels. Typically with a predefined MapViewer theme, you can specify a label column that will provide all the text strings for labeling each feature of the theme. These text strings are string values stored in the database table column, in a specific language (such as English). However, you can also supply different translations of these stored string values by using a resource bundle. When such translated text strings are available, you can instruct MapViewer to label the features of a theme using a specific language or locale.


Note:

Only predefined geometry themes support resource bundles at this time.

The steps for supplying translations and instructing MapViewer to label a theme using a specific user language are as follows:

  1. Prepare the translations.

    A typical MapViewer predefined geometry theme gets all the underlying data from a table. You can specify one of the (string type) columns as the labeling column for this theme. This is called the label column. When a label column needs to be translated into different languages, you extract all the values from the table, and store them in a properties file, such as StringResources.properties. (Note that file name StringResources.properties assumes that the extracted texts are all in English. If they are not, then the properties file name needs to follow a convention where the language code, and an optional region or country code, is a suffix in the file name. For example, StringResources_fr.properties will contain French translations only, while StringResources_zh_CN.properties is for simplified Chinese.)

    A properties file is a plain text file that follows a very simple format. For example, a simple StringResources.properties file might contain the following:

    # This is the English version of the strings.
    California = California
    Nevada = Nevada
    Montana = Montana
    

    The first line is a comment, and starts with the # character. Each subsequent line contains one pair of key (first string) and value (second string). The keys come directly from the label column, whereas the values are corresponding translations. Because this particular file contains the default English text strings, the key and the value (translation) are the same in each case. Note that the keys should always be in English.

    From this default properties file, your translation specialists should create a set of property files, one file for each translation. Using the preceding simple example, the translated file for simplified Chinese (StringResources_zh_CN.properties) should look like the following, in which the value of each key has been replaced by the Chinese translation of the key, encoded as a Unicode string:

    # This is the Chinese version of the strings.
    California =  \u6CA1\u6709\u8981\u5448\u73B0\u7684\u4E3B\u9898\u3002
    Nevada = \u65E0\u6CD5\u52A0\u8F7D\u4E3B\u9898\u3002
    Montana = \u65E0\u6CD5\u52A0\u8F7D\u6837\u5F0F\u3002
    

    The default properties file, StringResouces.properties, plus all the language specific files that share the same file name (except for the language and region suffixes) collectively form what is called a resource bundle. In this case the resource bundle is named StringResources. You can name your resource bundles with any name you like, but different bundles (containing different set of keys) should always use different base names.

    For more information about Java resource bundles and properties files, see the Java language documentation.

  2. Supply the translated text strings as a Java Resource Bundle, which can be based on either Java resource classes or plain properties files.

    After all the label text strings have been translated, you must place all the files (the resource bundle) in the MapViewer CLASSPATH so that MapViewer can find these files at run time. Typically, you can use the MapViewer WEB-INF/classes folder: copy all the files including the base StringResources.properties and language-specific files (such as StringResources_fr.properties and StringResources_zh_CN.properties) into this folder.

    Note that if you place all the files of a resource bundle into a subfolder under WEB-INF/classes, then the name of the resource bundle (as known to MapViewer) will need to be prefixed with this subfolder name. This is similar to how one places a Java class in a directory structure that follows the package names. For example, if you put all the StringResources*.properties files in WEB-INF/classes/i18n/, then later when you register the resource bundle with MapViewer, the actual name of your resource bundle should be i18n.StringResources.

  3. Specify the name of the resource bundle in the theme definition by registering the resource bundle with MapViewer.

    For MapViewer to find your translated classes, you must specify the complete name of your resource bundle in the theme definition. The easiest way to do this is with the Map Builder utility, specifying the resource bundle name as the Translation Class in the Advanced Parameters pane of the theme editor. Figure 2-6 shows StringResources being specified for the Translation Class.

    Figure 2-6 Specifying a Resource Bundle for a Theme

    Description of Figure 2-6 follows

    As mentioned in the preceding step, if your resource bundle files are located in a subfolder of , then the subfolder name must the base name of your resource bundle, separated by a period, as if the resource bundle files were Java classes in a package.

  4. Specify a language parameter when requesting a map or theme.

    Specify the preferred language for each map request the Oracle Maps JavaScript API (described in Section 8.4) or the XML map request API (described in Chapter 3).

    • In JavaScript code, specify the label language code in the call to the MVThemeBasedFOI class. The following example causes the FOI theme to display its labels in simplified Chinese:

      themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','mvdemo.theme_demo_states');
      themebasedfoi.setLabelLanguageCode("zh-cn");
      themebasedfoi.enableLabels(true);
      

      With the setLabelLanguageCode(lang_code) method, you can specify a language code so that MapViewer labels the features using the text strings for the specified language, which must be a 2 letter language code (such as zh), followed optionally a hyphen (-) and a 2-letter country code (such as zh-cn). The language codes are defined by the ISO 639 standards and are listed at several Web sites, such as http://www.loc.gov/standards/iso639-2/php/English_list.php. If no translated text strings for the specified language code are found, the English text strings (or whatever the default strings are for the theme) will be used for labeling.

    • In an XML map request, specify the language in the lang attribute. The following example causes the labels to be displayed in simplified Chinese:

      <map_request title="Oracle LBS MAP" 
      basemap="demo_map" 
      datasource = "mvdemo" 
      width="640" height="480" 
      lang="zh-CN" 
      format="PNG_STREAM"> 
       
      <center size="5.15"> 
      <geoFeature> <geometricProperty typeName="center"> 
        <Point> <coordinates>-122.2615, 37.5266</coordinates> 
        </Point> </geometricProperty> 
      </geoFeature> 
      </center> 
      </map_request>
      

      Only language codes and country codes specified by the ISO 639 standards can be used as possible lang values. If an optional country code is used, it must be connected to the language code by a hyphen (-). Country codes and language codes are not case sensitive.

      If the lang attribute is specified as part of the XML map request, every theme rendered to the result map it checked to see if it has an associated resource bundle. If a theme does not have an associated resource bundle, or the translated text strings for the specified language cannot be found, the default values (those stored in the table column) are used.

      If the lang attribute is not specified as part of the XML map request, the default text string values (those stored in the table column) are always used, regardless of which locale in effect for MapViewer itself (or rather, its containing JVM).

2.3.2 JDBC Themes

A JDBC theme is a theme that is dynamically defined with a map request. JDBC themes are not stored permanently in the database, as is done with predefined themes.

For a JDBC theme, you must specify a valid SQL query that retrieves all the necessary spatial data (geometries or other types of data, such as image, GeoRaster, network, or topology). If attribute data is needed, such as for thematic mapping or spatial data analysis, the query must also select it. In other words, you must provide a correct and complete query for a JDBC theme. In addition to the query, you can also specify the rendering and labeling styles to be used for the theme.

For a JDBC theme based on spatial geometries, MapViewer processed the columns specified in the query according to the following rules:

  • The column of type SDO_GEOMETRY is treated as the spatial data column.

  • Any column whose name or alias matches that specified in the JDBC theme's label_column attribute is treated as the labeling column, whose values are used as text for labels.

  • Any other columns are treated as attribute data columns, which may or may not be used by MapViewer. For example, if the rendering style is an advanced style, any attribute columns are processed by that style in the order in which they appear in the SELECT list in the query. Thus, if you are performing thematic mapping and using an advanced style, you must specify all attribute columns that are needed for the thematic mapping, in addition to the geometry column and optional labeling column. (A labeling column can also be an attribute column, in which case you do not need to specify that column in the SELECT list.)

Example 2-8 is a map request that includes a JDBC theme.

Example 2-8 JDBC Theme in a Map Request

<?xml version="1.0" standalone="yes"?>
<map_request title="My MAP" datasource = "mvdemo">

  <themes>
    <theme name="jdbc_theme_1">
       <jdbc_query
            datasource="mvdemo"
            jdbc_srid="41052"
            spatial_column="geometry"
            render_style="C.RED">
          SELECT geometry from states where name='MA' 
       </jdbc_query>
     </theme>
  </themes>

</map_request> 

The full query that MapViewer executes for the JDBC theme in Example 2-8 is:

SELECT geometry FROM states WHERE name='MA';

For this request, MapViewer generates a map that contains only the selected geometry as a result of executing this JDBC theme's query. In a more typical case, however, the map request will need to use several JDBC themes to plot additional dynamic data on top of the base map. Furthermore, the map request may have a query window associated with it; that is, the user may want to see only a portion of the area included in the whole base map. In this case, the SQL queries in the JDBC themes will be subjected to a spatial window query, to eliminate any unwanted results.

For more information about JDBC themes, see the information about the <jdbc_query> element in Section 3.2.9.

2.3.2.1 Defining a Point JDBC Theme Based on Two Columns

If a database table uses two columns (such as longitude and latitude) to represent a point coordinate, you can define a JDBC theme based on the two columns to render points. The table does not need to have a spatial geometry column, but it can have one; however, if the theme request defines the point columns and also the geometry column, MapViewer will try to render the points using the two columns, not the geometry column.

Example 2-9 is a JDBC theme that renders points from two columns, named LONG_LOC and LAT_LOC, of a table named POI. The x_column and y_column attributes specify the columns containing the point coordinate values. In this example, the points are rendered using the C.RED style, and the table values from the NAME column are rendered using the T.POI_NAME style.

Example 2-9 JDBC Theme Based on Columns

<map_request>
  . . .
  <center>
   . . .
  </center>
  <themes>
    <theme name="theme1" >
       <jdbc_query
         datasource="mvdemo"
         jdbc_srid="8265"
         x_column="long_loc"
         y_column="lat_loc"
         render_style="C.RED"
         label_column="name"
         label_style="T.POI_NAME"
         >SELECT long_loc, lat_loc,name FROM poi
       </jdbc_query>
     </theme>
  </themes>
</map_request>

If the request specifies a valid query window (that is, not the full extent), a WHERE expression based on the size of the request window is automatically added to the query.

If the table has a geometry column, you can specify SQL code to use the geometry column as a filter. Example 2-10 is similar to Example 2-9, but it adds the use of the SDO_FILTER operator to specify a query window based on the geometry in the column named GEOMETRY. In Example 2-10, the question mark (?) characters indicate that the lower-left and upper-right coordinates of the query window rectangle are taken from values supplied at run time (not shown in this example).

Example 2-10 JDBC Theme Based on Columns, with Query Window

<map_request>
  . . .
  <center>
   . . .
  </center>
  <themes>
    <theme name="theme1" >
       <jdbc_query
         datasource="mvdemo"
         jdbc_srid="8265"
         x_column="long_loc"
         y_column="lat_loc"
         render_style="C.RED"
         label_column="name"
         label_style="T.POI_NAME"
         >SELECT long_loc, lat_loc FROM poi WHERE
           SDO_FILTER(geometry,MDSYS.SDO_GEOMETRY(2003, 8265, NULL, 
           MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
           MDSYS.SDO_ORDINATE_ARRAY(?,?,?,?)),
           'querytype=WINDOW') = 'TRUE'
       </jdbc_query>
     </theme>
  </themes>
</map_request>

2.3.2.2 Storing Complex JDBC Themes in the Database

Sometimes the SQL query for a JDBC theme is so complex that you may want to save the query. In such cases, you can define a predefined theme (whose definition is stored in the database's USER_SDO_THEMES view), and then include the full SQL query as the content of the <features> element in the styling rules for that theme.

The feature style specified in the <features> element is then used to render the geometries retrieved using the full query. The base table as defined for such a theme is ignored because the full SQL query already includes a FROM clause. The geometry column defined in the USER_SDO_THEMES view is still needed, and it must be the same as the geometry column selected in the user-supplied SQL query. If you have a <label> element for a styling rule, the label style specified is used to label the geometries, as long as the query selects a column that contains label text.

Example 2-11 is a sample <styling_rules> element of a predefined theme with a complex SQL query.

Example 2-11 Complex Query in a Predefined Theme

<?xml version="1.0" standalone="yes"?>
 <styling_rules>
   <rule>
     <features style="L.POOR_ROADS" asis="true">
        select sdo_lrs.clip_geom_segment(geometry,start_measure,end_measure)
              geometry 
        from (select /*+ no_merge use_hash(a b) */
                a.street_id, name, start_measure, end_measure, geometry
             from (select /*+ no_merge */ a.street_id, name, geometry
                   from philly_roads a
                   where sdo_filter(geometry,sdo_geometry(2002,41124,null,
                    sdo_elem_info_array(1,2,1),
                                       sdo_ordinate_array(?,?,?,?)),
                                 'querytype=window')='TRUE') a,
                   philly_road_conditions b
             where condition='POOR' and a.street_id = b.street_id)
     </features>
   </rule>
 </styling_rules>

Even though Example 2-11 is defined as a predefined theme, MapViewer still treats it as a JDBC theme at run time when a user requests a map that includes this theme. As with a normal JDBC theme, MapViewer by default imposes a window filtering process (if a query window was included in the map request) on top of the SQL query. To override this default behavior and have the supplied query string executed without any modification, specify asis="true" in the <features> element, as shown in Example 2-11. (For information about the asis attribute, see Section 3.2.9.)

2.3.3 Image Themes

An image theme is a special kind of MapViewer theme useful for visualizing geographically referenced imagery (raster) data, such as from remote sensing and aerial photography.

You can define an image theme dynamically or permanently (as a predefined theme) in the database. You can use image themes with vector (nonimage) themes in a map. Figure 2-7 shows a map in which an image theme (showing an aerial photograph of part of the city of Boston) is overlaid with themes showing several kinds of roadways in the city.

Figure 2-7 Image Theme and Other Themes Showing Boston Roadways

Description of Figure 2-7 follows

Before you can define an image theme, you must follow these rules in organizing your image data:

  • Store image data in its original format (such as JPEG) in a BLOB column in a database table, or as an Oracle Multimedia object (ORDSYS.ORDImage) that points to the original image file. For information about creating an ORDSYS.ORDImage object, see Oracle Multimedia User's Guide.

  • Add a geometry (SDO_GEOMETRY) column to the same table, and store the minimum bounding rectangle (MBR) for each image in that column.

    Each geometry in the MBR column contains the geographic bounds for an image, not its size in the pixel space. For example, if an orthophoto image is 2000 by 2000 pixels in size, but covers a ground rectangle starting at the corner of (936000, 248000) and having a width and height of 8000 meters, the MBR for the geometry column should be populated with (936000, 248000, 944000, 256000).

  • Insert an entry for the geometry column in the USER_SDO_GEOM_METADATA view.

  • Create a spatial index on the geometry column.

To predefine an image theme, follow the guidelines in Section 2.3.3.1. To define a dynamic image theme in a map request, follow the guidelines for defining a JDBC theme, as explained in Section 2.3.2 and Section 3.2.9, but note the following additional considerations with dynamic image themes:

  • You must provide the original image resolution information when defining an image theme.

  • MapViewer by default automatically scales the image data when generating a map with an image theme, so that it fits the current query window. To disable this automatic scaling, specify imagescaling="false" in the map request.

For any image theme definition, MapViewer supports only GIF, JPEG, PNG, and TIFF image formats. To enable MapViewer to visualize data in any other image format, you must implement a custom image renderer using the oracle.sdovis.CustomImageRenderer interface in Java, and then register your implementation class in the mapViewerConfig.xml file (to tell MapViewer which custom image renderer to use for image data in a specific format). For detailed information about implementing and registering a custom image renderer, see Appendix C.

For an example of a map request specifying an image theme, including an explanation of how MapViewer processes the request, see Example 3-6 in Section 3.1.6.

2.3.3.1 Creating Predefined Image Themes

To create a predefined image theme, you must store the definition of the image theme in the database by inserting a row into the USER_SDO_THEMES view (described in Section 2.9.2). Example 2-12 stores the definition of an image theme.

Example 2-12 Creating a Predefined Image Theme

INSERT INTO user_sdo_themes  VALUES (
   'IMAGE_LEVEL_2', 
   'Orthophotos at pyramid level 2', 
   'IMAGES',
   'IMAGE_MBR', 
   '<?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="image" image_column="image"
                   image_format="JPEG" image_resolution="2"
                   image_unit="M">
      <rule >
        <features style="C.RED"> plevel=2 </features>
      </rule>
    </styling_rules>' );

Example 2-12 creates an image theme named IMAGE_LEVEL_2. The base table (where all image data and associated MBRs are stored) is named IMAGES, and the minimum bounding rectangles (MBRs) for the images are stored in the column named IMAGE_MBR. In the STYLING_RULES column of the USER_SDO_THEMES view, an XML document with one <styling_rules> element is inserted.

The <styling_rules> element for an image theme has the following attributes:

  • theme_type must be image in order for this theme to be recognized as an image theme.

  • image_column specifies the column in the base table or view that stores the actual image data.

  • image_format is a string identifying the format of the image data. If you specify GIF or JPEG, MapViewer can always render the image data. If you specify any other value, such as ECW, you must have implemented a custom image renderer and registered it to MapViewer in order for the image to be rendered properly. For information about implementing a custom image renderer, see Appendix C.

  • image_resolution is an optional attribute that identifies the original image resolution (number of image_unit units for each pixel).

  • image_unit is an optional attribute, except it is required if you specify the image_resolution attribute. The image_unit attribute specifies the unit of the resolution, such as M for meter. The value for this attribute must be one of the values in the SDO_UNIT column of the MDSYS.SDO_DIST_UNITS table. In Example 2-12, the image resolution is 2 meters per pixel.

The DTD for the <styling_rules> element is presented in Section A.7.

2.3.4 GeoRaster Themes

A GeoRaster theme is a special kind of MapViewer theme useful for visualizing GeoRaster objects. GeoRaster is a feature of Oracle Spatial that lets you store, index, query, analyze, and deliver raster image and gridded data and its associated metadata. GeoRaster objects are defined using the SDO_GEORASTER data type. For detailed information about GeoRaster, see Oracle Spatial GeoRaster Developer's Guide.

Before you can use MapViewer with GeoRaster themes, you must ensure that the Java Advanced Imaging (JAI) library files (jai_core.jar and jai_codec.jar) are in the MapViewer library path, as explained in Section 1.4. You must also perform the following actions with the GeoRaster data:

  1. Georeference the GeoRaster data to establish the relationship between cell coordinates of the GeoRaster data and real-world ground coordinates (or some other local coordinates).

    If you are using Oracle Database Release 10.1, you must also set the spatial resolution values.

  2. Generate or define the spatial extent (footprint) associated with the raster data.

  3. Optionally, generate pyramid levels that represent the raster image or data at different sizes and degrees of resolution.

  4. Insert a row into the USER_SDO_GEOM_METADATA view that specifies the name of the GeoRaster table and the SPATIALEXTENT attribute of the GeoRaster column (that is, the column of type SDO_GEORASTER). The following example inserts a row for a table named GEOR_TABLE with a GeoRaster column named GEOR_COLUMN:

    INSERT INTO USER_SDO_GEOM_METADATA VALUES
    ( 'geor_table',
      'geor_column.spatialextent',
      SDO_DIM_ARRAY(
        SDO_DIM_ELEMENT('X', 496602.844, 695562.844, 0.000005),
        SDO_DIM_ELEMENT('Y',8788409.499,8973749.499, 0.000005)
      ),
      82279   -- SRID
    );
    
  5. Create a spatial index on the spatial extent of the GeoRaster table. The following example creates a spatial index named GEOR_IDX on the spatial extent of the table named GEOR_TABLE:

    CREATE INDEX geor_idx ON geor_table(geor_column.spatialextent)
      INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    

Example 2-16 in Section 2.3.4.1 prepares GeoRaster data for use and stores a GeoRaster theme in the database.

MapViewer supports two types of map requests with objects from a GeoRaster table:

  • A request containing a SQL statement to select one or more GeoRaster objects

  • A request specifying a single GeoRaster object by the combination of its raster data table name and its rasterID attribute value in the SDO_GEORASTER object. (The rasterID attribute value in the SDO_GEORASTER object is distinct from and unrelated to any primary key or ID column in the GeoRaster table.)

The following elements and attributes apply to the definition of a GeoRaster theme:

  • <jdbc_georaster_query> element: Specifies that this is a dynamically defined GeoRaster theme. For a theme that uses a SQL statement to select one or more GeoRaster objects, this element contains the SQL query statement (without a terminating semicolon). The complete DTD for this element is included in the map request DTD in Section 3.2.

  • georaster_table attribute: Specifies the name of the GeoRaster table.

  • georaster_column attribute: Specifies the name of the column of type SDO_GEORASTER in the GeoRaster table.

  • polygon_mask attribute (optional): Specifies a set of two-dimensional coordinates representing a polygon, to be used as a mask to make transparent the part of the GeoRaster image that is outside the polygon mask. The coordinates are defined as x1,y1,x2,y2, . . . . The mask coordinates must be in the data coordinate space.

  • raster_bands attribute (optional): Specifies the band composition to be assigned to the red, green, and blue channels. If you specify only one value, the resulting image uses one band (gray levels for monochromatic images). If you specify two values, they are used for the red and green channels, and the default blue band stored in the GeoRaster metadata is used for the blue channel. If you do not specify this attribute, MapViewer uses the default values stored in the GeoRaster metadata.

  • raster_pyramid attribute (optional): Specifies the pyramid level (level of resolution). If you do not specify this attribute, MapViewer calculates the best pyramid level for the current window query and device area.

  • raster_id attribute (only if the definition does not include a SQL statement): Specifies the rasterID attribute value in the SDO_GEORASTER object definition of the single GeoRaster object for the map request.

  • raster_table attribute (optional, and only if the definition does not include a SQL statement): Specifies the raster data table associated with the single GeoRaster object for the map request.

  • transparent_nodata attribute (optional): Specifies if any GeoRaster NODATA value is to be rendered as transparent. The default value is "false".

Example 2-13 defines a GeoRaster theme that contains a SQL statement that selects a single GeoRaster object. The theme assigns band 1 to the red channel, band 2 to the green channel, and band 3 to the blue channel. Because the raster_pyramid attribute is not specified, MapViewer calculates the best pyramid level by using the spatial resolution values set during or after the georeferencing process. (Note that in Example 2-13, georid=1 in the WHERE clause refers to a column named GEORID in the GeoRaster table named PCI_IMAGE.)

Example 2-13 GeoRaster Theme Containing a SQL Statement

<theme name="georaster_theme">
  <jdbc_georaster_query
    georaster_table="pci_image" 
    georaster_column="georaster"
    raster_bands="1,2,3"
    jdbc_srid="82301"
    datasource="mvdemo"
    asis="false"> SELECT georaster FROM pci_image WHERE georid =1
  </jdbc_georaster_query>
</theme>

Example 2-14 defines a GeoRaster theme that specifies the single GeoRaster object whose rasterID attribute value in the SDO_GEORASTER object is 1 (raster_id="1") and associated with the raster data table named RDT_PCI. The theme specifies 2 as the pyramid level.

Example 2-14 GeoRaster Theme Specifying a Raster ID and Raster Data Table

<theme name="georaster_theme">
  <jdbc_georaster_query
    georaster_table="pci_image"
    georaster_column="georaster"
    raster_id="1"
    raster_table="rdt_pci"
    raster_pyramid="2"
    raster_bands="1,2,3"
    jdbc_srid="82301"
    datasource="mvdemo"
    asis="false">
  </jdbc_georaster_query>
</theme>

2.3.4.1 Creating Predefined GeoRaster Themes

To create a predefined GeoRaster theme, you must store the definition of the GeoRaster theme in the database by inserting a row into the USER_SDO_THEMES view (described in Section 2.9.2). Example 2-15 stores the definition of a GeoRaster theme.

Example 2-15 Creating a Predefined GeoRaster Theme

INSERT INTO user_sdo_themes  VALUES (
   'GEOR_BANDS_012', 
   'Band 0 for red, 1 for green, 2 for blue', 
   'GEOR_TABLE',
   'GEOR_COLUMN', 
   '<?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="georaster" raster_table="RDT_PCI"
                   raster_id="1" raster_bands="0,1,2">
    </styling_rules>' );

Example 2-15 creates a GeoRaster theme named GEOR_BANDS_012, in which band 0 is assigned to the red channel, band 1 to the green channel, and band 2 to the blue channel. The GeoRaster table name (GEOR_TABLE in this example) is inserted in the BASE_TABLE column of the USER_SDO_THEMES view, the GeoRaster column name (GEOR_COLUMN in this example) is inserted in the GEOMETRY_COLUMN column, and an XML document with one <styling_rules> element is inserted in the STYLING_RULES column.

In the <styling_rules> element for a GeoRaster theme, theme_type must be georaster in order for this theme to be recognized as a GeoRaster theme.

The <styling_rules> element for a GeoRaster theme can contain the attributes described in Section 2.3.4, including raster_bands, raster_pyramid, raster_id, and raster_table, as shown in Example 2-15. Alternatively, the <styling_rules> element for a GeoRaster theme can be a rule definition. For example, to create a GeoRaster theme that selects a GeoRaster object from the GeoRaster table satisfying the WHERE clause condition georid=1, replace the <styling_rules> element in Example 2-15 with the following:

<styling_rules theme_type="georaster">
  <rule>
    <features> georid=1
    </features>
  </rule>
</styling_rules>

The <styling_rules> element for a GeoRaster theme can also specify one or more bitmap masks, as explained in Section 2.3.4.2.

The DTD for the <styling_rules> element is presented in Section A.7.

Example 2-16 prepares GeoRaster data for use with a GeoRaster theme that is stored in the database. Comments in the code example briefly describe the main steps. For detailed information about requirements and steps for using GeoRaster data, see Oracle Spatial GeoRaster Developer's Guide.

Example 2-16 Preparing GeoRaster Data for Use with a GeoRaster Theme

connect scott
Enter password: password
 
SET ECHO ON
SET FEEDBACK 1
SET NUMWIDTH 10
SET LINESIZE 100
SET PAGESIZE 10000
SET SERVEROUTPUT ON SIZE 5000
SET LONG 20000
SET TIMING ON
call dbms_java.set_output(5000);
 
-------------------------------------------------------------------
-- Create a GeoRaster table (a table that has a 
-- column of SDO_GEORASTER object type).
-------------------------------------------------------------------
 
create table georaster_table
    (georid     number primary key, 
     type       varchar2(32), 
     georaster  sdo_georaster);
 
-------------------------------------------------------------------
-- Create the GeoRaster DML trigger on the GeoRaster table, if
-- the Oracle Database release is before 11.1. (In Release 11.1 and later
-- this trigger is created automatically, so you do not need to create
-- it manually.)
-------------------------------------------------------------------
 
call sdo_geor_utl.createDMLTrigger('georaster_table', 'georaster');
 
-------------------------------------------------------------------
-- Create a raster data table (RDT).
--
-- It is used to store cell data of GeoRaster objects.
-- This step is not a requirement. If the RDT table does not
-- exist, the GeoRaster procedures or functions will generate it
-- automatically whenever needed.
-- However, for huge GeoRaster objects, some tuning and setup on those
-- tables can improve the scalability and performance significantly.
-- In those cases, it is better for users to create the RDTs.
-- The primary key must be added to the RDT if you create it.
-------------------------------------------------------------------
 
create table rdt_geor of sdo_raster 
  (primary key (rasterId, pyramidLevel, bandBlockNumber,
                rowBlockNumber, columnBlockNumber))
  lob(rasterblock) store as (nocache nologging);
 
commit;
 
----------------
-- Import the image.
----------------
 
connect system;
Enter password: password
 
call dbms_java.grant_permission('MDSYS','SYS:java.io.FilePermission',
  'lbs/demo/images/l7_ms.tif', 'read' );
 
call dbms_java.grant_permission('SCOTT','SYS:java.io.FilePermission',
  'lbs/demo/images/l7_ms.tif', 'read' );
  
connect scott;
Enter password: password
 
 declare 
  geor SDO_GEORASTER;
begin
  delete from georaster_table where georid = 1;
 insert into georaster_table 
    values( 1, 'TIFF', sdo_geor.init('rdt_geor', 1) );
 select georaster into geor 
    from georaster_table where georid = 1 for update;
  sdo_geor.importFrom(geor, '', 'TIFF', 'file',
    'lbs/demo/images/l7_ms.tif');
  update georaster_table set georaster = geor where georid = 1;
  commit;
end;/
 
connect system;
Enter password: password
 
call dbms_java.revoke_permission('MDSYS','SYS:java.io.FilePermission',
       'lbs/demo/images/l7_ms.tif', 'read' );
 
call dbms_java.revoke_permission('SCOTT','SYS:java.io.FilePermission',
       'lbs/demo/images/l7_ms.tif', 'read' );
       
connect scott;
Enter password: password
 
--------------------------
-- Change the GeoRaster format, if needed.
-- To do this, you can call SDO_GEOR.changeFormatCopy.
-- The following operations for pyramiding, spatial resolution setup, and 
-- spatial extent generation can also be combined into one PLSQL block.
--------------------------
 
declare
  gr1 sdo_georaster;
begin
  --
  -- Using changeFormat with a GeoRaster object:
  --
 
  -- 1. Select the source GeoRaster object.
  select georaster into gr1 
    from georaster_table where georid = 1;
 
  -- 2. Make changes. (Interleaving is application-dependent. For TIFF images,
  --    the default interleaving is BSQ.)
  sdo_geor.changeFormat(gr1, 'blocksize=(512,512,3) interleaving=BIP');
 
  -- 3. Update the GeoRaster object in the GeoRaster table.
  update georaster_table set georaster = gr1 where georid = 1;
 
  commit;
end;/
 
---------------------------
-- Generate pyramid levels (strongly recommended, but optional).
---------------------------
 
declare
  gr sdo_georaster;
begin
 
  -- 1. Select the source GeoRaster object.
  select georaster into gr 
    from georaster_table where georid = 1 for update;
 
  -- 2. Generate pyramids.
  sdo_geor.generatePyramid(gr, 'resampling=NN');
 
  -- 3. Update the original GeoRaster object.
  update georaster_table set georaster = gr where georid = 1;
 
  commit;
end;/
 
-----------------------------
-- Georeference the GeoRaster object.
-----------------------------
 
DECLARE
  gr sdo_georaster;
BEGIN
  SELECT georaster INTO gr FROM georaster_table WHERE georid = 1 FOR UPDATE;
  sdo_geor.georeference(gr, 82216, 1,
                        sdo_number_array(30, 0, 410000.000000),
                        sdo_number_array(0, -30,3759000.000000));
  UPDATE georaster_table SET georaster = gr WHERE georid = 1;
  COMMIT;
END;/

-----------------------------
-- Set the spatial resolutions (required for 10gR1 only)
-----------------------------
-- If you are using Oracle Database Release 10.1, set spatial resolutions. (Not
-- required if you are using Release 10.2.) The spatial resolution values of 
-- (30, 30) are from the ESRI world file or from the georeferencing information; 
-- however, you may have to compute these values if they are not part of 
-- the original georeferencing metadata.
DECLARE
  gr sdo_georaster;
BEGIN
  SELECT georaster INTO gr FROM georaster_table WHERE georid = 1 FOR UPDATE;
  sdo_geor.setSpatialResolutions(gr, sdo_number_array(30, 30));
  UPDATE georaster_table SET georaster = gr WHERE georid = 1;
  COMMIT;
END;
/

------------------------
-- Update the spatial extent.
------------------------
 
DECLARE
  sptext sdo_geometry;
BEGIN
  SELECT sdo_geor.generateSpatialExtent(a.georaster) INTO sptext 
          FROM georaster_table a WHERE a.georid=1 FOR UPDATE;
  UPDATE georaster_table a SET a.georaster.spatialextent = sptext WHERE a.georid=1;
  COMMIT;
END;/
 
commit;
 
------------------------------------------------------------------
-- Create metadata information for the GeoRaster spatial extent column.
------------------------------------------------------------------
 
INSERT INTO USER_SDO_GEOM_METADATA 
  VALUES (
  'GEORASTER_TABLE',
  'georaster.spatialextent',
  SDO_DIM_ARRAY(
    SDO_DIM_ELEMENT('X', 410000.0, 470000.0, 0.000005),
    SDO_DIM_ELEMENT('Y', 3699000.0,3759000., 0.000005)
     ),
  82216   -- SRID
);
 
------------------------
-- Create a spatial index on the spatial extent.
------------------------
 
CREATE INDEX georaster_idx ON georaster_table(georaster.spatialextent) 
INDEXTYPE IS MDSYS.SPATIAL_INDEX;
 
--------------------------------------------------------
-- Create a predefined GeoRaster theme for MapViewer.
--------------------------------------------------------
 
INSERT INTO user_sdo_themes  VALUES (
   'GEORASTER_TABLE', 
   'GeoTiff image', 
   'GEORASTER_TABLE',
   'GEORASTER', 
   '<?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="georaster" raster_table="RDT_GEOR"
                   raster_id="1" raster_bands="0,1,2">
    </styling_rules>' );
    
commit;

2.3.4.2 Using Bitmap Masks with GeoRaster Themes

Effective with Oracle Spatial GeoRaster for Release 11.1, bitmap masks can be assigned to GeoRaster layers stored in the database. A bitmap mask is a special one-bit deep rectangular raster grid with each pixel having either the value of 0 or 1. It is used to define an irregularly shaped region inside another image. The 1-bits define the interior of the region, and the 0-bits define the exterior of the region. For more information about bitmap masks, see Oracle Spatial GeoRaster Developer's Guide.

To specify a bitmap mask with a GeoRaster theme, use the <bitmap_masks> element in the <styling_rules> element for the predefined theme, as shown in Example 2-17.

Example 2-17 Bitmap Mask in Predefined GeoRaster Theme

<styling_rules theme_type="georaster" raster_id="1"
  raster_table="RDT_MASS_COLOR_MOSAIC">
    <bitmap_masks>
      <mask layers="1,2" zeromapping="0" onemapping="255"/>
    </bitmap_masks>
</styling_rules>

The <bitmap_masks> element contains one or more <mask> elements, each with a mask definition for a specific GeoRaster object. In Example 2-17, a mask is defined for layers 1 and 2 of the GeoRaster object with the raster ID of 1 in the RDT_MASS_COLOR_MOSAIC table. The <mask> element has the following attributes:

  • raster_id specifies the raster ID value of the GeoRaster object.

  • raster_table specifies the raster data table (RDT).

  • layers specifies the layer numbers in the GeoRaster object to be used for the mask.

  • zeromapping specifies the transparency value to be applied during rendering on bitmap pixels with a value of 0 (zero). The attribute value can be from 0 (completely transparent) to 255 (completely opaque).

  • onemapping specifies the transparency value to be applied during rendering on bitmap pixels with a value of 1. The attribute value can be from 0 (completely transparent) to 255 (completely opaque).

2.3.4.3 Reprojection of GeoRaster Themes

Effective with Oracle Spatial GeoRaster for Release 11.2.0.1, GeoRaster objects can be reprojected into a different SRID. It is recommended that you apply Oracle Database patch 10259201, to avoid black boundaries for adjacent reprojected GeoRaster objects when the objects are rendered in MapViewer. For more information, see My Oracle Support document ID 1272931.1, Black Lines After Reprojection Of Georaster Data Via Wms In Oracle Mapviewer.

In MapViewer, a GeoRaster theme will be reprojected if its SRID is different from the map request SRID. The reprojection is just for rendering, with no changes made to the original GeoRaster object. For older databases without reprojection support, the GeoRaster object will not be reprojected.

The reprojection modes available are BILINEAR (used as default), NN, CUBIC, AVERAGE4, AVERAGE16. For more information about reprojection, see Oracle Spatial GeoRaster Developer's Guide.

To specify a reprojection mode with a GeoRaster theme, use the reproj_mode keyword in the <styling_rules> element for the predefined theme, as shown in Example 2-18.

Example 2-18 Reprojection Mode in Predefined GeoRaster Theme

<styling_rules theme_type="georaster" reproj_mode="CUBIC">
</styling_rules>

2.3.5 Network Themes

A network theme is a special kind of MapViewer theme useful for visualizing networks defined using the Oracle Spatial network data model. A network consists of a set of nodes and links. A network can be directed or undirected, although links and paths typically have direction. A network can be organized into different levels of abstraction, called a network hierarchy. MapViewer assumes that network spatial tables in a network use the same coordinate system, and that these tables are indexed and registered as described in Oracle Spatial Topology and Network Data Models Developer's Guide.

Network node, link, and path tables store geometries of type SDO_GEOMETRY. You can create JDBC themes that use these geometries. In addition, you can define dynamic themes that consider aspects of the network, such as the direction of links for a directed network.

The following elements and attributes apply to the definition of a network theme:

  • <jdbc_network_query> element: Specifies that this is a dynamically defined network theme. The complete DTD for this element is included in the map request DTD in Section 3.2.

  • network_name attribute: Specifies the name of the network.

  • network_level attribute (optional): Specifies the network hierarchy level to which this theme applies. (For a nonhierarchical network, specify 1, which is the default value.)

  • link_style attribute (optional): Specifies the style name to be used for links.

  • direction_style attribute (optional): Specifies the style name to be used for a link direction marker (for example, a directional arrow image).

  • bidirection_style attribute (optional): Specifies the style name to be used for a bidirected link.

  • direction_position attribute (optional): Specifies the position of the direction marker relative to the link start, as a number between 0 and 1. For example, 0.85 indicates 85 percent of the way between the link start and end points.

  • direction_markersize attribute (optional): Specifies the size (number of pixels) of the direction marker.

  • direction_multimarker attribute (optional): Specifies if the direction marker should be repeated over the link: true repeats the marker at a specified start position and each subsequent interval of that distance; false (the default) does not repeat the marker.

  • link_labelstyle attribute (optional): Specifies the style name to be used for link labels in the column specified in the link_labelcolumn attribute.

  • link_labelcolumn attribute (optional): Specifies the name of the column containing link labels to be rendered using the style specified in the link_labelstyle attribute.

  • node_style attribute (optional): Specifies the style name to be used for nodes.

  • node_markersize attribute (optional): Specifies the size (number of pixels) of the node marker.

  • node_labelstyle attribute (optional): Specifies the style name to be used for node labels in the column specified in the node_labelcolumn attribute.

  • node_labelcolumn attribute (optional): Specifies the name of the column containing node labels to be rendered using the style specified in the node_labelstyle attribute.

  • path_ids attribute (optional): Specifies one or more path ID values of stored paths to be rendered. For more than one path, use commas to delimit the path ID values. For example, path_ids="1,3,4" specifies that the paths with path ID values 1, 3, and 4 are to be rendered.

  • path_styles attribute (optional): Specifies one or more style names associated with the paths specified in the path_ids attribute. For example, path_styles="C.RED,C.GREEN,C.BLUE" specifies styles to be used to render the first, second, and third paths (respectively) specified in the path_ids attribute.

  • path_labelstyle attribute (optional): Specifies the style name to be used for path labels in the column specified in the path_labelcolumn attribute.

  • path_labelcolumn attribute (optional): Specifies the name of the column containing path labels to be rendered using the style specified in the path_labelstyle attribute.

Additional network theme attributes related to network analysis are described in Section 2.3.5.2.

A network theme can combine attributes for links, nodes, and paths, or any combination. In such cases, MapViewer first renders the links, then the paths, and then the nodes.

Example 2-19 defines a network theme that specifies attributes for the display of links and nodes in the network named NYC_NET.

Example 2-19 Network Theme

<theme name="net_theme" user_clickable="false">
  <jdbc_network_query
    network_name="NYC_NET"
    network_level="1"
    jdbc_srid="8307"
    datasource="mvdemo"
    link_style="C.RED"
    direction_style="M.IMAGE105_BW"
    direction_position="0.85"
    direction_markersize="8"
    node_style="M.STAR"
    node_markersize="5"
    asis="false">
  </jdbc_network_query>
</theme>

2.3.5.1 Creating Predefined Network Themes

To create a predefined network theme, you must store the definition of the network theme in the database by inserting a row into the USER_SDO_THEMES view (described in Section 2.9.2). Example 2-20 stores the definition of a network theme.

Example 2-20 Creating a Predefined Network Theme

INSERT INTO user_sdo_themes  VALUES (
   'NYC_NET_1',
   'New York City network',
   'NYC_NET_LINK_TABLE',
   'GEOMETRY',
   '<?xml version="1.0" standalone="yes"?>
    <styling_rules
              theme_type="network"
              network_name="NYC_NET"
              network_level="1">
      <rule>
         <features>
           <link
              style="C.RED"
              direction_style="M.IMAGE105_BW"
              direction_position="0.85"
              direction_markersize="8">
           </link>
           <path
              ids="1,3"
              styles="C.BLUE,C.GREEN">
           </path>
           <node
              style="M.CIRCLE"
              markersize="5">
           </node>
         </features>
         <label>
           <link column="LINK_ID" style="T.STREET NAME"> 1 </link>
         </label>
      </rule>
    </styling_rules>' );

Example 2-20 creates a network theme named NYC_NET_1 for level 1 of the network named NYC_NET. The network table name (NYC_NET_LINK_TABLE in this example) is inserted in the BASE_TABLE column of the USER_SDO_THEMES view, the link geometry column name (GEOMETRY in this example) is inserted in the GEOMETRY_COLUMN column, and an XML document with one <styling_rules> element is inserted in the STYLING_RULES column.

In the <styling_rules> element for a network theme, theme_type must be network in order for this theme to be recognized as a network theme. Elements for links, paths, and nodes can be specified in the same <features> element, as is done in Example 2-20:

  • The link feature rule specifies the style C.RED and direction marker attributes for all links.

  • The path feature rule specifies the style C.BLUE for paths with the path ID value 1, and the style C.GREEN for paths with the path ID value 3.

  • The node feature rule specifies the style M.CIRCLE and a marker size of 5.

Example 2-20 also contains a <label> element for links, specifying the link column LINK_ID and the label style T.STREET NAME.

The DTD for the <styling_rules> element is presented in Section A.7.

2.3.5.2 Using MapViewer for Network Analysis

The network model Java API provides several network analysis capabilities. You can define MapViewer network themes that support the shortest-path and within-cost analysis capabilities. Some attributes apply to both capabilities, and some attributes apply only to the relevant associated capability.

For all network analysis capabilities, the <jdbc_network_query> element and the network-related attributes described in Section 2.3.5 apply to the definition of the network theme.

For shortest-path analysis, the following attributes apply to the definition of the network theme:

  • analysis_algorithm attribute: Specifies the shortest-path analysis algorithm to use. Must be either DIJKSTRA or ASEARCH.

  • shortestpath_style attribute: Specifies the style name to be used for the shortest path.

  • shortestpath_startnode attribute: Specifies the start node to be used for the analysis.

  • shortestpath_endnode attribute: Specifies the end node to be used for the analysis.

  • shortestpath_startstyle attribute (optional): Specifies the style name to be used for the start node.

  • shortestpath_endstyle attribute (optional): Specifies the style name to be used for the end node.

Example 2-21 defines a network theme that can be used for shortest-path analysis.

Example 2-21 Network Theme for Shortest-Path Analysis

<theme name="shortest_path_theme" user_clickable="false">
  <jdbc_network_query
    network_name="BI_TEST"
    network_level="1"
    jdbc_srid="0"
    datasource="mvdemo"
    analysis_algorithm="DIJKSTRA"
    shortestpath_style="L.PH"
    shortestpath_startnode="20"
    shortestpath_endnode="101"
    shortestpath_startstyle="M.STAR"
    shortestpath_endstyle="M.CIRCLE"
    asis="false">
  </jdbc_network_query>
</theme>

For within-cost analysis, the following attributes apply to the definition of the network theme:

  • analysis_algorithm attribute: Must be WITHINCOST.

  • withincost_startnode attribute: Specifies the start node to be used for the analysis.

  • withincost_cost attribute: Specifies the cost cutoff value for nodes to be included. All nodes that can be reached from the start node at a cost less than or equal to the specified value are included in the resulting display. Nodes that cannot be reached from the start node or that can be reached only at a cost greater than the specified value are not included.

  • withincost_startstyle attribute (optional): Specifies the style name to be used for the start node.

  • withincost_style attribute: Specifies the style name to be used for links in the displayed paths between the start node and each node that is within the specified cost cutoff value.

Example 2-22 defines a network theme that can be used for within-cost analysis.

Example 2-22 Network Theme for Within-Cost Analysis

<theme name="within_cost_theme" user_clickable="false">
  <jdbc_network_query
    network_name="BI_TEST"
    network_level="1"
    jdbc_srid="0"
    datasource="mvdemo"
    analysis_algorithm="WITHINCOST"
    withincost_startnode="20"
    withincost_style="L.PH"
    withincost_cost="1"
    withincost_startstyle="M.STAR"
    asis="false">
  </jdbc_network_query>
</theme>

2.3.6 Topology Themes

A topology theme is a special kind of MapViewer theme useful for visualizing topologies defined using the Oracle Spatial topology data model. The topology data model lets you work with data about nodes, edges, and faces in a topology. The spatial representations of nodes, edges, and faces are spatial geometries of type SDO_GEOMETRY. For nodes and edges, the geometries are explicitly stored; for faces, the initial lines (exterior and interior) are stored, allowing the face geometry to be generated.

In addition to the spatial representation of nodes, edges, and faces, a topology can have features. A feature (also called a topology geometry) is a spatial representation of a real-world object. Each feature is defined as an object of type SDO_TOPO_GEOMETRY, which identifies the topology geometry type, topology geometry ID, topology geometry layer ID, and topology ID. For detailed information, see Oracle Spatial Topology and Network Data Models Developer's Guide.

MapViewer can render topology features. It can also render a theme in debug mode (explained later in this section) to show the nodes, edges, and faces of a topology. For each topology theme, MapViewer uses the topology metadata information stored in the USER_SDO_TOPO_METADATA view.

The following elements and attributes apply to the definition of a topology theme:

  • <jdbc_topology_query> element: Specifies that this is a dynamically defined topology theme. The element can specify a SQL query statement (without a terminating semicolon). The complete DTD for this element is included in the map request DTD in Section 3.2.

  • topology_name attribute: Specifies the name of the topology.

  • feature_table attribute: Specifies the name of the feature table.

  • spatial_column attribute: Specifies the name of the spatial feature column of type SDO_TOPO_GEOMETRY.

  • label_column attribute: Specifies the column in the feature table that contains the text label to be used with each feature.

  • label_style attribute: Specifies the name of the text style to be used to render the labels in the label column.

  • render_style attribute: Specifies the name of the style to be used to render the topology.

Example 2-23 defines a topology theme that specifies attributes for the display of features and labels from the LAND_PARCELS table in the CITY_DATA topology. The SQL statement specifies the spatial feature column and the label column, and it includes all rows in the feature table.

Example 2-23 Topology Theme

<theme name="topo_theme" user_clickable="false">
  <jdbc_topology_query
    topology_name="CITY_DATA"
    feature_table="LAND_PARCELS"
    label_column="FEATURE_NAME"
    spatial_column="FEATURE"
    label_style="T.CITY NAME"
    render_style="C.COUNTIES"
    jdbc_srid="0"
    datasource="topology"
    asis="false">select feature, feature_name from land_parcels
  </jdbc_topology_query>
</theme>

MapViewer also supports a debug mode that renders the nodes, edges, and faces of a topology. To specify debug mode, include the mode="debug" attribute in the <theme> element. In addition to the <jdbc_topology_query> attributes mentioned earlier in this section, the following attributes can be used in debug mode:

  • edge_style attribute: Specifies the name of the style to be used to render edges.

  • edge_label_style attribute: Specifies the name of the text style to be used to render edge labels.

  • edge_marker_style attribute: Specifies the name of the marker style to be used for edge markers.

  • edge_marker_size attribute: Specifies the size (number of pixels) of for edge markers.

  • node_style attribute: Specifies the name of the style to be used to render nodes.

  • node_label_style attribute: Specifies the name of the text style to be used to render node labels.

  • face_style attribute: Specifies the name of the style to be used to render faces.

  • face_label_style attribute: Specifies the name of the text style to be used to render face labels.

Example 2-24 defines a debug-mode topology theme for rendering features, edges, nodes, and faces from all feature tables in the CITY_DATA topology.

Example 2-24 Topology Theme Using Debug Mode

<theme name="topo_theme" mode="debug" user_clickable="false">
  <jdbc_topology_query
    topology_name="CITY_DATA"
    edge_style="C.RED"
    edge_marker_style="M.IMAGE105_BW"
    edge_marker_size="8"
    edge_label_style="T.EDGE"
    node_style="M.CIRCLE"
    node_label_style="T.NODE"
    face_style="C.BLUE"
    face_label_style="T.FACE"
    jdbc_srid="0"
    datasource="topology"
    asis="false">
  </jdbc_topology_query>
</theme>

2.3.6.1 Creating Predefined Topology Themes

To create a predefined topology theme, you must store the definition of the topology theme in the database by inserting a row into the USER_SDO_THEMES view (described in Section 2.9.2). Example 2-25 stores the definition of a topology theme.

Example 2-25 Creating a Predefined Topology Theme

INSERT INTO user_sdo_themes  VALUES (
   'LANDPARCELS',
   'Topology theme for land parcels',
   'LAND_PARCELS',
   'FEATURE',
   '<?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="topology" topology_name="CITY_DATA">
      <rule>
        <features style="C.RED"></features>
        <label column="FEATURE_NAME" style="T.TEXT STYLE"> </label>
      </rule>
    </styling_rules>' );

Example 2-25 creates a topology theme named LANDPARCELS for the topology named CITY_DATA. The feature table name (LAND_PARCELS in this example) is inserted in the BASE_TABLE column of the USER_SDO_THEMES view, the feature column name (FEATURE in this example) is inserted in the GEOMETRY_COLUMN column, and an XML document with one <styling_rules> element is inserted in the STYLING_RULES column.

In the <styling_rules> element for a topology theme, theme_type must be topology in order for this theme to be recognized as a topology theme. The theme in Example 2-25 defines one styling rule that renders all land parcel features from the CITY_DATA topology using the C.RED style and using the T.TEXT STYLE label style for values in the FEATURE_NAME column of the feature table.

The DTD for the <styling_rules> element is presented in Section A.7.

2.3.7 WFS Themes

A WFS theme is a special kind of MapViewer theme that supports the rendering of data delivered using the Open GIS Consortium (OGC) Web Feature Service (WFS) protocol, specifically the WFS 1.0.0 implementation specification.

WFS theme are conceptually similar to geometry themes, and users are able to render and label features. The WFS operations GetCapabilities, DescribeFeatureType, and GetFeature are used when rendering a WFS theme. When a WFS service is accessed, MapViewer caches the information about capabilities and feature types.

  • GetCapabilities retrieves the server general information, including the URL addresses to issue requests and the features available. In general, a WFS capability request has the form:

    http://localhost:1979/geoserver/wfs/GetCapabilities?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities
    

    The result includes a <Capabilities> element with the URL addresses for the WFS requests. For example, the following includes the GetCapabilities URLs for HTTP GET and POST requests.

    <Capability>
     <Request>
      <GetCapabilities>
       <DCPType>
        <HTTP>
         <Get onlineResource="http://localhost:1979/geoserver/wfs/GetCapabilities?" />
        </HTTP>
       </DCPType>
       <DCPType>
        <HTTP>
         <Post onlineResource="http://localhost:1979/geoserver/wfs/GetCapabilities?" /> 
        </HTTP>
        </DCPType>
      </GetCapabilities>
    . . .
    </Capability>
    
  • DescribeFeatureType retrieves the feature information, including attributes and types.

  • GetFeature retrieves the feature geometries and attributes. The output format for GetFeature requests is GML2.

The following attributes apply to the definition of a WFS theme:

  • datasource attribute: Specifies the MapViewer data source from which styles will be loaded.

  • feature_attributes attribute: Specifies feature attributes (besides geometry and label columns) that can be used with advanced styles.

  • feature_ids attribute: Specifies the WFS feature IDs to be retrieved. Feature IDs are represented with the fid name in the WFS responses. If feature IDs are specified, spatial filter and query conditions are not used in the WFS request.

  • feature_name attribute: Specifies the WFS feature name.

  • key_column attribute: Specifies the attribute to be used as a key column. Applies to predefined themes, and can be used in Oracle Maps applications. If key_column is not specified, fid is used as the key column.

  • label_column attribute: Specifies the column in the feature table that contains the text label to be used with each WFS feature.

  • label_style attribute: Specifies the name of the text style to be used to render the labels in the label column.

  • query_condition attribute: Specifies a WHERE clause condition to be applied to the WFS theme. Cannot be a complex condition with a hierarchy of expressions defined using multiple parentheses. Each string in the query must be separated by a blank space. If the condition cannot be parsed, it is ignored on the WFS request. Any query conditions are ignored if you specify the feature_ids attribute. The following are examples of valid expressions:

    state_name = 'New Hampshire' or state_name = 'New York'
    (state_name = 'New Hampshire' or state_name = 'New York') and top_pop > 700000
    (state_name = 'New Hampshire' or state_name = 'New York') and (top_pop > 700000)
    
  • render_style attribute: Specifies the name of the style to be used to render the geometry.

  • service_url attribute: Corresponds to the capabilities address for HTTP GET requests. The service_url parameter for MapViewer must be the online resource address for HTTP GET in the <GetCapabilities> element. In the preceding example, the value to be used is: http://localhost:1979/geoserver/wfs/GetCapabilities?

    Do not include the Capabilities parameters SERVICE, VERSION, and REQUEST; use just the URL from the capabilities information.

  • spatial_column attribute: Specifies the name of the spatial feature column of type SDO_TOPO_GEOMETRY.

  • srs attribute: Specifies the spatial reference system (coordinate system) name for the WFS feature, in EPSG or Oracle Spatial format. For example, EPSG:4325, SDO:8307, and 8307 (the Spatial SRID value) specify the same SRS. If an EPSG SRS value is specified, MapViewer tries to identify an equivalent Spatial (SDO) SRID; and if no matching SRID is found, the SRID for the theme is assumed to be zero (0). MapViewer looks for matching SRID values as follows:

    1. Use any custom mapping specified in an SDO to EPSG SRID mapping file specified MapViewer configuration file, as explained inSection 1.5.2.11.

    2. Use the Spatial function SDO_CS.MAP_EPSG_SRID_TO_ORACLE to get the equivalent SDO code (if this function is available in the version of Oracle Database used to store the data).

    3. Use the EPSG code that is in the MDSYS.CS_SRS table, if a match can be found.

Example 2-26 shows a request with a dynamic WFS theme. The WFS service is geoserver, and it is installed on the local system.

Example 2-26 WFS Request with a Dynamic WFS Theme

<?xml version="1.0" standalone="yes"?>
<map_request
             title="WFS MAP"
             datasource = "mvdemo"
             width="640"
             height="480"
             bgcolor="#a6cae0"
             antialiase="true"
             mapfilename="wfs_map"
             format="PNG_URL">
  <center size="20.">
     <geoFeature  >
         <geometricProperty typeName="center">
             <Point>
                 <coordinates>-70., 44.</coordinates>
             </Point>
         </geometricProperty>
     </geoFeature>
  </center>
 
  <themes>
   <theme name="wfs" >
     <wfs_feature_request 
         service_url="http://localhost:1979/geoserver/wfs/GetCapabilities?"
         srs="EPSG:4326"
         feature_name="states"
         spatial_column="the_geom"
         render_style="C.COUNTIES"
         label_column="STATE_NAME"
         label_style="T.STATE NAME"
         datasource="mvdemo" />
    </theme> 
  </themes>
 
</map_request>

2.3.7.1 Creating Predefined WFS Themes

To create a predefined WFS theme, you must store the definition of the WFS theme in the database by inserting a row into the USER_SDO_THEMES view (described in Section 2.9.2). Example 2-27 stores the definition of a WFS theme.

Example 2-27 Creating a Predefined WFS Theme

INSERT INTO user_sdo_themes  VALUES (
   'WFS_THEME1', 
   'WFS', 
   'POI',
   'THE_GEOM',
'<?xml version="1.0" standalone="yes"?>
<styling_rules theme_type="wfs" service_url="http://localhost:1979/geoserver/wfs/GetCapabilities?" srs="EPSG:4326">
    <hidden_info>
        <field column="NAME" name="name"/>
        <field column="MAINPAGE" name="mainpage"/>
  </hidden_info>
    <rule>
        <features style="M.STAR"> </features>
        <label column="NAME" style="T.STREET NAME"> 1 </label>
  </rule>
</styling_rules>' );

In Example 2-27, the WFS feature POI is used as the base table, and the attribute THE_GEOM is the spatial column. The styling rule information contains the service_url and srs information; and although not shown inExample 2-27, it can also specify a key_column value. The <features> and <label> elements of the styling rules are similar to the rules used in geometry themes. Hidden information (<hidden_info> element) can also be defined and used in Oracle Maps applications.

Example 2-28 shows a map request that uses the predefined theme created in Example 2-27.

Example 2-28 Map Request with Predefined WFS Theme

<?xml version="1.0" standalone="yes"?>
<map_request
             title="Predefined WFS MAP"
             datasource = "mvdemo"
             width="640"
             height="480"
             bgcolor="#a6cae0"
             antialiase="true"
             format="PNG_STREAM">
 
  <themes>
   <theme name="wfs_theme1" />
  </themes>
 
</map_request>

See also the WFS map request examples in Section 3.1.14.

In some cases, proxy information may affect the access to WFS servers. If this occurs, specify the appropriate proxy parameters in the MapViewer configuration file.

2.3.8 Custom Geometry Themes

Custom geometry themes are associated with external spatial data (spatial data in a native format other than Oracle Spatial, such as Shapefile). A custom geometry theme uses a spatial provider class to retrieve the native data, and the external provider must use the spatial data provider plug-in mechanism. MapViewer provides a spatial provider interface class that the external provider must implement. The interface implementation has the following methods:

public interface SDataProvider
{
 /**
  * Returns the initialization parameter names for the provider.
  * These names can be used by applications to populate user interface
  * components.
  * @return
  */
 public String[] getInitParameterNames();
 
 /**
  * Returns runtime parameter names. Runtime parameters are additional parameters
  * that the provider may use when retrieving the data objects.
  * These names can be used by applications to populate user interface
  * components.
  *
  * @return
  */
 public String[] getRuntimeParameterNames();
 
 /**
  * This method is used to set the initialization parameters for the specific
  * data provider. In mapViewer these parameters are defined on the
  * configuration file, when registering the spatial provider.
  * @param params to be used by the initialization method.
  * @return true if success; false otherwise
  */
 public boolean init(Properties params);
 
 /**
  * This method creates and returns an instance of SDataSet which contains
  * the feature spatial data and attributes produced by this provider, based on
  * the given parameters for a specific incoming map request.
  * <br>
  * MapViewer calls this method on the custom theme producer implementation.
  * The SDataSet class stores for each feature its spatial representation and
  * and the attribute values that are requested.
  *
  * @param queryWin the search area to retrieve spatial objects. The window is assumed
  *                 to be already on data provider spatial reference system.
  * @param nonSpatialColumns the list of attributes that will return with objects.
  * @param params  parameters that the provider may use to retrieve the data.
  * @return an instance of SDataSet; null if failed.
  */
 public SDataSet buildDataSet(Rectangle2D queryWin,String []nonSpatialColumns,
                               Properties params);
 
 /**
  * Returns the list of existing attributes for this data provider.
  * @param params  parameters that the provider may use to get the attribute list.
  * @return
  */
 public Field[] getAttributeList(Properties params);
 
 /**
  * Returns the data set spatial extent MBR.
  * @param params  parameters that the provider may use to get the data extents
  * @return
  */
 public Rectangle2D getDataExtents(Properties params);
 
 /**
  * Builds a spatial index on the data set.
  * @param params  parameters that the provider may use to build the spatial index.
  * @return
  */
 public boolean buildSpatialIndex(Properties params);
}

The init and buildDataSet methods must be implemented. The other method implementations can be empty; however applications (such as the Oracle Map Builder Tool) can make use of these methods to handle the information about spatial data providers. A provider can implement its own spatial indexing mechanism; MapViewer offers an implementation for the Shapefile provider, and the buildSpatialIndex method creates an indexing file with the .oix extension in the shapefile directory. Appendix D contains an example of how to implement and register a sample spatial provider with MapViewer.

To render native data in MapViewer with custom geometry themes, follow these steps:

  1. Implement a spatial provider class based on the plug-in interface, and generate a jar file with the provider implementation. Copy the jar file to a directory that is part of the MapViewer CLASSPATH definition.

  2. Register the provider in the MapViewer configuration file. MapViewer already offers a spatial provider implementation for the Shapefile format, and its registration section in the configuration file looks like this:

    <s_data_provider
      id="shapefileSDP"
      class="oracle.sdovis.ShapefileDataProvider"
      >
      <parameters>
        <parameter name="datadir" value="/temp/data" />
      </parameters>
    </s_data_provider>
    

    Each provider must have id and class names defined: id is a unique name that identifies the provider, and class corresponds to the Java class implementation. The <parameters> element defines the initialization parameters of the provider.

    For the Shapefile provider, the initialization parameter datadir defines where MapViewer will look for the data files, and thus it should be a directory that is accessible to MapViewer. MapViewer first looks for data files based on the theme definition information; and if the data path defined in the theme definition is not accessible, MapViewer looks for the data path defined in the configuration file.

  3. Create custom geometry themes associated with the external spatial data provider.

Although the external spatial data is outside the Oracle database, you still need to have a database connection to render this data. The database is used to store the metadata information related with the theme, as well as the styling information used to render and to label the data.

Example 2-29 shows the definition for a dynamic custom geometry theme. The XML element <custom_geom_theme> identifies a custom geometry theme. The <parameters> element defines the runtime parameters to be used by the provider. In this case "filename" is a runtime parameter, and "/lbs/demo/shapefile/parcel.shp" defines the file path. MapViewer first attempts to use this file path definition; but if it is not accessible, it uses the data directory value defined in the configuration file for the Shapefile spatial provider.

Example 2-29 Defining a Dynamic Custom Geometry Theme

<theme name="custom_geom_theme_1" >
   <custom_geom_theme
     provider_id="shapefileSDP"
     srid="26986"
     render_style="C.RED"
     label_column="parcel_id"
     label_style="T.CITY NAME"
     datasource="mvdemo">
   <parameters>
    <parameter name="filename" value="/lbs/demo/shapefile/parcel.shp"/>
   </parameters>
  </custom_geom_theme>
</theme>

The available attributes for a dynamic custom geometry theme are:

  • provider_id specifies the spatial provider.

  • datasource specifies the Oracle database connection. This connection is used to retrieve the styles to render the spatial data.

  • srid specifies the spatial reference system (Oracle Spatial coordinate system).

  • render_style specifies the style to be used when rendering the features.

  • label_column specifies the name of the column containing label text to be used with the theme.

  • label_style specifies the style to be used when labeling the features.

  • feature_attributes specifies additional attributes that can be used with advanced styles.

  • key_column specifies a key attribute that can be used in Oracle Maps applications.

Example 2-30 shows how to store a predefined custom geometry theme definition. Use GEOMETRY as the geometry column name, and you can specify any name for the base table name. The "theme_type=geom_custom" attribute identifies the theme as a custom theme. The <rule> element has the same function as for an Oracle Spatial geometry theme. The <parameters> element defines the runtime parameters that the provider accepts. For the Shapefile provider, the runtime parameter filename defines the path to the Shapefile data.

Example 2-30 Storing a Predefined Custom Geometry Theme

insert into user_sdo_themes values ( 
'SHAPE_THEME', 
'Shapefile theme', 
'CUSTOM_TABLE', 
'GEOMETRY', 
'<?xml version="1.0" standalone="yes"?> 
<styling_rules theme_type="geom_custom" srid="26986" provider_id="shapefileSDP"> 
  <rule> 
    <features style="C.RED"> </features> 
    <label column="PARCEL_ID" style="T.CITY NAME"> 1 </label> 
  </rule> 
  <parameters> 
    <parameter name="filename" value="/lbs/demo/shapefile/parcel.shp"/> 
  </parameters> 
</styling_rules>' 
);

You can override the runtime parameters section of a predefined custom geometry theme by the specifying the parameters in a map_request. For example, you can include the following in a <map_request> element:

<theme name="CUSTOM_THEME" >
  <parameters>
    <parameter name="filename" value="/lbs/demo/shapefile/counties.shp"/>
  </parameters>
</theme>

2.3.9 Annotation Text Themes

Oracle Spatial supports annotation text as specified in the OpenGIS Implementation Specification for Geographic information - Simple feature access - Part 1: Common architecture, which defines annotation text as "simply placed text that can carry either geographically-related or ad-hoc data and process-related information as displayable text. This text may be used for display in editors or in simpler maps. It is usually lacking in full cartographic quality, but may act as an approximation to such text as needed by any application."

Oracle Spatial provides the ST_ANNOTATION_TEXT object type for storing annotation text, and the USER_ANNOTATION_TEXT_METADATA and ALL_ANNOTATION_TEXT_METADATA views for storing metadata related to annotation text. For more information about annotation text support, see Oracle Spatial Developer's Guide.

Each annotation text object may have one or more elements, and each element is defined by the following:

  • Value: Text associated with element. If the value is null, the text is derived from the first non-null preceding element value. If all preceding elements have null values, the text is a text expression value derived from the metadata.

  • Location: Spatial location associated with the annotation text object.

  • Leader line: Linear feature associated with the annotation text object.

  • Attributes: Graphic attributes used to display the text. If the value is null, graphic attributes are derived from the attributes value in the metadata.

The text expression in the metadata views can be any of the following:

  • A column name.

  • A function applied to a column name. For example: substr(my_col,1,3)

  • The concatenation of two or more column names. For example: column_1 || column_2 || column_3

  • A text value that is unrelated to a column name. In this case, it is treated as a simple text string that is used for any text element that has a null value.

Annotation text themes in MapViewer are associated with database tables that have a column of type ST_ANNOTATION_TEXT. For each annotation text element, MapViewer will render:

  • The value (if not null) of the annotation text element as a string, using a text style that is created at real time based on the element attributes.

  • The leader line (if not null) associated with the annotation text element. In this case, users can select a MapViewer style to render the leader line.

Each annotation text element has an envelope represented by a geometry, and which is used for spatial indexing. Therefore, you must do the following to use spatial indexing with annotation text tables in MapViewer:

  1. Insert a row into the USER_ANNOTATION_TEXT_METADATA view that specifies the name of the annotation text table and the PRIVATEENVELOPE attribute of the annotation text column (that is, the column of type ST_ANNOTATION_TEXT).

    The following example inserts a row for a table named ANNOTEXT_TABLE with an annotation text column named TEXTOBJ:

    INSERT INTO USER_SDO_GEOM_METADATA 
      VALUES (
      'ANNOTEXT_TABLE',
      'TEXTOBJ.PRIVATEENVELOPE',
      SDO_DIM_ARRAY(
        SDO_DIM_ELEMENT('X', 0.0, 10.0, 0.0005),
        SDO_DIM_ELEMENT('Y', 0.0,10.0, 0.0005)
         ),
      null   -- SRID
    );
    
  2. Create a spatial index on the annotation text envelope of the annotation text table.

    The following example creates a spatial index named ANNO_TEXT_IDX on the annotation envelope of the table named ANNOTEXT_TABLE:

    CREATE INDEX anno_text_idx ON annotext_table(textobj.privateenvelope)
      INDEXTYPE IS mdsys.spatial_index;
    

For themes with valid SRID information, if the metadata base map scale is defined, the element text sizes will be scaled as maps zoom in or out.

Example 2-31 defines the styling rules for a predefined annotation text theme in MapViewer. The structure is similar to other MapViewer themes. Currently, just one styling rule is processed for each annotation theme. In this example, the theme type is annotation, the feature style L.PH is used to render leader lines, and the query condition (id = 1 or id = 2) is appended on the final query.

Example 2-31 Styling Rules for a Predefined Annotation Text Theme

<?xml version="1.0" standalone="yes"?>
<styling_rules theme_type="annotation">
    <rule>
        <features style="L.PH"> (id = 1 or id = 2) </features>
  </rule>
</styling_rules>

Example 2-32 shows the theme definition for a dynamic annotation text theme. The parameters defined are:

  • datasource: the data source name

  • jdbc_srid: the spatial reference identifier

  • annotation_table: the annotation text table

  • annotation_column: the annotation text column

  • leaderline_style: the leader line style to be used

Example 2-32 Dynamic Annotation Text Theme Definition

<themes>
  <theme name="theme1" >
     <jdbc_annotation_query
       datasource="tilsmenv"
       jdbc_srid="0"
       annotation_table="ANNOTEXT_TABLE"
       annotation_column="textobj"
       leaderline_style="L.PH"
       >select textobj from annotext_table
     </jdbc_annotation_query>
   </theme>
</themes>

Example 2-33 is similar to Example 2-32, but it adds the behavior that if the annotation_column column contains a null value, then the value in the textexpr_column is used for the annotation instead. In Example 2-33, assume that the ANNOTATION_TABLE table contains a column named DEFAULT_ANNOTATION (which is used in Example 2-34). This additional column is specified in the textexpr_column attribute and in the SELECT statement.

Example 2-33 Dynamic Annotation Text Theme with Default Annotation Column

<themes>
  <theme name="theme1" >
     <jdbc_annotation_query
       datasource="tilsmenv"
       jdbc_srid="0"
       annotation_table="ANNOTEXT_TABLE"
       annotation_column="textobj"
       textexpr_column="default_annotation"
       leaderline_style="L.PH"
       >select textobj, default_annotation from annotext_table
     </jdbc_annotation_query>
   </theme>
</themes>

Example 2-34 creates an annotation text table and prepares it to be used with MapViewer.

Example 2-34 Script to Generate Annotation Text Data

SET ECHO ON
SET FEEDBACK 1
SET NUMWIDTH 10
SET LINESIZE 100
SET PAGESIZE 10000
SET SERVEROUTPUT ON SIZE 5000
SET LONG 20000
SET TIMING ON
call dbms_java.set_output(5000);
 
---------------------------------------------------------------------
-- Create an annotation text table (a table that has a
-- column of ST_ANNOTATION_TEXT object type), and insert some records.
---------------------------------------------------------------------
 
create table annotext_table (
  id number, 
  default_annotation varchar2(32), 
  textobj ST_ANNOTATION_TEXT);
 
insert into annotext_table values (1,'Text_1',
ST_ANNOTATION_TEXT(
   ST_ANNOTATIONTEXTELEMENT_ARRAY(
          ST_ANNOT_TEXTELEMENT_ARRAY(
                ST_ANNOTATIONTEXTELEMENT('Sample Label 1',
                   SDO_GEOMETRY(2001, null, sdo_point_type(1,1,null),null,null),
                   SDO_GEOMETRY(2002,null,null,
                       SDO_ELEM_INFO_ARRAY(1,2,1),
                       SDO_ORDINATE_ARRAY(0,0, 1,1)), NULL)))));
 
insert into annotext_table values (2,'Text_2',
ST_ANNOTATION_TEXT(
   ST_ANNOTATIONTEXTELEMENT_ARRAY(
          ST_ANNOT_TEXTELEMENT_ARRAY(
                ST_ANNOTATIONTEXTELEMENT('Sample Label 2',
                   SDO_GEOMETRY(2001,null,sdo_point_type(10,10,null),null,null),
                   SDO_GEOMETRY(2002,null,null,
                       SDO_ELEM_INFO_ARRAY(1,2,1),
                       SDO_ORDINATE_ARRAY(5,10, 10,10)), NULL)))));
 
insert into annotext_table values (3, 'Text_3',
ST_ANNOTATION_TEXT(
   ST_ANNOTATIONTEXTELEMENT_ARRAY(
          ST_ANNOT_TEXTELEMENT_ARRAY(
                ST_ANNOTATIONTEXTELEMENT(null,
                   SDO_GEOMETRY(2002, null, null,
                       SDO_ELEM_INFO_ARRAY(1,2,1),
                       SDO_ORDINATE_ARRAY(2,5,4,5,6,5)),
                   SDO_GEOMETRY(2002,null,null,
                       SDO_ELEM_INFO_ARRAY(1,2,1),
                       SDO_ORDINATE_ARRAY(4,3, 4,5)),
'<?xml version="1.0" encoding="UTF-8" ?>
<textAttributes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="../../annotation_text.xsd">
 <textStyle fontFamily="Dialog" fontSize="14" fill="blue"/>
 <textlayout/>
</textAttributes>'
)))));
 
---------------------------------------------------------------------
-- Register the annotation text table in the user metadata view.
---------------------------------------------------------------------
 
insert into USER_ANNOTATION_TEXT_METADATA values(
  'ANNOTEXT_TABLE', 'TEXTOBJ', null, null, null);
 
---------------------------------------------------------------------
-- Update the metadata information.
---------------------------------------------------------------------
 
update user_annotation_text_metadata set
text_expression='default_annotation',
text_attributes =
'<?xml version="1.0" encoding="UTF-8" ?>
<textAttributes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="../../annotation_text.xsd">
 <textStyle fontFamily="Serif" fontSize="14" fill="#ff0000"/>
 <textlayout/>
</textAttributes>';
 
---------------------------------------------------------------------
-- Register the annotation text geometry envelope on the user
-- metadata view of geometries.
---------------------------------------------------------------------
 
INSERT INTO USER_SDO_GEOM_METADATA
 VALUES (
 'ANNOTEXT_TABLE',
 'TEXTOBJ.PRIVATEENVELOPE',
 SDO_DIM_ARRAY(
   SDO_DIM_ELEMENT('X', 0.0, 10.0, 0.0005),
   SDO_DIM_ELEMENT('Y', 0.0,10.0, 0.0005)
    ),
 null   -- SRID
);
 
---------------------------------------------------------------------
-- Create a spatial index on the annotation text envelope.
---------------------------------------------------------------------
 
create index anno_text_idx on annotext_table(textobj.privateenvelope)
  indextype is mdsys.spatial_index;
 
---------------------------------------------------------------------
-- Insert a predefined theme into MapViewer's theme view.
---------------------------------------------------------------------
 
INSERT INTO user_sdo_themes  VALUES (
  'ANNOTEXT_THEME',
  'Annotation text',
  'ANNOTEXT_TABLE',
  'TEXTOBJ',
  '<?xml version="1.0" standalone="yes"?>
   <styling_rules theme_type="annotation">
     <rule >
      <features style="L.PH"> </features>
     </rule>
   </styling_rules>' );
 
commit;

2.3.10 Thematic Mapping

Thematic mapping refers to the drawing of spatial features based on their attribute values. MapViewer uses thematic mapping to create maps in which colors or symbols are applied to features to indicate their attributes. For example, a Counties theme can be drawn using colors with different hues that map directly to the population density of each county, or an Earthquakes theme can be plotted with filled circles whose sizes map to the scale or damage of each earthquake.

To achieve thematic mapping, you must first create an advanced style that is suitable for the type of thematic map, and then create a theme for the features specifying the advanced style as the rendering style. In the styling rules for the theme, you must also specify attribute columns in the table or view whose values will be used to determine exactly how a feature will be rendered thematically by the advanced style.

For example, assume that you wanted to display a map in which the color used for each region reflects the level of sales for a particular product. To do this, create an advanced style that defines a series of individual range-based buckets (see Section A.6.1.2), where each bucket contains a predefined range of sales values for a product, and each bucket has an associated rendering style. (Each region will be rendered using the style associated with the range in which that region's sales value falls.) Also specify the name of the column or columns that provide the attribute values to be checked against the ranges. In other words, the advanced style defines how to map regions based on their sales values, and the theme's styling rules tie together the advanced style and the attribute column containing the actual sales values.

Figure 2-8 shows the relationship between an advanced style and a theme, and how the style and the theme relate to the base table. In this figure, the advanced style named V.SALES defines the series of buckets. The predefined theme named SALES_BY_REGION specified the V.SALES style in its styling rules. The theme also identifies the SALES column in the REGIONS table as the column whose value is to be compared with the bucket ranges in the style. (Each bucket could be associated with a labeling style in addition to or instead of a rendering style, as explained in Section 2.2.2.)

Figure 2-8 Thematic Mapping: Advanced Style and Theme Relationship

Description of Figure 2-8 follows

In addition to the individual range-based buckets shown in Figure 2-8, MapViewer supports other bucket styles, as explained in Section A.6.1. You can also use more than one attribute column for thematic mapping, such as when drawing pie charts (explained in Section 3.1.9).

The rest of this section presents additional examples of thematic mapping.

Example 2-35 is the XML definition for an Earthquakes theme.

Example 2-35 XML Definition of Styling Rules for an Earthquakes Theme

<?xml version="1.0" standalone="yes"?> 
<styling_rules theme_type="nature"> 
  <rule column="RICHTER_SCALE"> 
    <features style="v.earthquakes"> 
    </features> 
  </rule> 
</styling_rules>

The theme in Example 2-35 has only one rule. The <rule> element includes an attribute named column that does not appear in the Airport theme in Example 2-6. The column attribute specifies one or more columns (comma-delimited) that provide the attribute values needed for thematic mapping. The style specified for the <features> element is named v.earthquakes, and it is an advanced style.

Another part of the definition of the Earthquakes theme specifies the table that contains the data to be rendered. This table must contain a column named RICHTER_SCALE in addition to a column (of type SDO_GEOMETRY) for the spatial data. (The table and the column of type SDO_GEOMETRY must be identified in the BASE_TABLE and GEOMETRY_COLUMN columns, respectively, of the USER_SDO_THEMES view, which is described in Section 2.9.2.) The RICHTER_SCALE column must be of type NUMBER. To understand why, look at the advanced style definition in Example 2-36.

Example 2-36 Advanced Style Definition for an Earthquakes Theme

<?xml version="1.0" ?> 
<AdvancedStyle> 
  <VariableMarkerStyle basemarker="m.circle" startsize="7" increment="4"> 
     <Buckets> 
          <RangedBucket seq="0"  label="less than 4"  high="4"/> 
          <RangedBucket seq="1"  label="4 - 5" low="4" high="5"/> 
          <RangedBucket seq="2"  label="5 - 6" low="5" high="6"/> 
          <RangedBucket seq="3"  label="6 - 7" low="6" high="7"/> 
          <RangedBucket seq="4"  label="7 and up" low="7"/> 
      </Buckets> 
  </VariableMarkerStyle> 
</AdvancedStyle> 

This style specifies that the marker named m.circle is used to indicate the location of an earthquake. The size of the marker to be rendered for an earthquake depends on the numeric value of the RICHTER_SCALE column for that row. In this example there are five buckets, each covering a predetermined range of values. For example, if an earthquake is of magnitude 5.7 on the Richter scale, the marker size will be 15 pixels (7 + 4 + 4), because the value 5.7 falls in the third bucket (5 - 6) and the starting marker size is 7 pixels (startsize="7") with an increment of 4 for each range (increment="4").


Note:

The label attribute value (for example, label="less than 4") is not displayed on the map, but is used only in a label that is compiled for an advanced style.

The seq attribute value (for example, seq="0") is ignored by MapViewer, which determines sequence only by the order in which elements appear in a definition.


Example 2-36 used the <VariableMarkerStyle> tag. The following examples use the <ColorSchemeStyle> tag in creating thematic maps of census blocks in California. Example 2-37 illustrates the use of a graduated color scale for a thematic mapping of population density. Example 2-38 is a thematic mapping of average household income using a graduated color scale. Example 2-39 is also a thematic mapping of average household income, but it uses a specific color style for each income range rather a graduated scale.

Example 2-37 Mapping Population Density Using a Graduated Color Scheme

# ca pop density usbg_hhinfo 
<?xml version="1.0" standalone="yes"?> 
<styling_rules theme_type="political"> 
<rule column="densitycy"> 
   <features style="v.CA Pop density"> 
   </features> 
 </rule> 
</styling_rules> 

The table named USBG_HHINFO includes a column named DENSITYCY (used in Example 2-37). The definition of the style (v.CA Pop density) that corresponds to this population density theme is as follows:

<?xml version="1.0" ?> 
<AdvancedStyle> 
  <ColorSchemeStyle basecolor="#ffff00" strokecolor="#00aaaa"> 
     <Buckets low="0.0" high="20000.0" nbuckets="10"/> 
  </ColorSchemeStyle> 
</AdvancedStyle> 

The base color (basecolor) and the stroke color (strokecolor) are 24-bit RGB (red-green-blue) values specified using a hexadecimal notation. The base color value is used for the first bucket. The color value for each subsequent bucket is obtained by first converting the base color from the RGB to the HSB (hue-saturation-brightness) model and then reducing the brightness by a fixed increment for each bucket. Thus, the first bucket is the brightest and the last is the darkest.

As in Example 2-37, Example 2-38 illustrates the use of a base color and a graduated color scheme, this time to show household income.

Example 2-38 Mapping Average Household Income Using a Graduated Color Scheme

<?xml version="1.0" standalone="yes"?> 
<!-- # ca hh income theme  table = usbg_hhinfo  --> 
<styling_rules> 
<rule column="avghhicy"> 
   <features style="v.ca income"> 
   </features> 
 </rule> 
</styling_rules> 

The table named USBG_HHINFO includes a column named AVGHHICY (used in Example 2-38 and Example 2-39). The definition of the style (v.ca income) that corresponds to this average household income theme is as follows:

<?xml version="1.0" ?> 
<AdvancedStyle> 
  <ColorSchemeStyle basecolor="#ffff00" strokecolor="#00aaaa"> 
  <!-- # income range with a color gradient --> 
     <Buckets> 
          <RangedBucket seq="0" label="less than 10k"  high="10000"/> 
          <RangedBucket seq="1" label="10-15k" low="10000" high="15000"/> 
          <RangedBucket seq="2" label="15-20k" low="15000" high="20000"/> 
          <RangedBucket seq="3" label="20-25k" low="20000" high="25000"/> 
          <RangedBucket seq="4" label="25-35k" low="25000" high="35000"/> 
          <RangedBucket seq="5" label="35-50k" low="35000" high="50000"/> 
          <RangedBucket seq="6" label="50-75k" low="50000" high="75000"/> 
          <RangedBucket seq="7" label="75-100k" low="75000" high="100000"/> 
          <RangedBucket seq="8" label="100-125k" low="100000" high="125000"/>
          <RangedBucket seq="9" label="125-150k" low="125000" high="150000"/>
          <RangedBucket seq="10" label="150-250k" low="150000" high="250000"/>
          <RangedBucket seq="11" label="250-500k" low="250000" high="500000"/>
          <RangedBucket seq="12" label="500k and up"   low="500000"/>
      </Buckets> 
  </ColorSchemeStyle> 
</AdvancedStyle> 

For individual range-based buckets, the lower-bound value is inclusive, while the upper-bound value is exclusive (except for the range that has values greater than any value in the other ranges; its upper-bound value is inclusive). No range is allowed to have a range of values that overlaps values in other ranges.

Example 2-39 uses specific color styles for each average household income range.

Example 2-39 Mapping Average Household Income Using a Color for Each Income Range

<?xml version="1.0" standalone="yes"?> 
<!-- # ca hh income theme  table = usbg_hhinfo  --> 
<styling_rules> 
<rule column="avghhicy"> 
   <features style="v.ca income 2"> 
   </features> 
 </rule> 
</styling_rules> 

The definition of the v.ca income 2 style is as follows:

<?xml version="1.0" ?>
<AdvancedStyle>
 <BucketStyle>
  <Buckets>
   <!-- # income ranges with specific colors -->
   <RangedBucket seq="0" label="less than 10k"  high="10000" style="c.rb13_1"/>
   <RangedBucket seq="1" label="10-15k" low="10000" high="15000" style="c.rb13_2"/>
   <RangedBucket seq="2" label="15-20k" low="15000" high="20000" style="c.rb13_3"/>
   <RangedBucket seq="3" label="20-25k" low="20000" high="25000" style="c.rb13_4"/>
   <RangedBucket seq="4" label="25-35k" low="25000" high="35000" style="c.rb13_5"/>
   <RangedBucket seq="5" label="35-50k" low="35000" high="50000" style="c.rb13_6"/>
   <RangedBucket seq="6" label="50-75k" low="50000" high="75000" style="c.rb13_7"/>
   <RangedBucket seq="7" label="75-100k" low="75000" high="100000" style="c.rb13_8"/>
   <RangedBucket seq="8" label="100-125k" low="100000" high="125000" style="c.rb13_9"/>
   <RangedBucket seq="9" label="125-150k" low="125000" high="150000" style="c.rb13_10"/>
   <RangedBucket seq="10" label="150-250k" low="150000" high="250000" style="c.rb13_11"/>
   <RangedBucket seq="11" label="250-350k" low="250000" high="350000" style="c.rb13_12"/>
   <RangedBucket seq="12" label="350k and up"   low="350000" style="c.rb13_13"/>
  </Buckets>
 </BucketStyle>
</AdvancedStyle>

Each <RangedBucket> definition has a specified style.

The following examples create an advanced style to identify gasoline stations operated by different oil companies, and a theme that uses the style. A <CollectionBucket> tag is used to associate a column value (Shell; Esso; Texaco; BP; any of Avia, Benzinex, Q8, Total, Witte Pomp; and all others for a default category) with a style appropriate for that company's stations, as shown in Example 2-40.

Example 2-40 Advanced Style Definition for Gasoline Stations Theme

<?xml version="1.0" ?> 
<AdvancedStyle> 
<BucketStyle> 
 <Buckets> 
  <CollectionBucket seq="0" label="Shell" style="m.shell gasstation"> 
   Shell 
  </CollectionBucket> 
  <CollectionBucket seq="1" label="Esso" style="m.esso gasstation"> 
   Esso 
  </CollectionBucket> 
  <CollectionBucket seq="2" label="Texaco"  style="m.texaco gasstation"> 
   Texaco 
 </CollectionBucket> 
  <CollectionBucket seq="3" label="BP"  style="m.bp gasstation"> 
   BP 
  </CollectionBucket> 
  <CollectionBucket seq="4" label="Other"  style="m.generic gasstation"> 
   Avia,Benzinex,Q8,Total,Witte Pomp 
  </CollectionBucket> 
  <CollectionBucket seq="5" label="DEFAULT" style="m.default gasstation">
   #DEFAULT#
  </CollectionBucket>
  </Buckets>
</BucketStyle> 
</AdvancedStyle> 

Notes on Example 2-40:

  • m.esso gasstation, m.texaco gasstation, and the other style names have a space between the words in their names.

  • The names are not case-sensitive. Therefore, be sure not to use case as a way of differentiating names. For example, m.esso gasstation and M.ESSO GASSTATION are considered the same name.

  • A default collection bucket can be specified by using #DEFAULT# as its value. This bucket is used for any column values (gas station names) that are not specified in the other buckets.

A theme (theme_gasstation) is then defined that specifies the column (MERK) in the table that contains company names. The styling rules of the theme are shown in Example 2-41.

Example 2-41 Styling Rules of Theme Definition for Gasoline Stations

<?xml version="1.0" standalone="yes"?> 
<styling_rules> 
  <rule column="merk"> 
    <features style="v.gasstations"> 
    </features> 
    <label column="merk" style="t.SansSerif red 10"> 
      1 
    </label> 
  </rule> 
</styling_rules> 

This theme depends on a table named NED_GASSTATIONS, which has the columns shown in Table 2-2 (with column names reflecting the fact that the developer's language is Dutch).

Table 2-2 Table Used with Gasoline Stations Theme

ColumnData Type

FID

NOT NULL NUMBER

ID

NUMBER

NAAM

VARCHAR2(31)

STRAAT_

VARCHAR2(30)

NR

NUMBER

TV

VARCHAR2(1)

AAND

VARCHAR2(2)

PCODE

VARCHAR2(6)

PLAATS

VARCHAR2(10)

GEOM

SDO_GEOMETRY

MERK

VARCHAR2(40)


In this table, the GEOM column contains spatial geometries, and the MERK column contains company names (Shell, Esso, and so on).

The styling rules for the theme_gasstation theme specify that the marker (style v.gasstations) at a location specified by the content of the GEOM column is determined by the value of the MERK column for that row. The style v.gasstations (see Example 2-40) specifies that if the column value is Shell, use the style m.shell gasstation; if the column value is Esso, use the style m.esso gasstation; and so on, including if the column value is any one of Avia, Benzinex, Q8, Total, and Witte Pomp, use the style m.generic gasstation; and if the column value is none of the preceding, use the style m.default gasstation.

2.3.10.1 Thematic Mapping Using External Attribute Data

Previous discussion of thematic mapping has assumed that both the attribute data (such as population of sales totals) and the geospatial data (geometry objects representing boundaries, locations, and so on) are in the same database. However, the attribute data can come from a source outside the current database; for example, the attribute data might reflect aggregated results of a business intelligence (BI) query performed on a different database, or the attribute data might come from a comma-delimited list of sales values exported from a spreadsheet. Such attribute data, from outside the database that contains the geospatial data, is called external attribute data.

To use external attribute data with MapViewer, you must use the nonspatial data provider plug-in mechanism, in which a custom data provider is associated with a MapViewer theme (predefined or dynamic) in the same map request. When MapViewer process the theme, it calls the nonspatial data provider to join nonspatial attribute data with the spatial data that has been fetched for the theme.

To use a nonspatial data provider, follow these steps:

  1. Implement your Java nonspatial data provider by implementing the MapViewer defined interface oracle.mapviewer.share.ext.NSDataProvider.

  2. Register the nonspatial data provider implementation with MapViewer (in its configuration file). There you can also specify a set of global parameters that your implementation may depend on. Note that each custom data provider implementation class must have a unique ID that you assign.

  3. Place a library containing the nonspatial data provider implementation classes in the library path of MapViewer, such as its web/WEB-INF/lib directory.

  4. Include the nonspatial data provider implementation in a map request by invoking the following method on the MapViewer Java client API class MapViewer:

    addNSDataProvider(java.lang.String providerId,
                      java.lang.String forTheme,
                      java.lang.String spatialKeyColumn,
                      java.lang.String customRenderingStyle,
                      java.util.Properties params,
                      long timeout)
    

    For information about the addNSDataProvider parameters, see the Javadoc reference information for MapViewer, available at a URL in the form http://host:port/mapviewer/mapclient, where host and port indicate where OC4J or Oracle Fusion Middleware listens for incoming requests. For example: http://www.mycorp.com:8888/mapviewer/mapclient

Example 2-42 shows a simple nonspatial data provider implementation. This implementation is also supplied with MapViewer as a default nonspatial data provider.

Example 2-42 Nonspatial (External) Data Provider Implementation

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Properties;
import java.util.Vector;
 
import oracle.mapviewer.share.ext.NSDataSet;
import oracle.mapviewer.share.ext.NSDataProvider;
import oracle.mapviewer.share.ext.NSRow;
import oracle.lbs.util.Logger;
 
import oracle.mapviewer.share.Field;
 
/**
 * A simple implementation of the NSDataProvider interface. When invoked, it supplies tabular attribute data to MapViewer out
 * of a file or URL. The data in the file must be orgazined as following: <br>
 * <UL>
 *   <LI> The first line contain a single character which is the delimiter
 *        between columns in the subsequent lines.
 *   <LI> Each line after the first in the file represent one data row
 *   <LI> Each field in the row must be separated by the delimiter char only
 *   <LI> The first field in each line must be a string (key) that serves as the
 *         key; the rest of the fields must be numeric values
 * </UL>
 *
 * When incorporating this data provider in a map request, one of the following
 * two parameters must be specified:
 * <UL>
 *   <LI> file  if the custom data is stored in a local file; this parameter
 *        specifies the full path to that file
 *   <LI> url  if the custom data can be accessed from a web; this parameter
 *        specifeis the full URL to the data file.
 * </UL>
 *
 *
 */
public class NSDataProviderDefault implements NSDataProvider
{
  private static Logger log = Logger.getLogger("oracle.sdovis.nsdpDefault");
 
  public boolean init(Properties params)
  {
    return true;
  }
 
  public NSDataSet buildDataSet(Properties params)
  {
    String file = params.getProperty("file");
    if(file!=null)
      return readFromFile(file);
 
    String url = params.getProperty("url");
    if(url!=null)
      return readFromUrl(url);
 
    log.error("Must supply either file or url for default NS data provider.");
    return null;
  }
 
  public void destroy()
  {
  }
 
  protected NSDataSet readFromFile(String file)
  {
    BufferedReader in = null;
    try{
      in   = new BufferedReader(new FileReader(file));
      String line = in.readLine();
      String delimiter = line.substring(0,1);
 
      Vector rows = new Vector();
 
      while ( (line=in.readLine()) != null)
      {
        NSRow row = buildRow(line, delimiter);
        if(row!=null)
          rows.add(row);
      }
 
      NSDataSet res = new NSDataSet(rows);
      return res;
    }catch(Exception ex)
    {
      log.error(ex);
      return null;
    } finally
    {
      try{
        if(in!=null)
          in.close();
      }catch(Exception e){}
    }
  }
 
  protected NSDataSet readFromUrl(String url)
  {
    log.error("url not supported yet.");
    return null;
  }
 
  protected NSRow buildRow(String line, String delimiter)
  {
    if(line==null || line.length()<1)
      return null;
 
    String[] fields = line.split(delimiter);
    if(fields==null || fields.length==0)
      return null;
 
    Field[] row = new Field[fields.length];
 
    Field a = new Field(fields[0]);
    a.setKey(true);
 
    row[0] = a;
 
    for (int i = 1; i < fields.length; i++)
    {
      try{
        double d = Double.parseDouble(fields[i]);
        a = new Field(d);
        row[i] = a;
      }catch(Exception e)
      {
        log.warn("invalid row field (key="+fields[0]+")");
        return null;
      }
    }
 
    return new NSRow(row);
 
  }
}

2.3.11 Attributes Affecting Theme Appearance

Some attributes of the <theme> element affect only the appearance of the map display, rather than determining the data to be associated with the theme. These appearance-related attributes control whether and how the theme is processed and rendered when a map is generated. Examples include the following attributes:

  • min_scale and max_scale determine whether or not a theme is displayed at various map scales (levels of resolution). For example, if you are displaying a map of streets, there are certain map scales at which the streets would become too dense for a usable display, such as when viewing an entire state or province. In this case, you should create a theme for streets, and specify minimum and maximum scale values to ensure that individual streets affected by the theme are displayed when the scale is appropriate and otherwise are not displayed.

  • labels_always_on determines whether or not labels for the theme will be displayed if they would overlap another label. By choosing appropriate labels_always_on values and choosing an appropriate order of themes to be processed within a map request, you can control how cluttered the labels might become and which labels have priority in getting displayed.

  • fast_unpickle determines the unpickling (unstreaming) method to be used, which can involve a trade-off between performance and precision in the display.

  • fixed_svglabel, visible_in_svg, selectable_in_svg, onclick, onmousemove, onmouseover, and onmouseout affect the appearance of SVG maps.

To specify any appearance-related attributes, use the <theme> element (described in Section 3.2.20) with the XML API or the JavaBean-based API (see especially Section 4.3).

2.4 Maps

A map can consist of a combination of elements and attributes, such as the following:

  • Background image

  • Title

  • Legend

  • Query window

  • Footnote (such as for a copyright notice)

  • Base map

  • Predefined themes (in addition to any in the base map)

  • JDBC themes (with dynamic queries)

  • Dynamically defined (temporary) styles

These elements and attributes, when specified in a map request, define the content and appearance of the generated map. Chapter 3 contains detailed information about the available elements and attributes for a map request.

A map can have a base map and a stack of themes rendered on top of each other in a window. A map has an associated coordinate system that all themes in the map must share. For example, if the map coordinate system is 8307 (for Longitude / Latitude (WGS 84), the most common system used for GPS devices), all themes in the map must have geometries defined using that coordinate system.

You can add themes to a map by specifying a base map name or by using the programming interface to add themes. The order in which the themes are added determines the order in which they are rendered, with the last specified theme on top, so be sure you know which themes you want in the background and foreground.

All base map names and definitions for a database user are stored in that user's USER_SDO_MAPS view, which is described in Section 2.9 and Section 2.9.1. The DEFINITION column in the USER_SDO_MAPS view contains an XML definition of a base map.

Example 2-43 shows a base map definition.

Example 2-43 XML Definition of a Base Map

<?xml version="1.0" ?>
<map_definition>
<theme name="theme_us_states"    min_scale="10"  max_scale="0"/>
<theme name="theme_us_parks"     min_scale="5"   max_scale="0"/>
<theme name="theme_us_highways"  min_scale="5"   max_scale="0"/>
<theme name="theme_us_streets"   min_scale="0.05" max_scale="0"/>
</map_definition>

Each theme in a base map can be associated with a visible scale range within which it is displayed. In Example 2-43, the theme named theme_us_streets is not displayed unless the map request is for a map scale of 0.05 or less and greater than 0 (in this case, a scale showing a great deal of detail). If the min_scale and max_scale attributes are not specified, the theme is displayed whenever the base map is displayed. (For more information about map scale, see Section 2.4.1.)

The display order of themes in a base map is the same as their order in the base map definition. In Example 2-43, the theme_us_states theme is rendered first, then theme_us_parks, then theme_us_highways, and finally (if the map scale is within all specified ranges) theme_us_streets.

2.4.1 Map Size and Scale

Map size is the height of the map in units of the map data space. For example, if the map data is in WGS 84 geographic coordinates, the map center is (-120.5, 36.5), and the size is 2, then the height of the map is 2 decimal degrees, the lower Y (latitude) value is 35.5 degrees, and the upper Y value is 37.5 decimal degrees.

Map scale is expressed as units in the user's data space that are represented by 1 inch on the screen or device. Map scale for MapViewer is actually the denominator value in a popular method of representing map scale as 1/n, where:

  • 1, the numerator, is 1 unit (1 inch for MapViewer) on the displayed map.

  • n, the denominator, is the number of units of measurement (for example, decimal degrees, meters, or miles) represented by 1 unit (1 inch for MapViewer) on the displayed map.

For example:

  • If 1 inch on a computer display represents 0.5 decimal degree of user data, the fraction is 1/0.5. The decimal value of the fraction is 2.0, but the scale value for MapViewer is 0.5.

  • If 1 inch on a computer display represents 2 miles of user data, the fraction is 1/2. The decimal value of the fraction is 0.5, but the scale value for MapViewer is 2.

  • If 1 inch on a computer display represents 10 miles of user data, the fraction is 1/10. The decimal value of the fraction is 0.1, but the scale value for MapViewer is 10.

The min_scale and max_scale attributes in a <theme> element describe the visible scale range of a theme. These attributes control whether or not a theme is displayed, depending on the current map scale. The default scale value for min_scale is positive infinity, and the default value for max_scale is negative infinity (or in other words, by default display the theme for all map scales, if possible given the display characteristics).

  • min_scale is the value to which the display must be zoomed in for the theme to be displayed. For example, if parks have a min_scale value of 5 and if the current map scale value is 5 or less but greater than the max_scale value, parks will be included in the display; however, if the display is zoomed out so that the map scale value is greater than 5, parks will not be included in the display.

  • max_scale is the value beyond which the display must be zoomed in for the theme not to be displayed. For example, if counties have a max_scale value of 3 and if the current map scale value is 3 or less, counties will not be included in the display; however, if the display is zoomed out so that the map scale value is greater than 3, counties will be included in the display.

A high min_scale value is associated with less map detail and a smaller scale in cartographic terms, while a high max_scale value is associated with greater map detail and a larger scale in cartographic terms. (Note that the MapViewer meaning of map scale is different from the popular meaning of cartographic map scale.) The min_scale value for a theme should be larger than the max_scale value. Example 2-43 in Section 2.4 includes min_scale and max_scale values.

You also assign scale values for theme labels, to enable the showing or hiding of labels with values different from the base theme scales, by using the theme label scale parameters label_min_scale and label_max_scale. These parameters are similar to the min_scale and max_scale parameters, but the labels are shown if the map scale is in the visible range defined by label_min_scale and label_max_scale. (The label scale values are ignored if the theme is not in the visible scale range defined by min_scale and max_scale.) The following is a theme definition with label scale values; the labels will be shown when the map scale is between 5 and 2, but the theme features will be shown when the map scale is between 10 and 0:

<theme name="theme_us_states" min_scale="10" max_scale="0" 
     label_min_scale="5" label_max_scale="2"/>

To determine the current map scale for a map returned by MapViewer, first find the map size, namely the height (vertical span) of the map in terms of the coordinate system associated with the map data. For example, assume that a map with a height of 10 (miles, meters, decimal degrees, or whatever unit of measurement is associated with the data) is requested, and that the map is drawn on a device with a size of 500 by 350 pixels, where 350 is the height. MapViewer assumes a typical screen resolution of 96 dpi. Because 96 pixels equals 1 inch, the height of the returned map is 3.646 inches (350/96 = 3.646). In this example, the size of the map is 10, and therefore the map scale is approximately 2.743 (10/3.646 = 2.743).

Alternatively, you can request a map using a map scale value without specifying a unit, such as 50000 for a scale of 1:50000, by specifying the scale_mode theme attribute value as ratio. (If the scale_mode theme attribute value is screen_inch, the scale refers to a unit.) To use a scale defined without a unit, request the map specifying the center and ratio scale.

To find the equivalent MapViewer screen inch scale for a ratio scale, follow these steps:

  1. Find the numerical fraction of a meter associated with one screen pixel. For example, if the screen resolution is 96 dpi (dots per inch), the number of meters on the screen for each screen pixel is 0.000265 (that is, 0.0254/96).

  2. Find the map scale for one screen pixel (the mapdotScale value), as follows:

    • For projected data (meters), multiply the result of step 1 by the ratio scale. For example, if the ratio scale is 50000 (50 thousand) and the screen resolution is 96 dpi, the result is 13.25 meters for each pixel (50000 * 0.000265).

    • For geodetic data (degrees), multiply the result of step 1 by the number of meters (on the surface of the Earth) for each degree. (This number will depend on the coordinate system associated with the data.) For example, if one degree = 111195 meters and if the screen resolution is 96 dpi, the result is 29.466675 meters for each pixel (111195 * 0.000265).

    • For data using any other unit, use the approach for projected data using meters.

  3. Because the MapViewer scale is per screen inch instead of per screen pixel, multiply the result of step 2 by the dpi value. For example, if the result of step 2 is 13.25 meters at 96 dpi, the number of meters for each screen inch is 1272 (13.25 * 96).

2.4.2 Map Legend

A map legend is an inset illustration drawn on top of the map and describing what various colors, symbols, lines, patterns, and so on represent. You have flexibility in specifying the content and appearance of the legend. You can:

  • Customize the background, border style, and font

  • Have one or more columns in the legend

  • Add space to separate legend entries

  • Indent legend entries

  • Use any MapViewer style, including advanced styles

Example 2-44 is an excerpt from a request that includes a legend.

Example 2-44 Legend Included in a Map Request

<?xml version="1.0" standalone="yes"?>
<map_request
             basemap="density_map"
             datasource = "mvdemo">
  <center size="1.5">
     . . .
  </center>

  <legend bgstyle="fill:#ffffff;fill-opacity:128;stroke:#ff0000" 
          position="NORTH_WEST" font="Dialog">
    <column>
      <entry text="Map Legend" is_title="true"/>
      <entry style="M.STAR" text="center point"/>
      <entry style="M.CITY HALL 3" text="cities"/>
      <entry is_separator="true"/>
      <entry style="C.ROSY BROWN STROKE" text="state boundary"/>
      <entry style="L.PH" text="interstate highway"/>
      <entry text="County population:"/>
      <entry style="V.COUNTY_POP_DENSITY" tab="1"/>
    </column>
  </legend>

  <themes>
     . . .    
  </themes>
  
</map_request>  

Figure 2-9 shows a map with the legend specified in Example 2-44.

Figure 2-9 Map with Legend

Description of Figure 2-9 follows

Notes on Example 2-44 and Figure 2-9:

  • This example shows a legend with a single column, although you can create multiple columns in a legend.

  • Each entry in the column definition can identify label text and whether the text is the legend title (is_title="true"), a style name and associated text, or a separator (is_separator="true") for vertical blank space to be added (after the cities entry in this example).

As an alternative to specifying the legend content in one or more <column> elements, you can request an automatic legend based on the map request. With an automatic legend, you specify the legend header, and MapViewer generates the legend based on the themes that have any interaction with the map area. Themes from the map request and from the base map are considered. (Some legend items might not be visible, though, such as if a theme interacts with the query window but no features of the theme are visible on the map.)

Example 2-45 is a map request that requests an automatic legend (because the <legend> element does not include any <column> elements).

Example 2-45 Map Request with Automatic Legend

<?xml version="1.0" standalone="yes"?>
<map_request
             title="Automatic legend"
             datasource = "mvdemo"
             width="640"
             height="480"
             bgcolor="#a6cae0"
             antialiase="false"
             format="PNG_STREAM">
  <center size="4.5">
     <geoFeature >
         <geometricProperty typeName="center">
             <Point>
                 <coordinates>-122.2615, 37.5266</coordinates>
             </Point>
         </geometricProperty>
     </geoFeature>
  </center>
 
  <themes>
    <theme name="THEME_COUNTIES_3397829" />
    <theme name="THEME_US_ROAD1" />
    <theme name="THEME_US_AIRPORT" />
  </themes>
 
 <legend bgstyle="fill:#ffffff;fill-opacity:128;stroke:#ff0000;stroke-opacity:128" profile="medium" font="Courier">
  </legend>
 
</map_request>

Example 2-46 requests an automatic legend in which the <legend> elements specifies the themes to be used to generate the legend items. In this example, even if the map result shows more themes, the legend items are based on the THEME_COUNTIES_3397829 and THEME_US_AIRPORT themes specified in the <legend> element.

Example 2-46 Automatic Legend with Themes Specified

<map_request
             title="Legend with themes defined"
             datasource = "mvdemo"
             width="640"
             height="480"
             bgcolor="#a6cae0"
             antialiase="false"
             format="PNG_STREAM">
  <center size="4.5">
     <geoFeature >
         <geometricProperty typeName="center">
             <Point>
                 <coordinates>-122.2615, 37.5266</coordinates>
             </Point>
         </geometricProperty>
     </geoFeature>
  </center>
 
  <themes>
    <theme name="THEME_COUNTIES_3397829" />
    <theme name="THEME_US_ROAD1" />
    <theme name="THEME_US_AIRPORT" />
  </themes>
 
 <legend bgstyle="fill:#ffffff;fill-opacity:128;stroke:#ff0000;stroke-opacity:128" profile="medium" font="Courier">
  <themes>
    <theme name="THEME_COUNTIES_3397829" />
    <theme name="THEME_US_AIRPORT" />
  </themes>
 </legend>
 
</map_request>

You cannot combine an automatic legend with the use of <column> elements. If the <legend> element contains any <column> elements, a column/entry legend is created.

MapViewer used the following considerations when it builds automatic legend items:

  • Each legend column has a maximum of five entries (an advanced style is considered one entry).

  • The legend text for simple rendering styles comes from the theme description if defined, otherwise from the theme name.

  • If a rendering style is used in more than one theme, the style is repeated in the legend but with text related to the theme to which it applies.

  • Labeling styles are not repeated in the legend. The style text for labeling styles comes from the style description.

  • Advanced styles are not repeated in the legend.

For detailed information about adding a legend to a map request, see Section 3.2.11.

If you also specify a map title, note, or logo (or any combination), be sure that the legend and the other features have different positions. (Map titles, notes, and logos are explained in Section 1.5.2.5.) The default position for a legend is SOUTH_WEST.

2.5 Data Sources

A data source corresponds to a database schema or user. Before you can draw any spatial data in a database schema, you must first define (create) a data source for the schema, either permanently or dynamically:

  • You can define a data source permanently by specifying its connection information and user login credentials in the MapViewer configuration file (mapViewerConfig.xml).

  • You can define or modify a data source dynamically using the MapViewer administration (Admin) page.

Each map request must specify a master data source. You can, however, specify a different data source for individual themes added to the map request. This makes it easy to aggregate data stored across different database schemas. If a theme has no specified data source, it is associated with the master data source. A base map (and thus the themes included in it) is always associated with the master data source. When a theme is processed, all of its underlying data, as well as the styles referenced in its definition, must be accessible from the data source or sources associated with the theme.

Each data source has associated renderers (sometimes called mappers or map makers), the number of which is determined by the number_of_mappers attribute in the <map_data_source> element. This attribute and the max_connections attribute (both described in Section 1.5.2.14) affect the number of database connections created for each data source when map requests are processed. The number of renderers specified in a data source also is the maximum number of concurrent requests that can be processed for that data source. Each additional renderer requires only a small amount of memory, so the main potential disadvantage of specifying a large number of renderers (such as 100) is that the underlying CPU resource might be strained if too many map requests are allowed to come through, thus affecting the performance of the entire MapViewer server.

Each data source has its own internal metadata cache. The metadata cache holds the definitions of all accessed styles, as well as of all predefined themes that originate from the data source. This eliminates the need to query the database repeatedly for the definition of a style or predefined theme whenever it is needed.

2.6 How a Map Is Generated

When a map request arrives at the MapViewer server, the server picks a free renderer associated with the master data source in the request. This section describes the process that the MapViewer server follows to generate a map. In brief, MapViewer performs the following steps:

  1. Parse and process the incoming XML map request.

  2. Prepare the data for each theme (executed in parallel).

  3. Render and label each theme.

  4. Generate final images or files.

Each map generated by MapViewer results from its receiving a valid XML map request. (If you use the JavaBean-based API, the request is automatically converted to an XML document and passed to the MapViewer server.) The XML map request is parsed and its content is validated. MapViewer then creates any dynamic styles specified in the XML request. It builds a theme list from all themes included in the base map (if a base map is specified), as well as any specified predefined or JDBC themes. All individual features in the request are grouped into a single temporary theme. In other words, after parsing the incoming request, all data that must be shown on the map is presented in a list of themes to the MapViewer rendering engine.

The ordering of the themes in the list is important, because it determines the order in which the themes are rendered. All themes included in the base map (when present) are added to the list first, followed by all specified themes (predefined or JDBC). The theme that contains all the individual features is added as the last theme on the list. Any other requested features of a map (such as legend, map title, or footnote), are created and saved for rendering later.

For each theme in the request, MapViewer then creates a separate execution thread to prepare its data, so that preparation of the themes takes place in parallel. For a predefined theme, this means formulating a query based on the theme's definition and any other information, such as the current map request window. This query is sent to the database for execution, and the result set is returned. MapViewer creates individual renderable objects based on the result set.

  • For predefined themes that are fully cached, no query is sent to the database, because all renderable objects are readily available.

  • For JDBC themes, the query supplied by the user is either executed as is (when the asis attribute value is TRUE in the JDBC theme definition) or with a spatial filter subquery automatically applied to it. The spatial filter part is used to limit the results of the user's query to those within the current requested window.

  • For themes that already have renderable features (such as the one containing all individual features in a request), there is no need to create renderable objects.

After all themes for the map request have been prepared and all necessary data has been collected, MapViewer starts to render the map. It creates an empty new in-memory image to hold the result map, and paints the empty image with the necessary backgrounds (color or image). It then renders all of the themes in the theme list.


Note:

All image or GeoRaster themes are always rendered first, regardless of their position in the theme list. All other themes, however, are rendered in the order in which they appear in the theme list.

For each theme, features are rendered in an order determined internally by MapViewer. The rendering of each feature involves invoking the drawing methods of its rendering style. After all themes have been rendered, the labeling process starts. For each theme whose features must be labeled with text, MapViewer invokes algorithms to label each feature, with the specific algorithm depending on the type of feature (such as polygon or line).

After all themes have been rendered and (when needed) labeled, MapViewer plots any additional map features (such as a legend) on the internal map image. MapViewer then converts that image into the desired format (such as PNG or GIF) specified in the original map request; however, for SVG maps, instead of using an internal image, MapViewer initially creates an empty SVG map object, then creates an SVG document as a result of the rendering process, and inserts it into the map object.

2.7 Cross-Schema Map Requests

A database user can issue a map request specifying a theme that uses data associated with another database user, to select data from tables that the other data source user is authorized to access. For example, assume that user SCOTT wants to issue a map request using data associated with user MVDEMO. In general, user SCOTT must be granted SELECT access on relevant tables owned by user MVDEMO, and the <theme> element should generally specify any tables in schema-name.table-name format. In this example scenario:

  • For a geometry table, grant the SELECT privilege on the geometry table of MVDEMO to SCOTT (see Example 2-47).

  • For a GeoRaster table, grant the SELECT privilege on the GeoRaster table and raster data table or tables of MVDEMO to SCOTT (see Example 2-48).

  • For a topology data model table, grant the SELECT privilege on the topology table, topology column index table, and related topology information tables (topology-name_EDGE$, topology-name_NODE$, topology-name_FACE$, topology-name_RELATION$) of MVDEMO to SCOTT (see Example 2-49).

  • For network data model tables, grant the SELECT privilege on the network link, node, path, and path-link tables of MVDEMO to SCOTT (see Example 2-50).

Example 2-47 shows a dynamic theme that accesses the MVDEMO.STATES geometry table from a data source defined on the SCOTT user.

Example 2-47 Cross-Schema Access: Geometry Table

SQL> grant select on STATES to SCOTT;
. . .
<themes>
  <theme name="theme1">
     <jdbc_query
       datasource="scottds"
       spatial_column="geom"
       render_style="MVDEMO:C.COUNTIES"
       jdbc_srid="8265"
       >SELECT geom from MVDEMO.STATES</jdbc_query>
   </theme>
</themes>

Example 2-48 shows a dynamic theme that accesses the MVDEMO.GEORASTER_TABLE GeoRaster table and its RDT from a data source defined on the SCOTT user. Specify the base (GeoRaster) table in schema-name.table-name format.

Example 2-48 Cross-Schema Access: GeoRaster Table

SQL> grant select on GEORASTER_TABLE to SCOTT;
SQL> grant select on RDT_GEOR1 to SCOTT;
. . .
<themes>
  <theme name="georaster_theme">
    <jdbc_georaster_query
       georaster_table="MVDEMO.georaster_table"
       georaster_column="georaster"
       raster_table="rdt_geor1"
       raster_id="1"
       jdbc_srid="8307"
       datasource="scottds"
       asis="false">
     </jdbc_georaster_query>
  </theme>
</themes>

Example 2-49 shows a dynamic theme that accesses the MVDEMO.LAND_PARCELS topology table and information tables for the CITY_DATA topology from a data source defined on the SCOTT user. Specify the feature table and the topology in schema-name.object-name format, if they are owned by a different schema than the one associated with the data source.

Example 2-49 Cross-Schema Access: Topology Feature Table

SQL> grant select on CITY_DATA_FACE$ to SCOTT;
SQL> grant select on CITY_DATA_EDGE$ to SCOTT;
SQL> grant select on CITY_DATA_NODE$ to SCOTT;
SQL> grant select on CITY_DATA_RELATION$ to SCOTT;
SQL> grant select on LAND_PARCELS to SCOTT;
SQL> grant select on <topology-column-index-table-name> to SCOTT;
. . .
<themes>
  <theme name="topo_theme" >
     <jdbc_topology_query
       topology_name="MVDEMO.CITY_DATA"
       feature_table="MVDEMO.LAND_PARCELS"
       spatial_column="FEATURE"
       render_style="MVDEMO:C.COUNTIES"
       jdbc_srid="0"
       datasource="scottds"
       asis="false">select feature from MVDEMO.land_parcels
     </jdbc_topology_query>
   </theme>
</themes>

In Example 2-49, you must grant SELECT on the topology column index table name (<topology-column-index-table-name>) because the spatial index table associated with the feature table topology column is used by MapViewer in topology queries. You can determine the topology column index table name as follows. Assume the following information:

  • Topology feature table owner: MVDEMO

  • Topology feature table name: LAND_PARCELS

  • Topology feature table topology column name: FEATURE

The following query returns the index table name (in this example, MDTP_14E60$):

SQL> select sdo_index_table from all_sdo_index_info
     where table_owner = 'MVDEMO'
     and table_name = 'LAND_PARCELS'
     and column_name = 'FEATURE'
 
SDO_INDEX_TABLE
--------------------------------
MDTP_14E60$

Then, modify the last GRANT statement in Example 2-49, "Cross-Schema Access: Topology Feature Table" to specify the <topology-column-index-table-name>. In this case:

SQL> grant select on MDTP_14E60$ to SCOTT;

Example 2-50 shows a dynamic theme that accesses the MVDEMO.BI_TEST network and its link, node, path, and path-link tables. Specify the network name in schema-name.network-name format.

Example 2-50 Cross-Schema Access: Network Tables

SQL> grant select on BI_TEST_LINK$ to SCOTT;
SQL> grant select on BI_TEST_NODE$ to SCOTT;
SQL> grant select on BI_TEST_PATH$ to SCOTT;
SQL> grant select on BI_TEST_PLINK$ to SCOTT;
. . .
<themes>
  <theme name="net_theme" >
     <jdbc_network_query
       network_name="MVDEMO.BI_TEST"
       network_level="1"
       jdbc_srid="0"
       datasource="scottds"
       link_style="MVDEMO:C.RED"
       node_style="MVDEMO:M.CIRCLE"
       node_markersize="5"
       asis="false">
     </jdbc_network_query>
   </theme>
</themes>

2.8 Workspace Manager Support in MapViewer

Workspace Manager is an Oracle Database feature that lets you version-enable one or more tables in the database. After a table is version-enabled, users in a workspace automatically see the correct version of database rows in which they are interested. For detailed information about Workspace Manager, see Oracle Database Worbkspace Manager Developer's Guide.

You can request a map from a specific workspace, at a specific savepoint in a workspace, or at a point close to a specific date in a workspace. The following attributes of the <theme> element are related to support for Workspace Manager:

  • workspace_name attribute: specifies the name of the workspace from which to get the map data.

  • workspace_savepoint attribute: specifies the name of the savepoint to go to in the specified workspace.

  • workspace_date attribute: specifies the date to go to (that is, a point at or near the specified date) in the specified workspace.

  • workspace_date_format attribute: specifies the date format. The default is mmddyyyyhh24miss. This attribute applies only if you specified the workspace_date attribute.

  • workspace_date_nlsparam attribute: specifies globalization support options. The options and default are the same as for the nlsparam argument to the TO_CHAR function for date conversion, which is described in Oracle Database SQL Language Reference.

  • workspace_date_tswtz attribute: specifies a Boolean value. TRUE means that the input date is in timestamp with time zone format; FALSE (the default) means that the input date is a date string.

The workspace_name attribute is required for the use of Workspace Manager support in MapViewer.

If you specify neither the workspace_savepoint nor workspace_date attribute, MapViewer goes to the latest version of the workspace defined. If you specify both the workspace_savepoint and workspace_date attributes, MapViewer uses the specified date instead of the savepoint name.

Example 2-51 shows the definition of a dynamic theme that uses attributes (shown in bold) related to Workspace Manager support. In this example, MapViewer will render the data related to workspace wsp_1 at the savepoint sp1.

Example 2-51 Workspace Manager-Related Attributes in a Map Request

<?xml version="1.0" standalone="yes"?>
<map_request
 . . .
  <themes>
    <theme name="wmtheme" user_clickable="false"
       workspace_name="wsp_1" workspace_savepoint="sp1" >
       <jdbc_query
         spatial_column="GEOM"
         render_style="stylename"
         jdbc_srid="8307"
         datasource="mvdemo"
         asis="false"> select GEOM,ATTR from GEOM_TABLE
       </jdbc_query>
     </theme>
  </themes>
 . . .
</map_request>

The following considerations apply to MapViewer caching of predefined themes (explained in Section 2.3.1.5) and the use of Workspace Manager-related MapViewer attributes:

  • The Workspace Manager-related attributes are ignored for predefined themes if the caching attribute is set to ALL in the <styling_rules> element for the theme.

  • No caching data is considered if you specify the workspace_name attribute.

For MapViewer administrative requests (discussed in Chapter 7), the following elements are related to Workspace Manager support:

  • <list_workspace_name>

  • <list_workspace_session>

The <list_workspace_name> element returns the name of the current workspace, as specified with the workspace_name attribute in the most recent map request. If no workspace has been specified (that is, if the workspace_name attribute has not been specified in a map request in the current MapViewer session), or if the LIVE workspace has been specified, the LIVE workspace is returned. If Workspace Manager is not currently installed in Oracle Database, the request fails.

Example 2-52 uses the <list_workspace_name> element in an administrative request.

Example 2-52 <list_workspace_name> Element in an Administrative Request

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <list_workspace_name data_source="mvdemo"/>
</non_map_request>

If wsp_1 is the current workspace, the response for Example 2-52 will be:

<?xml version="1.0" ?>
<non_map_response>
  <workspace_name succeed="true" name="wsp_1"/>
</non_map_response>

If no workspace has been specified or if the LIVE workspace has been specified, the response for Example 2-52 will be:

<?xml version="1.0" ?>
<non_map_response>
  <workspace_name succeed="true" name="LIVE"/>
</non_map_response>

If Workspace Manager is not currently installed in Oracle Database, the response for Example 2-52 will be:

<?xml version="1.0" ?>
<non_map_response>
  <workspace_name succeed="false"/>
</non_map_response>

The <list_workspace_session> element returns the names of the current workspace and current context. If no workspace has been specified (that is, if the workspace_name attribute has not been specified in a map request in the current MapViewer session), or if the LIVE workspace has been specified, information for the LIVE workspace is returned. If Workspace Manager is not currently installed in Oracle Database, the request fails.

Example 2-53 uses the <list_workspace_session> element in an administrative request.

Example 2-53 <list_workspace_session> Element in an Administrative Request

<?xml version="1.0" standalone="yes"?>
<non_map_request>
  <list_workspace_session data_source="mvdemo"/>
</non_map_request>

If wsp_1 is the current workspace and if the context is LATEST, the response for Example 2-53 will be:

<?xml version="1.0" ?>
<non_map_response>
  <workspace_session succeed="true" name="wsp_1" context="LATEST"
     context_type="LATEST"/>
</non_map_response>

If no workspace has been specified or if the LIVE workspace has been specified, and if the context is LATEST, the response for Example 2-53 will be:

<?xml version="1.0" ?>
<non_map_response>
  <workspace_session succeed="true" name="LIVE" context="LATEST"
     context_type="LATEST"/>
</non_map_response>

If Workspace Manager is not currently installed in Oracle Database, the response for Example 2-53 will be:

<?xml version="1.0" ?>
<non_map_response>
  <workspace_session succeed="false"/>
</non_map_response>

2.9 MapViewer Metadata Views

The mapping metadata describing base maps, themes, and styles is stored in the global tables SDO_MAPS_TABLE, SDO_THEMES_TABLE, and SDO_STYLES_TABLE, which are owned by MDSYS. However, you should never directly update these tables. Each MapViewer user has the following views available in the schema associated with that user:

  • USER_SDO_MAPS and ALL_SDO_MAPS contain information about base maps. These views are described in Section 2.9.1.

  • USER_SDO_THEMES and ALL_SDO_THEMES contain information about themes. These views are described in Section 2.9.2.

  • USER_SDO_STYLES and ALL_SDO_STYLES contain information about styles. These views are described in Section 2.9.3.


    Note:

    You can use the Map Builder tool (described in Chapter 9) to manage most mapping metadata. However, for some features you must use SQL statements to update the MapViewer metadata views.

The USER_SDO_xxx views contain metadata information about mapping elements (styles, themes, base maps) owned by the user (schema), and the ALL_SDO_xxx views contain metadata information about mapping elements on which the user has SELECT permission.

The ALL_SDO_xxx views include an OWNER column that identifies the schema of the owner of the object. The USER_SDO_xxx views do not include an OWNER column.

All styles defined in the database can be referenced by any user to define that user's themes, markers with a text style, or advanced styles. However, themes and base maps are not shared among users; so, for example, you cannot reference another user's themes in a base map that you create.

The following rules apply for accessing the mapping metadata:

  • If you need to add, delete, or modify any metadata, you must perform the operations using the USER_SDO_xxx views. The ALL_SDO_xxx views are automatically updated to reflect any changes that you make to USER_SDO_xxx views.

  • If you need only read access to the metadata for all styles, you should use the ALL_SDO_STYLES view. Both the OWNER and NAME columns make up the primary key; therefore, when you specify a style, be sure to include both the OWNER and NAME.

The preceding MapViewer metadata views are defined in the following file:

$ORACLE_HOME/lbs/admin/mapdefinition.sql

MapViewer also uses some other metadata views, which may be defined in other files. You should never modify the contents of these views, which include the following:

  • MDSYS.USER_SDO_CACHED_MAPS is used by the map tile server, which is part of Oracle Maps (described in Chapter 8).

  • MDSYS.USER_SDO_TILE_ADMIN_TASKS includes information about long tasks related to map tile management. If you stop a long map tile layer task such as prefetching and then restart the task, MapViewer uses the information in the USER_SDO_TILE_ADMIN_TASKS view to resume the task rather than start over at the beginning.

2.9.1 xxx_SDO_MAPS Views

The USER_SDO_MAPS and ALL_SDO_MAPS views have the columns listed in Table 2-3.

Table 2-3 xxx_SDO_MAPS Views

Column NameData TypeDescription

OWNER

VARCHAR2

Schema that owns the base map (ALL_SDO_MAPS only)

NAME

VARCHAR2

Unique name to be associated with the base map

DESCRIPTION

VARCHAR2

Optional descriptive text about the base map

DEFINITION

CLOB

XML definition of the list of themes and their scale value range information to be associated with the base map


2.9.2 xxx_SDO_THEMES Views

The USER_SDO_THEMES and ALL_SDO_THEMES views have the columns listed in Table 2-4.

Table 2-4 xxx_SDO_THEMES Views

Column NameData TypeDescription

OWNER

VARCHAR2

Schema that owns the theme (ALL_SDO_THEMES only)

NAME

VARCHAR2

Unique name to be associated with the theme

DESCRIPTION

VARCHAR2

Optional descriptive text about the theme

BASE_TABLE

VARCHAR2

Table or view containing the spatial geometry column

GEOMETRY_COLUMN

VARCHAR2

Name of the spatial geometry column (of type SDO_GEOMETRY)

STYLING_RULES

CLOB

XML definition of the styling rules to be associated with the theme


2.9.3 xxx_SDO_STYLES Views

The USER_SDO_STYLES and ALL_SDO_STYLES views have the columns listed in Table 2-5.

Table 2-5 xxx_SDO_STYLES Views

Column NameData TypeDescription

OWNER

VARCHAR2

Schema that owns the style (ALL_SDO_STYLES only)

NAME

VARCHAR2

Unique name to be associated with the style

TYPE

VARCHAR2

One of the following values: COLOR, MARKER, LINE, AREA, TEXT, or ADVANCED

DESCRIPTION

VARCHAR2

Optional descriptive text about the style

DEFINITION

CLOB

XML definition of the style

IMAGE

BLOB

Image content (for example, airport.gif) for marker or area styles that use image-based symbols (for markers) or fillers (for areas)

GEOMETRY

SDO_GEOMETRY

(Reserved for future use)


Depending on the Oracle Database release, the ALL_SDO_STYLES view may contain sample styles owned by the MDSYS schema. If these styles are defined on your system, you can specify them in theme definitions and map requests, and you can examine the XML definitions for ideas to use in defining your own styles.

To specify a style (or other type of MapViewer object) that is owned by a schema other than the one for the current user, you must specify the schema name, and you must use a colon (:), not a period, between the schema name and the object name. The following excerpt from a <jdbc_query> element refers to the style named C.RED owned by the MDSYS schema:

<jdbc_query . . . render_style="MDSYS:C.RED">
. . .
 </jdbc_query>

Example 2-54 finds the names of all currently defined styles owned by the MDSYS schema, and it displays the type, description, and XML definition of one of the styles. (The example output is reformatted for readability.)

Example 2-54 Finding Styles Owned by the MDSYS Schema

SELECT owner, name FROM all_sdo_styles 
  WHERE owner = 'MDSYS';
 
OWNER                            NAME
-------------------------------- --------------------------------
MDSYS                            C.BLACK
MDSYS                            C.BLACK GRAY
MDSYS                            C.BLUE
MDSYS                            C.COUNTIES
MDSYS                            C.FACILITY
. . .
MDSYS                            L.MAJOR STREET
MDSYS                            L.MAJOR TOLL ROAD
MDSYS                            L.MQ_ROAD2
MDSYS                            L.PH
MDSYS                            L.POOR_ROADS
MDSYS                            L.PTH
MDSYS                            L.RAILROAD
MDSYS                            L.RAMP
MDSYS                            L.SH
MDSYS                            L.STATE BOUNDARY
. . .
MDSYS                            M.REDSQ
MDSYS                            M.SMALL TRIANGLE
MDSYS                            M.STAR
MDSYS                            M.TOWN HALL
MDSYS                            M.TRIANGLE
MDSYS                            T.AIRPORT NAME
MDSYS                            T.CITY NAME
MDSYS                            T.MAP TITLE
MDSYS                            T.PARK NAME
MDSYS                            T.RED STREET
MDSYS                            T.ROAD NAME
MDSYS                            T.SHIELD1
MDSYS                            T.SHIELD2
MDSYS                            T.STATE NAME
MDSYS                            T.STREET NAME
. . .
 
-- Display the type, description, and XML definition of one style.
SET LONG 4000;
SELECT owner, name, type, description, definition 
  FROM all_sdo_styles WHERE name = 'L.PH';
 
OWNER   NAME     TYPE       DESCRIPTION
------  -----    ------     ------------------
MDSYS   L.PH     LINE       Primary highways
 
DEFINITION
---------------------------------------------------------------------------
<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<desc></desc>
<g class="line" style="fill:#33a9ff;stroke-width:4">
<line class="parallel" style="fill:#aa55cc;stroke-width:1.0"/>
</g>
</svg>
PK֡PKv\EOEBPS/img/bthemes2.gifwGIF89a   1%!$!)19!11)11!!! 109:! !!$)!()))!)))! 8'1710!14)98)1019<19:9)$B1(J1,R1Hp aJZ-l=1 "̃GxDXos w\`:kO S>0P{F B0rJ҂ޥJw%!,X+ D:J^o(z cY%\ڶ.m|h`x0r,صhm;B"m`,c?1 15s\b=Zֲ6u\_i3q^,c"*!ͣH8cL!A볟M`AK n> |,Yxb{ ~U:863"c`@j0pQ=u<#@ ßd5 &vd.')O,Fr-nX8A< m%f1 =_A cCr;L8U=tꄞ?18n (`XA氌eT 8i }IGC1 FOgdWp}'Wid7nw} (_}fi_fBgX"A$;$:Sa3Y]&փ=GCm9|m` Pp``i`Pwޗ]w} FjtdP6hQFXBWw~eJ|o'Pp9Xpxw 7i``y>hEgd6{h`~&95r*TJ`a/RVKp0G@Z!6h]&i FFgߗK8}~fQ(Èa x6dj(pf}aQvhIȍh~Y~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