[Chameleon] Identify information object

Paul Spencer pspencer at dmsolutions.ca
Tue May 31 10:33:52 EDT 2005


Jonathon,



Jonathon Coombes wrote:
> On Mon, 2005-05-30 at 22:27 -0400, Paul Spencer wrote:
> 
>>You can use the following attributes on CWC2 type="Query" to add this 
>>functionality
>>
>>highlightresults="true"
> 
> 
> Hi Paul,
> 
> Thanks for the quick reply. The above details make sense.
> 
> 
>>if you want the result to stay highlighted until cleared (you need a 
>>ClearQueryResults widget in this case) set:
>>
>>persistentresults="true"
>>
>>otherwise, the highlight will disappear on the next map draw
> 
> 
> Again, this makes sense.
> 
> However, I have one slight problem. How would I use the functionality
> of a Query widget, in a customised widget like the LocateByAttribute
> that was mentioned a week ago? Do I have to go to a mapserver level
> for something like this? Do I create a subclass of the main class
> and inherit from Query? 
> 
> What would be the recommended approach for this?

I think this would be a new widget.  The query widget is a 
point-and-click widget whereas I think you are describing a widget that 
the user would enter some text and pick an attribute to search, and the 
code would highlight the result(s)

I would do this by creating a new widget (or using something posted on 
this list) not based on Query at all (since no direct map interaction is 
required).  It would take the user input and perform a queryByAttribute 
then save the query results using saveQuery ... the query results should 
be saved in the same location that drawmap.php would look for them.

To do this will be considerable effort for someone new to Chameleon, 
unfortunately.

Cheers

Paul

> 
> Regards
> Jonathon
> 
> 
>>Jonathon Coombes wrote:
>>
>>>Hi,
>>>
>>>In the mapscript demos in the past, when you clicked on a feature
>>>within your map, it highlighted it red. Is this possible within
>>>Chameleon widgets? That is, when I select a feature or click within
>>>an object of a certain layer, it will be altered or enhanced in some
>>>way?
>>>
>>>Regards
>>>Jonathon
>>

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


More information about the Chameleon mailing list