Skip to Main Content
Feature Request FR-4368
Product Area Page Components
Status DELIVERED

6 Voters

Maps - moveLayer and Event Handlers - (DGGIU)

eoghain.anderson Internal
· Mar 24 2025

Idea Summary

First, the manner in which layers are added to the MapLibre map object are not simple to follow.  I'd like to document what we see happening.

Upon load of the page, all map layers run (no server side conditions), but not all layers return data (some have no_data_found purposefully and expected).  When APEX renders the page, it will load the layers in the sequenced order of layers we defined in the APEX IDE.  However, layers that return no data on page load, the layer is then not added to the MapLibre map object as a layer.  So you end up with this sample:

First Layer - does not return data, not added to MapLibre object
Second Layer - does return data, added to MapLibre object, index position 1

Dynamic Action fires to refresh First Layer.

First Layer - returns data, added to MapLibre object, index position 2

Layer order is not respected in terms of APEX developer defined sequencing.

Expected Layering would be:
First Layer - painted first
Second Layer - painted second

Instead, this occurs:
Second Layer - painted first
First Layer - painted second

Given this outcome of incorrectly ordered layers, we attempted to utilize the moveLayer() function from MapLibre library.  However, while moveLayer does move the layers, the event handlers (mouseover tooltips) seem to not move with the layer that was moved. 

Is this a bug in APEX not moving the event handlers?

is it MapLibre bug not moving the event handlers?

Is it just an extra call we have to make to move the event handlers (knowing APEX created them originally and not our dev team)?

Is it better for APEX to maintain the layer sequencing from APEX IDE, and therefore we never have to call moveLayer explicitly (even if APEX does that with it's map interactions)?

Use Case
We have requirements to handle layering in quite a complex manner and the current implementation sometimes prohibits us for the reasons above

This has been delivered in Oracle APEX 24.2 as part of bug 36182515!