[Mapserver-users] Zoom to in a mapserver project

Jean Jean
Wed Feb 11 10:48:17 PST 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> </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> </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> </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> </DIV>
<DIV>function findBuilding(inBuilding){<BR>  var aForm =3D=20
document.forms[0]<BR>  aForm.building.value  =3D=20
inBuilding;<BR><BR>  aForm.mode.value =3D "itemquery";<BR> =20
aForm.qlayer.value =3D "building_query";<BR>  aForm.mapext.value =
=3D=20
"shapes";<BR>  aForm.buffer.value =3D "0.005";<BR> =20
aForm.submit()<BR>}<BR><BR>and in my map file -<BR><BR>LAYER   =
# this=20
layer just displays one building when it has been queried<BR>  NAME =

"building_query"<BR>  DATA Build<BR>  TYPE  =
POLYGON<BR> =20
STATUS OFF<BR>  FILTERITEM Bldg_name<BR>  FILTER=20
"%building%"<BR>  CLASS<BR>    TEMPLATE=20
"demo.html"        # Use to display=20
map<BR>    #COLOR 255 0 0<BR>    =
#OUTLINECOLOR 255=20
0 0<BR>  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> </DIV>
<DIV><FONT face=3DArial size=3D2>Can someone help me?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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