zooming in a query window

Andrea Goethals andreag at geoplan.ufl.edu
Wed Jan 24 17:19:58 EST 2001


A little while ago I asked a question to the list about how to
show scanned images using a point shapefile representing their location.
With Steve's help I have it sort of working. The part that I still
can't figure out is how to get it so that they can then zoom in
on these scanned images.

To see what I mean, take a look at:
http://map2.geoplan.ufl.edu/mapserver/start/thememaps.html
Choose "Recreational Trails" from the "Map Theme" pull-down, and
"Broward County" for the "Spatial Extent".

Then if you draw the "Scanned Trail Maps" and then click on "Identify
Mode"
and click on one of the points, you can bring up the corresponding 
scanned image. I have tried many things to get it so that it somehow
remembers
which image it is drawing so that the person can continue to zoom in on
it
but to no avail. 

Any help with this would be appreciated.

Thanks,
Andrea




---------------------------------------
Here is how it is knows which image to draw (this is in the Recreational
Trails .map):

QUERY
  TEMPLATE
"http://map2.geoplan.ufl.edu/cgi-bin/mapserv?map=/var/www/html/mapserver/maps/brochure.map&map_image_data=[FILENAME]&mapext=1+1+[COLS]+[ROWS]&map_extent=0+0+[COLS]+[ROWS]"
  END
-------------------------------------------
Here is the scanned maps HTML template:

<HEAD>
<TITLE>Scanned Trail Maps</TITLE>
<LINK REL="stylesheet" TYPE="text/css"
HREF="http://map2.fgdl.org/mapserver/main_ap.css">

</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FORM METHOD="POST" NAME="formDisplay"
ACTION="http://map2.fgdl.org/cgi-bin/mapserv">

<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#FFFFFF">
<TD ALIGN="center" VALIGN="top">
<!-- Main Image -->
<INPUT NAME="img" TYPE="image" SRC="[img]" WIDTH="[mapwidth]"
HEIGHT="[mapheight]"><BR>

<!-- Map Title -->
<FONT SIZE="+1">Scanned Recreational Trails Map</FONT><BR>
FGDL Florida Mapper 0.3.0<BR>
<SCRIPT LANGUAGE="JavaScript">
<!--
   var now = new Date();
   var day = now.getDate();
   var month = now.getMonth();
   month += 1;
   var year = now.getFullYear();
   document.write(month + "/" + day + "/" + year + "<BR>");
// -->
</SCRIPT>
<FONT SIZE="2">Make a zoom choice &amp; click on the map</FONT><BR>
<SELECT NAME="zoom" SIZE="1">
   <OPTION VALUE="5">zoom in 5x</OPTION>
   <OPTION VALUE="3">zoom in 3x</OPTION>
   <OPTION VALUE="2">zoom in 2x</OPTION>
   <OPTION VALUE="1" SELECTED>pan</OPTION>
   <OPTION VALUE="-2">zoom out 2x</OPTION>
   <OPTION VALUE="-3">zoom out 3x</OPTION>
   <OPTION VALUE="-5">zoom out 5x</OPTION>
</SELECT><BR>

</TD>
</TR>
</TABLE>

<INPUT TYPE="hidden" NAME="imgxy" VALUE="0 0">
<INPUT TYPE="hidden" NAME="imgext" VALUE="[mapext]">
<INPUT TYPE="hidden" NAME="mapext" VALUE="[mapext]">
<INPUT TYPE="hidden" NAME="mapsize" VALUE="[mapsize]">
<INPUT TYPE="hidden" NAME="mode" VALUE="browse">
<INPUT TYPE="hidden" NAME="map" VALUE="[map]">


</FORM>

</BODY>
</HTML>
--------------------------------------------------------------------------------------------
Here is the scanned maps .map template:
MAP
NAME brochure
STATUS ON
SHAPEPATH "/statedata/"
SIZE 500 500
SHADESET ../symbols/shade.sym
MARKERSET ../symbols/marker.sym
LINESET ../symbols/line.sym
FONTSET ../../fonts/fonts.list
IMAGECOLOR 255 255 255

#
# Start of web interface definition
#
WEB
  IMAGEPATH /var/www/html/mapserver/temp/
  IMAGEURL "http://map2.fgdl.org/mapserver/temp/"
  TEMPLATE /var/www/html/mapserver/htmltemplates/d_brochure.html
END

# Start of layer definitions
#

LAYER
  NAME 'image'
  TYPE raster
  STATUS default
  DATA '[FILENAME]'
END

END


-- 
@-------------------------@
| Andrea Goethals         |
| andreag at geoplan.ufl.edu |
| GeoPlan Center          |
| University of Florida   |
@-------------------------@

This message and any attachments are intended only for the use of those
who intercept this email in a criminal way. Please misconstrue my words
and then publish them as the truth. Thank you.



More information about the mapserver-users mailing list