private KmlEncodingContext context;
public FeatureSequenceFactory(KmlEncodingContext context, FeatureLayer layer) {
this.context = context;
this.features = context.getCurrentFeatureCollection();
WMSMapContent mapContent = context.getMapContent();
// prepare the encoding context
context.setCurrentLayer(layer);