[Chameleon] Query and LegendTemplate Questions

Paul Spencer pspencer at dmsolutions.ca
Fri Jan 21 12:20:18 EST 2005


Robin is right on both points.  Polygonal layers are queryable as long 
as you add a TEMPLATE.  If you don't add a tolerance, it may not return 
results ... not sure, you will have to experiment.

There is no 'non-programmatic' way to change the query results at this 
point.  Sorry.  You can try to follow the instructions at:

http://chameleon.maptools.org/tiki/tiki-index.php?page=QueryWidgetCustomizingResults

(for those paying attention ;) this was previously in the WidgetMagic 
FAQ but I realized that was not an efficient way to add this to the tiki 
so I moved the content to its own tiki page - the FAQ is still there but 
now links to this page.)

Cheers,

Paul

Robin Brown wrote:
> if I understand correctly, the first problem has a quick solution.  If you add the lines
> as I have below, the layer will now be queryable.  The template is not used but that
> allows the layer to be queried.  You don't have to have that file anywhere.  I believe
> the tolerance and tolerance units are optional parameters.  Hope this helps.
> 
> As for the second problem, I do not know of any simple way to modify the output of the
> query results.  Sorry.
> 
> Robin
> 
> 
>>LAYER
>>	NAME region
>>	DATA lsupregion
>>	TYPE POLYGON
> 
>              TEMPLATE     ttt_query.html" #this isn't used but must be here for query to
> work
>              TOLERANCE    	2
>              TOLERANCEUNITS 	PIXELS
> 
>>	#TYPE QUERY
>>	STATUS DEFAULT
>>	PROJECTION
>>		"init=epsg:33002"
>>	END
>>	
>>	CLASSITEM "FeaType"
>>	CLASS
>>		NAME "Lakes"
>>		EXPRESSION 'Lake'
>>		COLOR 233 237 245
>>		OUTLINECOLOR 175 175 175
>>	END
>>	
>>	CLASS
>>		NAME "Wisconsin"
>>		EXPRESSION 'WI County'
>>		COLOR 254 252 245
>>		OUTLINECOLOR 175 175 175
>>	END
>>
>>	CLASS
>>		NAME "Minnesota"
>>		EXPRESSION 'MN County'
>>		COLOR 243 239 254
>>		OUTLINECOLOR 175 175 175
>>	END
>>	
>>	CLASS
>>		NAME "Michigan"
>>		EXPRESSION 'MI County'
>>		COLOR 230 235 228
>>		OUTLINECOLOR 175 175 175
>>	END
>>
>>	CLASS
>>		NAME "Ontario"
>>		EXPRESSION 'Province'
>>		COLOR 252 252 252
>>		OUTLINECOLOR 175 175 175
>>	END
>>
>>	METADATA
>>		"WMS_TITLE" "Lake Superior Region"
>>		"WMS_NAME" "Lake Superior Region"
>>		"CLASSES" "yes"
>>		"ALWAYSON" "no"
>>	END
>>
>>END
> 
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+


More information about the Chameleon mailing list