throw new RestletException("Layer not indexable: " + layer,
Status.CLIENT_ERROR_FORBIDDEN);
}
// create some kvp and pass through to GetMapKvpreader
KvpMap raw = new KvpMap();
raw.put("layers", namespace + ":" + layer);
raw.put("format", "kml");
raw.put("format_options", "selfLinks:true;relLinks:true;");
// regionateby:" + regionateBy + (regionateAttr != null ? ";regionateAttr:" + regionateAttr : ""));
if (feature != null) {
raw.put("featureid", feature);
} else {
raw.put("startIndex", Integer.toString(startIndex));
raw.put("maxfeatures", Integer.toString(maxFeatures));
}
GetMapKvpRequestReader reader = new GetMapKvpRequestReader(getWMS());
reader.setHttpRequest(RESTUtils.getServletRequest(request));
// parse into request object
raw = KvpUtils.normalize(raw);
KvpMap kvp = new KvpMap(raw);
KvpUtils.parse(kvp);
final GetMapRequest getMapRequest = (GetMapRequest) reader.read(
(GetMapRequest) reader.createRequest(), kvp, raw);
getMapRequest.setBaseUrl(RESTUtils.getBaseURL(request));