Home | Trees | Indices | Help |
|
---|
|
1 # Copyright (C) 2009 Daniel Carvalho <idnael@gmail.com> 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 from __pyjamas__ import JS 16 17 from pyjamas.gmaps.Utils import translateGmapsObject, dictToJs #, gmapsPyObjectToJs 18 19 20 GeocoderStatus = JS("$wnd['google']['maps']['GeocoderStatus']") 21 GeocoderLocationType = JS("$wnd['google']['maps']['GeocoderLocationType']") 22 23 24 geocoderResultsFields = dictToJs( 25 {"results": 'l', "types": 'l', "address_components": 'l', 26 "results[]": 'd', "address_components[]": 'd', "geometry": 'd', 27 "result": 'd'}) 28 29 30 # translates a geocoderResults structure from js to python 31 # and vice-versa 32 36 37 38 # translates just one element of the geocoderResults 39 # (because it is used inside directionsResults...) 43 4446 4955 5651 52 self.geocoder.geocode(request, 53 lambda jsResults, status: 54 callback(translateGeocoderResults(jsResults), status))58 return dictToJs(params)59
Home | Trees | Indices | Help |
|
---|
http://epydoc.sourceforge.net |