#1 Tue 14 May 2013 08:29
- HENRIPRINCE
- Juste Inscrit !
- Date d'inscription: 14 May 2013
- Messages: 1
template html mapserver
Bonjour,
je suis en train de développer un serveur sig, utilise ms4w. le système est win7 64bits. les problèmes sont:
j'ai suivi le tutoriel mapserver 5x, exemple1-9 et enfin j'ai créé mon mapfile simplifié pour faciliter de suivre les bugs.
je n'arrive pas à afficher le map en mode browser; mais en mode map, il s'affiche bien
j'inclus ici mon mapfile et le modèle html.
le fichier map:
Code:
MAP
NAME "QGIS-MAP"
EXTENT 42.432009 -21.872027 52.823599 -13.901912
SIZE 600 600
UNITS meters
SHAPEPATH "C:/bien/Cours/Stockage_shp/"
IMAGECOLOR 210 1000 110
IMAGEQUALITY 95
IMAGETYPE png
#FONTSET 'C:/bien/Cours/fonts.txt'
#SYMBOLSET 'C:/bien/Cours/symbols.txt'
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
WEB
TEMPLATE 'index_Map.html'
IMAGEPATH '/ms4w/tmp/ms_tmp/'
IMAGEURL '/ms_tmp/'
END
LAYER
NAME district
DATA district
STATUS DEFAULT
EXTENT 42.432009 -21.872027 52.823599 -13.901912
TYPE POLYGON
LABELITEM 'district'
CLASS
STYLE
COLOR 30 120 90
OUTLINECOLOR 100 150 80
#EXPRESSION 'district'
END # fin style
LABEL
COLOR 0 0 225
SHADOWCOLOR 218 15 220
SHADOWSIZE 2 2
TYPE BITMAP #TrueType
SIZE MEDIUM
POSITION CC
PARTIALS FALSE
BUFFER 2
END # fin label
END # fin class
END # fin layer
END # fin de mapil marche bien en mode map, voici le lien:
http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/ipmserver/baseshppg.map&layer=all&mode=map
la carte s'affiche bien avec toutes les critères indiquées (etiquette, etc..) mais si je veux utiliser en mode browser (avec un fichier html). j'ai reçu :
loadForm(): Web application error. Not enough arguments for imgext.
(le lien de mon fichier html est: http://localhost/ipmserver/index_map.html)
Voici le contenu de fichier index_map.html :
Code:
<!-- MapServer Template -->
<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<HEAD>
<TITLE>SITE IPM</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</HEAD>
<Body>
<form method ="GET" action = "http://localhost/cgi-bin/mapserv.exe">
<!-- HIDDEN MAPSERVER CGI VARIABLES -->
<input type="hidden" name="map" value="/ms4w/Apache/htdocs/ipmserver/baseshppg.map">
<input type="hidden" name="imgext" value= "[mapext]">
<input type="hidden" name="imgxy" value= "[center]">
<input type="hidden" name="layer" value= "all">
<input type="hidden" name="zoom" value= "1">
<input type="hidden" name="program" value="http://localhost/cgi-bin/mapserv.exe">
<input type="hidden" name="mode" value="browse">
<Input type = "submit" value = "Refraîchir">
<div align="center">
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td>
<!-- THE INTERACTIVE, DYNAMICALLY CREATED MAP -->
<input type="image" name="img" src="[img]" width="600" height="600">
</td>
</tr>
</table>
</div>
</form>
</Body>
</HTML>Où est la source de problème?!
j'ai déjà lit bcp à propos de imgext et CGI VARIABLES mapserver mais je n'arrive pas à résoudre ce problème. Merci pour me répondre
Hors ligne


