[Mapserver-users] Multiple Layer Itemqueries?

David Fawcett David.Fawcett at state.mn.us
Thu Feb 19 07:02:46 PST 2004


Is it possible to perform two itemnqueries in the same request? 
Something like:

http://0.0.0.0/cgi-bin/ms4/mapserv.exe?map=e%3A%5Cweb%2Fsc%5Cmulti.map&mode=itemnquery&qlayer=sub&qitem=FIPS&qstring=('[FIPS]'+IN+'27001,27003,27005')&qlayer=log&qitem=FIPS&qstring=('[FIPS]'+IN+'27007,27009,27011')"

I have a map file with two layers that both reference the same MN
counties poly shapefile.  I have classed each layer so one is red and
the other is blue.  And, I am using STYLE selected in my querymap
object.  

It works, but it appears that the second itemnquery overwrites the
first one in the URL string.  Is it possible to get the selected items
from each layer to show up in the same image?


Here is the Map Snippet:

  QUERYMAP
    SIZE 150 150
    STATUS ON
    STYLE SELECTED
    #COLOR 255 204 102
  END

  
LAYER
    NAME log
    STATUS ON
    TYPE POLYGON
    DATA score
	TEMPLATE "selectcounty.html"
	FOOTER "selectcountyfoot.html"
    CLASS 
	   COLOR 255 0 0
       OUTLINECOLOR 181 181 181   
    END
  END
  LAYER
    NAME sub
    STATUS ON
    TYPE POLYGON
    DATA score
	TEMPLATE "selectcounty.html"
	FOOTER "selectcountyfoot.html"
    CLASS 
	   COLOR 255 204 102
       OUTLINECOLOR 181 181 181  
    END
  END

David J. Fawcett
MN Office of Environmental Assistance



More information about the MapServer-users mailing list