[Python] queryByAttributes()
Didrik Pinte
dpinte at ITAE.BE
Tue Feb 13 08:41:37 PST 2007
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message num?riquement sign?e
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070213/52a5080d/attachment.sig>
More information about the MapServer-users
mailing list