Skip Headers
Oracle® Application Express Application Builder User's Guide
Release 4.1

Part Number E21674-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Creating Maps

Application Builder includes built-in wizards for generating Flash maps. How you create a flash map depends upon whether you are adding the map to an existing page, or adding a map on a new page.

Topics:

About Flash Map Support

Flash map support in Oracle Application Express is based on the AnyChart AnyMap Interactive Maps Component. AnyMap is a flexible Macromedia Flash-based solution that enables developers to visualize geographical related data. Flash maps are rendered by a browser and require Flash Player 9 or later. For more information about AnyChart, go to

http://www.anychart.com

AnyChart stores map data in files with a *.amap extension, and supports 300 map files for the United States of America, Europe, Asia, Europe, Africa, Oceania, North America, and South America. To render a desired map, you select the map source in the wizard (for example, Germany) and the map XML automatically references the desired map source .amap file, germany.amap. To browse through the available maps, see "Map Reference" in AnyChart User's Guide:

http://anychart.com/products/anychart/docs/users-guide/

Adding a Flash Map to an Existing Page

To add a flash map to an existing page.

  1. Navigate to the Page Definition. See "Accessing the Page Definition".

  2. On the Page Definition, create a new region:

    • Tree view- Under Page Rendering, right-click Regions and select Create.

    • Component view - Under Region, click the Create icon.

    The Create Region Wizard appears.

  3. Select Map and click Next.

  4. For Map Type, select a map type (for example, Europe), and click Next.

  5. For Map Source, a Tree lists the map source files for the selected Map Type. Click the Map Source you wish to use (for example, Denmark).

  6. For Display Attributes:

    1. Specify the following:

      • Title

      • Region Template

      • Parent Region

      • Display Point

      • Sequence

      • Column

    2. Click Next.

  7. For Display Attributes, select the appropriate map attributes and click Next.

    To learn more about a specific attribute, click the item label. See "About Field-Level Help".

  8. For Source:

    1. Specify a query by either:

      • Entering a SQL query in the field provided. See "About Creating SQL Queries for Maps".

      • Clicking the Build Query button. When the Build Chart Query Wizard appears, follow the on-screen instructions.

    2. Specify relevant attributes. To view map reference information associated with your selected Map Source, expand the Map Region Information region at the bottom of the page.

      To associate data with geographical locations, you must incorporate information from the Region Name or Region ID columns into the Map query. See "About Creating SQL Queries for Maps".

  9. Click Create Region.

Adding Flash Maps to a New Page

To create an flash chart on a new page:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

  3. Click Create Page.

  4. Select Map and click Next.

  5. For Map Type, select a map type (for example, Europe), and click Next.

  6. For Map Source, a Tree lists the map source files for the selected Map Type. Click the Map Source you wish to use (for example, Denmark).

  7. For Page Attributes:

    1. Specify the following:

      • Page Number

      • Page Name

      • Region Template

      • Region Name

      • Breadcrumb

      To learn more, click the item label. When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".

    2. Click Next.

  8. Specify whether to include tabs and click Next.

  9. For Map Attributes, select the appropriate attributes and click Next.

    To learn more about a specific attribute, click the item label. See "About Field-Level Help".

  10. For Query:

    1. Specify a query by either:

      • Entering a SQL query in the field provided. See "About Creating SQL Queries for Maps".

      • Clicking the Build Query button. When the Build Chart Query Wizard appears, follow the on-screen instructions.

    2. Specify relevant attributes. To view map reference information associated with your selected Map Source, expand the Map Reference Information region at the bottom of the page.

      To associate data with geographical locations, you must incorporate information from the Region Name or Region ID columns into the Map query. See "About Creating SQL Queries for Maps".

    3. Click Next.

  11. Click Finish.

About Creating SQL Queries for Maps

You define a map in Application Builder using a wizard. For most chart wizards, you select a map type, map source, and provide a SQL query using the following syntax:

SELECT link, label, value
FROM   ...

