org.gwtopenmaps.openlayers.client.control
Class SnappingOptions
java.lang.Object
org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
org.gwtopenmaps.openlayers.client.control.SnappingOptions
public class SnappingOptions
- extends JSObjectWrapper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SnappingOptions
public SnappingOptions(JSObject object)
SnappingOptions
public SnappingOptions()
setGreedy
public void setGreedy(boolean greedy)
- Snap to closest feature in first target layer that applies. Default is true. If false, all features in all target layers will be checked and the closest feature in all target layers will be chosen. The greedy property determines if the order of the target layers is significant. By default, the order of the target layers is significant where layers earlier in the target layer list have precedence over layers later in the list. Within a single layer, the closest feature is always chosen for snapping. This property only determines whether the search for a closer feature continues after an eligible feature is found in a target layer.
- Parameters:
greedy
-
setTargets
public void setTargets(Vector[] targets)
- targets - {Array(OpenLayers.Layer.Vector)} A list of vector layers
the defaults from the
property will apply. The editable layer itself may be a target
layer - allowing newly created or edited features to be snapped to
existing features from the same layer. If no targets are provided
the layer given in the constructor (as ) will become the
initial target.
TODO ahhughes, which method is best?
setTargets
public void setTargets(SnappingTarget[] targets)
- targets - {Array(Object)} A list of objects for
configuring target layers. See valid properties of the target
objects below. If the items in the targets list are vector layers
(instead of configuration objects), the defaults from the
property will apply. The editable layer itself may be a target
layer - allowing newly created or edited features to be snapped to
existing features from the same layer. If no targets are provided
the layer given in the constructor (as ) will become the
initial target.
setDefaults
public void setDefaults(Vector vector)
getGreedy
public boolean getGreedy()
setLayer
public void setLayer(Vector layer)
- Property: layer {} The current editable layer.
Set at construction or after construction with .
getLayer
public Vector getLayer()
Copyright © 2011 sourceforge. All Rights Reserved.