Open wmbeers opened 4 years ago
Feedback from 10/21/2020 meeting:
Lex reports map viewer ignores SORT_ORDER of T_SAVED_MAP_LAYER. I've confirmed the DWR request to get the layers is returning them in the right order, but then at some point along the line that ordering gets lost. I strongly suspect it's just the nature of async calls I and CMV are making before the last bit where the layer is actually in the map.
Worst case just re-order when all load promises are complete?
at some point along the line that ordering gets lost. I strongly suspect it's just the nature of async calls...
Yes, we get as far as _loadSavedMapLayers and we still have the sort order. It calls addLayer, which is an async call, through _onLayerLoad (callback from "load" event handler on the layer). That alone is enough to scramble the order, because a slow one early in the list could take longer to load, pushing to later in the list. To make it worse, we have to then make a call to the server via esriRequest. I think re-sorting at the end is the only viable option, as everything else would be a nightmare of chained calls.
I think re-sorting at the end is the only viable option, as everything else would be a nightmare of chained calls.
It's not so easy to re-sort. See _moveUp to see what's involved in just moving one layer one spot.
Test with switching from map.addLayer to map.addLayers.
Demonstrated UI improvement to dev team. Feedback: good for WATERSS, but we're going to set up others based on HCMs (I'll work with Eric on this) and will need a hierarchical structure.
Description:
Users need the ability to load a set of map services/layers pulled from various EST (and possibly external) sources. We can't necessarily get there by creating new map services, as that might get hard to maintain. Building off saved maps seems like the logical starting point.
Server-side code changes in https://repo.fla-etat.org/bugzilla/show_bug.cgi?id=6223