Information Request DTD Map Response DTD

MapViewer Map Request XML API 3-55 The theme modifiers enable you to override the theme definition on a base map, without having to edit and change the base map definition. The theme_ decorations element has the same attributes as the theme element described in Section 3.2.20 . The following example overrides the labels_always_on attribute for the theme_ us_airport theme on the base map FORCED_LABELING. ?xml version=1.0 standalone=yes? map_request title=Override labeling on map definition basemap=FORCED_LABELING datasource=tilsmenv width=500 height=375 bgcolor=a6caf0 antialiase=true format=PNG_URL center size=15.0 geoFeature geometricProperty typeName=center Point coordinates-122.4,37.8coordinates Point geometricProperty geoFeature center theme_modifiers theme_decorations name=theme_us_airport label_always_on=false theme_modifiers map_request

3.3 Information Request DTD

In addition to issuing map requests see Section 3.2 and administrative requests see Chapter 7 , you can issue information requests to MapViewer. An information request is an XML request string that you can use to execute SQL queries and obtain the result as an array of strings or an XML document. The SQL query must be a SELECT statement and must select only primitive SQL types for example, not LOB types or user-defined object types. The following is the DTD for a MapViewer information request. ELEMENT info_request PCDATA ATTLIST info_request datasource CDATA REQUIRED format strict | non-strict strict datasource is a required attribute that specifies the data source for which to get the information. format is an optional attribute. If it is strict the default, all rows are formatted and returned in an XML document. If format is set to non-strict, all rows plus a column heading list are returned in a comma-delimited text string. Example 3–24 shows an information request to select the city, 1990 population, and state abbreviation from the CITIES table, using the connection information in the 3-56 Oracle Fusion Middleware Users Guide for Oracle MapViewer mvdemo data source and returning the information as an XML document format=strict. Example 3–24 MapViewer Information Request ?xml version=1.0 standalone=yes? info_request datasource=mvdemo format=strict SELECT city, pop90 population, state_abrv state FROM cities info_request Example 3–24 returns an XML document that includes the following: ?xml version=1.0 encoding=UTF-8? ROWSET ROW num=1 CITYNew YorkCITY POPULATION7322564POPULATION STATENYSTATE ROW ROW num=2 CITYLos AngelesCITY POPULATION3485398POPULATION STATECASTATE ROW ROW num=3 CITYChicagoCITY POPULATION2783726POPULATION STATEILSTATE ROW ROW num=4 CITYHoustonCITY POPULATION1630553POPULATION STATETXSTATE ROW . . . ROWSET

3.4 Map Response DTD

The following is the DTD for the map response resulting from normal processing of a map request. Section 3.5 shows the DTD for the response if there was an exception or unrecoverable error. ELEMENT map_response map_image ELEMENT map_image map_content, box, themes, WMTException ELEMENT map_content EMPTY ATTLIST map_content url CDATA REQUIRED ELEMENT WMTException PCDATA ATTLIST WMTException version CDATA 1.0.0 error_code SUCCESS|FAILURE REQUIRED The response includes the URL for retrieving the image, as well as any error information. When a valid map is generated, its minimum bounding box is also returned, along with the list of themes that have features within the minimum bounding rectangle MBR that intersects with the bounding box. Example 3–25 shows a map response. MapViewer Map Request XML API 3-57 Example 3–25 Map Response ?xml version=1.0 encoding=UTF-8 ? map_response map_image map_content url=http:map.oracle.comoutputmap029763.gif box srsName=default coordinates-122.260443,37.531621 -120.345,39.543coordinates box themes theme name=US_STATES theme name=US_HIGHWAYS themes WMTException version=1.0.0 error_code=SUCCESS WMTException map_image map_response

3.5 MapViewer Exception DTD