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:
- On map load DA executing: document.getElementsByClassName('a-MapRegion-legendSelector')[1].click()
- 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.
- 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
- While this could technically work, it is not maintainable for 100s of layers…
- 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