FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = ds
.getFeatureSource(typeName);
Class<?> geometryType = featureSource.getSchema()
.getGeometryDescriptor().getType().getBinding();
Style style = getFeatureLayerStyle(styleSource, geometryType);
MapLayer mapLayer = new FeatureSourceMapLayer(featureSource, style);
layer = new FeatureLayer();
layer.setMapLayer(mapLayer);
} else if (lowFileName.endsWith(".jpg")
|| lowFileName.endsWith(".jpeg")
|| lowFileName.endsWith(".png") || lowFileName.endsWith(".gif")