I saw this example which demonstrates how ordering can be controlled with markers added using styling options (graphicZIndex) applied to a vector layer. Due to the limitations in the combination of event listeners that I can apply using this method, I am forced to use the markers layer instead.
There are 100 points with associated data that I need to present both on the map (as markers) and listed below it (as detailed data). The data is sorted with the most important data appearing first. It makes sense that the corresponding marker is also on top of the heap. But by looping through the array, and calling the addMarkers
function while appending data to the bottom of the map, the most important marker would be buried under the heap.
Is there a way to reverse the ordering of the markers without having to loop through the data twice?