Ignore:
Timestamp:
11/24/10 02:13:33 (3 years ago)
Author:
xkolman2 <xkolman2@…>
Branches:
master
Children:
e191deb
Parents:
c7339696
git-author:
xkolman2 <xkolman2@…> (11/24/10 02:13:33)
git-committer:
xkolman2 <xkolman2@…> (11/24/10 02:13:33)
Message:

fix adrres routing preloading wrong addreses
fix last step nod being disaplayed du to a wrong tag breaking pango

git-svn-id: https://nlp.fi.muni.cz/svn/gps_navigace/trunk@232 0858a4d0-ffff-46e5-938e-62b5ecb34222

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/mod_onlineServices.py

    rc7339696 rf1e7af7  
    172172    # respect travel mode 
    173173    mode = self.get('mode', None) 
    174     if mode != None: 
    175       if mode == 'cycle': 
    176         type = "b" 
    177       elif mode == 'foot': 
    178         type = "w" 
    179       elif mode == 'train' or mode == 'bus': 
    180         type = 'r' 
    181       else: 
    182         type = "" 
    183  
    184        # combine type and aother parameters 
    185       dir = {} 
    186       self.get('directionsLanguage', 'en en') 
    187       # the google language code is the seccond part of this whitespace delimited string 
    188       googleLanguageCode = self.get('directionsLanguage', 'en en').split(" ")[1] 
    189       dir['hl'] = googleLanguageCode 
    190  
    191       directions = self.tryToGetDirections(start, destination, dir, type, otherOptions) 
    192  
    193       return directions 
     174    if mode == 'cycle': 
     175      type = "b" 
     176    elif mode == 'foot': 
     177      type = "w" 
     178    elif mode == 'train' or mode == 'bus': 
     179      type = 'r' 
     180    else: 
     181      type = "" 
     182 
     183     # combine type and aother parameters 
     184    dir = {} 
     185    self.get('directionsLanguage', 'en en') 
     186    # the google language code is the seccond part of this whitespace delimited string 
     187    googleLanguageCode = self.get('directionsLanguage', 'en en').split(" ")[1] 
     188    dir['hl'] = googleLanguageCode 
     189 
     190    directions = self.tryToGetDirections(start, destination, dir, type, otherOptions) 
     191 
     192    return directions 
    194193 
    195194  def tryToGetDirections(self, start, destination, dir, travelMode, otherOptions, seccondTime=False): 
     
    283282    def run(self): 
    284283      print "onlineServices: worker starting" 
     284      print "worker: work type: %s" % self.type 
    285285      if self.type == "localSearchGoogle": 
    286286        if self.args: 
     
    297297        if self.args and len(self.args) == 2: 
    298298          (start, destination) = self.args 
     299          print "worker: routing from",start," to ",destination 
    299300          self.setStatusMessage("online routing in progress...") 
    300301          self.callback.enableOverlay() 
     
    321322          self.setStatusMessage("online routing done   ") 
    322323          # send the results to the output handler 
    323           if self.returnResult: # check if our reulst is expected and should be returned to the oputpt handler 
     324          if self.returnResult: # check if our result is expected and should be returned to the oputpt handler 
    324325            self.outputHandler(self.key, (directions, startAddress, destinationAddress, startLL, destinationLL)) 
    325326             
Note: See TracChangeset for help on using the changeset viewer.