Ejemplo n.º 1
0
    def findNeighbour(self):
        self.renderMap()
        d = NeighbourDialog(self)
        type_name = d.typeTxt.get()
        src = d.source
        r = Finder.findNeighbours(src, type_name)
        print "type = " + type_name
        if len(r) > 0:
            print "GOT ROUTES"
            dlist = ""
            for i in r:
                print i
                dlist = dlist + str(i[-1][2]) + ","
                self.renderRoute(i)

            tkMessageBox.showinfo(str(len(r)) + " Results Found", dlist)
        else:
            tkMessageBox.showinfo("No results",
                                  "No destinations match your query")
Ejemplo n.º 2
0
 def findNeighbour(self):
     self.renderMap()
     d = NeighbourDialog(self)
     type_name = d.typeTxt.get()
     src = d.source
     r = Finder.findNeighbours(src, type_name)
     print "type = "+type_name
     if len(r) > 0:
         print "GOT ROUTES"
         dlist = ""
         for i in r:
             print i
             dlist = dlist + str(i[-1][2])+","
             self.renderRoute(i)
             
         
         tkMessageBox.showinfo(str(len(r))+" Results Found", dlist)
     else :
         tkMessageBox.showinfo("No results","No destinations match your query")