[Mapserver-users] Groups and query modes

Alessandro Galasso agalasso at gndci.cs.cnr.it
Wed Apr 16 10:50:10 EDT 2003


If i group 2 or more layers into one group, i can query the group as a
normal layer in querymap mode.
But if I use itemquerymap mode i receive the following error:
msQueryByAttributes(): General error message. No query layer defined
So my question is: are groups supported in itemquery (and this is a bug) or
not ?

  LAYER
    NAME "layer1"
    GROUP myGroup
    STATUS OFF
    DATA "layer1"
    TYPE LINE
    UNITS METERS
    SIZEUNITS PIXELS
    TEMPLATE "templates/myTemplate.html"
    FILTERITEM MYDBITEM
    CLASS
      NAME "layer1"
      COLOR 0 0 255
    END
  END
  LAYER
    NAME "layer2"
    GROUP myGroup
    STATUS OFF
    DATA "layer2"
    TYPE LINE
    UNITS METERS
    SIZEUNITS PIXELS
    TEMPLATE "templates/myTemplate.html"
    FILTERITEM MYDBITEM
    CLASS
      NAME "layer2"
      COLOR 0 0 255
    END
  END

This query runs fine:

http://laplace/mapserver/mapserv.exe
?map=calabria/calabria.map
&imgext=2596508+4372387+2675198+4332997
&imgsize=863+432
&layers=myGroup
&img.x=345
&img.y=133
&mode=querymap

but this one fails:

http://laplace/mapserver/mapserv.exe
?map=calabria/calabria.map
&map_extent=2596508+4372387+2675198+4332997
&imgsize=863+432
&qlayer=myGroup
&map_myGroup_filter=myItem
&mode=itemquerymap


---
Alessandro Galasso




More information about the mapserver-users mailing list