Пример #1
0
class DirectionsRenderer:
    def __init__(self, options):
        if options:
            self.renderer = JS("""new $wnd.google.maps.DirectionsRenderer(options);""")
        else:
            self.renderer = JS("""new $wnd.google.maps.DirectionsRenderer();""")

    def setDirections(self, results):
        self.renderer.setDirections(translateDirectionsResults(results, True))

    def setMap(self, map):
        self.renderer.setMap(map)
Пример #2
0
class DirectionsRenderer:
    def __init__(self, options):
        if options:
            self.renderer = \
                JS("""new $wnd.google.maps.DirectionsRenderer(options);""")
        else:
            self.renderer = \
                JS("""new $wnd.google.maps.DirectionsRenderer();""")

    def setDirections(self, results):
        self.renderer.setDirections(translateDirectionsResults(results, True))

    def setMap(self, map):
        self.renderer.setMap(map)
Пример #3
0
class DirectionsRenderer:
    def __init__(self, options):
        if options:
            self.renderer = \
                JS("""new $wnd['google']['maps']['DirectionsRenderer'](@{{options}})""")
        else:
            self.renderer = \
                JS("""new $wnd['google']['maps']['DirectionsRenderer']()""")

    def setDirections(self, results):
        self.renderer.setDirections(translateDirectionsResults(results, True))

    def setMap(self, map):
        self.renderer.setMap(map)
Пример #4
0
class DirectionsRenderer:

    def __init__(self, options):
        if options:
            self.renderer = \
                JS("""new $wnd['google']['maps']['DirectionsRenderer'](@{{options}})""")
        else:
            self.renderer = \
                JS("""new $wnd['google']['maps']['DirectionsRenderer']()""")

    def setDirections(self, results):
        self.renderer.setDirections(translateDirectionsResults(results, True))

    def setMap(self, map):
        self.renderer.setMap(map)