collections.add(fcObj); KmlEncodingContext context = new WFSKmlEncodingContext(gs.getService(WFSInfo.class), collections);
public WFSKmlEncodingContext(ServiceInfo si, List<SimpleFeatureCollection> collections) { this.service = getService(); this.collections = collections; // set some defaults for wfs encoding this.descriptionEnabled = false; this.kmScore = 100; this.extendedDataEnabled = true; this.kmz = false; }