com.google.maps.gwt.client.drawing
Class DrawingManager

java.lang.Object
  extended by JavaScriptObject
      extended by com.google.maps.gwt.client.MVCObject
          extended by com.google.maps.gwt.client.drawing.DrawingManager

public class DrawingManager
extends MVCObject

Allows users to draw markers, polygons, polylines, rectangles, and circles on the map. The DrawingManager 's drawing mode defines the type of overlay that will be created by the user. Adds a control to the map, allowing the user to switch drawing mode. THIS SOURCE CODE IS GENERATED, DO NOT MODIFY


Nested Class Summary
static interface DrawingManager.CirclecompleteHandler
          This event is fired when the user has finished drawing a circle.
static interface DrawingManager.MarkercompleteHandler
          This event is fired when the user has finished drawing a marker.
static interface DrawingManager.OverlaycompleteHandler
          This event is fired when the user has finished drawing an overlay of any type.
static interface DrawingManager.PolygoncompleteHandler
          This event is fired when the user has finished drawing a polygon.
static interface DrawingManager.PolylinecompleteHandler
          This event is fired when the user has finished drawing a polyline.
static interface DrawingManager.RectanglecompleteHandler
          This event is fired when the user has finished drawing a rectangle.
 
Constructor Summary
protected DrawingManager()
          Protected constructor avoids default public constructor.
 
