[Mapserver-users] How to use itemquery in MapServer 4.0.1

Gambin Dejan Dejan.Gambin at pula.hr
Tue Apr 13 08:55:49 EDT 2004


This is a multi-part message in MIME format.

------_=_NextPart_001_01C42156.A544742E
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I am trying to use itemquery to show the map centered in a polygon that
has a name (attribute data) written in a search box. As I have seen,
this can be done with an itemquery, but I just can't get this map to be
shown. I have tried something similar to Test Suite itemquery using
tutorial example, but it doesn't show (normal query map shows
correctly).
=20
Is it something different in 4.0 version? In my template file I put:
=20
...<td><img border=3D"2"
src=3D"/cgi-bin/mapserv.exe?map=3D[map]&mode=3Ditemquery&qlayer=3Dcities_=
poly&qi
tem=3Dname&mapext=3Dshapes&value=3DFargo" height=3D"150" =
width=3D"200"></td>...
=20
- the map parameter is correctly passed to the template.=20
- cities_poly is the name of a polygon layer in the map file
- the cities shape file has an attribute called "NAME" with a string
that is the name of the city
- the city Fargo exists in the shape file
- I tried to use uppercases but nothing happened
- I tried to use itemquerymap mode instead of itemquery mode
=20
I am a little confused because somewhere there is "item", somewhere
"qitem", somewhere there is "name" somewhere "value". So what is the
right way to show a simple map centered around a polygon that has a name
written in a search box? I suppose the problem is similar to show the
street map centered around the searching street.
=20
Thanks very much
=20
Regards,
=20
Dejan Gambin
=20

------_=_NextPart_001_01C42156.A544742E
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>

<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>I am =
trying to use=20
itemquery to show the&nbsp;map centered in a polygon that has a name =
(attribute=20
data) written in a search box. As I have seen, this can be done with an=20
itemquery, but I just can't get this map to be shown. I have tried =
something=20
similar to Test Suite itemquery using tutorial example, but it doesn't =
show=20
(normal query map shows correctly).</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>Is it =
something=20
different in 4.0 version? In my template file I put:</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial =
size=3D2>...&lt;td&gt;&lt;img=20
border=3D"2"=20
src=3D"/cgi-bin/mapserv.exe?map=3D[map]&amp;mode=3Ditemquery&amp;qlayer=3D=
cities_poly&amp;qitem=3Dname&amp;mapext=3Dshapes&amp;value=3DFargo"=20
height=3D"150" width=3D"200"&gt;&lt;/td&gt;...</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>- the =
map parameter=20
is correctly passed to the template. </FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>- =
cities_poly is the=20
name of a polygon layer in the map file</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>- the =
cities shape=20
file has an attribute called "NAME" with a string that is the name of =
the=20
city</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>- the =
city Fargo=20
exists in the shape file</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>- I =
tried to use=20
uppercases but nothing happened</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>- I =
tried to use=20
itemquerymap mode instead of itemquery mode</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>I am a =
little=20
confused because somewhere there is "item", somewhere "qitem", somewhere =
there=20
is "name" somewhere "value". So what is the right way to show a simple =
map=20
centered around a polygon that has a name written in a search box? I =
suppose the=20
problem is similar to show the street map centered around the searching=20
street.</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>Thanks =
very=20
much</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial=20
size=3D2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial size=3D2>Dejan=20
Gambin</FONT></SPAN></DIV>
<DIV><SPAN class=3D461413412-13042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C42156.A544742E--



More information about the mapserver-users mailing list