|
|
|
Oracle 9iAS map viewer
Assume also that the data source mvdemo has a base map named demo_map defined as part of its mapping metadata. To obtain a map centered at the San Francisco area (longitude/latitude: -122.40, 37.80), 400 by 360 pixels in width and height, and covering an area of 5.0 decimal degrees, one must submit the following XML request:
<?xml version="1.0" standalone="yes" ?>
<map_request
basemap="demo_map"
datasource="mvdemo"
width="400"
height="360" >
<center size="5.0">
<geoFeature>
<geometricProperty typeName="center">
<Point>
<coordinates>
-122.4, 37.8
</coordinates>
</Point>
</geometricProperty>
</geoFeature>
</center>
</map_request>
The XML Response from MapViewer will be:
<?xml version="1.0" encoding="UTF-8"?>
<map_response>
<map_image>
<map_content url="http://foo.com/mapviewer/images /omsmap1.gif?refresh=-8276478193051686394"/>
<box srsName="default">
<coordinates>
-125.17777777777778,35.3
-119.62222222222222,40.3
</coordinates>
</box>
<WMTException version="1.0.0" error_code="SUCCESS">
</WMTException>
</map_image>
</map_response>
The URL to the generated map image and an MBR (minimum bounding rectangle) of the area covered by the map are returned as part of the XML response. Once the program retrieves the response, it can then parse its XML content and extract the URL to the map image and other information.
The following sections describe in greater detail the basic concepts for MapViewer, the XML API, and the rendering process.
Mapping Metadata: styles, themes, and base maps
In MapViewer terminology, a map consists of one or more themes. Each theme consists of a set of individual geographic features that share certain common attributes. Each feature is rendered and (optionally) labeled with specific styles. Themes can be predefined inside a database user's schema, or can be dynamically defined as part of a map request. Predefined themes can be grouped to form a predefined base map that can also be stored in a user's schema. Styles, predefined themes, and base maps are collectively called mapping metadata for MapViewer. This scheme provides a clear separation between the presentation of data and the spatial data itself. For instance, any modifications you make while manipulating the mapping metadata will have no effect on the corresponding spatial data, and vice versa.
- Styles
A style is a visual attribute that can be used to represent a spatial feature. The basic map symbols and legends 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.
- LINE: a line style (width, color, end style, join style) and optionally a center line, edges, and hashmark.
- AREA: a color or texture, and optionally a stroke color.
- TEXT: a font specification (size and family) and optionally highlighting (bold, italic) and a foreground color.
- ADVANCED: a composite used primarily for thematic mapping.
Styles should be created or modified using the Map Definition Tool as it checks for the referential integrity between styles, themes, and (base) maps. Any geographic feature, such as a road, can be displayed differently if different styles are assigned or applied, even though its underlying geometric structure remains the same.
|
|
|