Geometry centroidGeom = null;
// get geometry of the area of interest
Envelope aoi = mapContent.getRenderingArea();
GeometryFactory factory = new GeometryFactory();
Geometry displayGeom = factory.toGeometry(new Envelope(aoi.getMinX(), aoi
.getMaxX(), aoi.getMinY(), aoi.getMaxY()));
// get the styles for this feature
SimpleFeatureType featureType = features.getSchema();
FeatureTypeStyle[] fts = KMLUtils.filterFeatureTypeStyles(layer.getStyle(),