/[projects]/dao/DaoAdresseService/src/dk/daoas/daoadresseservice/AdressSearch.java
ViewVC logotype

Diff of /dao/DaoAdresseService/src/dk/daoas/daoadresseservice/AdressSearch.java

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

revision 2408 by torben, Fri Feb 27 12:43:54 2015 UTC revision 2409 by torben, Sat Feb 28 16:14:55 2015 UTC
# Line 37  public class AdressSearch { Line 37  public class AdressSearch {
37                    
38          ServiceConfig config;          ServiceConfig config;
39                    
40            StreetnameHelper googleHelper;
41            StreetnameHelper osmHelper;
42            
43          public AdressSearch(ServiceConfig config) {          public AdressSearch(ServiceConfig config) {
44                  this.config = config;                  this.config = config;
45                    
46                    googleHelper = new GoogleStreetnameHelper( config );
47                    osmHelper = new OSMStreetnameHelper( config );
48          }          }
49                    
50                    
# Line 95  public class AdressSearch { Line 101  public class AdressSearch {
101                  // Brug OpenStreetMap før vi prøver google                  // Brug OpenStreetMap før vi prøver google
102                  // For google har en request limit, det har OSM ikke!                  // For google har en request limit, det har OSM ikke!
103                  if ( gadeident == null) {                  if ( gadeident == null) {
104                          if (config.useOpenStreetMaps) {                          String vej = osmHelper.proposeStreetName(result, postnr, result.splitResult.vej);              
105                                  result.osmVej = GeocodeHelper.openstreetmapHelper(config, postnr, result.splitResult.vej );                          gadeident = helperWrapper(vej, postnrVeje, helperSearchKey);
                                 result.osm = true;  
                                   
                                 gadeident = helperWrapper(result.osmVej, postnrVeje, helperSearchKey);  
                         }  
106                  }                  }
107                                    
108                  if ( gadeident == null) {                  if ( gadeident == null) {
109                          if (config.useGoogle) {                          String vej = googleHelper.proposeStreetName(result, postnr, result.splitResult.vej);            
110                                  result.googleVej = GeocodeHelper.googleHelper(config, postnr, result.splitResult.vej );                          gadeident = helperWrapper(vej, postnrVeje, helperSearchKey);
                                 result.google = true;  
                                   
                                 gadeident = helperWrapper(result.googleVej, postnrVeje, helperSearchKey);                                
                         }  
111                  }                  }
112                                    
113    

Legend:
Removed from v.2408  
changed lines
  Added in v.2409

  ViewVC Help
Powered by ViewVC 1.1.20