Hi,  I find vague information about how to use the GeoServer mapfish print 
capability for image creation but nothing that actually explains it in detail.  
I am generally technically adept in GeoServer in general but I can't figure 
this one out.  I have added the needed formats: param to the YAML file.  I've 
also hardcoded into my JSON the "outputFormat":"png" so I expect it should 
work.  I've read up on the need for JAI and ImageIO and have verified in the 
OpenGeoSuite logs that those two jars are being loaded.  But still when I ask 
to print a map it always returns pdf.  I know I'm missing something but I can't 
figure it out.  

The Goal is to have users create annotated content in the light weight 
openLayers viewer and then be able to export that as an image and then overlay 
it in ArcGIS and do actual analysis.  I've already managed to figure out the 
image World File so I just need the image.  The PDF looks great, how do I get 
the image?

YAML:
dpis: [75, 150, 300, 600]

formats: ['pdf', 'png']
 
scales:
    - 524288000
    - 262144000
    - 131072000
.
.
.

hosts:
    - !localMatch
        dummy: true
    - !ipMatch
        ip: 0.0.0.0
        mask: 0.0.0.0

layouts:

    BIG:
        metaData: &commonMetaData
            title: "${mapTitle}"
            author: "GeoExplorer"
            subject: "Map printed with the OpenGeo Suite"
            keywords: "map,print"
            creator: "OpenGeo Suite"
        mainPage:
            pageSize: 1024 768
            rotation: true
            items:
                - !text
                    text: "${mapTitle}"
                    fontSize: 30
                    spacingAfter: 30
                    align: center
                - !map
                    spacingAfter: 10
                    width: 800
                    height: 600
                - !scalebar
                    type: bar
                    maxSize: 100
                    barBgColor: white
                    fontSize: 8
                    align: right
                    spacingAfter: 10
                - !text
                    text: "${comment}"


-- PrintConfig (NOTE: Formats is not listed)
printCongif={"scales":[{...},{"name":"1:524,288,000","value":"524288000"}],
"dpis":[{"name":"75","value":"75"},{...},{"name":"600","value":"600"}],
"layouts":[{"name":"BIG","map":{"width":800,"height":600},"rotation":true}]

-- JSON:
spec 
{"units":"m","srs":"EPSG:4326","layout":"BIG","dpi":300,"outputFormat":"png","outputFilename":"UWPImage.png","mapTitle":"","comment":"","layers":[{"baseURL":"http://maps.opengeo.org/geowebcache/service/wms","opacity":1,"singleTile":false,"type":"WMS","layers":["bluemarble"],"format":"image/png","styles":[""],"customParams":{"TRANSPARENT":true}}],"pages":[{"center":[0,0],"scale":2000,"rotation":0}]}
 
Thoughts???

Thanks,
Mark
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to