![JAR search and dependency download from the Maven repository](/logo.png)
uk.ac.ceh.dynamo.providers.GridMapLegendProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dynamo-mapping Show documentation
Show all versions of dynamo-mapping Show documentation
A Spring MVC plugin for creating dynamic MapServer maps with freemarker templates
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