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

Diff of /branches/2.4.x/src/skrueger/geotools/labelsearch/LabelSearch.java

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

trunk/src/skrueger/geotools/labelsearch/LabelSearch.java revision 256 by alfonx, Fri Jul 31 14:43:47 2009 UTC branches/1.0-gt2-2.6/src/skrueger/geotools/labelsearch/LabelSearch.java revision 325 by mojays, Wed Aug 26 15:32:54 2009 UTC
# Line 39  import java.util.Locale; Line 39  import java.util.Locale;
39  import org.apache.log4j.Logger;  import org.apache.log4j.Logger;
40  import org.geotools.data.DefaultQuery;  import org.geotools.data.DefaultQuery;
41  import org.geotools.feature.AttributeType;  import org.geotools.feature.AttributeType;
 import org.geotools.feature.Feature;  
42  import org.geotools.feature.FeatureCollection;  import org.geotools.feature.FeatureCollection;
 import org.geotools.feature.FeatureType;  
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;
46    import org.opengis.feature.simple.SimpleFeature;
47    import org.opengis.feature.simple.SimpleFeatureType;
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 82  public class LabelSearch { Line 82  public class LabelSearch {
82          }          }
83    
84          private AttributeType getLabelAttribute(final TextSymbolizer ts,          private AttributeType getLabelAttribute(final TextSymbolizer ts,
85                          final FeatureType schema) {                          final SimpleFeatureType schema) {
86                  if (ts == null) {                  if (ts == null) {
87                          // This layer has no labels                          // This layer has no labels
88                          return null;                          return null;
# Line 141  public class LabelSearch { Line 141  public class LabelSearch {
141                                   * support case insensitivity and i don't find a lower or UPPER                                   * support case insensitivity and i don't find a lower or UPPER
142                                   * function.                                   * function.
143                                   */                                   */
144                                  final Iterator<Feature> fi = features.iterator();                                  final Iterator<SimpleFeature> fi = features.iterator();
145                                  while (fi.hasNext()) {                                  while (fi.hasNext()) {
146                                          final Feature f = fi.next();                                          final SimpleFeature f = fi.next();
147    
148                                          final TextSymbolizer ts = StylingUtil.getTextSymbolizer(ml                                          final TextSymbolizer ts = StylingUtil.getTextSymbolizer(ml
149                                                          .getStyle(), f);                                                          .getStyle(), f);
# Line 204  public class LabelSearch { Line 204  public class LabelSearch {
204                  return hits;                  return hits;
205          }          }
206    
207          protected SearchResult createSearchResult(final Feature f, final String title,          protected SearchResult createSearchResult(final SimpleFeature f, final String title,
208                          final String inTitle, MapLayer ml) {                          final String inTitle, MapLayer ml) {
209                  return new SearchResultFeature(f, title, inTitle, mapPane, ml);                  return new SearchResultFeature(f, title, inTitle, mapPane, ml);
210          }          }

Legend:
Removed from v.256  
changed lines
  Added in v.325

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26