public class Draw
extends com.google.gwt.core.client.JavaScriptObject
Modifier and Type | Class and Description |
---|---|
static class |
Draw.GeometryType |
static class |
Draw.Options |
Modifier and Type | Method and Description |
---|---|
void |
activate(Draw.GeometryType geometryType)
Activates the toolbar for drawing geometries.
|
void |
activate(Draw.GeometryType geometryType,
Draw.Options options)
Activates the toolbar for drawing geometries.
|
void |
addDrawEndHandler(DrawEndHandler handler)
Add handler to draw end event;
|
static Draw |
create(MapWidget map,
Draw.Options options)
Creates a new Draw object.
|
void |
deactivate()
Deactivates the toolbar and reactivates map navigation.
|
void |
finishDrawing()
Finishes drawing the geometry and fires the onDrawEnd event.
|
SimpleFillSymbol |
getFillSymbol()
Symbol to be used when drawing a Polygon or Extent.
|
SimpleLineSymbol |
getLineSymbol()
Symbol to be used when drawing a Polyline.
|
SimpleMarkerSymbol |
getMarkerSymbol()
Symbol to be used when drawing a Point or Multipoint.
|
boolean |
respectDrawingVertexOrder()
When set to false, the geometry is modified to be topologically correct.
|
void |
setFillSymbol(SimpleFillSymbol fillSymbol)
Sets the fill symbol.
|
void |
setLineSymbol(SimpleLineSymbol lineSymbol)
Sets the line symbol.
|
void |
setMarkerSymbol(SimpleMarkerSymbol markerSymbol)
Sets the marker symbol.
|
void |
setRespectDrawingVertexOrder(boolean set)
Sets whether the polygon geometry should be modified to be topologically correct.
|
public static Draw create(MapWidget map, Draw.Options options)
map
- - Map the toolbar is associated with.options
- - Parameters that define the functionality of the draw toolbar.public final SimpleFillSymbol getFillSymbol()
public final SimpleLineSymbol getLineSymbol()
public final SimpleMarkerSymbol getMarkerSymbol()
public final boolean respectDrawingVertexOrder()
public final void activate(Draw.GeometryType geometryType)
geometryType
- -The type of geometry drawn.public final void activate(Draw.GeometryType geometryType, Draw.Options options)
geometryType
- - The type of geometry drawn.options
- - Options that define the functionality of the draw toolbar.public final void deactivate()
public final void finishDrawing()
public final void setFillSymbol(SimpleFillSymbol fillSymbol)
fillSymbol
- - The fill symbol.public final void setLineSymbol(SimpleLineSymbol lineSymbol)
lineSymbol
- - The line symbol.public final void setMarkerSymbol(SimpleMarkerSymbol markerSymbol)
markerSymbol
- - The marker symbol.public final void setRespectDrawingVertexOrder(boolean set)
set
- -When set to false, the geometry is modified to be topologically correct. When set to true,
the input geometry is not modified.public final void addDrawEndHandler(DrawEndHandler handler)
handler
- - Geometry drawn on the client.