[Mapserver-DE] Problem mit GetLegendGraphic

Frank Glandorf f.glandorf at gmx.de
Mon Aug 22 11:03:33 CEST 2005


Hallo,

ich versuche gerade mir mittels GetLegendGraphic meine Legendeneinträge
anzeigen zu lasse, aber irgendwie erhalte ich, egal welche Layer ich mir
anzeigen lassen will, immer nur eine leere png-Datei. Kann mir jemand sagen
was ich falsch mache?

Anbei mal mein GetLegendAufruf, mein GetCapabilities-Eintrag, sowie meine
Map-Datei:



http://link.map3/cgi-bin/mapserv?map=/home/htdocs/web81/html/grabis/grabis.map&Request=GetLegendGraphic&service=wms&Version=1.1.1&layer=gebaeude&format=png



<GetLegendGraphic>
  <Format>image/png</Format>
  <Format>image/jpeg</Format>
  <Format>image/wbmp</Format>
  -<DCPType>
    -<HTTP>
      -<Get>
        <OnlineResource 
xlink:href="link.map3/cgi-bin/mapserv?map=/home/htdocs/web81/html/grabis/grabis.map&"/>
      </Get>
      -<Post>
        <OnlineResource
xlink:href="link.map3/cgi-bin/mapserv?map=/home/htdocs/web81/html/grabis/grabis.map&"/>
      </Post>
    </HTTP>
  </DCPType>
</GetLegendGraphic>



#
# Start des Mapfiles 
#


NAME Grabis
STATUS ON
SIZE 600 450
EXTENT 3444900 5821000 3470600 5840900
UNITS METERS
SHAPEPATH "../../data/grabis/data"
SYMBOLSET "etc/symbols.sym"
FONTSET "etc/fonts.txt"
IMAGECOLOR 255 255 255


#
# Start der Projektionsdefinition
#
PROJECTION
  "init=epsg:31493"
END
#
# Ende der Projektionsdefinition
#



#
# Start der Web Interface Definition
#
WEB
  IMAGEPATH "../../tmp/ms_tmp/"
	IMAGEURL "/ms_tmp/"
	METADATA
	  "WMS_TITLE" "GRABen InformationsSystem"
		"WMS_FEATURE_INFO_MIME_TYPE" "text/html"
	  "WMS_SRS" "epsg:31493"
		"WMS_ONLINERESOURCE"
"http://link.map3/cgi-bin/mapserv?map=/home/htdocs/web81/html/grabis/grabis.map&"
	END #End of Metadata
END #End of Header
#
# Ende der Web Interface Definition
#


#
# Start der Referenzkarte
#
REFERENCE
  IMAGE "/images/ref.png"
	EXTENT 3444900 5821000 3470600 5840900
  STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
  SIZE 150 117      
END 
#
# Ende der Referenzkarte
#

 
#
# Start der Maßstabsleisten Definition
#
SCALEBAR
  IMAGECOLOR 255 255 255
	LABEL
	  COLOR 0 0 0
		SIZE SMALL
	END
	SIZE 150 5
	COLOR 255 255 255
	BACKGROUNDCOLOR 0 0 0
	OUTLINECOLOR 0 0 0
	UNITS METERS
	INTERVALS 5
	STATUS ON
	STYLE 0
	TRANSPARENT ON
END
#
# Ende der Mapstabsleisten Definition
#


#
# Start der Legendendefinition
#
LEGEND
  STATUS ON
  KEYSIZE 20 20
	KEYSPACING 5 5
  LABEL
	  TYPE TRUETYPE
		FONT "ARIAL"
		SIZE 8
    COLOR 120 120 120
  END # END OF LABEL
END 
#
# Ende der Legendendefinition
#


#
# Start der Layer Definitionen
#

#------------------------Karten-------------------------

LAYER #-------------------TK25--------------------------
  NAME "indextk"
	TYPE TILEINDEX
	DATA "tk25"
	METADATA
	  "WMS_TITLE" "indextk"
		"WMS_SRS" "epsg:31493"
	END #End of Metadata
END 

LAYER 
  NAME "tk25"
	STATUS OFF
	TYPE RASTER
	METADATA
	  "WMS_TITLE" "TK25"
		"WMS_SRS" "epsg:31493"
	END #End of Metadata
	TILEINDEX "indextk"
	TILEITEM "location"
END #--------------- END OF TK25------------------------


