Ejemplo n.º 1
0
class DirectionsService:
    def __init__(self):
        self.ds = JS("""new $wnd.google.maps.DirectionsService();""")

    def route(self, request, callback):
        self.ds.route(
            request, lambda jsResults, status: callback(
                translateDirectionsResults(jsResults), status))
Ejemplo n.º 2
0
class DirectionsService:

    def __init__(self):
        self.ds = JS("""new $wnd.google.maps.DirectionsService()""")

    def route(self, request, callback):
        self.ds.route(request,
           lambda jsResults, status:
               callback(translateDirectionsResults(jsResults), status))