<s> from pyjamas . ui . RootPanel import RootPanel , RootPanelCls <EOL> from pyjamas . ui . SimplePanel import SimplePanel <EOL> from pyjamas import DOM <EOL> from pyjamas . Timer import Timer <EOL> from __pyjamas__ import JS <EOL> from pyjamas . gmaps . Map import Map , MapTypeId , MapOptions <EOL> from pyjamas . gmaps . Base import LatLng , LatLngBounds <EOL> from pyjamas . gmaps . InfoWindow import InfoWindow , InfoWindowOptions <EOL> class EventProperties ( SimplePanel ) : <EOL> def __init__ ( self ) : <EOL> SimplePanel . __init__ ( self ) <EOL> self . setSize ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . myLatLng = LatLng ( - <NUM_LIT> , <NUM_LIT> ) <EOL> options = MapOptions ( ) <EOL> options . zoom = <NUM_LIT:4> <EOL> options . center = self . myLatLng <EOL> options . mapTypeId = MapTypeId . ROADMAP <EOL> self . map = Map ( self . getElement ( ) , options ) <EOL> self . map . addListener ( "<STR_LIT>" , self . zoomChanged ) <EOL> options = InfoWindowOptions ( ) <EOL> options . content = "<STR_LIT>" <EOL> options . position = self . myLatLng <EOL> self . infoWindow = InfoWindow ( options ) <EOL> self . infoWindow . open ( self . map ) <EOL> self . map . addListener ( "<STR_LIT>" , self . zoomChanged ) <EOL> def zoomChanged ( self ) : <EOL> zoomLevel = self . map . getZoom ( ) <EOL> self . map . setCenter ( self . myLatLng ) <EOL> self . infoWindow . setContent ( "<STR_LIT>" + str ( zoomLevel ) ) <EOL> if zoomLevel == <NUM_LIT:0> : <EOL> self . map . setZoom ( <NUM_LIT:10> ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> root = RootPanel ( ) <EOL> root . add ( EventProperties ( ) ) </s>
