All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.ac.ceh.dynamo.providers.GridMapLegendProvider Maven / Gradle / Ivy

Go to download

A Spring MVC plugin for creating dynamic MapServer maps with freemarker templates

There is a newer version: 1.3
Show newest version
package uk.ac.ceh.dynamo.providers;

import java.util.HashMap;
import java.util.Map;
import uk.ac.ceh.dynamo.GridMap;
import uk.ac.ceh.dynamo.GridMapMethod;
import uk.ac.ceh.dynamo.Provides;

/**
 *
 * @author Chris Johnson
 */
public class GridMapLegendProvider {
    
    @Provides(GridMapMethod.LEGEND) 
    public Map processRequestParameters(GridMap.GridLayer layer) {
        Map toReturn = new HashMap<>();
        toReturn.put("SERVICE", new String[]{"WMS"});
        toReturn.put("VERSION", new String[]{"1.1.1"});
        toReturn.put("REQUEST", new String[]{"GetLegendGraphic"});
        toReturn.put("TRANSPARENT", new String[]{"true"});
        toReturn.put("FORMAT", new String[]{"image/png"});
        toReturn.put("LAYER", new String[]{ layer.layer() });
        return toReturn;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy