Simple Map Request Map Request with Dynamically Defined Theme Map Request with Base Map, Center, and Additional Predefined Theme

3-2 Oracle Fusion Middleware Users Guide for Oracle MapViewer ■ Custom features point, circles, or any geometry specified in the XML request string to be plotted. These require that you provide the dynamic data in the format of the geoFeature element described in Section 3.2.5 , as defined in the DTD. The geometry portion of the geoFeature element adopts the Geometry DTD as specified in Open GIS Consortium Geography Markup Language Version 1.0 OGC GML v1.0. ■ Thematic mapping. You can manage the definition of base maps, themes, and styles individual symbologies using the Map Builder tool, which is described in Chapter 9 . For the current release, MapViewer accepts only a coordinate pair to identify the location for a map request; it cannot take a postal address as direct input for a map. This chapter first presents some examples of map requests see Section 3.1 , and then presents detailed explanations of the following XML DTDs for requests and other operations: ■ Map Request DTD ■ Information Request DTD ■ Map Response DTD ■ MapViewer Exception DTD ■ Geometry DTD OGC

3.1 Map Request Examples

This section provides examples of map requests. It refers to concepts, elements, and attributes that are explained in detail in Section 3.2 . It contains sections with the following examples: ■ Section 3.1.1, Simple Map Request ■ Section 3.1.2, Map Request with Dynamically Defined Theme ■ Section 3.1.3, Map Request with Base Map, Center, and Additional Predefined Theme ■ Section 3.1.4, Map Request with Center, Base Map, Dynamically Defined Theme, and Other Features ■ Section 3.1.5, Map Request for Point Features with Attribute Value and Dynamically Defined Variable Marker Style ■ Section 3.1.6, Map Request with an Image Theme ■ Section 3.1.7, Map Request for Image of Map Legend Only ■ Section 3.1.8, Map Request with SRID Different from Data SRID ■ Section 3.1.9, Map Request Using a Pie Chart Theme ■ Section 3.1.15, Java Program Using MapViewer ■ Section 3.1.16, PLSQL Program Using MapViewer

3.1.1 Simple Map Request

Example 3–1 is a very simple map request. It requests a map consisting of a blank blue image from the mvdemo data source with the string Hello World drawn on top. The MapViewer Map Request XML API 3-3 datasource attribute is required for a map request, even though this specific map request does not retrieve any map data from the data source. Example 3–1 Simple Map Request Hello World ?xml version=1.0 standalone=yes? map_request title=Hello World datasource = mvdemo

3.1.2 Map Request with Dynamically Defined Theme

Example 3–2 is a simple map request with one dynamically defined theme. It requests a map of all Oracle Spatial geometries from the COUNTIES table. Example 3–2 Simple Map Request with a Dynamically Defined Theme ?xml version=1.0 encoding=UTF-8 ? map_request datasource=lbs_data themes theme name=t1 jdbc_query spatial_column = GEOM datasource = lbs_data SELECT geom FROM counties jdbc_query theme themes map_request

3.1.3 Map Request with Base Map, Center, and Additional Predefined Theme

Example 3–3 requests a map with a specified center for the result map, and specifies a predefined theme poi_theme_us_restaurants to be rendered in addition to the predefined themes that are part of the base map basemap=us_base. Example 3–3 Map Request with Base Map, Center, and Additional Predefined Theme ?xml version=1.0 encoding=UTF-8 ? map_request datasource=lbs_data title=LBS CUSTOMER MAP basemap=us_base width=500 height=375 bgcolor=a6cae0 format=GIF_URL center size=1 geoFeature typeName=mapcenter label=Motel 1 text_style=T.MOTEL render_style=M.MOTEL radius=300 geometricProperty Point coordinates-122.2615, 37.5266coordinates Point geometricProperty geoFeature center srsSDO:8265srs themes theme name=poi_theme_us_restaurants themes map_request Notes on Example 3–3 : ■ Because basemap is specified, MapViewer first draws all predefined themes for that base map before drawing the specified theme poi_theme_us_ restaurants. 3-4 Oracle Fusion Middleware Users Guide for Oracle MapViewer ■ The center will be drawn with a marker of the M.MOTEL style and the label Motel 1 in the T.MOTEL style. ■ A circle with a radius of 300 meters will be drawn around the center.

3.1.4 Map Request with Center, Base Map, Dynamically Defined Theme, and Other Features