Creating Database Application Components
6m 45s

The course is part of this learning path

Start course

This course explores how you can add various components to your database applications.

Learning Objectives

  • Learn how to use charts, calendars, and maps in your Oracle APEX applications

Intended Audience

  • Anyone who wants to enhance their knowledge of Oracle APEX


We recommend that you take this course as part of our Oracle APEX: Foundations learning path.


Welcome to the Oracle APEX Foundations Course. Today in this lesson on Creating Database Application Components, I will be talking about maps. Lets get started. In this lesson, you will learn how to create and use maps within your APEX application. With APEX, you can create maps that visualize location data based on data in the table. The map component consists of a background map and spatial geometry objects sourced from data in a table or a REST Data Source. The background map is static and comes from Oracle Elocation Service. These background maps are ready to use and do not require any API keys. However, in order to display the background map, the end user's browser must have Internet connection and access to Spatial geometry objects are drawn on the background map based on data in a table. The table can be sourced from a local table or a SQL query. Maps created using the Create Page Wizard or in the Page Designer support both the local database tables, REST Enabled SQL, and REST Data Sources. Maps support a rich set of built-in marker icons and shapes.

Supported spatial geometry objects include: points, for example individual customer or supplier locations displayed as markers. Lines which represent features like roads or paths. Polygons which represent areas like parcels, states or countries. Heat maps are used to visualize the point density. The more points that are clustered together, the more intense the color. Use this option to visualize the spatial distribution of population or incidence. Extruded polygons, displayed as the three-dimensional extruded objects. The height of the 3D object visualizes a column value. You can source spatial geometry objects from either a geometry column. The supported data types include SDO_GEOMETRY, VARCHAR 2, or CLOB. VARCHAR 2 and CLOB columns must contain geometry information in Geo JSON format. Two, numeric columns; these columns must contain the longitude and latitude values. This option only applies to point and heat map objects.

From a user's perspective, map regions include a number of controls that enable users to change the display at runtime. You can add or remove controls by editing map region attributes in the Page Designer. This slide shows an example of a map region with the points layer to visualize airports in the United States. To view additional examples, install the Sample Maps application from Starter Apps. The Create Application Wizard only supports maps created based on a local database. To create maps based on an external data source, use the Create Page Wizard or add a map region in the Page Designer. The Create Page Wizard supports spatial geometry objects based on a local table, SQL query, REST Enabled SQL Service,  or REST Data Sources. Now lets learn how to create a map using the Create Page Wizard. First, navigate your application homepage. I am in a demo application homepage. Click 'Create Page'. Select map, then specify the page attributes. Specify a page name.

For data source, you can choose from local database, REST Enabled SQL Service or REST Data Source. In this example, we accept the default local database. For source type, select either table or SQL Query. In this example, we select SQL Query and then enter the SQL Query required to generate the map. Specify your navigation preference. For this example, we turn off the Breadcrumb and Navigation, click 'Next'. You can select the spatial geometry layer type. Here, I select points and then select the geometry column type. This indicates how the spatial objects are sourced. What appears next depends on the spatial objects or geometrics and the geometry type selected. Let us select the appropriate columns. For geometry column, I select GEOMETRY(Sdo_Geometry) data type. For tooltip column, I select the airport name.

You can even turn on the 'Create Faceted Search Page' to enable the faceted search on the map page. Click 'Create Page'. Now click 'Save and Run Page'. You can see the map page, and when you hover over the points, you can see the airport name listed in the tooltip. To summarize, in this lesson you learned how to create and use maps within your APEX application. I hope you learned something useful. Thank you for watching.

About the Author
Oracle University
Training Provider
Learning Paths

Oracle University, the learning and training arm of Oracle, is a leader in cloud education, providing modern digital training, certification, and learning solutions across Oracle’s entire product portfolio that enable our customers to master their Oracle Cloud solutions and maximize their investments. Over 2 million certified professionals worldwide have placed their trust Oracle University to reach their learning goals. Learn about Oracle University.

Covered Topics