run setParam MapViewer JSP Tag Reference Information

MapViewer JSP Tag Library 5-9 service, and a URL for that image is returned to the associated MapViewer bean. This tag exposes the URL as a scripting variable. The body of the tag must contain a legend element. See Section 3.2.11 for detailed information about the legend element and its attributes. Table 5–8 lists the makeLegend tag parameters. The following example creates a single-column legend with the id of myLegend, and it displays the legend image. mv:makeLegend id=myLegend legend bgstyle=fill:ffffff;stroke:ff0000 profile=MEDIUM column entry text=Legend: is_title=true entry style=M.STAR text=center point entry style=M.CITY HALL 3 text=cities entry is_separator=true entry style=C.ROSY BROWN STROKE text=state boundary entry style=L.PH text=interstate highway entry text=County population density: entry style=V.COUNTY_POP_DENSITY tab=1 column legend mv:makeLegend P Here is the map legend: IMG SRC==myLegend P

5.2.9 run

The run tag 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. The run tag does not output anything to the JSP page. To display the map image that MapViewer generates as a result of the run tag, you must use the getMapURL tag. Table 5–9 lists the run tag parameters. Table 5–8 makeLegend Tag Parameters Parameter Name Description Required id Name for the scripting variable that can be used to refer to the URL of the generated legend image. 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 information about styles specified in the legend request No format Format of the legend image to be created on the server. If specified, must be GIF_URL the default or PNG_URL. No 5-10 Oracle Fusion Middleware Users Guide for Oracle MapViewer The following example requests a zooming in on the map display with the default zoom factor of 2, and recentering of the map display at coordinates 100, 250 in the device space. mv:run action=zoomin x=100 y=250

5.2.10 setParam

The setParam tag specifies one or more parameters for the current map request. You can set all desired parameters at one time with a single setParam tag, or you can set different parameters at different times with multiple setParam tags. Most of the parameters have the same names and functions as the attributes of the map_ request root element, which is described in Section 3.2.1.1 . The parameter names are case-sensitive. Table 5–10 lists the setParam tag parameters. Table 5–9 run Tag Parameters Parameter Name Description Required action One of the following values to indicate the map navigation action to be taken: zoomin zoom in, zoomout zoom out, or recenter recenter the map. For zoomin or zoomout, factor specifies the zoom factor; for all actions including no specified action, x and y specify the new center point; for all actions including no specified action, x2 and y2 specify with x and y the rectangular area to which to crop the resulting image. If you do not specify an action, the map request is submitted for processing with no zooming or recentering, and with cropping only if x, y, x2, and y2 are specified. No x The X ordinate value of the point for recentering the map, or the X ordinate value of the lower-left corner of the rectangular area to which to crop the resulting image if x2 and y2 are specified No y The Y ordinate value of the point for recentering the map, or the Y ordinate value of the lower-left corner of the rectangular area to which to crop the resulting image if x2 and y2 are specified No x2 The X ordinate value of the upper-right corner of the rectangular area to which to crop the resulting image No y2 The Y ordinate value of the upper-right corner of the rectangular area to which to crop the resulting image No factor Zoom factor: a number by which the current map size is multiplied for zoomin or divided for zoomout. The default is 2. This parameter is ignored if action is not zoomin or zoomout. No Table 5–10 setParam Tag Parameters Parameter Name Description Required antialiasing When its value is TRUE, MapViewer renders the map image in an antialiased manner. This usually provides a map with better graphic quality, but it may take longer for the map to be generated. The default value is FALSE for faster map generation. No MapViewer JSP Tag Library 5-11 The following example uses two setParam tags. The first setParam tag sets the background color, width, height, and title for the map. The second setParam tag sets the center point and vertical span for the map. mv:setParam bgcolor=ff0000 width=800 height=600 title=My Map mv:setParam centerX=-122.35 centerY=37.85 size=1.5

5.3 JSP Example Several Tags for MapViewer