Follow us on GitHub

com.google.gwt.maps.client.overlays
Class Polygon

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.mvc.MVCObject<Polygon>
          extended by com.google.gwt.maps.client.overlays.Polygon

public class Polygon
extends MVCObject<Polygon>



See Polygon API Doc


Constructor Summary
protected Polygon()
          use newInstance();
 
Method Summary
 HandlerRegistration addClickHandler(ClickMapHandler handler)
          This event is fired when the DOM click event is fired on the Polygon.
 HandlerRegistration addDblClickHandler(DblClickMapHandler handler)
          This event is fired when the DOM dblclick event is fired on the Polygon.
 HandlerRegistration addMouseDownHandler(MouseDownMapHandler handler)
          This event is fired when the DOM mousedown event is fired on the Polygon.
 HandlerRegistration addMouseMoveHandler(MouseMoveMapHandler handler)
          This event is fired when the DOM mousemove event is fired on the Polygon.
 HandlerRegistration addMouseOutMoveHandler(MouseOutMapHandler handler)
          This event is fired on Polygon mouseout.
 HandlerRegistration addMouseOverHandler(MouseOverMapHandler handler)
          This event is fired on Polygon mouseover.
 HandlerRegistration addMouseUpHandler(MouseUpMapHandler handler)
          This event is fired when the DOM mouseup event is fired on the Polygon.
 HandlerRegistration addRightClickHandler(RightClickMapHandler handler)
          This event is fired when the Polygon is right-clicked on.
 boolean getEditable()
          Returns whether this shape can be edited by the user.
 MapWidget getMap()
          Returns the map on which this shape is attached.
 MVCArray<LatLng> getPath()
          Retrieves the first path.
 MVCArray<MVCArray<LatLng>> getPaths()
          Retrieves the paths for this polygon.
static Polygon newInstance(PolygonOptions options)
          Create a polygon using the passed PolygonOptions, which specify the polygon's path, the stroke style for the polygon's edges, and the fill style for the polygon's interior regions.
 void setEditable(boolean editable)
          If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment.
 void setMap(MapWidget mapWidget)
          Renders this shape on the specified map.
 void setOptions(PolygonOptions options)
          set Options
 void setPath(JsArray<LatLng> path)
          Sets the first path.
 void setPath(MVCArray<LatLng> path)
          Sets the first path.
 void setPaths(JsArray<LatLng> paths)
          Sets the path for this polygon.
 void setPaths(MVCArray<LatLng> paths)
          Sets the path for this polygon.
 void setPathss(JsArray<JsArray<LatLng>> paths)
          Sets the path for this polygon.
 void setPathss(MVCArray<MVCArray<LatLng>> paths)
          Sets the path for this polygon.
 
Methods inherited from class com.google.gwt.maps.client.mvc.MVCObject
bindTo, bindTo, bindTo, changed, createInstanceOfMVCObject, get, notify, set, setValues, unbind, unbindAll
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Polygon

protected Polygon()
use newInstance();

Method Detail

newInstance

public static final Polygon newInstance(PolygonOptions options)
Create a polygon using the passed PolygonOptions, which specify the polygon's path, the stroke style for the polygon's edges, and the fill style for the polygon's interior regions. A polygon may contain one or more paths, where each path consists of an array of LatLngs. You may pass either an array of LatLngs or an MVCArray of LatLngs when constructing these paths. Arrays are converted to MVCArrays within the polygon upon instantiation.

Parameters:
options -

getEditable

public final boolean getEditable()
Returns whether this shape can be edited by the user.


getMap

public final MapWidget getMap()
Returns the map on which this shape is attached.


getPath

public final MVCArray<LatLng> getPath()
Retrieves the first path.


getPaths

public final MVCArray<MVCArray<LatLng>> getPaths()
Retrieves the paths for this polygon.


setEditable

public final void setEditable(boolean editable)
If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment.

Parameters:
editable -

setMap

public final void setMap(MapWidget mapWidget)
Renders this shape on the specified map. If map is set to null, the shape will be removed.

Parameters:
mapWidget -

setOptions

public final void setOptions(PolygonOptions options)
set Options

Parameters:
options -

setPath

public final void setPath(MVCArray<LatLng> path)
Sets the first path. See PolylineOptions for more details.

Parameters:
path -

setPath

public final void setPath(JsArray<LatLng> path)
Sets the first path. See PolylineOptions for more details.

Parameters:
path -

setPaths

public final void setPaths(MVCArray<LatLng> paths)
Sets the path for this polygon.

Parameters:
paths -

setPathss

public final void setPathss(MVCArray<MVCArray<LatLng>> paths)
Sets the path for this polygon.

Parameters:
paths -

setPaths

public final void setPaths(JsArray<LatLng> paths)
Sets the path for this polygon.

Parameters:
paths -

setPathss

public final void setPathss(JsArray<JsArray<LatLng>> paths)
Sets the path for this polygon.

Parameters:
paths -

addClickHandler

public final HandlerRegistration addClickHandler(ClickMapHandler handler)
This event is fired when the DOM click event is fired on the Polygon.

Parameters:
handler -

addDblClickHandler

public final HandlerRegistration addDblClickHandler(DblClickMapHandler handler)
This event is fired when the DOM dblclick event is fired on the Polygon.

Parameters:
handler -

addMouseDownHandler

public final HandlerRegistration addMouseDownHandler(MouseDownMapHandler handler)
This event is fired when the DOM mousedown event is fired on the Polygon.

Parameters:
handler -

addMouseMoveHandler

public final HandlerRegistration addMouseMoveHandler(MouseMoveMapHandler handler)
This event is fired when the DOM mousemove event is fired on the Polygon.

Parameters:
handler -

addMouseOutMoveHandler

public final HandlerRegistration addMouseOutMoveHandler(MouseOutMapHandler handler)
This event is fired on Polygon mouseout.

Parameters:
handler -

addMouseOverHandler

public final HandlerRegistration addMouseOverHandler(MouseOverMapHandler handler)
This event is fired on Polygon mouseover.

Parameters:
handler -

addMouseUpHandler

public final HandlerRegistration addMouseUpHandler(MouseUpMapHandler handler)
This event is fired when the DOM mouseup event is fired on the Polygon.

Parameters:
handler -

addRightClickHandler

public final HandlerRegistration addRightClickHandler(RightClickMapHandler handler)
This event is fired when the Polygon is right-clicked on.

Parameters:
handler -


Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.