Defines required attributes for Annotations.
Annotations represent a text based geographic feature.
The geometry stored in the feature indicates where the
text should be drawn and the attribute indicated by
the
BasicFeatureTypes.ANNOTATION_ATTRIBUTE_NAME attribute holds
the text to be displayed for the feature.
Example:
if ( feature.getFeatureType().isDescendedFrom( AnnotationFeatureType.ANNOTATION ) )
{
String attributeName = (String)feature.getAttribute( AnnotationFeatureType.ANNOTATION_ATTRIBUTE_NAME );
String annotationText = (String)feature.getAttribute( attributeName );
... // Do something with the annotation text and feature
}
author: John Meagher |