camptocamp / cgxp

22 stars 22 forks source link

Take order of layers into account when querying server #1078

Closed pgiraud closed 8 years ago

pgiraud commented 8 years ago

Instead of storing the editable layers in an associative array (object) in which the keys are the layers ids, we store them in an array. The advantage is that we keep them in the order as in the tree. We can then query the server for features using the visibility order. Thus the features in the response are ordered as well.

I also simplified the way the menu is created. We may have duplicates if layers are available multiple times in the tree, but I don't think it's a big deal.

Please review.

pgiraud commented 8 years ago

Not ready for review yet. Hopefully, units tests are here to catch errors.

pgiraud commented 8 years ago

Can be tested with the following link: https://geomapfish-demo.camptocamp.net/pierre/edit?map_x=532954.64190714&map_y=152845.69622813&map_zoom=9&tree_group_layers_Edit=line%2Cpoint&tree_group_layers_Edit2=polygon&tree_groups=Edit%2CEdit2&debug=

sbrunner commented 8 years ago

Looks good, merge :-)