5-6 Oracle Fusion Middleware Users Guide for Oracle MapViewer
5.2.4 getParam
The getParam tag gets the value associated with a specified parameter for the current map request.
Table 5–4 lists the getParam tag parameter.
The following example displays the value of the title parameter for the current map request:
P The current map title is: mv:getParam name=title P
5.2.5 identify
The identify tag gets nonspatial attribute column values associated with spatial features that interact with a specified point or rectangle on the map display, and it
optionally uses a marker style to identify the point or rectangle. For example, if the user clicks on the map and you capture the X and Y coordinate values for the mouse
pointer when the click occurs, you can retrieve values of nonspatial columns associated with spatial geometries that interact with the point. For example, if the user
clicks on a point in Chicago, your application might display the city name, state abbreviation, and population of Chicago, and it might also display a city marker on
the map near where the click occurred.
The attributes are returned in a String[][] array of string arrays, which is exposed by this tag as a scripting variable.
The list of nonspatial columns to fetch must be provided in the tag body, in a comma-delimited list, which the MapViewer bean uses to construct a SELECT list for
its queries.
You can optionally associate a highlighting marker with each feature that is identified by using the style attribute and specifying a marker style. To display a new map that
includes the highlighting markers, use the getMapURL
tag. Table 5–5
lists the identify tag parameters.
Table 5–4 getParam Tag Parameter
Parameter Name
Description Required
name Name of the parameter whose value is to be retrieved. It must be
one of the valid parameter names for the setParam
tag. The parameter names are case-sensitive. This attribute must have a
literal value; it cannot take a JSP expression value. Yes
Table 5–5 identify Tag Parameters
Parameter Name
Description Required
id Name for the scripting variable through which the returned
nonspatial attribute values will be exposed. The first array contains the column names. This attribute must have a literal
value; it cannot take a JSP expression value. Yes
datasource Name of the MapViewer data source from which to retrieve
the nonspatial information. No
table Name of the table containing the column identified in
spatial_column. This attribute must have a literal value; it cannot take a JSP expression value.
Yes
MapViewer JSP Tag Library 5-7
The following example creates an HTML table that contains a heading row and one row for each city that has any spatial interaction with a specified point presumably,
the city where the user clicked. Each row contains the following nonspatial data: city name, population, and state abbreviation. The String[][] array of string arrays that
holds the nonspatial information about the associated city or cities is exposed through the scripting variable named attrs. The scriptlet after the tag loops through the array
and outputs the HTML table which in this case will contain information about one city.
mv:identify id=attrs style=M.CYAN PIN table=cities spatial_column=location
x=100 y=200 City, Pop90 Population, State_abrv State
mv:identify
ifattrs=null attrs.length0 {
out.printCENTER TABLE border=\1\\n; forint i=0; iattrs.length; i++
{ ifi==0 out.printTR BGCOLOR=\FFFF00\;
else out.printTR\n; String[] row = attrs[i];
forint k=0; krow.length; k++ out.printTD+row[k]+TD;
out.printTR\n; }
out.printTABLECENTER; }
spatial_ column
Column of type SDO_GEOMETRY containing geometry objects to be checked for spatial interaction with the specified
point or rectangle. This attribute must have a literal value; it cannot take a JSP expression value.
Yes
srid Coordinate system SDO_SRID value of the data in spatial_
column. If you do not specify this parameter, a null coordinate system is assumed.
No x
The X ordinate value of the point; or the X ordinate value of the lower-left corner of the rectangle if x2 and y2 are specified.
Yes y
The Y ordinate value of the point; or the Y ordinate value of the lower-left corner of the rectangle if x2 and y2 are specified.
Yes x2
The X ordinate value of the upper-right corner of the rectangle. No y2
The Y ordinate value of the upper-right corner of the rectangle. No style
Name of the marker style to be used to draw a marker on features that interact with the specified point or rectangle. To
display a new map that includes the highlighting markers, use the
getMapURL tag.
No
Table 5–5 Cont. identify Tag Parameters
Parameter Name
Description Required
5-8 Oracle Fusion Middleware Users Guide for Oracle MapViewer
5.2.6 importBaseMap