Changeset f1e7af7
- Timestamp:
- 11/24/10 02:13:33 (3 years ago)
- Branches:
- master
- Children:
- e191deb
- Parents:
- c733969
- git-author:
- xkolman2 <xkolman2@…> (11/24/10 02:13:33)
- git-committer:
- xkolman2 <xkolman2@…> (11/24/10 02:13:33)
- Location:
- modules
- Files:
-
- 6 edited
-
mod_menu.pyc (modified) (previous)
-
mod_onlineServices.py (modified) (4 diffs)
-
mod_onlineServices.pyc (modified) (previous)
-
mod_route.py (modified) (2 diffs)
-
mod_route.pyc (modified) (previous)
-
mod_turnByTurn.pyc (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
modules/mod_onlineServices.py
rc733969 rf1e7af7 172 172 # respect travel mode 173 173 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 194 193 195 194 def tryToGetDirections(self, start, destination, dir, travelMode, otherOptions, seccondTime=False): … … 283 282 def run(self): 284 283 print "onlineServices: worker starting" 284 print "worker: work type: %s" % self.type 285 285 if self.type == "localSearchGoogle": 286 286 if self.args: … … 297 297 if self.args and len(self.args) == 2: 298 298 (start, destination) = self.args 299 print "worker: routing from",start," to ",destination 299 300 self.setStatusMessage("online routing in progress...") 300 301 self.callback.enableOverlay() … … 321 322 self.setStatusMessage("online routing done ") 322 323 # send the results to the output handler 323 if self.returnResult: # check if our re ulst is expected and should be returned to the oputpt handler324 if self.returnResult: # check if our result is expected and should be returned to the oputpt handler 324 325 self.outputHandler(self.key, (directions, startAddress, destinationAddress, startLL, destinationLL)) 325 326 -
modules/mod_route.py
rff46384 rf1e7af7 369 369 # add a fake destination step, so there is a "destination reached" message 370 370 destStep = {} 371 destStep[u'descriptionHtml'] = '<p xml:lang="en">you <b>should</b> be near the destination<p>' 371 destStep[u'descriptionEspeak'] = '<p xml:lang="en">you <b>should</b> be near the destination</p>' 372 destStep[u'descriptionHtml'] = 'you <b>should</b> be near the destination' 372 373 # TODO: make this multilingual 373 374 (lat,lon) = self.route[-1] … … 924 925 menus.drawButton(cr, x4+(w1-x4)/2, y4+dy, (w1-x4)/2, dy, "as destination#position", "generic", "route:posToDestination|set:needRedraw:True") 925 926 926 927 if self.startAddress == None: 927 # try to get last used addresses 928 startText = self.get('startAddress', None) 929 destinationText = self.get('destinationAddress', None) 930 931 # if there are no last used addresses, use defaults 932 if startText == None: 928 933 startText = "click to input starting adres" 929 else: 930 startText = self.startAddress 931 if self.destinationAddress == None: 934 935 if destinationText == None: 932 936 destinationText = "click to input destination adres" 933 else:934 destinationText = self.destinationAddress935 937 936 938 menus.showText(cr, startText, x4+w1/20, y4+dy/5, w1-x4-(w1/20)*2)
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/trac/gps_navigace/chrome/site/nlp-logo.png)