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)
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)
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)