Take out Layers in Print Legend
LG,
I've spent the morning experimenting - I could use other vernacular to describe the experience, of using the hiddenlayers.txt file approach as posted on the Code Gallery.
I REALLY don't get the logic behind the way it works, nor understand why you need to cater for categories within a layer!! this adds up to hundreds, if not thousands of lines of code for us as our vegetation class layers contain a large amount of categories.
so, given the inconsistent behavior of what a few of us are seeing in the legend display - in both layer list and printing, can either this be fixed, or some code written (or both) - like the hiddenlayers approach but to simply
1. turn off all layers to start
2. list all layers that you want ON. not off (if that includes group layers then so be it, but including categories is just UNWORKABLE!!!!)
3. Have the capability of letting the legend resize appropriately also for the missing layers, as this was a problem also with the script - it left blank holes where you turn off layers!!! not good.
as I mentioned on the code gallery site, we have a product over here that simply reads xml to set up layer visibility and therefore the legend...
<layers>
<layer name='*' visible="false"/> (turns all layers off to start)
<layer name="Property" visible="true"/>
<layer name="Roads" visible="true"/>
</layers>
VERY VERY simple.....
regards
Gareth
Vous devez vous connecter pour laisser un commentaire.
Commentaires
0 commentaire