LAYER #------------------DGK5---------------------------
  NAME "indexdgk"
	TYPE TILEINDEX
	DATA "dgk5"
	METADATA
	  "WMS_TITLE" "indexdgk"
		"WMS_SRS" "epsg:31493"
	END #End of Metadata
END

LAYER
  NAME "dgk5"
	STATUS OFF
	TYPE RASTER
	METADATA
	  "WMS_TITLE" "DGK5"
		"WMS_SRS" "epsg:31493"
	END #End of Metadata
	TILEINDEX "indexdgk"
	TILEITEM "location"
END #----------------END OF DGK5------------------------

#-------------------End of Karten-----------------------




#------------------Beschriftungen-----------------------

LAYER #---------Beschriftung Stationen------------------
  NAME "beschriftung_stationen"
	CONNECTIONTYPE postgis
	  CONNECTION "user=... password=... dbname=... host=localhost"
  DATA "the_geom from station"
	STATUS OFF
	TYPE LINE
	METADATA
	  "WMS_TITLE" "Beschriftung Stationen"
		"WMS_SRS" "epsg:31493"
	END #End of Metadata
	LABELITEM "name"
	CLASS
	  SYMBOL "circle"
		SIZE 1
		COLOR 255 255 255
		LABEL
		  ANGLE AUTO
		  TYPE TRUETYPE
			FONT "ARIAL"
			SIZE 10
			COLOR 0 0 0
			BACKGROUNDCOLOR 255 255 255
			POSITION LR
			FORCE TRUE
			OFFSET 10 10
		END #End of Label
	END #End of Class
	MAXSCALE 4000
END #---------End of Beschriftungen Stationen-----------

LAYER #---------Beschriftungen Flurstuecke--------------
  NAME "beschriftung_flurstuecksnummern"
	CONNECTIONTYPE postgis
    CONNECTION "user=... password=... dbname=... host=localhost"
  DATA "the_geom from flstnr"
	STATUS OFF
	TYPE ANNOTATION
	METADATA
	  "WMS_TITLE" "Beschriftung_Flurstuecknummern"
		"WMS_SRS" "epsg:31493"
	END #End of Metadata
	LABELITEM "textstring"
	CLASS
		LABEL
		  TYPE TRUETYPE
			FONT "ARIAL"
			SIZE 10
			COLOR 0 0 0
			BACKGROUNDCOLOR 255 255 255
			POSITION CC
			FORCE TRUE
		END #End of Label
	END #End of Class
	SYMBOLSCALE 1500
	LABELMAXSCALE 3000
END #-----End of Beschftung Flurstuecksnummern----------

LAYER #-----------Beschriftungen Strasse----------------
  NAME "beschriftung_strassen"
	#GROUP "beschriftung"
	CONNECTIONTYPE postgis
	  CONNECTION "user=... password=... dbname=... host=localhost"
  DATA "the_geom from strassen"
	STATUS ON
	TYPE ANNOTATION
	METADATA
	  "WMS_TITLE" "Beschriftung_Strassen"
		"WMS_SRS" "epsg:31493"
	END #End of Metadata
	LABELITEM "textstring"
	LABELANGLEITEM Text_angle
	CLASS
	  SYMBOL "circle"
		SIZE 1
		COLOR 255 255 255
		LABEL
		  ANGLE AUTO
		  TYPE TRUETYPE
			FONT "ARIAL"
			SIZE 8
			COLOR 0 0 0
			BACKGROUNDCOLOR 255 255 255
			POSITION CC
			FORCE TRUE
			OFFSET 0 0
		END #End of Label
	END #End of Class
	MAXSCALE 5000
END #-------End of Beschriftungen Strassen--------------

#--------------End of Beschriftungen--------------------




LAYER #---------------Layer-----------------------------
  NAME "kataster"
	CONNECTIONTYPE postgis
	  CONNECTION "user=... password=... dbname=... host=localhost"
  DATA "the_geom from flurst"
	METADATA
	  "WMS_TITLE" "Kataster"
		"WMS_SRS" "epsg:31493"
	  "DESCRIPTION" "Kataster"
		"RESULT_FIELDS" "objekt"
	END #End of Metadata
	STATUS ON
	TYPE POLYGON
	CLASS
		COLOR 255 255 255
		OUTLINECOLOR 0 0 0
	END
	TEMPLATE "ttt_query.html"
