public static class SnappingManager.SnappingOptions
extends com.google.gwt.core.client.JavaScriptObject
Modifier and Type | Method and Description |
---|---|
static SnappingManager.SnappingOptions |
create() |
void |
setAlwaysSnap(boolean alwaysSnap)
Set the alwaysSnap parameter.
|
void |
setLayerInfos(SnappingManager.LayerInfos[] layerInfos)
Set the layerInfos parameter.
|
void |
setMap(MapWidget map)
Set the map parameter.
|
void |
setSnapKey(int key)
Set the snapKey parameter.
|
void |
setSnapPointSymbol(SimpleMarkerSymbol snapPointSymbol)
Set the snapPointSymbol parameter.
|
void |
setTolerance(int tolerance)
Set the tolerance parameter.
|
public static SnappingManager.SnappingOptions create()
public final void setAlwaysSnap(boolean alwaysSnap)
alwaysSnap
- - When true, snapping is always enabled. When false users press the snapKey
to enable snapping. Default value is false.public final void setLayerInfos(SnappingManager.LayerInfos[] layerInfos)
layerInfos
- - An array of layerInfo objects that define the snapping target layers. All values
are optional. If no snapping options are set the default values will be used.public final void setMap(MapWidget map)
map
- - Reference to the map. Required parameter.public final void setSnapKey(int key)
-
- When alwaysSnap is set to false use this option to define the key users press
to enable snapping. The default values is the CTRL key.public final void setSnapPointSymbol(SimpleMarkerSymbol snapPointSymbol)
snapPointSymbol
- - Define a symbol for the snapping location. The default symbol
is a simple marker symbol with the following properties: size:15px,color:cyan, style:STYLE_CROSS.public final void setTolerance(int tolerance)
tolerance
- - Specify the radius of the snapping circle in pixels. The default value is 15 pixels.