[Python] queryByAttributes()

Yves Jacolin yjacolin at FREE.FR
Tue Feb 13 12:25:12 EST 2007


Thanks Didrik,

I tested with mapserver 4.8, and it isnot working indeed. So I am waiting your 
test.

Regards,

Y.
Le Mardi 13 Février 2007 17:41, vous avez écrit :
> Le mardi 13 février 2007 à 16:17 +0100, Yves Jacolin a écrit :
> > Hi,
> >
> > I am trying to create a map using a python script. I got a problem with
> > the getByAttributes() method :
> > myLayer.queryByAttributes(mapobject,"ville","ville=Paris",1)
> >
> > The "Paris" string is viewed as a column name, and I can't change this, I
> > tried to used double and simple quote (" and '), tired to escape quote
> > (\" and \'), but all this failed !
> >
> > Thanks,
> >
> > Y.
> > PS : I am a newby to python and use mapscript 4.10.0
>
> With mapserver 4.4, this worked fine :
>
> myLayer.queryByAttributes(mapobject, None, "ville='Paris'",
>                           mapscript.MS_SINGLE)
>
> I remember having problems using mapserver 4.8.
>
> I will try and test it with mapserver 4.10 as soon as possible and let
> you know.
>
> Didrik

-- 
Yves Jacolin
---
http://yjacolin.gloobe.org



More information about the mapserver-users mailing list