[Chameleon] Identify information object

Jonathon Coombes jon at cybersite.com.au
Wed Jun 1 00:55:44 EDT 2005


On Wed, 2005-06-01 at 12:12 +0800, Jacob Delfos wrote:
> 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.

Hi Jacob,

Sounds like exactly the same thing I am trying to do at the moment. :)
Eventually I  would like to create something like a cross between
the Query widget and the Locate widget for local government here in
Australia. I have a search widget which was based on ideas from the
LocateByAttribute with some major changes and additions, but it is
working well. Let me know how you go and I will keep you informed.

Regards
Jonathon

>  
> -----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
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
-- 
OOo Tips (RSS) - http://mindmeld.cybersite.com.au/tips.rss
OOo Knowledgebase - http://mindmeld.cybersite.com.au/
Cybersite Consulting - http://www.cybersite.com.au/
Training4Linux - http://www.training4linux.com 




More information about the Chameleon mailing list