[mapserver-users] mapserver mapfile for transparancy

Fawcett, David (MNIT) David.Fawcett at state.mn.us
Thu Mar 5 08:12:37 PST 2015


You can set Opacity at the layer level.

Here is the relevant part of the documentation:  http://mapserver.org/mapfile/layer.html#opacity


From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of rishi
Sent: Thursday, March 05, 2015 12:38 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] mapserver mapfile for transparancy


hi all

i want to set transparency for colored polygons iam displaying a polygon layer on the google image and i want to set transparency so that background image has to visible in the colored polygons

i have attached my map also

my mapfile is

MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947

IMAGETYPE png

size 150 500

 TRANSPARENT on

LEGEND

STATUS EMBED

POSITION LR

TRANSPARENT TRUE

END

web

    metadata

        wms_srs "EPSG:4326 EPSG:900913"

    end

end

LAYER CONNECTIONTYPE postgis
CONNECTION "user=postgres password=****** dbname=mpdb host=localhost port=5432" DATA "geom FROM view_villagevidyut using unique village_code_c11"

STATUS Default

TYPE polygon

labelitem "villname"

  CLASSITEM "process"

      CLASS

       NAME "completed"

   EXPRESSION "completed"



   STYLE

     COLOR 0 255 0

       outlinecolor 121 188 255

      END

LABEL

SIZE 2

color 121 188 255

END

END

CLASS NAME "uncompleted"

 EXPRESSION "uncompleted"

STYLE

 COLOR 135 206 235

 outlinecolor 121 188 255

END

END

CLASS NAME "plan not covered"

EXPRESSION ""

   STYLE

       COLOR 240 128 128



       outlinecolor 121 188 255

      END

      LABEL

        SIZE 2

        color 121 188 255

    END

  END



PROJECTION

      "init=epsg:900913"

    END





end







END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150305/982112a3/attachment.htm>


More information about the MapServer-users mailing list