END #---------------End of Kataster---------------------


LAYER #---------------Gebaeude--------------------------
  NAME "gebaeude"
	METADATA
	  "WMS_TITLE" "Gebaeude"
		"WMS_SRS" "epsg:31493"
	  "DESCRIPTION" "Gebaeude"
	END #End of Metadata
	STATUS ON
	TYPE POLYGON
	DATA "gebaeude"
	CLASS
	  COLOR 128 0 0
		OUTLINECOLOR 0 0 0
	END #End of Class
END #--------------End of Gebaeude----------------------


LAYER #---------------Graben----------------------------
  NAME "graben"
	CONNECTIONTYPE postgis
	  CONNECTION "user=... password=... dbname=... host=localhost"
  DATA "the_geom from graben"
	METADATA
	  "WMS_TITLE" "Graben"
		"WMS_SRS" "epsg:31493"
    "DESCRIPTION" "Graben"
    "RESULT_FIELDS" "name laenge l_netto_li l_netto_re"
  END #End of Metadata
	STATUS ON
	TYPE LINE
	LABELITEM "name"
	CLASS
	  SYMBOL "circle"
		SIZE 2
		COLOR 0 128 0
		LABEL
		  ANGLE AUTO
		  TYPE TRUETYPE
      FONT "arial-bold"
      SIZE 9
      ANTIALIAS true
     	COLOR 0 0 0
			BACKGROUNDCOLOR 255 170 0
			OUTLINECOLOR 255 170 0
			BUFFER 2
			POSITION UR
			FORCE TRUE
			OFFSET 5 15
		END #End of Label
	END #End of Class
	TEMPLATE "ttt_query.html"
	MAXSCALE 25000
	TOLERANCE 2
END #----------------End of Graben----------------------


LAYER #----------------Station--------------------------
  NAME "station"
	CONNECTIONTYPE postgis
    CONNECTION "user=... password=... dbname=... host=localhost"
  DATA "the_geom from station"
	METADATA
	  "WMS_TITLE" "Station"
		"WMS_SRS" "epsg:31493"
	  "DESCRIPTION"   "Stationierung"
    "RESULT_FIELDS" "rname name hoehe1 hoehe4 len3d1 len3d3 hoehe2 len3d2
photo"
  END #End of Metadata
	STATUS ON
	TYPE LINE
	CLASS
	  SYMBOL "circle"
		SIZE 3
		COLOR 119 43 26
	END #End of Class
	MAXSCALE 7000
	TEMPLATE "ttt_query.html"
	TOLERANCE 3
END #---------------End of Station----------------------


LAYER #---------------Durchlaesse-----------------------
  NAME "durchlass"
	CONNECTIONTYPE postgis
    CONNECTION "user=... password=... dbname=... host=localhost"
  DATA "the_geom from durchlass"
	METADATA
	  "WMS_TITLE" "Durchlaesse"
		"WMS_SRS" "epsg:31493"
	  "DESCRIPTION"   "Durchlass"
    "RESULT_FIELDS" "rname name hoehe1 station_e hoehe2 dn"
  END #End of Metadata
	STATUS ON
	TYPE LINE
	CLASS
	  SYMBOL "circle"
		SIZE 3
		COLOR 0 0 255
	END #End of Class
	MAXSCALE 7000
	TEMPLATE "ttt_query.html"
	TOLERANCE 2
END #-----------End of Durchlaesse----------------------


