mapscript question

Didrik Pinte dpinte at ITAE.BE
Sun May 7 13:53:26 EDT 2006


Le dimanche 07 mai 2006 à 19:17 +0200, Didrik Pinte a écrit :
> Le dimanche 07 mai 2006 à 19:09 +0200, Didrik Pinte a écrit :
> > Hi,
> > 
> > When querying a layer in a mapfile using queryByAttributes(), is the
> > query parameters saved when displaying the map ? It does not seem to be
> > the case.
> > 
> > Example: 
> > 
> > mymap = mapscript.mapObj('.../test.map')
> > mylayer = mymap.getLayerByName('alayer')
> > res = mylayer.queryByAttributes(mymap, 'vid', 'vid == 10',
> > mapscript.MS_MULTIPLE)
> > if res = mapscript.MS_SUCCESS:
> >   mymap.draw()
> > 
> > How can I do that ? Do I have to get the results in the resultsets and
> > add them to a new dynamic layer ?
> > 
> > Thanks for your help
> > 
> > Didrik
> 
> 
> I've tested the drawQuery method but it does hilight the results AND
> show the non selected points. I'm trying to get only the selected
> points.
> 
> Didrik

Here is the answer ;-)

Setting the QUERYMAP STYLE to SELECTED in place of HILITE solved the
problem.

Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060507/534e23e0/attachment.bin


More information about the mapserver-users mailing list