создал html файл index.html следующего содержания:
Код: Выделить всё
<!-- MapServer Template -->
<html>
<head>
<title>MapServer - nngasu</title>
<script language="javascript">
function configure() {
var template = document.demo.template.options[document.demo.template.selectedIndex].value;
var snippet = " TEMPLATE " + template;
document.demo.map_web.value = snippet;
if(template.indexOf("frame") != -1) document.demo.action = "frames.html";
if(template.indexOf("dhtml") != -1) document.demo.action = "frames_dhtml.html";
}
</script>
</head>
<body bgcolor="#ffffff">
<center><h1>MapServer - nngasu</h1></center>
<!-- EDIT THE FORM ACTION -->
<form name="demo" method="GET" action="/cgi-bin/mapserv.exe" onSubmit="configure()">
<input type="hidden" name="layer" value="pomesheniya">
<input type="hidden" name="layer" value="steni">
<input type="hidden" name="zoomsize" value=2>
<input type="hidden" name="map_web" value="">
<!-- EDIT THESE HIDDEN VARIABLES -->
<input type="hidden" name="map" value="/ms4w/apps/10korpus/nngasu-10korpus.map">
<input type="hidden" name="program" value="/cgi-bin/mapserv.exe">
<input type="hidden" name="root" value="/10korpus/">
<p><a href="D:\ms4w\apps\10korpus\index1.html">1этаж</a> 10корпуса</p>
<p><a href="D:\ms4w\apps\10korpus\index2.html">2этаж</a> 10корпуса</p>
<p><a href="D:\ms4w\apps\10korpus\index3.html">3этаж</a> 10корпуса</p>
<p><a href="D:\ms4w\apps\10korpus\index4.html">4этаж</a> 10корпуса</p>
<p><a href="D:\ms4w\apps\10korpus\index5.html">5этаж</a> 10корпуса</p>
<p><a href="D:\ms4w\apps\10korpus\index6.html">подвал</a> 10корпуса</p>
<i>index.html</i>
</body></html>
Код: Выделить всё
<!-- MapServer Template -->
<html>
<head>
<title>MapServer - nngasu</title>
</head>
<body bgcolor="#ffffff">
<center><h1>MapServer - nngasu</h1></center>
<hr>
<form method="GET" action="/cgi-bin/mapserv.exe" name="mapserv">
<input type="hidden" name="imgxy" value="[center]">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="root" value="[root]">
<input type="hidden" name="mode" value="browse">
<input type="hidden" name="program" value="[program]">
<input type="hidden" name="map_web" value="[map-web]">
<table align="center" width="680" border="0">
<tr>
<td>
<table width="400" border="1">
<tr>
<td> </td>
<td><input type="checkbox" name="layer" value="steni"
[steni_check]> Стены
<input type="checkbox" name="layer" value="pomesheniya"
[pomesheniya_check]> Помещения
</td>
<td> </td>
</tr>
<tr>
<td>
<!-- SPECIFY MAP MODE -->
<div align="center">Map Mode:<br>
<select name="mode">
<option value="browse">Browse</option>
<option value="map">Map</option>
</select>
</div>
</td>
<td>
<!-- FORM SUBMIT BUTTON -->
<div align="center">
<input type="submit" name="submit" value="Refresh">
</div>
</td>
<td>
<!-- ZOOM/PAN CONTROLS -->
<div align="center">Map Control: <br>
<select name="zoom">
<option value="4" [zoom_4_select]>Zoom In 4x</option>
<option value="3" [zoom_3_select]>Zoom In 3x</option>
<option value="2" [zoom_2_select]>Zoom In 2x</option>
<option value="1" [zoom_1_select]>Recenter</option>
<option value="-2" [zoom_-2_select]>Zoom Out 2x</option>
<option value="-3" [zoom_-3_select]>Zoom Out 3x</option>
<option value="-4" [zoom_-4_select]>Zoom Out 4x</option>
</select>
</div>
</td>
</tr>
<tr>
<!-- DISPLAY THE MAPSERVER-CREATED MAP IMAGE -->
<td colspan="3" align="center" valign="top">
<input type="image" name="img" src="[img]" width="400" height="300" border="0">
</td>
</td>
<td>
<p>Обзорная карта:<br>
<input type="image" name="etaj" src="[etaj]" border="0"></p>
<p>Легенда:<br>
<img name="legend" src="[legend]"></p>
</td>
</tr>
<td align="right"><img src="[scalebar]"></td>
</table>
</td>
</tr>
</table>
</form>
<a href="[root]/index.html">back</a>
<i>index.html</i>
</body></html>
Код: Выделить всё
#
# Start of map file
#
MAP
#NAME ITASCA
#STATUS ON
IMAGETYPE GIF
EXTENT 99 98.5 182.1 133.2
SIZE 400 300
#UNITS METERS
SHAPEPATH "/ms4w/apps/10korpus/"
IMAGECOLOR 255 255 255
FONTSET "./fonts/fonts.list"
#TEMPLATEPATTERN "itasca"
#
# Projection definition, consult the PROJ.4 documentation for parameter discussion
#
PROJECTION
"proj=utm"
"ellps=GRS80"
"zone=15"
"north"
"no_defs"
END
#
# Start of symbol definitions (we're only using a few)
#
#SYMBOL
#NAME 'circle'
#TYPE ELLIPSE
#POINTS 1 1 END
#FILLED TRUE
#END
#SYMBOL
# NAME 'star'
#TYPE VECTOR
#FILLED TRUE
#POINTS
# 0 .375
# .35 .375
# .5 0
#.65 .375
#1 .375
#.75 .625
#.875 1
#.5 .75
#.125 1
#.25 .625
#END
# END
#
# Start of web interface definition (including WMS enabling metadata)
#
WEB
HEADER templates/header.html
TEMPLATE "set in index.html"
FOOTER templates/footer.html
MINSCALE 100
MAXSCALE 15500
# change the next two lines to match your setup
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
#METADATA
# WMS_TITLE "UMN MapServer Itasca Demo"
# WMS_ABSTRACT "This is a UMN MapServer application for Itasca County located in north central Minnesota."
# WMS_ACCESSCONSTRAINTS "none"
# change this value to match your setup
#WMS_ONLINERESOURCE "http://localhost.localdomain/mapserver_demos/itasca/index.html"
#WMS_SRS "EPSG:4326"
#END
END
#
# Start of reference map
#
REFERENCE
IMAGE './images/etaj.png'
SIZE 150 97
EXTENT 99 98.5 182.1 133.2
STATUS ON
MINBOXSIZE 10
MAXBOXSIZE 150
COLOR -1 -1 -1
OUTLINECOLOR 128 0 0
MARKERSIZE 8
MARKER 'star'
END
#
# Start of legend
#
LEGEND
KEYSIZE 18 12
LABEL
TYPE TRUETYPE
SIZE MEDIUM
COLOR 0 0 89
FONT arial
ENCODING 'Windows-1251'
END
STATUS ON
END
#
# Start of scalebar
#
SCALEBAR
IMAGECOLOR 0 0 0
LABEL
COLOR 255 255 255
SIZE TINY
END
STYLE 1
SIZE 100 2
COLOR 255 255 255
UNITS METERS
INTERVALS 1
TRANSPARENT FALSE
STATUS ON
END
#
# Start of layer definitions
#
LAYER
NAME steni
TYPE LINE
DATA steni1et10k
STATUS ON
CLASS
NAME 'Steni'
STYLE
COLOR 0 232 230
OUTLINECOLOR 181 181 145
END
END
#METADATA
# WMS_TITLE "Township Boundaries"
# WMS_ABSTRACT "Pulic Land Survey (PLS) township boundaries for Itasca County. See http://deli.dnr.state.mn.us/metadata/full/twprgne2.html for more information."
# WMS_SRS "EPSG:4326"
#END
END
LAYER
NAME pomesheniya
TYPE POLYGON
STATUS ON
DATA pomesh1et10k
CLASS
NAME 'Pomesheniya'
#TEMPLATE "templates/pomesheniya.html"
STYLE
COLOR 49 117 185
OUTLINECOLOR 32 150 32
END
END
# HEADER "templates/pomesheniya_header.html"
# FOOTER "templates/pomesheniya_footer.html"
#TOLERANCE 3
# DUMP TRUE # allow GML export
# METADATA
# WMS_TITLE "Lakes and Rivers"
# WMS_ABSTRACT "DLG lake and river polygons for Itasca County. See http://deli.dnr.state.mn.us/metadata/full/dlglkpy2.html for more information."
# WMS_SRS "EPSG:4326"
# END
END # lakes
END # Map File