addJDBCTheme MapViewer JSP Tag Reference Information

MapViewer JSP Tag Library 5-3 ■ To get information, use the getParam , getMapURL , and identify tags. ■ To submit the map request for processing, use the run tag.

5.2 MapViewer JSP Tag Reference Information

This section provides detailed information about the Oracle-supplied JSP tags that you can use to communicate with MapViewer. Table 5–1 lists each tag and briefly describes the information specified by the tag. Except where noted, you can use JSP expressions to set tag attribute values at run time, using the following format: mv:tag attribute== jspExpression The following sections in alphabetical order by tag name provide reference information for all parameters available for each tag: the parameter name, a description, and whether or not the parameter is required. If a parameter is required, it must be included with the tag. If a parameter is not required and you omit it, a default value is used. Short examples are provided in the reference sections for JSP tags, and a more comprehensive example is provided in Section 5.3 .

5.2.1 addJDBCTheme

The addJDBCTheme tag adds a dynamically defined theme to the map request. It performs the same operation as the jdbc_query element, which is described in Section 3.2.9 . Table 5–2 lists the addJDBCTheme tag parameters. Table 5–1 JSP Tags for MapViewer Tag Name Explanation init Creates the MapViewer bean and places it in the current session. Must come before any other MapViewer JSP tags. setParam Specifies one or more parameters for the current map request. addPredefinedTheme Adds a predefined theme to the current map request. addJDBCTheme Adds a dynamically defined theme to the map request. importBaseMap Adds the predefined themes that are in the specified base map to the current map request. makeLegend Creates a legend map inset illustration drawn on top of the generated map. getParam Gets the value associated with a specified parameter for the current map request. getMapURL Gets the HTTP URL for the currently available map image, as generated by the MapViewer service. identify Gets nonspatial attribute column values associated with spatial features that interact with a specified point or rectangle on the map display, and optionally uses a marker style to identify the point or rectangle. run Submits the current map request to the MapViewer service for processing. The processing can be to zoom in or out, to recenter the map, or to perform a combination of these operations. 5-4 Oracle Fusion Middleware Users Guide for Oracle MapViewer Table 5–2 addJDBCTheme Tag Parameters Parameter Name Description Required name Name for the dynamically defined theme. Must be unique among all themes already added to the associated MapViewer bean. Yes min_scale The value to which the display must be zoomed in for the theme to be displayed, as explained in Section 2.4.1 . If min_ scale and max_scale are not specified, the theme is displayed for all map scales, if possible given the display characteristics. No max_scale The value beyond which the display must be zoomed in for the theme not to be displayed, as explained in Section 2.4.1 . If min_scale and max_scale are not specified, the theme is displayed for all map scales, if possible given the display characteristics. No spatial_ column Column of type SDO_GEOMETRY containing geometry objects for the map display Yes srid Coordinate system SDO_SRID value of the data to be rendered. If you do not specify this parameter, a null coordinate system is assumed. No datasource Name of the data source instance that contains information for connecting to the database Yes 1 1 You must specify either datasource or the combination of jdbc_host, jdbc_port, jdbc_sid, jdbc_user, and jdbc_password. jdbc_host Host name for connecting to the database Yes 1 jdbc_port Port name for connecting to the database Yes 1 jdbc_sid SID for connecting to the database Yes 1 jdbc_user User name for connecting to the database Yes 1 jdbc_ password Password for connecting to the database Yes 1 jdbc_mode The Oracle JDBC driver thin or oci8 to use to connect to the database. The default is thin. No asis If set to TRUE, MapViewer does not attempt to modify the supplied query string. If FALSE the default, MapViewer embeds the SQL query as a subquery of its spatial filter query. For more information and an example, see Section 3.2.9 . No render_ style Name of the style to be used to render the spatial data retrieved for this theme. For point features the default is a red cross rotated 45 degrees, for lines and curves it is a black line 1 pixel wide, and for polygons it is a black border with a semitransparent dark gray interior. No label_style Name of the text style to be used to draw labeling text on the spatial feature for this theme. If you specify label_style, you must also specify label_column. If you do not specify label_style, no label is drawn for the spatial feature of this theme. No label_ column The column in the SELECT list of the supplied query that contains the labeling text for each feature row. If label_ style is not specified, any label_column value is ignored. No MapViewer JSP Tag Library 5-5 The following example creates a new dynamic theme named bigCities, to be executed using the mvdemo data source and specifying the LOCATION column as containing spatial data. Note that the greater-than character in the WHERE clause is valid here. mv:addJDBCTheme name=bigCities datasource=mvdemo spatial_column=location SELECT location, name FROM cities WHERE pop90 450000 mv:addJDBCTheme

5.2.2 addPredefinedTheme