Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Map Region - Map Layers - Prevent Loading of All Layers at Map Initialization

Greg KafkaJul 3 2023

Good Morning/Afternoon/Evening (depending on your specific geo-coordinates),

I have a map question! The current default for Apex map regions is to have all map layer legend entries “is-checked.” This forces all layers (and their data) to load upon map initialization. I am working with over 100 layers with hundreds of thousands of points of data. As you can imagine, loading everything all at once is not a good idea. The following solutions have been tried with no success:

  1. On map load DA executing: document.getElementsByClassName('a-MapRegion-legendSelector')[1].click()
    1. Only works after the legend is created, which is after the map and all layers have loaded. Although it does work to uncheck the legend entry after loading.
  2. Server-side condition limiting select statements for data for layers to load only when condition is met with a DA to meet the condition based on checkbox
    1. While this could technically work, it is not maintainable for 100s of layers…
  3. I'm at the point where I can't remember all the other approaches, but they didn't work…

If anyone has any suggestions on an approach, I would greatly appreciate the help. I simply need to have layers available to load after the map has initialized without loading all of the data upfront. Btw, lazy loading has no impact on this.

Thanks!

Greg

Comments
Post Details
Added on Jul 3 2023
6 comments
894 views