[Cartoweb-users] Highlighting objects in the map

Sylvain Pasche sylvain.pasche at camptocamp.com
Thu Oct 20 05:50:31 EDT 2005


Le mardi 18 octobre 2005 à 16:42 +0200, Eduard Witteveen a écrit :
> Hello,
> 
> I want to make a plugin that highlights certain objects based upon 3 
> parameters:
>     - layername
>     - layerfieldname
>     - layerfieldvalue
> 
> [...]
> So basically i have 2 questions:
> 
> 1) How do i define this id field? I found the following method, but is 
> there also a cartoweb-method?
> > METADATA
> >
> >  "id_attribute_string" "gid|string"
> >END 

In fact this is a cartoweb method of declaring the id field in the
mapfile. The id_attribute_string is not related to mapserver, but
cartoweb.

If you want to restrict your query to some elements, you can use the
QuerySelection object of the QueryRequest request object.
In the QuerySelection, In the QuerySelection object which extends
IdSelection (from the location plugin), you have the idAttribute field
which can be used for your $layerfieldname. And the $selectedId for your
$layervalue.

> 2) How can i search on fields other than the id field? (more important 
> for me)

This should be possible by giving the appropriate $idAttribute field to
the QuerySelection object.

> 
> PS: Since i know that we are working under the gpl licence, i want to 
> postback code. Please let me know where i can drop code, or should i 
> place this on my own website?
> 

The official way of doing contributions is to open a bugzilla
enhancement bug request on our bugzilla there:

http://bugzilla.maptools.org

This is better than posting to a private website, because it offers a
centralized place where to store things, and can benefit of the bugzilla
infrastructure (comments, attachements, ...)

Best regards,

Sylvain






More information about the Cartoweb-users mailing list