Maps in Oracle APEX allow developers to create highly visual and interactive geographic data displays within their applications. Whether you’re plotting customer locations, delivery routes, or regional sales figures, the Map region provides a powerful, built-in solution. Setting up a map report in Oracle APEX requires understanding spatial data, configuring region settings correctly, and ensuring your data source supports geographic coordinates.
How to Set Up a Map Report in Oracle APEX
-
Ensure You Have Spatial Data
-
Your data must include a geometry column in either SDO_GEOMETRY or GeoJSON format.
-
The most common format is longitude and latitude stored in a table.
-
Example table:
CREATE TABLE STORE_LOCATIONS ( id NUMBER PRIMARY KEY, store_name VARCHAR2(100), longitude NUMBER, latitude NUMBER );
-
-
Enable Spatial Format for the Data
-
You can either convert longitude/latitude to SDO_GEOMETRY, or use the native
geometry
support in APEX. -
Example SQL query for APEX Map Source using GeoJSON:
SELECT id, store_name AS name, '{ "type": "Point", "coordinates": [' || longitude || ',' || latitude || '] }' AS geometry FROM store_locations
-
-
Create a Map Region
-
Go to the APEX Page Designer.
-
Add a new Map region.
-
Choose Map as the region type.
-
Under Attributes, set the Geometry Column to the name of your geometry column (e.g.,
geometry
). -
Set ID Column to the unique identifier (e.g.,
id
). -
Set Label Column to display names on the map (e.g.,
store_name
).
-
-
Choose the Map Layer
-
Oracle APEX uses Oracle Maps or OpenStreetMap as the background.
-
You can configure themes, layers, and clustering.
-
If you’re using Oracle Autonomous Database, Oracle Maps should work out-of-the-box.
-
For other environments, ensure your APEX instance has access to the map service.
-
-
Customize Marker Appearance
-
You can define colors, sizes, and icons based on data values.
-
Example: Highlight stores by region or performance level using marker styles.
-
-
Add Tooltips or Popups
-
Enable tooltip behavior and use
store_name
or additional fields. -
Configure “Info Window” to display details when a marker is clicked.
-
-
Optional: Link to Other Pages
-
Set up marker links to navigate to a form page or dashboard with more information.
-
Use the Link section under the region attributes to pass parameters like
:ID
.
-
Example Use Case
You want to display a live map of all company store locations:
-
Data table includes store name, lat/lng, and region.
-
Map region shows all store points with icons.
-
Users can click each icon to open a store detail page.
-
Different regions use different colors for visual segmentation.
Best Practices
-
Always validate longitude and latitude data for completeness and accuracy.
-
Index spatial columns when dealing with large datasets for better performance.
-
Use meaningful zoom levels based on your target audience’s geography.
-
Avoid clutter by enabling clustering when displaying many data points.
-
Test the map across devices for responsiveness and interactivity.
-
Use descriptive names and hover details to improve accessibility.
The first thing that you need to make a map work is a way to map your points of interest into the map. This can be done using one of three categories:
SDO_GEOMETRY - is a special Oracle Object type which is used by Oracle Spatial. It contains information about the coordinate system used, the type of geometry, the dimensions, data points information as array, etc. Perfect for all kinds of Map Layes, supported in APEX and especially useful when more complex tasks are solved. In use by the SDO_UTIL and SDO_SAM packages, which can determine distances between points on the map, do analysis and others calculations. It can represent all types of geometries – points, polygons, lines and so on.
GeoJSON - is a geographical data, represented in a JSON format. It is following a special global standard (GeoJSON format) and is easy to read. Oracle has special datatype to store such information and can index it. It is particularly useful, when working with Javascript and is used when modifying information on the map. It can represent all types of geometries – points, polygons, lines and so on.
Longitude/Latitude - is the most popular and easy to understand data type. It represent the 2D coordinates of a point on the map. Most people are already familiar with it and most data sources available can provide you these two.
In this case we will use Longitude/Latitude.
Step 1 – Create a map page
Select table
Select map style
Save and Browse
Oracle APEX Documentation
Explore official documentation on Map regions and spatial visualization at:
https://docs.oracle.com/en/database/oracle/apex/
Search for "Map Region", "Spatial Data", and "SDO_GEOMETRY" for detailed guidance.
Conclusion
Map reports in Oracle APEX are a dynamic way to bring location-based insights into your applications. By correctly structuring your data and configuring the map region, you can deliver a visually engaging and interactive experience. Whether tracking assets, plotting customers, or analyzing geographic patterns, Oracle APEX maps provide a rich toolset to enhance any business application.