def updateDirections(self): self.directions = getDirections(self.origin,self.destination,self.methodOfTransport,self.wayPoints) totalseconds=0 etasOfMember=[] for leg in self.directions['routes'][0]['legs']: seconds, mins = self.getEtaOfLeg(leg) etasOfMember.append(seconds) totalseconds += seconds self.eta = totalseconds self.etaToMembers = etasOfMember
def findRealisticPlaceToMeetLeader(poolMembers,poolMemberIndex,poolLeader,destination,lastPoint,places): placeNearestToLastPoint=0 currentPoolRoute=poolMembers currentPoolRoute[poolMemberIndex][locationIndex]=placeNearestToLastPoint poolMemberDirections=getDirections(poolMembers[poolMemberIndex][locationIndex],destination,poolMembers[poolMemberIndex][methodIndex],) poolDirections=getDirections(poolMembers[poolMemberIndex][locationIndex],placeNearestToLastPoint,poolMembers[poolMemberIndex][methodIndex],)
def updateDirections(self): self.directions=getDirections(self.origin,self.destination,self.methodOfTransport,self.wayPoints)
def setDirections(self): self.directionsToMeetPoint=getDirections(self.origin,self.meetPoint.location,self.methodOfTransport,[])
def setDirections(self): self.directionsToMeetPoint = getDirections(self.origin,self.meetPoint.location,self.methodOfTransport,[]) seconds , mins=self.getEtaOfLeg(self.directionsToMeetPoint['routes'][0]['legs'][0]) self.eta=seconds