4-6 Oracle Fusion Middleware Users Guide for Oracle MapViewer
■
setSizedouble size sets the height size in the user data space for the map to be generated.
■
setShowSVGNavBarboolean s specifies whether or not to show the built-in SVG navigation bar. The default value is TRUE that is, show the navigation bar.
■
setSVGOnClickjava.lang.String onClick sets the onClick function for an SVG map. The onClick function is a JavaScript function defined in the
Web page in which the SVG map is embedded. The onClick function is called whenever the SVG map is clicked if both theme feature selection and window
selection are disabled. For information about using JavaScript functions with SVG maps, see
Appendix B .
■
setSVGShowInfoboolean info specifies whether or not to display hidden information when the mouse moves over features for which hidden information is
provided. If its value is TRUE the default, hidden information is displayed when the mouse moves over such features; if it is set to FALSE, hidden information is
not displayed when the mouse moves over such features. Regardless of the value, however, hidden information is always rendered in an SVG map; this method
only controls whether hidden information can be displayed.
■
setSVGZoomFactordouble zfactor sets the zoom factor for an SVG map. The zoom factor is the number by which to multiply the current zoom ratio for
each integer increment a zoomin operation in the zoom level. The inverse of the zoom factor value is used for each integer decrement a zoomout operation in the
zoom level. For example, if the zfactor value is 2 the default, zooming in from zoom level 4 to 5 will enlarge the detail by two; for example, if 1 inch of the map at
zoom level 4 represents 10 miles, 1 inch of the map at zoom level 5 will represent 5 miles. The zoom ratio refers to the relative scale of the SVG map, which in its
original size zoom level 0 has a zoom ratio of 1.
■
setSVGZoomLevelsint zlevels sets the number of zoom levels for an SVG map.
■
setSVGZoomRatiodouble s sets the zoom factor to be used when an SVG map is initially loaded. The default value is 1, which is the original map size
zoom level 0. Higher zoom ratio values show the map zoomed in, and lower values show the map zoomed out.
■
setWebProxyjava.lang.String proxyHost, java.lang.String proxyPort sets the Web proxy to be used when connecting to the MapViewer
service. This is needed only if there is a firewall between the Web service and this bean.
You can remove the map legend from the current map request by calling the deleteMapLegend method.
4.3.3 Adding Themes or Features to the Current Map Request
Besides specifying a base map to be included in a map request, you can add themes or individual point and linear features, such as a point of interest or a dynamically
generated route, to the current map request. The themes can be predefined themes whose definitions are stored in the database, or dynamic themes where you supply the
actual query string when you add the theme to the current request.
There are several kinds of dynamic themes: to retrieve geometric data JDBC theme, to retrieve image data image theme, to retrieve GeoRaster data GeoRaster theme, to
retrieve network data network theme, and to retrieve topology data topology theme. For dynamic themes and features, you must explicitly specify the styles you
MapViewer JavaBean-Based API 4-7
want to be used when rendering them. Being able to add dynamic themes and features gives you flexibility in adapting to application development needs.
The methods for adding themes or features to the current map request have names that start with add, and they include the following:
■
addGeoRasterTheme and its variants add GeoRaster data to the current map request. In some cases you supply the query string to retrieve the raster data; in
other cases you supply the necessary GeoRaster information to retrieve a specific image.
Section 2.3.4 explains GeoRaster themes.
■
addImageTheme and its variants add an image theme, for which you must supply the query string for retrieving the image data to be rendered as part of the
map. Section 2.3.3
explains image themes.
■
addJDBCTheme and its variants add a JDBC theme, for which you must supply the query string for retrieving the geometric data.
Section 2.3.2 explains JDBC
themes.
■
addLinearFeature and its variants add a single linear feature line string to the current map request. You must specify a rendering style. You can specify the
labeling text and text style for drawing the label, and you can also specify if the label will always be present regardless of any overlapping. The coordinates must
be in the user data space. There is no limit to the number of linear features that you can add.
■
addLinksWithinCost adds a network theme to the current map request; the theme will be a result of the within-cost analysis on network data. The within-cost
analysis finds all nodes that are within a specified cost, and generates the shortest path to each node.
■
addNetworkLinks adds network links to the current map request as a network theme, for which you must supply the rendering styles.
■
addNetworkNodes adds the network nodes to the current map request as a network theme, for which you must supply the rendering styles.
■
addNetworkPaths adds the network paths to the current map request as a network theme, for which you must supply the rendering styles.
■
addNetworkTheme and its variants add the network links, nodes, and paths to the current map request as a network theme, for which you must supply the
rendering styles. Section 2.3.5
explains network themes.
■
addPointFeature and its variants add a single feature that is a point to the current map request. This point will be rendered using the supplied rendering
style on the map after all themes have been rendered. You can optionally supply a labeling text to be drawn alongside the point feature, and you can specify if the
label will always be present regardless of any overlapping. You can also supply an array of radii the units are always in meters, in which case a series of circles will
be drawn centering on the point. The coordinates x and y must be in the user data space. You can assign attribute values to the point feature for use with an
advanced style. For oriented point features, you can specify orientation parameters. There is no limit to the number of point features you can add.
■
addPredefinedTheme and its variants add a predefined theme to the current map request.
■
addShortestPath and its variants add a network theme to the current map request; the theme will be a result of the shortest-path analysis on a network data.
You must supply the necessary parameters for the shortest-path algorithm.
4-8 Oracle Fusion Middleware Users Guide for Oracle MapViewer
■
addThemesFromBaseMapjava.lang.String basemap adds all predefined themes in the specified base map to the current map request. This has an
advantage over setBaseMapName, in that you can manipulate the themes for the current map request, as explained in
Section 4.3.5 .
■
addTopologyDebugTheme and its variants add the topology data structure as a topology debug-mode theme to the current map request. You must supply the
rendering styles for the edges, nodes, and faces. Section 2.3.6
explains topology themes, including the debug mode.
■
addTopologyTheme adds the topology features as a topology theme to the current map request. You must supply the query string.
Section 2.3.6 explains
topology themes. You can remove all added point and linear features by calling the
removeAllPointFeatures and removeAllLinearFeatures methods, respectively.
4.3.4 Adding Dynamically Defined Styles to a Map Request