/[schmitzm]/branches/2.1/src/skrueger/geotools/labelsearch/LabelSearch.java
ViewVC logotype

Diff of /branches/2.1/src/skrueger/geotools/labelsearch/LabelSearch.java

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

revision 335 by alfonx, Wed Aug 26 18:09:39 2009 UTC revision 417 by alfonx, Fri Sep 25 16:34:10 2009 UTC
# Line 43  import org.geotools.feature.FeatureColle Line 43  import org.geotools.feature.FeatureColle
43  import org.geotools.map.MapLayer;  import org.geotools.map.MapLayer;
44  import org.geotools.styling.Style;  import org.geotools.styling.Style;
45  import org.geotools.styling.TextSymbolizer;  import org.geotools.styling.TextSymbolizer;
 import org.opengis.feature.Feature;  
46  import org.opengis.feature.simple.SimpleFeature;  import org.opengis.feature.simple.SimpleFeature;
47  import org.opengis.feature.simple.SimpleFeatureType;  import org.opengis.feature.simple.SimpleFeatureType;
48  import org.opengis.feature.type.AttributeDescriptor;  import org.opengis.feature.type.AttributeDescriptor;
 import org.opengis.feature.type.FeatureType;  
49  import org.opengis.filter.Filter;  import org.opengis.filter.Filter;
50  import org.opengis.filter.expression.Expression;  import org.opengis.filter.expression.Expression;
51  import org.opengis.filter.expression.PropertyName;  import org.opengis.filter.expression.PropertyName;
# Line 120  public class LabelSearch { Line 118  public class LabelSearch {
118                                  if (!ml.isVisible())                                  if (!ml.isVisible())
119                                          continue;                                          continue;
120    
121                                  final List<TextSymbolizer> allTS = StylingUtil.getTextSymbolizers(ml                                  final List<TextSymbolizer> allTS = StylingUtil.getVisibleTextSymbolizers(ml
122                                                  .getStyle());                                                  .getStyle());
123                                  if (allTS.size() == 0) {                                  if (allTS.size() == 0) {
124                                          // A layer without any TextSymbolizer doesn't have to be                                          // A layer without any TextSymbolizer doesn't have to be
125                                          // searched any more.                                          // searched any more.
126                                          continue;                                          continue;
127                                  }                                  }
128                                    
                                 // 26 CAST!  
129                                  final FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = (FeatureSource<SimpleFeatureType, SimpleFeature>) ml.getFeatureSource();                                  final FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = (FeatureSource<SimpleFeatureType, SimpleFeature>) ml.getFeatureSource();
130                                                                    
131                                  final String typeName = featureSource.getSchema()                                  final String typeName = featureSource.getSchema()
# Line 160  public class LabelSearch { Line 157  public class LabelSearch {
157                                          if (ts == null)                                          if (ts == null)
158                                                  continue;                                                  continue;
159    
160                                            // TODO Evaluate the Rule that belongs to the TextSymbolizer against the feature...
161                                          final AttributeDescriptor labelAttribute = getLabelAttribute(ts, featureSource.getSchema());                                          final AttributeDescriptor labelAttribute = getLabelAttribute(ts, featureSource.getSchema());
162    
163                                          if (labelAttribute == null) {                                          if (labelAttribute == null) {

Legend:
Removed from v.335  
changed lines
  Added in v.417

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26