Package muntjac :: Package addon :: Package google_maps :: Module google_map :: Class GoogleMap
[hide private]
[frames] | no frames]

Class GoogleMap

source code

                          object --+                
                                   |                
                 util.IEventListener --+            
                                       |            
           terminal.paintable.IPaintable --+        
                                           |        
                              object --+   |        
                                       |   |        
  terminal.variable_owner.IVariableOwner --+        
                                           |        
                              object --+   |        
                                       |   |        
             terminal.sizeable.ISizeable --+        
                                           |        
                     ui.component.IComponent --+    
                                               |    
                                  object --+   |    
                                           |   |    
event.method_event_source.IMethodEventSource --+    
                                               |    
         ui.abstract_component.AbstractComponent --+
                                                   |
                                                  GoogleMap

Server side component for the VGoogleMap widget.

Instance Methods [hide private]
 
__init__(self, application, apiKey_or_center=None, zoom=None, apiKey=None)
Construct a new instance of the map with given parameters.
source code
 
paintContent(self, target)
Paints any needed component-specific things to the given UIDL stream.
source code
 
changeVariables(self, source, variables)
Receive and handle events and other variable changes from the client.
source code
 
fireMoveEvent(self) source code
 
fireClickEvent(self, obj) source code
 
fireMarkerClickedEvent(self, clickedMarker) source code
 
fireMarkerMovedEvent(self, movedMarker) source code
 
addListener(self, listener, iface=None)
Register a new map listener.
source code
 
removeListener(self, listener, iface=None)
Remove a map listener.
source code
 
getCenter(self)
Get current center coordinates of the map.
source code
 
setCenter(self, center)
Set the current center coordinates of the map.
source code
 
getZoom(self)
Get the current zoom level of the map.
source code
 
setZoom(self, zoom)
Set the zoom level of the map.
source code
 
setClientLogLevel(self, level)
Set the level of verbosity the client side uses for tracing or displaying error messages.
source code
 
getClientLogLevel(self)
Get the level of verbosity the client side uses for tracing or displaying error messages.
source code
 
getBoundsNE(self)
Get the coordinates of the north-east corner of the map.
source code
 
getBoundsSW(self)
Get the coordinates of the south-west corner of the map.
source code
 
setMarkerSource(self, markerSource)
Set the MarkerSource for the map.
source code
 
closeInfoWindow(self)
Close the currently open info window, if any.
source code
 
addPolyOverlay(self, overlay)
Add a new {@link PolyOverlay} to the map.
source code
 
updateOverlay(self, overlay)
Update a PolyOverlay on the map.
source code
 
removeOverlay(self, overlay)
Remove a PolyOverlay from the map.
source code
 
getOverlays(self)
Get the collection of PolyOverlays currently in the map.
source code
 
addMarker(self, marker)
Add a Marker to the current MarkerSource.
source code
 
removeMarker(self, marker)
Removes the marker from the map
source code
 
removeAllMarkers(self) source code
 
setScrollWheelZoomEnabled(self, isEnabled) source code
 
isScrollWheelZoomEnabled(self) source code
 
addControl(self, control) source code
 
hasControl(self, control) source code
 
removeControl(self, control) source code
 
addMapType(self, name, minZoom, maxZoom, copyright_, tileUrl, isPng, opacity) source code
 
clearMapTypes(self) source code
 
reportMapBounds(self) source code

Inherited from ui.abstract_component.AbstractComponent: __getstate__, __setstate__, addCallback, addStyleName, attach, childRequestedRepaint, detach, fireComponentErrorEvent, fireComponentEvent, fireEvent, fireRequestRepaintEvent, focus, getApplication, getCSSHeight, getCSSWidth, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, hasListeners, isEnabled, isImmediate, isReadOnly, isVisible, paint, parseStringSize, registerCallback, registerListener, removeCallback, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidthUnits, withdrawCallback, withdrawListener

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
strToLL(cls, latLngStr) source code
Class Variables [hide private]
  CLIENT_WIDGET = None
hash(x)
  TYPE_MAPPING = 'org.vaadin.hezamu.googlemapwidget.GoogleMap'

Inherited from ui.abstract_component.AbstractComponent: SIZE_PATTERN

Inherited from terminal.sizeable.ISizeable: SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS, UNIT_SYMBOLS

Instance Variables [hide private]
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, application, apiKey_or_center=None, zoom=None, apiKey=None)
(Constructor)

source code 

Construct a new instance of the map with given parameters.

Parameters:
  • application - Application owning this instance.
  • apiKey_or_center - the API key to be used for Google Maps or the center of the map as a 2-tuple
  • zoom - initial zoom level of the map
  • apiKey - the API key to be used for Google Maps
Overrides: object.__init__

paintContent(self, target)

source code 

Paints any needed component-specific things to the given UIDL stream. The more general paint method handles all general attributes common to all components, and it calls this method to paint any component-specific attributes to the UIDL stream.

Parameters:
  • target - the target UIDL stream where the component should paint itself to
Raises:
Overrides: ui.abstract_component.AbstractComponent.paintContent
(inherited documentation)

changeVariables(self, source, variables)

source code 

Receive and handle events and other variable changes from the client.

Parameters:
  • source - the Source of the variable change. This is the origin of the event. For example in Web Adapter this is the request.
  • variables - the Mapping from variable names to new variable values.
Overrides: terminal.variable_owner.IVariableOwner.changeVariables

addListener(self, listener, iface=None)

source code 
Register a new map listener.

@param listener:
           new L{IMapClickListener}, L{IMapMoveListener},
           L{IMarkerMovedListener} or L{IMarkerClickListener}
           to register

NOTE!! The marker that is clicked MUST have some information window
content! This is due to the implementation of the Widget, as the marker
click events do not propagate if there is not a information window
opened.

Parameters:
  • listener - the new IListener to be registered.
Raises:
  • ValueError - unless method has a match in object
Overrides: event.method_event_source.IMethodEventSource.addListener

removeListener(self, listener, iface=None)

source code 

Remove a map listener.

Parameters:
Overrides: event.method_event_source.IMethodEventSource.removeListener

setCenter(self, center)

source code 

Set the current center coordinates of the map. This method can be used to pan the map programmatically.

Parameters:
  • center - the new center coordinates

getZoom(self)

source code 

Get the current zoom level of the map.

Returns:
the current zoom level

setZoom(self, zoom)

source code 

Set the zoom level of the map. This method can be used to zoom the map programmatically.

addPolyOverlay(self, overlay)

source code 

Add a new {@link PolyOverlay} to the map. Does nothing if the overlay already exist on the map.

Parameters:
Returns:
True if the overlay was added.

updateOverlay(self, overlay)

source code 

Update a PolyOverlay on the map. Does nothing if the overlay does not exist on the map.

Parameters:
Returns:
True if the overlay was updated.

removeOverlay(self, overlay)

source code 

Remove a PolyOverlay from the map. Does nothing if the overlay does not exist on the map.

Parameters:
Returns:
True if the overlay was removed.

getOverlays(self)

source code 

Get the collection of PolyOverlays currently in the map.

Returns:
a list of overlays.

addMarker(self, marker)

source code 

Add a Marker to the current MarkerSource. If the map has no marker source a new BasicMarkerSource is created.

Parameters:
  • marker - Marker to add