[Mapserver-users] filter, mapscript

Sven Jacobi jacobi at dfki.de
Wed Feb 26 05:36:47 EST 2003


Hi list,

I'm trying to make a query by attributes, but somehow it doesn't work...
I'm using MS 3.6.1 and Python Mapscript.
Below are the pieces of code responsible for the errors...

Any ideas what I'm doing wrong?

Thanks in forward,

Sven

---------------------------------------------------
...
testlayer = mymap.getLayerByName("Bestandstandorte")
 testlayer.status=MS_ON
 #testlayer.filteritem = 'H_BAUMART'
 testlayer.setfilter('Fi')
 rv = testlayer.queryByAttributes(mymap, 1)
...

-----------------------------------------------------
...
LAYER
  NAME "Bestandstandorte"
  DATA Bestandstandorte
  #EXPRESSION (`Ortsgrenze`)
  STATUS OFF
  TYPE POLYGON

  FILTERITEM "H_BAUMART"
  FILTER 'Fi'

  CLASSITEM "H_BAUMART"
  CLASS    
    NAME Fichte
    EXPRESSION 'FI'
...

----------------------------------------------------
File "/home/jacobi/Funkland/Zope-2.5.1b2-src/Extensions/querytest.py", line 
105, in drawmap
    testlayer.setfilter('FI')
  File "/home/jacobi/Funkland/site-packages/MapScript.py", line 1901, in 
__getattr__
    raise AttributeError,name
AttributeError: setfilter




More information about the mapserver-users mailing list