Creating Predefined Network Themes

MapViewer Concepts 2-35 Example 2–19 Network Theme theme name=net_theme user_clickable=false jdbc_network_query network_name=NYC_NET network_level=1 jdbc_srid=8307 datasource=mvdemo link_style=C.RED direction_style=M.IMAGE105_BW direction_position=0.85 direction_markersize=8 node_style=M.STAR node_markersize=5 asis=false jdbc_network_query theme

2.3.5.1 Creating Predefined Network Themes

To create a predefined network theme, you must store the definition of the network theme in the database by inserting a row into the USER_SDO_THEMES view described in Section 2.9.2 . Example 2–20 stores the definition of a network theme. Example 2–20 Creating a Predefined Network Theme INSERT INTO user_sdo_themes VALUES NYC_NET_1, New York City network, NYC_NET_LINK_TABLE, GEOMETRY, ?xml version=1.0 standalone=yes? styling_rules theme_type=network network_name=NYC_NET network_level=1 rule features link style=C.RED direction_style=M.IMAGE105_BW direction_position=0.85 direction_markersize=8 link path ids=1,3 styles=C.BLUE,C.GREEN path node style=M.CIRCLE markersize=5 node features label link column=LINK_ID style=T.STREET NAME 1 link label rule styling_rules ; Example 2–20 creates a network theme named NYC_NET_1 for level 1 of the network named NYC_NET. The network table name NYC_NET_LINK_TABLE in this example 2-36 Oracle Fusion Middleware Users Guide for Oracle MapViewer is inserted in the BASE_TABLE column of the USER_SDO_THEMES view, the link geometry column name GEOMETRY in this example is inserted in the GEOMETRY_ COLUMN column, and an XML document with one styling_rules element is inserted in the STYLING_RULES column. In the styling_rules element for a network theme, theme_type must be network in order for this theme to be recognized as a network theme. Elements for links, paths, and nodes can be specified in the same features element, as is done in Example 2–20 : ■ The link feature rule specifies the style C.RED and direction marker attributes for all links. ■ The path feature rule specifies the style C.BLUE for paths with the path ID value 1, and the style C.GREEN for paths with the path ID value 3. ■ The node feature rule specifies the style M.CIRCLE and a marker size of 5. Example 2–20 also contains a label element for links, specifying the link column LINK_ID and the label style T.STREET NAME. The DTD for the styling_rules element is presented in Section A.7 .

2.3.5.2 Using MapViewer for Network Analysis