01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.vfny.geoserver.wms.responses.map.openlayers;
06:
07: import org.vfny.geoserver.global.WMS;
08: import org.vfny.geoserver.wms.GetMapProducer;
09: import org.vfny.geoserver.wms.GetMapProducerFactorySpi;
10: import java.util.Collections;
11: import java.util.Map;
12: import java.util.Set;
13:
14: public class OpenLayersMapProducerFactory implements
15: GetMapProducerFactorySpi {
16: public boolean canProduce(String mapFormat) {
17: return getSupportedFormats().contains(mapFormat)
18: || "openlayers".equals(mapFormat);
19: }
20:
21: public GetMapProducer createMapProducer(String mapFormat, WMS wms)
22: throws IllegalArgumentException {
23: return new OpenLayersMapProducer(wms);
24: }
25:
26: public String getName() {
27: return "OpenLayers Map";
28: }
29:
30: public Set getSupportedFormats() {
31: return Collections.singleton("application/openlayers");
32: }
33:
34: public boolean isAvailable() {
35: return true;
36: }
37:
38: public Map getImplementationHints() {
39: return null;
40: }
41: }
|