[mapserver-users] White background in MapCache

thomas bonfort thomas.bonfort at gmail.com
Wed Nov 20 02:04:25 PST 2013


Donald,
You should add <transparent>true</transparent> to your source getmap
params, so that mapserver returns transparent images. Note that you'll
have to purge your existing mapcache caches so the tiles get
regenerated with transparency.

regards,
thomas

On 20 November 2013 01:03, Brown, Donald <brownd at usgs.gov> wrote:
> I am having trouble getting rid of the white background (I'd like it to be
> transparent) where there is supposed to be 'no data' for the following
> service:
> http://mrdata.usgs.gov/mapcache/kml/prgeol@WGS84.kml
>
> I tried modifying my mapcache.xml file to say 'mixed' for the format, then
> built the tiles using the command:
> mapcache_seed -c /mnt/mrt/mapcache/mapcache.xml -t prgeol -g WGS84 -M 8,8
>
> However, this did not seem to work. Any help would be greatly appreciated.
> Here is a snippet of my mapcache.xml file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <mapcache>
>    <metadata>
>      <title>MRData mapcache service</title>
>      <abstract>Contains various services for MRData maps</abstract>
>    </metadata>
>
>    <cache name="disk" type="disk">
>      <base>/mnt/mrt/mapcache</base>
>      <symlink_blank/>
>    </cache>
>
>    <format name="PNGQ_FAST" type="PNG">
>    <compression>fast</compression>
>    <colors>256</colors>
>    </format>
>
>    <format name="jpeg" type="JPEG">
>    <quality>75</quality>
>    <photometric>RGB</photometric>
>    </format>
>
>    <format name="mixed" type="MIXED">
>      <opaque>jpeg</opaque>
>      <transparent>PNGQ_FAST</transparent>
>    </format>
>
>    <source name="prgeol" type="wms">
>      <getmap>
>        <params>
>          <FORMAT>image/png</FORMAT>
>          <MAP_IMAGETYPE>png</MAP_IMAGETYPE>
>          <LAYERS>geol,fault,faultn</LAYERS>
>          <MAP>/mnt/mrt/map-files/pr.map</MAP>
>        </params>
>      </getmap>
>      <http>
>        <url>http://mrdata.usgs.gov/cgi-bin/mapserv</url>
>      </http>
>    </source>
>    <tileset name="prgeol">
>      <source>prgeol</source>
>      <cache>disk</cache>
>      <grid>WGS84</grid>
>      <grid>g</grid>
>      <grid>GoogleMapsCompatible</grid>
>      <format>mixed</format>
>      <metatile>5 5</metatile>
>      <expires>86400</expires>
>    </tileset>
>
>
> Thanks!
>
>
> --
> Don Brown
> GIS Specialist
> Cherokee Services Group, LLC (CSG)
> Contractor to the U.S. Geological Survey
> Fort Collins Science Center
> 2150 Centre Ave. Bldg. C
> Fort Collins, CO 80526
> (970) 226-9155
> brownd at usgs.gov
>
> _______________________________________________
> 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