[mapserver-users] Converting Mapfile to OUTPUTFORMAT . . .

Stephen Woodbridge woodbri at swoodbridge.com
Thu Feb 26 18:10:33 PST 2015


On 2/26/2015 5:56 PM, Basques, Bob (CI-StPaul) wrote:
> All,
>
> I’m trying to convert an older mapfile to use the new OUTPUTFORMAT
> parameters, and not having much success in setting up a particular color
> to be displayed as transparent in the resulting PNG.
>
> Anyone have a Mapfile fragment as an example of using a particular color
> as the transparent areas?  NOTE: I’m displaying the background color, so
> setting that to transparent is not going to work in this instance.  I
> need to use a specific RGB value.

Bob,

Set the background color to the color you want to be transparent.

If you need to have a background also, then create the first layer 
similar to this and adjust it for your projections:

   LAYER
     NAME "background"
     GROUP "cb"
     STATUS ON
     TYPE POLYGON
     METADATA
       ows_title "background"
       ows_extent "-20037508.34 -20037508.34 20037508.34 20037508.34"
     END
     PROJECTION "init=epsg:900913" END
     FEATURE
         POINTS -20037508.34 -20037508.34 20037508.34 -20037508.34 
20037508.34 20037508.34 -20037508.34 20037508.34 -20037508.34 
-20037508.34 END
     END
     CLASS
       STYLE
         COLOR "#80B1D3"
       END
     END
   END


-Steve W


More information about the mapserver-users mailing list