MapViewer Concepts 2-69
After all themes for the map request have been prepared and all necessary data has been collected, MapViewer starts to render the map. It creates an empty new
in-memory image to hold the result map, and paints the empty image with the necessary backgrounds color or image. It then renders all of the themes in the theme
list.
For each theme, features are rendered in an order determined internally by MapViewer. The rendering of each feature involves invoking the drawing methods of
its rendering style. After all themes have been rendered, the labeling process starts. For each theme whose features must be labeled with text, MapViewer invokes algorithms
to label each feature, with the specific algorithm depending on the type of feature such as polygon or line.
After all themes have been rendered and when needed labeled, MapViewer plots any additional map features such as a legend on the internal map image. MapViewer
then converts that image into the desired format such as PNG or GIF specified in the original map request; however, for SVG maps, instead of using an internal image,
MapViewer initially creates an empty SVG map object, then creates an SVG document as a result of the rendering process, and inserts it into the map object.
2.7 Cross-Schema Map Requests
A database user can issue a map request specifying a theme that uses data associated with another database user, to select data from tables that the other data source user is
authorized to access. For example, assume that user SCOTT wants to issue a map request using data associated with user MVDEMO. In general, user SCOTT must be
granted SELECT access on relevant tables owned by user MVDEMO, and the theme element should generally specify any tables in schema-name.table-name
format. In this example scenario:
■
For a geometry table, grant the SELECT privilege on the geometry table of MVDEMO to SCOTT see
Example 2–47 .
■
For a GeoRaster table, grant the SELECT privilege on the GeoRaster table and raster data table or tables of MVDEMO to SCOTT see
Example 2–48 .
■
For a topology data model table, grant the SELECT privilege on the topology table and related topology information tables topology-name_EDGE, topology-name_
NODE, topology-name_FACE, topology-name_RELATION of MVDEMO to SCOTT see
Example 2–49 .
■
For network data model tables, grant the SELECT privilege on the network link, node, path, and path-link tables of MVDEMO to SCOTT see
Example 2–50 .
Example 2–47 shows a dynamic theme that accesses the MVDEMO.STATES geometry
table from a data source defined on the SCOTT user.
Example 2–47 Cross-Schema Access: Geometry Table
SQL grant select on STATES to SCOTT; . . .
themes
Note: All image or GeoRaster themes are always rendered first,
regardless of their position in the theme list. All other themes, however, are rendered in the order in which they appear in the theme
list.
2-70 Oracle Fusion Middleware Users Guide for Oracle MapViewer
theme name=theme1 jdbc_query
datasource=scottds spatial_column=geom
render_style=MVDEMO:C.COUNTIES jdbc_srid=8265
SELECT geom from MVDEMO.STATESjdbc_query theme
themes
Example 2–48 shows a dynamic theme that accesses the MVDEMO.GEORASTER_
TABLE GeoRaster table and its RDT from a data source defined on the SCOTT user. Specify the base GeoRaster table in schema-name.table-name format.
Example 2–48 Cross-Schema Access: GeoRaster Table
SQL grant select on GEORASTER_TABLE to SCOTT; SQL grant select on RDT_GEOR1 to SCOTT;
. . . themes
theme name=georaster_theme jdbc_georaster_query
georaster_table=MVDEMO.georaster_table georaster_column=georaster
raster_table=rdt_geor1 raster_id=1
jdbc_srid=8307 datasource=scottds
asis=false jdbc_georaster_query
theme themes
Example 2–49 shows a dynamic theme that accesses the MVDEMO.LAND_PARCELS
topology table and information tables for the CITY_DATA topology from a data source defined on the SCOTT user. Specify the feature table and the topology in
schema-name.object-name format, if they are owned by a different schema than the one associated with the data source.
Example 2–49 Cross-Schema Access: Topology Feature Table
SQL grant select on CITY_DATA_FACE to SCOTT; SQL grant select on CITY_DATA_EDGE to SCOTT;
SQL grant select on CITY_DATA_NODE to SCOTT; SQL grant select on CITY_DATA_RELATION to SCOTT;
SQL grant select on LAND_PARCELS to SCOTT; . . .
themes theme name=topo_theme
jdbc_topology_query topology_name=MVDEMO.CITY_DATA
feature_table=MVDEMO.LAND_PARCELS spatial_column=FEATURE
render_style=MVDEMO:C.COUNTIES jdbc_srid=0
datasource=scottds asis=falseselect feature from MVDEMO.land_parcels
jdbc_topology_query theme
themes
MapViewer Concepts 2-71
Example 2–50 shows a dynamic theme that accesses the MVDEMO.BI_TEST network
and its link, node, path, and path-link tables. Specify the network name in schema-name.network-name format.
Example 2–50 Cross-Schema Access: Network Tables
SQL grant select on BI_TEST_LINK to SCOTT; SQL grant select on BI_TEST_NODE to SCOTT;
SQL grant select on BI_TEST_PATH to SCOTT; SQL grant select on BI_TEST_PLINK to SCOTT;
. . . themes
theme name=net_theme jdbc_network_query
network_name=MVDEMO.BI_TEST network_level=1
jdbc_srid=0 datasource=scottds
link_style=MVDEMO:C.RED node_style=MVDEMO:M.CIRCLE
node_markersize=5 asis=false
jdbc_network_query theme
themes
2.8 Workspace Manager Support in MapViewer