Method Summary
 void addCirclecompleteListener(DrawingManager.CirclecompleteHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addCirclecompleteListenerOnce(DrawingManager.CirclecompleteHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addMarkercompleteListener(DrawingManager.MarkercompleteHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addMarkercompleteListenerOnce(DrawingManager.MarkercompleteHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addOverlaycompleteListener(DrawingManager.OverlaycompleteHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addOverlaycompleteListenerOnce(DrawingManager.OverlaycompleteHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addPolygoncompleteListener(DrawingManager.PolygoncompleteHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addPolygoncompleteListenerOnce(DrawingManager.PolygoncompleteHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addPolylinecompleteListener(DrawingManager.PolylinecompleteHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addPolylinecompleteListenerOnce(DrawingManager.PolylinecompleteHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addRectanglecompleteListener(DrawingManager.RectanglecompleteHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addRectanglecompleteListenerOnce(DrawingManager.RectanglecompleteHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void clearCirclecompleteListeners()
          Removes all listeners for the given event for the given instance.
 void clearInstanceListeners()
          Removes all listeners for all events for the given instance.
 void clearMarkercompleteListeners()
          Removes all listeners for the given event for the given instance.
 void clearOverlaycompleteListeners()
          Removes all listeners for the given event for the given instance.
 void clearPolygoncompleteListeners()
          Removes all listeners for the given event for the given instance.
 void clearPolylinecompleteListeners()
          Removes all listeners for the given event for the given instance.
 void clearRectanglecompleteListeners()
          Removes all listeners for the given event for the given instance.
static DrawingManager create()
          Creates a DrawingManager that allows users to draw overlays on the map, and switch between the type of overlay to be drawn with a drawing control.
static DrawingManager create(DrawingManagerOptions options)
          Creates a DrawingManager that allows users to draw overlays on the map, and switch between the type of overlay to be drawn with a drawing control.
 OverlayType getDrawingMode()
          Returns the DrawingManager 's drawing mode.
 GoogleMap getMap()
          Returns the Map to which the DrawingManager is attached, which is the Map on which the overlays created will be placed.
 void setDrawingMode()
          Changes the DrawingManager 's drawing mode, which defines the type of overlay to be added on the map.
 void setDrawingMode(OverlayType drawingMode)
          Changes the DrawingManager 's drawing mode, which defines the type of overlay to be added on the map.
 void setMap(GoogleMap map)
          Attaches the DrawingManager object to the specified Map .
 void setOptions(DrawingManagerOptions options)
          Sets the DrawingManager 's options.
 void triggerCirclecomplete(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerMarkercomplete(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerOverlaycomplete(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerPolygoncomplete(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerPolylinecomplete(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerRectanglecomplete(JavaScriptObject... varargs)
          Triggers the given event.
 
Methods inherited from class com.google.maps.gwt.client.MVCObject
bindTo, bindTo, bindTo, bindTo, changed, get, notify, set, setValues, setValues, unbind, unbindAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawingManager

protected DrawingManager()
Protected constructor avoids default public constructor.

Method Detail

create

public static DrawingManager create(DrawingManagerOptions options)
Creates a DrawingManager that allows users to draw overlays on the map, and switch between the type of overlay to be drawn with a drawing control.


create

public static DrawingManager create()
Creates a DrawingManager that allows users to draw overlays on the map, and switch between the type of overlay to be drawn with a drawing control.


addCirclecompleteListener

public final void addCirclecompleteListener(DrawingManager.CirclecompleteHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addCirclecompleteListenerOnce

public final void addCirclecompleteListenerOnce(DrawingManager.CirclecompleteHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addMarkercompleteListener

public final void addMarkercompleteListener(DrawingManager.MarkercompleteHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addMarkercompleteListenerOnce

public final void addMarkercompleteListenerOnce(DrawingManager.MarkercompleteHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addOverlaycompleteListener

public final void addOverlaycompleteListener(DrawingManager.OverlaycompleteHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addOverlaycompleteListenerOnce

public final void addOverlaycompleteListenerOnce(DrawingManager.OverlaycompleteHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addPolygoncompleteListener

public final void addPolygoncompleteListener(DrawingManager.PolygoncompleteHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addPolygoncompleteListenerOnce

public final void addPolygoncompleteListenerOnce(DrawingManager.PolygoncompleteHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addPolylinecompleteListener

public final void addPolylinecompleteListener(DrawingManager.PolylinecompleteHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addPolylinecompleteListenerOnce

public final void addPolylinecompleteListenerOnce(DrawingManager.PolylinecompleteHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addRectanglecompleteListener

public final void addRectanglecompleteListener(DrawingManager.RectanglecompleteHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addRectanglecompleteListenerOnce

public final void addRectanglecompleteListenerOnce(DrawingManager.RectanglecompleteHandler handler)
Like addListener, but the handler removes itself after handling the first event.


clearCirclecompleteListeners

public final void clearCirclecompleteListeners()
Removes all listeners for the given event for the given instance.


clearInstanceListeners

public final void clearInstanceListeners()
Removes all listeners for all events for the given instance.


clearMarkercompleteListeners

public final void clearMarkercompleteListeners()
Removes all listeners for the given event for the given instance.


clearOverlaycompleteListeners

public final void clearOverlaycompleteListeners()
Removes all listeners for the given event for the given instance.


clearPolygoncompleteListeners

public final void clearPolygoncompleteListeners()
Removes all listeners for the given event for the given instance.


clearPolylinecompleteListeners

public final void clearPolylinecompleteListeners()
Removes all listeners for the given event for the given instance.


clearRectanglecompleteListeners

public final void clearRectanglecompleteListeners()
Removes all listeners for the given event for the given instance.


getDrawingMode

public final OverlayType getDrawingMode()
Returns the DrawingManager 's drawing mode.


getMap

public final GoogleMap getMap()
Returns the Map to which the DrawingManager is attached, which is the Map on which the overlays created will be placed.


setDrawingMode

public final void setDrawingMode(OverlayType drawingMode)
Changes the DrawingManager 's drawing mode, which defines the type of overlay to be added on the map. Accepted values are MARKER , POLYGON , POLYLINE , RECTANGLE , CIRCLE , or null . A drawing mode of null means that the user can interact with the map as normal, and clicks do not draw anything.


setDrawingMode

public final void setDrawingMode()
Changes the DrawingManager 's drawing mode, which defines the type of overlay to be added on the map. Accepted values are MARKER , POLYGON , POLYLINE , RECTANGLE , CIRCLE , or null . A drawing mode of null means that the user can interact with the map as normal, and clicks do not draw anything.


setMap

public final void setMap(GoogleMap map)
Attaches the DrawingManager object to the specified Map .


setOptions

public final void setOptions(DrawingManagerOptions options)
Sets the DrawingManager 's options.


triggerCirclecomplete

public final void triggerCirclecomplete(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerMarkercomplete

public final void triggerMarkercomplete(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerOverlaycomplete

public final void triggerOverlaycomplete(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerPolygoncomplete

public final void triggerPolygoncomplete(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerPolylinecomplete

public final void triggerPolylinecomplete(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerRectanglecomplete

public final void triggerRectanglecomplete(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.