FW: [Mapserver-users] layers not staying on
Michael Smith
msmith at sanangelompo.org
Fri Sep 12 08:04:31 PDT 2003
-----Original Message-----
From: Michael Smith [mailto:msmith at sanangelompo.org]
Sent: Friday, September 12, 2003 9:26 AM
To: Lowther, David W; mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] layers not staying on
Here is my map file and template file.
--------------------------------------
<html>
<head><title>MapServer Demo Interface</title></head>
<body bgcolor=#FFFFFF>
<center><h1>Planning GIS MapServer Demo Interface</h1></center>
<hr>
<form method=GET action="[program]">
<center>
<table border=0 cellspacing=0 cellpadding=4 bgcolor="#000000">
<tr>
<td valign="top" align=center>
<table cellpadding="0" cellspacing="0" border="0">
<tr><td colspan="2"><INPUT NAME="img" TYPE="image" SRC="[img]" width=600
height=600 border=0></td></tr>
<tr>
<td> <font size=-1 face="arial,helvetica"
color="#FFFFFF"><b>Powered by MapServer</b></font></td>
<td align="right"><img src="[scalebar]"></td>
</tr>
</table>
</td>
<td valign="top" bgcolor=#ffffff>
<table cellpadding="5" cellspacing="0" border="0" bgcolor="#ffffff">
<tr><td>
<center><input type="submit" value="Refresh/Query"></center>
<p>
<input type="radio" name="mode" value="browse" checked> <b>Browse
map</b><br>
<input type="radio" name="mode" value="query"> <b>Query
feature</b><br>
<input type="radio" name="mode" value="nquery"> <b>Query multiple
features</b>
<hr>
<p>
<b>Select Layers to Display: </b><br>
<select multiple name="layer" size=3>
<option value="schools" [elemdist_region_select]> Schools
<option value="waterline" [watercomb_polyline_select]> Water Mains
</select>
<p>
Zoom In <input type=radio name=zoomdir value=1 [zoomdir_1_check]>
Pan <input type=radio name=zoomdir value=0 [zoomdir_0_check]>
Zoom Out <input type=radio name=zoomdir value=-1 [zoomdir_-1_check]>
<p>
Zoom Size <input type=text name=zoomsize size=4 value=[zoomsize]>
<p>
<font size=+1><b>Legend</b></font><br><hr>
<img src="[legend]"><hr>
<p>
<center><INPUT NAME="ref" TYPE="image" SRC="[ref]"
border="0"></center>
</td></tr></table>
</td></tr>
</table>
</center>
<input type="hidden" name="imgxy" value="299.5 299.5">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="program" value="[program]">
<input type="hidden" name="map_web_imagepath" value="[map_web_imagepath]">
<input type="hidden" name="map_web_imageurl" value="[map_web_imageurl]">
</form>
<p><hr><p>
</body></html>
---------------------------------------------------
MAP
NAME "Mike"
STATUS ON
EXTENT -101.087052 31.087353 -100.110994 31.695354
#EXTENT 613161.780000 675951.930000 715492.610000 766282.700000 #lubbock
extents in feet
#EXTENT -7745844.296050 2757169.266170 9997964.943150 2558092.432226
SIZE 600 600 #change this size in the .html file also
SHAPEPATH "data"
#SYMBOLSET "symbols/line.sym"
IMAGECOLOR 255 255 255
UNITS DD
WEB
HEADER "demo_header.html"
TEMPLATE "cosademo.html"
END # Web
QUERYMAP
SIZE 200 200
STATUS ON
STYLE HILITE
COLOR 255 0 0
END
REFERENCE
STATUS ON
IMAGE "graphics/cosarefer.gif"
#EXTENT 393234.393701263 5205405.16440722 495769.579718949
5307959.02579127
SIZE 120 120
EXTENT -100.528849 31.335358 -100.365481 31.526444
COLOR -1 -1 -1
OUTLINECOLOR 255 0 0
END
#IMAGETYPE PNG
#IMAGETYPE jpg
#PROJECTION
# proj=utm
# ellps=GRS80
# zone=15
# north
# no_defs
#
# OR:
#
#"init=epsg:4267"
#END
LEGEND
STATUS ON
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
SHADOWSIZE 2 2
END # Label
END # Legend
SCALEBAR
IMAGECOLOR 255 255 255
LABEL
COLOR 255 255 255
SIZE tiny
END
STYLE 1
SIZE 80 2
COLOR 255 255 255
UNITS MILES
INTERVALS 1
TRANSPARENT TRUE
STATUS TRUE
END
SYMBOL
NAME "circle"
TYPE ellipse
FILLED true
POINTS
1 1
END
END
# Start of layer definitions
LAYER
NAME "Water Main"
GROUP waterline
STATUS ON
DATA "watercomb_polyline"
TYPE LINE
CLASS
NAME "Water Mains" #this title appears in legend
COLOR 22 20 20
END # Class
END # Layer
LAYER
NAME "watermain_anno"
GROUP waterline
STATUS ON
DATA "watercomb_text"
TYPE ANNOTATION
MAXSCALE 500000
LABELITEM "textstring"
CLASS
COLOR 255 255 255
#SYMBOL 'symbols/ctyhwy.gif'
LABEL
#MINFEATURESIZE 10 #40 how close label are to each other
#MINDISTANCE 150
POSITION CC
SIZE GIANT #tinysmallmediumlargegiant
#FONT arial-bold
#SIZE 12
COLOR 0 0 0
SHADOWCOLOR 255 255 255
SHADOWSIZE 2 2
#BUFFER 2 #can help adjust label spacing
WRAP " "
END
END
END # county road annotation
LAYER
NAME "City Limits"
GROUP "citylimit"
STATUS DEFAULT
DATA "limit97_region"
TYPE POLYGON
CLASS
NAME "City Limits"
SYMBOL 'circle'
SIZE 5 #changes size of line
OUTLINECOLOR 254 177 25
COLOR -1 -1 -1 #fills inside of circle
END # Class
END # Layer
LAYER
NAME "Aerial"
STATUS DEFAULT
DATA "jl11.tif" #put your_tif.TAB to D:\TEMP\
TYPE RASTER
MINSCALE 100
MAXSCALE 500000
END
LAYER
NAME "Roads"
GROUP "roads"
STATUS DEFAULT
DATA "tgrds"
TYPE LINE
CLASS
NAME "Streets & Roads" #this title appears in legend
#SYMBOL 'symbols/ctyhwy.gif'
TEMPLATE "tgrds.html"
COLOR 212 208 200
END # Class
HEADER "tgrds_header.html"
FOOTER "tgrds_footer.html"
TOLERANCE 5
DUMP TRUE # allow GML export
END # Layer
LAYER
NAME "tgrds_anno"
GROUP "roads"
STATUS DEFAULT
DATA "tgrds"
TYPE ANNOTATION
MAXSCALE 50000
LABELITEM "street"
CLASS
COLOR 255 255 255
#SYMBOL 'symbols/ctyhwy.gif'
LABEL
SIZE TINY #tinysmallmediumlargegiant
POSITION CC
BUFFER 2 #40 how close label are to each other
MINDISTANCE 150
MINFEATURESIZE 30
#FONT arial-bold
#SIZE 12
COLOR 0 0 0
SHADOWCOLOR 218 218 218
SHADOWSIZE 2 2
END #label
END #class
END #layer
LAYER
NAME "Water Poly"
GROUP "lakes"
STATUS DEFAULT
DATA "tgwater_region"
TYPE POLYGON
CLASS
NAME "Lakes & Rivers" #this title appears in legend
TEMPLATE "tgwater.html"
COLOR 49 117 185
#BACKGROUNDCOLOR 127 175 230
#OUTLINECOLOR 127 75 30
END # Class
HEADER "tgwater_header.html"
FOOTER "tgwater_footer.html"
TOLERANCE 5
DUMP TRUE # allow GML export
END # Layer
LAYER
NAME "School Boundary"
GROUP "schools"
STATUS ON
DATA "elemdist_region"
TYPE POLYGON
CLASS
NAME "School Dist"
#COLOR 252 236 188
#BACKGROUNDCOLOR 127 175 230
OUTLINECOLOR 127 75 30
END #Class
END #Layer
LAYER
NAME "schools_anno"
GROUP "schools"
STATUS ON
DATA "elemdist_region"
TYPE ANNOTATION
MAXSCALE 500000
LABELITEM "District"
CLASS
COLOR 255 255 255
#SYMBOL 'symbols/ctyhwy.gif'
LABEL
#MINFEATURESIZE 10 #40 how close label are to each other
#MINDISTANCE 150
POSITION CC
SIZE GIANT #tinysmallmediumlargegiant
#FONT arial-bold
#SIZE 12
COLOR 0 0 0
SHADOWCOLOR 255 255 255
SHADOWSIZE 2 2
#BUFFER 2 #can help adjust label spacing
WRAP " "
END
END
END # county road annotation
END
----------------------------------------------
-----Original Message-----
From: Lowther, David W [mailto:dlowther at ou.edu]
Sent: Friday, September 12, 2003 9:08 AM
To: 'Michael Smith'; mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] layers not staying on
Michael,
It sounds like your layer_status is not getting passed properly. Definitely
would need to see map and template files to know exactly why.
David Lowther
Software Engineer
GEO Information Systems
University of Oklahoma
dlowther at ou.edu
(405) 325-3131
http://www.geo.ou.edu
> -----Original Message-----
> From: Michael Smith [mailto:msmith at sanangelompo.org]
> Sent: Friday, September 12, 2003 8:29 AM
> To: mapserver-users at lists.gis.umn.edu
> Subject: [Mapserver-users] layers not staying on
>
>
> Can someone tell me what causes this. On Mapserver (windows
> 2000/IIS5), when I display a map my default layers appear.
> When I select a layer from my available layers and hit
> refresh, the available layer then displays. The problem I
> have is if I then change the view (zoom in or out) the
> available layer disappears and only my default layers show
> up. In the demo, if I select an available layer it stays on
> until I (or the user) turns it off. I can post my map file
> is that is needed. Any help will really be appreciated as I
> am on a deadline to show this mapserver demo to my boss.
> Thanks in advance.
>
> Michael Smith, Planner II
> City of San Angelo
> Planning & Development
> 325.657.4210 Fax: 325.481.2648
> Email: msmith at sanangelompo.org
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/maps> erver-users
>
>
More information about the MapServer-users
mailing list