Expression abxtract = null;
Date fromDate = null;
Date toDate = null;
Date timestamp = null;
for (TextSymbolizer2 ts : textSymbolizers) {
final OtherText ot = ts.getOtherText();
if(ot != null && ot.getTarget() != null && ot.getText() != null) {
if(ot.getTarget().toLowerCase().equals("kml:fromdate"))
fromDate = ot.getText().evaluate(feature, Date.class);
else if(ot.getTarget().toLowerCase().equals("kml:todate"))
toDate = ot.getText().evaluate(feature, Date.class);
else if(ot.getTarget().toLowerCase().equals("kml:timestamp"))
timestamp = ot.getText().evaluate(feature, Date.class);
}
}
try {
if(fromDate != null || toDate != null)
encodeKmlTimeSpan(fromDate, toDate);