[mapserver-users] show legend graphic with mapbuilder 1.5 and mapserver

Bernardo (iNCARGiS) bernardo at incargis.com
Tue Jun 10 11:43:30 EDT 2008


I'm just begining with mapbuilde and i have problems in show the legend image in my web

This is the part of my .map file

    LAYER
          NAME      EDIFICIOS
          DATA      LLIRIA
          STATUS  ON
          TYPE      POLYGON
          GROUP    BASE
          
          PROJECTION
            "init=epsg:23030"
          END
          
          DUMP TRUE
          TOLERANCE 10
          TEMPLATE "edificios.html"
          
          METADATA
              "wms_srs"                 "EPSG:23030"
              "wms_name"              "Edificios"
              "wms_server_version"  "1.1.0"
              "wms_format"            "image/gif"
              "wms_legend_graphic" "true"
          END

And this is my map context

  <Layer queryable="1" hidden="0">
   <Server service="OGC:WMS" version="1.0.0" title="OGC:WMS">
          <OnlineResource xlink:type="simple" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=d:/www/lliria_wms/lliria.map"/>
   </Server>
   <Name>Edificios</Name>
   <Title>Edificios</Title>
   <SRS>EPSG:23030</SRS>
   <FormatList>
    <Format current="1">image/gif</Format>
   </FormatList>
   <StyleList>
    <Style current="1">
     <Name>default</Name>
     <Title>default</Title>
     <LegendURL format="image/gif">
      <OnlineResource xlink:type="simple" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=d:/www/lliria_wms/lliria.map&amp;REQUEST=GetLegendGraphic&amp;LAYER=Edificios&amp;FORMAT=image/gif"/>
     </LegendURL>
    </Style>
   </StyleList>
  </Layer>

The legend is defined inside the map file


          TRANSPARENCY 100
          CLASSITEM "USO"
          
          CLASS
              NAME "ACERAS"
              EXPRESSION "ACERA"
              COLOR               -1 -1 -1
              OUTLINECOLOR    104 104 104
          END
          
          CLASS
              NAME "BALSAS"
              EXPRESSION "BALSA"
              COLOR               151 219 242
              OUTLINECOLOR    64 101 235
          END
          
          CLASS
              NAME "EDIFICIOS"
              EXPRESSION "EDIF"
              COLOR               255 234 190
              OUTLINECOLOR    255 211 127
          END


The imgage map is right but the legend no.

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080610/c9d711d8/attachment-0001.html


More information about the mapserver-users mailing list