38 |
|
|
39 |
import org.apache.log4j.Logger; |
import org.apache.log4j.Logger; |
40 |
import org.geotools.data.DefaultQuery; |
import org.geotools.data.DefaultQuery; |
|
import org.geotools.feature.AttributeType; |
|
41 |
import org.geotools.feature.FeatureCollection; |
import org.geotools.feature.FeatureCollection; |
42 |
import org.geotools.map.MapLayer; |
import org.geotools.map.MapLayer; |
43 |
import org.geotools.styling.Style; |
import org.geotools.styling.Style; |
44 |
import org.geotools.styling.TextSymbolizer; |
import org.geotools.styling.TextSymbolizer; |
45 |
import org.opengis.feature.simple.SimpleFeature; |
import org.opengis.feature.simple.SimpleFeature; |
46 |
import org.opengis.feature.simple.SimpleFeatureType; |
import org.opengis.feature.simple.SimpleFeatureType; |
47 |
|
import org.opengis.feature.type.AttributeDescriptor; |
48 |
import org.opengis.filter.Filter; |
import org.opengis.filter.Filter; |
49 |
import org.opengis.filter.expression.Expression; |
import org.opengis.filter.expression.Expression; |
50 |
import org.opengis.filter.expression.PropertyName; |
import org.opengis.filter.expression.PropertyName; |
81 |
this.mapPane = mapPane; |
this.mapPane = mapPane; |
82 |
} |
} |
83 |
|
|
84 |
private AttributeType getLabelAttribute(final TextSymbolizer ts, |
private AttributeDescriptor getLabelAttribute(final TextSymbolizer ts, |
85 |
final SimpleFeatureType schema) { |
final SimpleFeatureType schema) { |
86 |
if (ts == null) { |
if (ts == null) { |
87 |
// This layer has no labels |
// This layer has no labels |
150 |
if (ts == null) |
if (ts == null) |
151 |
continue; |
continue; |
152 |
|
|
153 |
final AttributeType labelAttribute = getLabelAttribute(ts, ml |
final AttributeDescriptor labelAttribute = getLabelAttribute(ts, ml |
154 |
.getFeatureSource().getSchema()); |
.getFeatureSource().getSchema()); |
155 |
|
|
156 |
if (labelAttribute == null) { |
if (labelAttribute == null) { |