[mapserver-users] template not showing map
Fawcett, David (MPCA)
David.Fawcett at state.mn.us
Wed Nov 18 13:02:13 PST 2009
I really don't think that your IMAGEURL is correct now.
IMAGEPATH is the path to your temp directory.
IMAGEURL is the URL that you use to access this same directory using your Web server/browser. It should be relative to your Web root.
I would guess that your IMAGEURL might be '/~sgraeule/mapserver/tmp/'
David.
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Bryan Hempen
Sent: Wednesday, November 18, 2009 2:53 PM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] template not showing map
Fawcett, David (MPCA) schrieb:
> Also, do you have an opening tag for your image? I just see the below line with only a closing tag for img:
>
> <a
> href='http://www.umn-mapserver-community.de'>http://www.umn-mapserver-community.de</img>
>
> David.
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Bryan Hempen
> Sent: Wednesday, November 18, 2009 1:50 PM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] template not showing map
>
> Hi there!
>
> i have a problem diplaying nodes, which are read from a
> postgresql/postgis database.
>
> specifically the problem is that when trying to display the nodes using
> a pretty standard template i don not get a picture, but surprisingly it
> is generated in the tmp folder (with right timestamp). i am also able to
> show it via web when navigating to the tmp folder, so it might not be a
> problem of user rights.
>
> http://www.pictureupload.de/originals/pictures/181109204617_no_map_displayed.png
> shows what it looks like when viewing the template
>
> http://www.pictureupload.de/originals/pictures/181109204754_picture_generated.png
> but the picture is generated!
>
> Hopefully you guys can help me if i provide you with the mapfile and the
> template-sourcecode.
>
> please let me know if there is anything more you need me to provide you
> with.
>
> thanks for the help
> bryan hempen
>
>
> # WFS.MAP
>
> MAP
> NAME 'WFS-Server'
> IMAGETYPE PNG
> EXTENT 8.01 52.2282 8.135 52.3109 #Osm-Koords.
> UNITS METERS
> DEBUG ON
> # SHAPEPATH 'C:/ms4w/Apache/htdocs/osnamap/data'
> SYMBOLSET '/home/sgraeule/public_html/mapserver/symbols/symbols.sym'
> FONTSET '/home/sgraeule/public_html/mapserver/fonts/fonts.list'
> IMAGECOLOR 200 200 200
> SIZE 500 500
>
> # Grundeinstellungen---------------------------------------------
>
> PROJECTION
> 'init=epsg:4326'
> END
>
> WEB
> TEMPLATE '/home/sgraeule/public_html/mapserver/template.html'
> IMAGEPATH '/home/sgraeule/public_html/tmp/'
> IMAGEURL '/tmp/'
>
>
> METADATA
> "WFS_TITLE" "WFS-Test"
> "WFS_SRS" "epsg:4326"
> "WFS_ABSTRACT" "POIS"
> "WFS_ONLINERESOURCE"
> "http://igf-project.igf.uni-osnabrueck.de/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.map"
> END
>
> END
>
>
> LAYER
> SYMBOLSCALE 50000
> NAME 'punkt_db' # Layer-Name, der in OpenLayers aufgerufen
> wird
> TYPE POINT
> STATUS DEFAULT
>
> CONNECTIONTYPE postgis # Verbindung zur PostGIS-Datenbank
> CONNECTION "user=# password=# dbname=# host=localhost port=5432"
> DATA "geom from nodes"
> CLASSITEM 'id'
>
> DUMP TRUE
> METADATA
> "WFS_TITLE" "geb"
> "WFS_SRS" "epsg:4326" # Festlegung des Koordinatensystems
> "gml_featureid" "id"
> "GML_INCLUDE_ITEMS" "all"
> END
>
> CLASS # Stil-Optionen; spielen fuer OpenLayers
> keine Rolle
> STYLE
> SYMBOL 'circle'
> SIZE 9
> MINSIZE 9
> MAXSIZE 15
> COLOR 0 0 200
> END
> END
> END
>
>
>
> END
>
>
> <!-- MapServer Template -->
> <html>
> <head>
> <title>Beispiel zum UMN MapServer</title>
> </head>
> <body font face="VERDANA,ARIAL,HELVETICA">
> <b>Beispiel: UMN MapServer</b><br>
> <a
> href='http://www.umn-mapserver-community.de'>http://www.umn-mapserver-community.de</img>
>
>
> <br>
> <a
> href="/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.map">Ausgangszustand</a>
>
> <form method="GET" action="/cgi-bin/mapserv">
>
>
> <table>
> <tr>
>
> <td valign="top">
>
>
> <input type="image" name="img" src="[img]" border="1">
>
> <br>
>
> </td>
>
> <input type="hidden" name="map" value="[map]"> <!-- Pfad zur map-Datei -->
> <input type="hidden" name="imgext" value="[mapext]"> <!--
> Kartenausdehnung -->
> <input type="hidden" name="imgxy" value="190 190"> <!-- das mittlere
> Pixel der Grafik (dient als Zentrum beim Zoomen) -->
>
>
>
> <td valign="top">
>
>
>
>
> <br><br>
>
>
>
> <b>Möchten Sie "Browsen" oder eine Abfrage durchführen?</b><br>
> <input type="radio" name="mode" value="browse"
> checked>Browse</input><br>
> <input type="radio" name="mode"
> value="query">Abfrage</input><br><br><br>
> Zoom<br>
> <select name="zoom" size="1">
>
> <option value="4">4X hinein</option>
> <option value="2">2X hinein</option>
> <option value="1" selected>nein</option>
> <option value="-2">2X heraus</option>
> <option value="-4">4X heraus</option>
>
> </select><br>
> </form>
> </td>
> </tr>
> <table>
>
> <!-- <img src="[legend]"> -->
>
>
> </body>
>
> </html>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
hi!
imagepath + imageurl are definately set right now, but it does not
change anything.
IMAGEPATH '/home/sgraeule/public_html/mapserver/tmp/'
IMAGEURL '/home/sgraeule/public_html/mapserver/tmp/'
you may want to take a look by yourself:
http://igf-project.igf.uni-osnabrueck.de/~sgraeule/mapserver/tmp/
i am not sure about how to use the image-tag, so i added the following
piece of code to the template.
<img src="[img]"> </img>
when executed umn mapserver correctly makes it <img
src="/home/sgraeule/public_html/mapserver/tmp/WFS-Server12585768438242.png">
</img>
,but my firefox still does not show the picture, but just a hint that
there should be a picture which was not found...
bryan
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list