Predefined Theme-Based FOI Layers

8-22 Oracle Fusion Middleware Users Guide for Oracle MapViewer The FOI server is a Java servlet running inside MapViewer. It responds to FOI requests from a JavaScript map client by querying the database, rendering FOI images, and sending the FOI images along with FOI attribute data to the client. The JavaScript map client displays the FOI images to the end user and provides interaction with the images. The FOI server accepts the following types of FOI requests: theme-based and user-defined. Each type of FOI request returns a data layer appropriate for the request type.

8.3.1 Theme-Based FOI Layers

A theme-based FOI layer is a collection of spatial features that have similar characteristics and that are stored in the database. The client fetches a theme-based FOI layer by sending a theme-based FOI layer request to the FOI server. The result of this request is a collection of FOI data entries that meets certain query criteria. Each FOI data entry contains the FOI image, as well as FOI attributes that can be used by the JavaScript map client to implement client-side interactivity. A theme-based FOI layer is based on a predefined MapViewer theme see Section 8.3.1.1 or a dynamic JDBC query theme see Section 8.3.1.3 , which defines all information necessary for FOI data rendering. The information includes the table in which the geometry features are stored, the criteria to use during the database query, the attributes that are part of the FOI data, and the style to use when rendering the FOI images. Predefined themes can be defined and configured using the Map Builder tool, which is described in Chapter 9 .

8.3.1.1 Predefined Theme-Based FOI Layers

When the client requests FOI data using a predefined theme-based FOI request, it must specify the name of a predefined theme, the scale of the feature images, and the query window used to query the geometry features. The theme name must be defined by the application, while the scale of the feature images and the query window are automatically calculated by the JavaScript map client. For example, a predefined theme named CUSTOMERS could be defined on a table named CUSTOMERS, which has the following definition: SQL DESCRIBE CUSTOMERS Name Null? Type --------------------------------- ------ ---------------------------- NAME VARCHAR264 CHAR CITY VARCHAR264 CHAR COUNTY VARCHAR264 CHAR STATE VARCHAR264 CHAR LOCATION SDO_GEOMETRY SALES NUMBER The LOCATION column is the spatial column that is used for rendering the customer markers. The XML styling rules for the CUSTOMERS theme are shown in Example 8–6 . Example 8–6 XML Styling Rules for Predefined Theme Used for FOI Layer ?xml version=1.0 standalone=yes? styling_rules hidden_info field column=CITY name=City field column=SALES name=Sales Oracle Maps 8-23 hidden_info rule features style=M.CIRCLE features label column=NAME style=T.TEXT 1 label rule styling_rules The styling rules in Example 8–6 specify the following. To see how these specifications affect the map display, see Figure 8–2, Application Created Using Oracle Maps in Section 8.1.2 . ■ The marker style M.CIRCLE is used to render the customers. ■ The NAME column is used as the labeling attribute label column=NAME. The value in the NAME column the name of the customer is included in the information window that the JavaScript map client displays when the user moves the mouse over the customer marker. ■ The information window also includes the values in columns specified in the hidden_info element CITY and SALES in this example for that customer. Each field element specifies two attributes: column to identify the database column and name to identify a text string to be used in the information window.

8.3.1.2 Templated Predefined Themes