[Chameleon] Query Selected Layers
Paul Spencer
pspencer at dmsolutions.ca
Fri Jan 6 10:01:05 EST 2006
Mariette,
there is a widget called SelectLayers. You can use this widget in
conjunction with the LegendTemplate widget to provide a mechanism to
mark layers as selected for a particular operation such as query. If
I'm not mistaken, at least one of the sample apps has a legend
template set up to do this. If not, the basic approach is to add a
SelectLayers widget set visible=false. This adds a javascript
function CWCSelectLayer( szLayerName, bSingle ) that can be called in
the onclick of a radio button or checkbox ... in your legend
template, you would add a radio button with an onclick event
something like onclick='CWCSelectLayer("[layer_name]", true)' (or
false if you just want a single selection.
Then you would create a custom query results page using the
instructions in the chameleon wiki. The current selection is
available by looping through each layer in the map file and checking
the metadata "selected" for the value "1"
Cheers
Paul
On 6-Jan-06, at 8:42 AM, Mariette wrote:
> Greetings,
>
> I was just wondering if anyone has a solution so that I may query
> selected layers only via a radio button. I have searched the
> archives and have found many postings looking for the same thing
> but no actuall solution.
>
>
> Thank You
>
>
> ********************************
>
> Mariette Hachey
>
> GIS Technologist
>
> GeoNet Technologies Inc.
>
> Box 22, Suite 211
>
> 90 University Ave
>
> Charlottetown, PE
>
> Canada, C1A 4K9
>
>
> ********************************
>
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the Chameleon
mailing list