/[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 315 by mojays, Wed Aug 26 11:03:27 2009 UTC revision 318 by alfonx, Wed Aug 26 13:33:32 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;
43  import org.geotools.feature.FeatureType;  import org.geotools.feature.SimpleFeature;
44    import org.geotools.feature.SimpleFeatureType;
45  import org.geotools.map.MapLayer;  import org.geotools.map.MapLayer;
46  import org.geotools.styling.Style;  import org.geotools.styling.Style;
47  import org.geotools.styling.TextSymbolizer;  import org.geotools.styling.TextSymbolizer;
# 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.315  
changed lines
  Added in v.318

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26