def getRandomDirections(lat, long, distance): google = Google() cs = PointsInCircum(lat, long, distance / 2) routes = [ route for routes in [google.route("%f,%f" % (lat, long), "%f,%f" % (lat, long), waypoints=["%f,%f" % c]) for c in cs] for route in routes ] return routes
def getRandomDirections(lat, long, distance): google = Google() cs = PointsInCircum(lat, long, distance / 2) routes = [ route for routes in [ google.route("%f,%f" % (lat, long), "%f,%f" % (lat, long), waypoints=["%f,%f" % c]) for c in cs ] for route in routes ] return routes
def getRandomDirectionsAtoB(Alat, Along, Blat, Blong): google = Google() cs = [ ["%f,%f" % ((Alat + Blat) / 2 + (i / 60.0), (Along + Blong) / 2 + (j / 60.0))] for i in xrange(-1, 2) for j in xrange(-1, 2) ] cs.append([]) routes = [ route for routes in [google.route("%f,%f" % (Alat, Along), "%f,%f" % (Blat, Blong), waypoints=c) for c in cs] for route in routes ] return routes
def getRandomDirectionsAtoB(Alat, Along, Blat, Blong): google = Google() cs = [[ "%f,%f" % ((Alat + Blat) / 2 + (i / 60.0), (Along + Blong) / 2 + (j / 60.0)) ] for i in xrange(-1, 2) for j in xrange(-1, 2)] cs.append([]) routes = [ route for routes in [ google.route( "%f,%f" % (Alat, Along), "%f,%f" % (Blat, Blong), waypoints=c) for c in cs ] for route in routes ] return routes