Chameleon's query tool highlighting improvement

17 October, 2006 - 12:07, last modified: 17 October, 2006 - 12:35

Query tool does a great job in querying and highlighting the queried features to the user so they can keep track of what the current feature they are viewing information about. However, if you have your GIS centeralized around a special unit. You might want only these units to be highlighted or, you may have too many layers that querying any point highlights many features that it becomes crowded and annoying so it would be a good idea to hiighlight only important layers.

Well, a solution is here. I've modified chameleon (2.0) to gracefully have a way to specify what layers should be highlighted and what is not. Gracefully here means that even if you include it, it's okay if you don't want to use it, won't hurt your code :-).

You will need to grab the following files from DSS's svn:

svn://itsyn.com/gis/chameleon/dss/trunk/htdocs/common/wrapper/drawmap.php svn://itsyn.com/gis/chameleon/dss/trunk/htdocs/widgets/Query/Query.widget.php

To toggle on the feature, you will need to set a query attribute called highlightResultsMapfile to true. Example:

<cwc2 type="Query" ... highlightResults="true" highlightResultsMapfile="true" ..>

Now by default, all layers are not going to be highlighted when querying. To change this for a layer so it can be highlighted, you will need to add a meta key with then name HIGHLIGHT and value of TRUE to the LAYER section in the map file. Example:

LAYER NAME example ... ... METADATA "HIGHLIGHT" "TRUE" END END

Well, that's it. I hope you find it useful and improve it as well ;-).

Submitted by Alejandro Barrios R. on 17 October, 2006 - 13:31.

Cool feature. Can we have the same functionality in Edit and ModelResults widget too? That would be great ;-)

thready
thready
thready
thready