[ka-Map-users] drag&drop layers order
Lorenzo Becchi
lorenzo at ominiverdi.com
Sat Sep 24 21:19:04 EDT 2005
I don't know if somebody could be insterested but I was curious to test
it.
http://149.139.8.29/~rischio/ka-map-22-sept-d&d/kamap/htdocs/
What works:
1) you can click and drag on the name of a layer in the legend (even if
it's expanded) than drop it on the layer you want to target (targettable
layers will highlight). Dragged layer will be set before target layer.
2) you can click on the toggle expander or on the checkbox and functions
respond as normal (it's not as simple as it seems).
what does not work:
1) layers in the viewport do nothing instead of switching the position
like in the legend.
Paul, I've tried some solutions.
If you have time to reed the code you, maybe, apreciate that I've
modified very few lines of the kaLegend.js (all commented), I've added
an external CSS for the Drag&Drop functions and other 2 files with
javacript objects.
Index.html is clean and I've (finally) started using events (at the
moment I'm not using kamap system).
I'm blocked on the function moveLayerHere() in the dragmanager.js.
I can use kaMap.getLayer(name) from the dragmanager and something more
like changing the order of the kaMap.aLayers array.
What I cannot is to switch layer position inside the viewport.
I've tried with the DOM (like I've done with the legend) and changing
the aLayers array. In the first case I neither got the parent node and
in the second I have no idea how to redraw the layers position.
Any suggestions?
thanks
Lorenzo
More information about the ka-Map-users
mailing list