[Mapserver-users] Zoom to in a mapserver project

Jean Jean
Wed Feb 11 13:48:17 EST 2004


This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C3F0D7.FE500DC0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

I come from France and my english is poor, sorry;-)

I have a mapserver project (mapserver4.01) and the first shape (shp =
ESRI) is nammed "departements"
(yours counties).
In the map file, his status is default.

I want to propose to users the possibility to zoom to a "departement".=20
I make a itemquery with mapext=3Dshapes as I have seen in this example :

function findBuilding(inBuilding){
  var aForm =3D document.forms[0]
  aForm.building.value  =3D inBuilding;

  aForm.mode.value =3D "itemquery";
  aForm.qlayer.value =3D "building_query";
  aForm.mapext.value =3D "shapes";
  aForm.buffer.value =3D "0.005";
  aForm.submit()
}

and in my map file -

LAYER   # this layer just displays one building when it has been queried
  NAME "building_query"
  DATA Build
  TYPE  POLYGON
  STATUS OFF
  FILTERITEM Bldg_name
  FILTER "%building%"
  CLASS
    TEMPLATE "demo.html"        # Use to display map
    #COLOR 255 0 0
    #OUTLINECOLOR 255 0 0
  END # CLASS
END # LAYER

Mapserver don't work, the return is :
msQueryAttributes: Query non defined.

Can someone help me?

Thank's
------=_NextPart_000_0005_01C3F0D7.FE500DC0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#f0e8d8>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I come from France and my english is =
poor,=20
sorry;-)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have a mapserver project =
(mapserver4.01) and the=20
first shape (shp ESRI) is nammed "departements"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>(yours counties).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In the map file, his status is=20
default.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I want to propose to users the =
possibility to zoom=20
to a "departement". </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I make a itemquery with mapext=3Dshapes =
as I have=20
seen in this example :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>function findBuilding(inBuilding){<BR>&nbsp; var aForm =3D=20
document.forms[0]<BR>&nbsp; aForm.building.value&nbsp; =3D=20
inBuilding;<BR><BR>&nbsp; aForm.mode.value =3D "itemquery";<BR>&nbsp;=20
aForm.qlayer.value =3D "building_query";<BR>&nbsp; aForm.mapext.value =
=3D=20
"shapes";<BR>&nbsp; aForm.buffer.value =3D "0.005";<BR>&nbsp;=20
aForm.submit()<BR>}<BR><BR>and in my map file -<BR><BR>LAYER&nbsp;&nbsp; =
# this=20
layer just displays one building when it has been queried<BR>&nbsp; NAME =

"building_query"<BR>&nbsp; DATA Build<BR>&nbsp; TYPE&nbsp; =
POLYGON<BR>&nbsp;=20
STATUS OFF<BR>&nbsp; FILTERITEM Bldg_name<BR>&nbsp; FILTER=20
"%building%"<BR>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; TEMPLATE=20
"demo.html"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Use to display=20
map<BR>&nbsp;&nbsp;&nbsp; #COLOR 255 0 0<BR>&nbsp;&nbsp;&nbsp; =
#OUTLINECOLOR 255=20
0 0<BR>&nbsp; END # CLASS<BR>END # LAYER<BR></DIV>
<DIV><FONT face=3DArial size=3D2>Mapserver don't work, the return is =
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>msQueryAttributes: Query non=20
defined.</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can someone help me?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thank's</FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C3F0D7.FE500DC0--




More information about the mapserver-users mailing list