LAYER #------------Bepflanzung--------------------------
  NAME "bepflanzung"
	CONNECTIONTYPE postgis
    CONNECTION "user=... password=... dbname=... host=localhost"
  DATA "the_geom from bepflanzung"
	METADATA
	  "WMS_TITLE" "Bepflanzung"
		"WMS_SRS" "epsg:31493"
	  "DESCRIPTION"   "Bepflanzung"
    "RESULT_FIELDS" "rname name station_e art"
  END #End of Metadata
	STATUS ON
	TYPE POLYGON
	CLASSITEM art 
	
	CLASS #Erlen bis 2000
	  EXPRESSION 'Erlen in Böschung'
		STYLE
  		SYMBOL "eigen"
  		#SIZE 2
  	  COLOR 0 255 0
  		OUTLINECOLOR 0 255 0
		END #End of Style
		MAXSCALE 2000
	END #End Erlen in Boeschung bis 2000
	
	CLASS #Erlen ab 2001
	  EXPRESSION 'Erlen in Böschung'
		STYLE
  		SYMBOL "eigen"
  		#SIZE 2
  	  COLOR 0 255 0
		END #End of Style
		MINSCALE 2001
	END #End Erlen in Boeschung ab 2001
	
	CLASS #Erlen BOK bis 2000
	  EXPRESSION 'Erlen auf BOK'
		STYLE
	 		SYMBOL "eigen"
	 		#SIZE 2
	 	  COLOR 0 255 0
	 		OUTLINECOLOR 0 255 0
		END #End Style
	  MAXSCALE 2000
	END #End Erlen auf BOK bis 2000
	
	CLASS #Erlen auf BOK ab 2001
	  EXPRESSION 'Erlen auf BOK'
		STYLE
	 		SYMBOL "eigen"
	 		#SIZE 2
	 	  COLOR 0 255 0
		END #End of Style
		MINSCALE 2001
	END #End Erlen auf BOK ab 2001
	
	CLASS #Erlen in Buschbewuchs bis 2000
	  EXPRESSION 'Erlen und Buschbewuchs in Boeschung'
		STYLE
	 		SYMBOL "eigen"
	 		#SIZE 2
	 	  COLOR 0 255 0
	 		OUTLINECOLOR 0 255 0
		END #End of Style
	  MAXSCALE 2000
	END #End Erlen in Buschbewuchs bis 2000
	
	CLASS #Erlen in buschbewuchs ab 2001
	  EXPRESSION 'Erlen in Buschbewuchs in Boeschung'
		STYLE
	 		SYMBOL "eigen"
	 		#SIZE 2
	 	  COLOR 0 255 0
		END #End of Style
		MINSCALE 2001
	END #End Erlen in Buschbewuchs ab 2001
	
	CLASS #End Erlen in Boeschung und BOK bis 2000
	  EXPRESSION 'Erlen in Boeschung und auf BOK'
		STYLE
	 		SYMBOL "eigen"
	 		#SIZE 2
	 	  COLOR 0 255 0
	 		OUTLINECOLOR 0 255 0
		END #End of Style
	  MAXSCALE 2000
	END #End Erlen in Boeschung und auf BOK bis 2000
	
	CLASS #Erlen in Boeschung und BOK ab 2001
	  EXPRESSION 'Erlen in Boeschung und auf BOK'
		STYLE
	 		SYMBOL "eigen"
	 		#SIZE 2
	 	  COLOR 0 255 0
		END #End of Style
		MINSCALE 2001
	END #End Erlen in Boeschung und auf BOK ab 2001
	 
	CLASS #Rest
	  EXPRESSION /./
		STYLE
	    COLOR 0 220 0
		END #End of Sytle
	END #End of Rest
	
	MAXSCALE 7000
	TEMPLATE "ttt_query.html"
	TOLERANCE 2
END #--------------End of Bewuchs-----------------------

LAYER #--------------Rote Liste-------------------------
  NAME "rote_liste"
	CONNECTIONTYPE postgis
    CONNECTION "user=... password=... dbname=... host=localhost"
  DATA "the_geom from rote_liste"
	METADATA
	  "WMS_TITLE" "Rote-Liste"
		"WMS_SRS" "epsg:31493"
    "DESCRIPTION"   "Rote-Liste-Pflanzen"
    "RESULT_FIELDS" "rname name station_e rl_code bemerkung"
  END #end of Metadata
	STATUS ON
	TYPE POLYGON
	CLASSITEM bemerkung
	CLASS
	  EXPRESSION ''
		STYLE
	 		COLOR 180 0 0
		  OUTLINECOLOR 180 0 0
		END #End of Style
	END #End of Expression
	
	CLASS
	  EXPRESSION /./
		STYLE
	 		SYMBOL "eigen"
	 	  COLOR 155 0 0
	 		OUTLINECOLOR 155 0 0
		END #End of Style
	  MAXSCALE 2000
	END #End of Expression
	
	CLASS
	  EXPRESSION /./
		STYLE
		  SYMBOL "eigen"
	    COLOR 180 0 0
		END #End of Style
		MINSCALE 2001
	END #End of Expression
	
	MAXSCALE 7000
	TEMPLATE "ttt_query.html"
	TOLERANCE 2
END #--------------End of Rote Liste--------------------

END # Ende Mapfile




-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++




This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)