1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 from __pyjamas__ import JS
16
17 from pyjamas.gmaps.Utils import dictToJs, createListenerMethods
18
19
20 MapTypeId = JS("$wnd['google']['maps']['MapTypeId']")
21 MapTypeControlStyle = JS("$wnd['google']['maps']['MapTypeControlStyle']")
22 NavigationControlStyle = JS("$wnd['google']['maps']['NavigationControlStyle']")
23 ScaleControlStyle = JS("$wnd['google']['maps']['ScaleControlStyle']")
24
25
28
29
32
33
36
37
40
41
42 -def Map(el, options):
43 if options:
44 map = JS("""new $wnd['google']['maps']['Map'](@{{el}}, @{{options}})""")
45 else:
46 map = JS("""new $wnd['google']['maps']['Map'](@{{el}})""")
47
48 createListenerMethods(map)
49 return map
50
51
53 JS("""return new $wnd['google']['maps']['MapPanes'](@{{el}})""")
54
55
57 JS("""return new $wnd['google']['maps']['MapCanvasProjection'](@{{el}})""")
58