Hey everybody,
When you look at the following app CFX Map you can see that my point featurelayer is below the line feature layer. How can I get the points on top of the lines?
Also I noticed when I refresh the app sometimes the layers get re-arranged my legend, I guess depending on how the layers load. How could I have a set order?
Thanks.
Tim
Solved! Go to Solution.
Hi Tim,
To get the points to draw on top of the other services you will need to update the addLayers method and specify the point service last. Ex:
map.addLayers([cfx,cfxprop,turn, tollLayer]);
Hi Tim,
To get the points to draw on top of the other services you will need to update the addLayers method and specify the point service last. Ex:
map.addLayers([cfx,cfxprop,turn, tollLayer]);
Thanks Jake, that fixed this issue.
Do you know if the only way to fix the random re-arranging layers in the Legend dijit can only be fixed by sorting the object before it gets fed to the dijit?
I think you may have to sort the object before it's sent to the legendDijit constructor. For example, if you want to order the legend by title in ascending order you could use the following:
layerInfo = layerInfo.sort(function(a, b){ return a.title < b.title; });
Ok, that's what I thought.
Thanks Jake for your help!