/[schmitzm]/branches/1.0-gt2-2.6/src/skrueger/geotools/labelsearch/LabelSearch.java
ViewVC logotype

Diff of /branches/1.0-gt2-2.6/src/skrueger/geotools/labelsearch/LabelSearch.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 331 by mojays, Wed Aug 26 15:32:54 2009 UTC revision 332 by alfonx, Wed Aug 26 17:15:49 2009 UTC
# Line 38  import java.util.Locale; Line 38  import java.util.Locale;
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;
# Line 81  public class LabelSearch { Line 81  public class LabelSearch {
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
# Line 150  public class LabelSearch { Line 150  public class LabelSearch {
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) {

Legend:
Removed from v.331  
changed lines
  Added in v.332

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26