Oracle APEX 23.2 introduced many new functionalities. One of them is the Custom Map Background. Now we can change our background map, making our Map region even better! So, how do we do it? Let's find out!
ArcGIS
First, we need to choose a map that will serve as our background. In this case, I will use my ArcGIS account. ArcGIS allows us to create and manage maps easily. To create a new map or select an existing one, go to the "Layers" tab and choose the "Create Data" option. After selecting the map and finishing your edits, click the "Save" button.
Map in ArcGIS:
Next, navigate to the "API Keys" tab to create a new API Key (you can also use the default one). After selecting the "Edit API Key" option in the "Maps, Layers, and Data" section, click the "Set Content Item Scopes" button and select your map. That’s all!
Oracle APEX and Background Maps
In Shared Components, select Map Backgrounds. Then click the Create button. Select Type. There are three options:
Raster XYZ Tile Layer: Renders a raster tile retrieved from a URL using x, y, and z values.
Vector Tile Layer: Retrieves a map tile layer described in a
style.json
file from a URL.OGC WMS: Retrieves a layer from the Web Map Service of the Open Geospatial Consortium.
In this example, we will use the Vector Tile Layer. I also entered my API Key and URL to Map Stylesheet. It is important to use the {api-key}
placeholder, which will be replaced with your API Key in the URL. My Background Map configuration looks like this:
Next, in the attributes of our Map region, in the Map section, change the Background option to Shared Components. In the Standard field, select My New Background Map (the map you just created).
Save your changes and run the page. The custom Background Map has now been added to the Map region.
Now, I will change the type of Background Map to OGC WMS. WMS is a standard created by the Open Geospatial Consortium (OGC) for sharing maps on the Internet. In this example, I will use a free map of Wrocław from the provided link. In Shared Components, select Map Backgrounds and click the Create button. This time, select the OGC WMS option. My Background Map configuration looks like this:
It is important to correctly declare parameters such as service, layers, styles, and version. The rest of the parameters will be added automatically. For more information about the WMS standard, click here
This is my Map region with the map of Wrocław as the background:
Conclusions
Adding a Background Map is very simple. Once again, with a bit of low-code magic, we achieve our goal quickly. Now we can use topographic or administrative maps of the world, countries, or cities. This is another functionality that helps us create GIS applications using Oracle APEX. Of course, Background Maps are not the only feature we get in version 23.2. Hmm… Christmas in October?