[Mapserver-users] Zoom In to a defined area
Lowther, David W
dlowther@ou.edu
Tue, 2 Sep 2003 08:06:53 -0500
Jeff,
Make a function for the onchange event of your combo box, grab the selected
value, and write it to the mapext input element of your form. That should
fix you up without messing up your other functions.
David Lowther
Software Engineer
GEO Information Systems
University of Oklahoma
dlowther@ou.edu
(405) 325-3131
http://www.geo.ou.edu
> -----Original Message-----
> From: Jeff L. [mailto:nf10@hotmail.com]
> Sent: Monday, September 01, 2003 9:59 PM
> To: armin.burger@libero.it; mapserver-users@lists.gis.umn.edu
> Subject: Re: [Mapserver-users] Zoom In to a defined area
>
>
> Thank you Armin for your reply.
> I tried your suggestion and it works. However, setting the
> name to "mapext"
> makes the standard "zoom in" and "zoom out" functions
> unusable as "mapext"
> is now overriding the MapServer "mapext" variable. When I try
> zoom in, i
> have this error "loadForm(): Web application error. Not
> enough arguments for
> mapext".
>
> I tried to change the name of tha variable to "ViewArea" then
> setting mapext
> to "ViewArea" value, but no success. Here is my code snippet:
>
> function AreaSelected()
> {
> if (document.forms[0].ViewArea.selectedIndex != 0 &&
> document.forms[0].ViewArea.selectedIndex !=1)
> {
> mapext = document.forms[0].ViewArea; // not sure about this
> document.forms[0].submit();
> }
> }
>
> ...
>
> <SELECT NAME="ViewArea" onChange="AreaSelected()">
> <OPTION VALUE="">Go to</OPTION>
> <OPTION VALUE="">- - - - - - - - - - - - - </OPTION>
> <OPTION VALUE="-180 45 180 90">Area 1</OPTION>
> <OPTION VALUE="-180 0 180 45">Area 2</OPTION>
> </SELECT >
>
>
> Jeff Lacoste
>
>
>
>
> >From: Armin Burger <armin.burger@libero.it>
> >Reply-To: Armin Burger <armin.burger@libero.it>
> >To: nf10@hotmail.com, mapserver-users@lists.gis.umn.edu
> >Subject: Re: [Mapserver-users] Zoom In to a defined area
> >Date: Mon, 1 Sep 2003 23:22:56 +0100
> >
> >Jeff,
> >
> >try something like
> >
> ><SELECT NAME="mapext" onChange="AreaSelected()">
> > <OPTION VALUE="">Go to</OPTION>
> > <OPTION VALUE="">- - - - - - - - - - - - - </OPTION>
> > <OPTION VALUE="-180 45 180 90">Area 1</OPTION>
> > <OPTION VALUE="-180 0 180 45">Area 2</OPTION>
> ></SELECT >
> >
> >Armin
> >
> >
> > > Hi,
> >
> > > By knowing the map coordinates of a specific area (xMin,
> yMin, xMax
> > > and yMax), i would like to zoom in to such area. I have a
> combo box
> > > with
> >defined
> > > areas to zoom in, i'm using CGI and JavaScript to change map
> > > extents,
> >but no
> > > success so far. My question would be how to pass the map
> extents and
> >may be
> > > the center of the image is also required to change? Here
> is my code
> >snippet:
> > > ....
> >
> > > <SCRIPT LANGUAGE="JavaScript"><!--
> >
> > > function AreaSelected()
> > > {
> > > if (document.forms[0].ViewArea.selectedIndex != 0 &&
> > > document.forms[0].ViewArea.selectedIndex !=1)
> > > document.forms[0].submit();
> > > }
> >
> > > //--></SCRIPT>
> >
> > > <form method=GET action="[program]" name=myform>
> >
> > > ....
> >
> > > <SELECT NAME="ViewArea" onChange="AreaSelected()"> <OPTION>Go
> > > to</OPTION>
> > > <OPTION>- - - - - - - - - - - - - </OPTION>
> > > <OPTION VALUE="-180,45,180,90">Area 1</OPTION>
> > > <OPTION VALUE="-180,0,180,45">Area 2</OPTION>
> > > </SELECT >
> >
> > > ....
> >
> > > <input type="hidden" name="imgxy" value="299.5 299.5"> <input
> > > type="hidden" name="imgext" value="[mapext]"> ....
> > > </form>
> >
> >
> > > Any help is appreciated
> >
> > > Jeff Lacoste
> >
> > > _________________________________________________________________
> > > Protect your PC - get McAfee.com VirusScan Online
> > > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> >
> > > _______________________________________________
> > > Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users@lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/maps> erver-users
>
>
>
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users