Where:

  • link is a URL.

  • label is the text that identifies the point on the map that you wish to associate data with. The Region ID or Region Name of the map should be used as the label.

  • value is the numeric column that defines the data to be associated with a point on the map.

Consider the following example when creating a new page:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

  3. Click Create Page.

  4. Select Map and click Next.

  5. For Map Type, select United States of America and click Next.

  6. For Map Source, expand Country Maps and select States.

    Description of maps_source1.gif follows
    Description of the illustration maps_source1.gif

  7. For Page Attributes specify the appropriate attributes and click Next.

  8. Specify whether to include tabs and click Next.

  9. For Map Attributes, select the appropriate attributes and click Next.

    The Query page appears.

  10. Expand and review the Map Reference Information region at the bottom of the page.

    Description of maps_source2.gif follows
    Description of the illustration maps_source2.gif

  11. For Query,

    1. Specify a query by either:

      • Entering a SQL query in the field provided. See "About Creating SQL Queries for Maps".

      • Clicking the Build Query button. When the Build Chart Query Wizard appears, follow the on-screen instructions.

    2. When you create your query, you must incorporate the region name information. The following example includes information for Florida and Alaska:

      SELECT null link, region label, value Populations
      FROM (
      SELECT 'Florida' region, 18328340 value FROM dual
      UNION ALL
      SELECT 'Alaska' region, 686293 value FROM dual)
      

      Note:

      If you are referencing geographical information stored in a database table, the information must correspond with the Region information associated with the map source. For more information, see AnyChart User's Guide:
      http://anychart.com/products/anymap/docs/
      
    3. Click Next.

  12. Click Finish.

Editing Flash Map Attributes

Once you create a map, you can alter its display by editing map attributes on the Map Attributes page.

To access the Map Attributes page:

  1. Navigate to the Page Definition. See "Accessing the Page Definition".

  2. Access the Chart Attributes page:

    • Tree view- Under Page Rendering, double-click the region name.

    • Component view - Under Region, select the region name.

      The Region Definition appears.

  3. Click Map Attributes.

  4. Edit the appropriate attributes.

    To learn more about a specific item on a page, click the item label.

    When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".

  5. Click Apply Changes.

About Navigation Alternatives

The Map Attributes page is divided into sections. You can access these sections by scrolling down the page, or by clicking a navigation button at the top of the page. When you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Using Custom XML with Flash Maps

There are additional map settings that cannot be controlled using the standard attributes on the Map Attributes page. To further control the look and feel of a chart, you can use custom XML.

To use custom XML:

  1. Navigate to the Page Definition. See "Accessing the Page Definition".

  2. Access the Map Attributes page:

    • Tree view- Under Page Rendering, double-click the region name.

    • Component view - Under Region, select the region name.

      The Region Definition appears.

  3. Click Map Attributes.

  4. Scroll down to Map XML.

  5. From Use Custom XML, select Yes.

    Note that when you select to use custom XML, regions with attributes that no longer appear are hidden. To display these regions again, select No for Use Custom XML.

  6. Edit the XML.

  7. Click Apply Changes.

Tip:

For more information on supported XML format for maps, see the Online Map XML Reference at:
http://www.anychart.com/

Enabling Asynchronous Updates

You can create Flash maps that monitor information by enabling the Asynchronous Update attribute on the Map Attributes page. Enabling this attribute updates the map to reflect changes in the underlying data within a specified time interval.

To enable asynchronous updates:

  1. Create a Flash map. See "About Flash Map Support" and "About Flash Map Support".

  2. Navigate to the Page Definition. See "Accessing the Page Definition".

  3. Access the Map Attributes page:

    • Tree view- Under Page Rendering, double-click the region name.

    • Component view - Under Region, select the region name.

      The Region Definition appears.

  4. Click Map Attributes.

  5. Scroll down to Refresh.

  6. From Asynchronous Update, select Yes.

  7. In Update Interval (Seconds), enter the interval in seconds between map updates. For optimal performance, select an interval that is greater than 2 seconds.

  8. Click Apply Changes.