[Chameleon] Identify information object

Jacob Delfos jacob.delfos at maunsell.com
Wed Jun 1 00:12:41 EDT 2005


Paul,

Is there a way to manually add objects to a query result?
My widget searches by attribute, but I am not using the query mechanism. Reason is I want more control over what is queryable or not, and what is returned (also because we use customisations with different levels of information depending on who is logged in), so I don't want to depend on the "template" mechanism. Also, I don't want to be limited to a current map-extent (even though I guess I could get around that). 

Could I use the "layerObj" class, and use "addfeature" for each shape in the iteration? Sorry for my ignorance, just that I haven't worked with dynamic layers before.... I need need to find a simple way to highlight shape objects on the fly.

regards,

Jacob




-----Original Message-----
From: chameleon-bounces at lists.maptools.org [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Paul Spencer
Sent: 31 May 2005 22:34
To: Jonathon Coombes; 'chameleon at lists.maptools.org'
Subject: Re: [Chameleon] Identify information object

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/|
+-----------------------------------------------------------------+
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20050601/c9bdf1be/attachment.html


More information about the Chameleon mailing list