示例#1
0
class Geocoder:
    def __init__(self):
        self.geocoder = JS("new $wnd['google']['maps']['Geocoder']()")

    def geocode(self, request, callback):

        self.geocoder.geocode(
            request, lambda jsResults, status: callback(
                translateGeocoderResults(jsResults), status))
class Geocoder:

    def __init__(self):
        self.geocoder = JS("new $wnd.google.maps.Geocoder()")

    def geocode(self, request, callback):

        self.geocoder.geocode(request,
            lambda jsResults, status:
            callback(translateGeocoderResults(jsResults), status))
示例#3
0
class Geocoder:

    def __init__(self):
        self.geocoder = JS("new $wnd.google.maps.Geocoder();")

    def geocode(self, request, callback):

        self.geocoder.geocode(request,
            lambda jsResults, status:
            callback(translateGeocoderResults(jsResults), status))