[mapserver-users] PDF output with layers

Carlos Ruiz boolean10001 at yahoo.com
Mon Sep 4 07:20:13 PDT 2017


I'm currently exploring PDF generation from Mapserver and I have noticed that no layers appear to be toggled. First I thought this was because the layer CLASS section has no name (as it happens when legend is generated), but it is not.
gdalinfo test.pdf does not show layers information.

Does anybody know how to configure a MAP file to include layers in the PDF output ?
Here is test.map contents:
MAP

    NAME "test"
    EXTENT 657024 2277645 687240 2294128
    SIZE 800 600
        
    OUTPUTFORMAT
        NAME "pdf"
        DRIVER CAIRO/PDF
        MIMETYPE "application/x-pdf"
        IMAGEMODE RGB
        EXTENSION "pdf"
        FORMATOPTION "GEO_ENCODING=ISO32000"
    END
    
    PROJECTION
        "init=EPSG:32613"
    END
    
    STATUS ON
    
    LAYER
        NAME "Landsat 8"
        CONNECTION "http://localhost/cgi-bin/landsat8.exe"
        CONNECTIONTYPE WMS
        TYPE RASTER
        STATUS ON
        METADATA
            "wms_name" "Landsat 8"
            "wms_srs" "EPSG:32613"
            "wms_server_version" "1.0.0"
            "wms_format" "image/jpeg"
        END
    END
    
    LAYER
        NAME "Colonias"
        CONNECTION "..."
        CONNECTIONTYPE POSTGIS
        DATA "geom FROM colonias_amg"
        TYPE POLYGON
        CLASS
            NAME "Colonias"
            STYLE
                COLOR 255 200 150
                OUTLINECOLOR 0 0 0
            END
        END        
        COMPOSITE
            OPACITY 35
        END
        STATUS ON
    END

END

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170904/b5a6c5a9/attachment.html>


More information about the mapserver-users mailing list