[Chameleon] Widget Dev - legend/layers

Liz Godwin godwinl@agr.gc.ca
Wed Apr 7 20:41:32 EDT 2004


Hey,

I've created my first widget....almost.  

In absense of an HTML Legend solution I liked, I made my own widget
that uses Group, Layer and Class objects from a mapfile to display a
collapsable tree view of a legend.  Because of the frequency of
layers/classes, the class list collapses under a layer also.  This
legend uses radio buttons at the moment for layer selection (only one
layer may be visible at a time... for now), although eventually my
widget will define conditions for both radio button and checkbox use.

Ok...  so it works mostly.  That is.. my javascript to collapse the
list at different levels works, and all levels display correctly, with
styling. 

What does not work is my layer selection.  The layer visible correctly
makes the right radio button selected, but I am unable to change the
layer that is visible.
What do I need to do for this?  Can I piggy back off another widget?  

Without any documentation yet, I am guessing as to the way to do this. 
My guess is that there are two parts to this, 1) making sure my radio
buttons have the correct name and value pairs, and 2), how to handle the
request sent to chameleon in the post request.  I looked at LayerManager
and it looked like I have to parse the URL to get the right request.  Do
I use this Widget as a good example, or is it all wrong (I read a month
ago in the list that LayerManager is changing).?
Where would I call a function to update the map layer status from?

Hopefully you all understand what I'm trying to do, thanks for your
help!!

Liz Godwin



More information about the Chameleon mailing list