Package org.mapfish.print.processor.map

Examples of org.mapfish.print.processor.map.CreateMapProcessor


        return attributes;
    }

    private static void setMapAttribute(final JSONObject attributes,
            final PJsonObject oldRequest, final Template template) throws JSONException {
        final CreateMapProcessor mapProcessor = getMapProcessor(template);
        final PJsonObject oldMapPage = (PJsonObject) getOldMapPage(oldRequest);

        if (mapProcessor == null) {
            if (oldMapPage == null) {
                // no map, no work
                return;
            } else {
                LOGGER.warn("The request json data has attribute information for creating the map but config does not have a" +
                            "map attribute.  Check that the request and the config.yaml are correct.");
                return;
            }
        } else if (oldMapPage == null) {
            LOGGER.warn("The request json data does not have attribute information for creating the map." +
                        "  Check that the request and the config.yaml are correct.");
            return;
        }

        String mapAttributeName = "map";
        if (mapProcessor.getInputMapperBiMap().containsValue("map")) {
            mapAttributeName = mapProcessor.getInputMapperBiMap().inverse().get("map");
        }

        final JSONObject map = new JSONObject();
        attributes.put(mapAttributeName, map);
View Full Code Here


        }
        setMapLayers(map, oldRequest);
    }

    private static CreateMapProcessor getMapProcessor(final Template template) {
        CreateMapProcessor mapProcessor = null;

        for (Processor<?, ?> processor : template.getProcessors()) {
            if (processor instanceof CreateMapProcessor) {
                if (mapProcessor == null) {
                    mapProcessor = (CreateMapProcessor) processor;
View Full Code Here

TOP

Related Classes of org.mapfish.print.processor.map.CreateMapProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.