Control to transform features with a standard transformation box.
OpenLayers. Control. TransformFeature | Control to transform features with a standard transformation box. |
Constants | |
EVENT_TYPES | |
Properties | |
geometryTypes | {Array(String)} To restrict transformation to a limited set of geometry types, send a list of strings corresponding to the geometry class names. |
preserveAspectRatio | {Boolean} set to true to not change the feature’s aspect ratio. |
rotate | {Boolean} set to false if rotation should be disabled. |
feature | {OpenLayers.Feature.Vector} Feature currently available for transformation. |
renderIntent | {String|Object} Render intent for the transformation box and handles. |
rotationHandleSymbolizer | {Object|String} Optional. |
box | {OpenLayers.Feature.Vector} The transformation box rectangle. |
center | {OpenLayers.Geometry.Point} The center of the feature bounds. |
scale | {Float} The scale of the feature, relative to the scale the time the feature was set. |
ratio | {Float} The ratio of the feature relative to the ratio the time the feature was set. |
handles | {Array(OpenLayers.Feature.Vector)} The 8 handles currently available for scaling/resizing. |
rotationHandles | {Array(OpenLayers.Feature.Vector)} The 4 rotation handles currently available for rotating. |
Constructor | |
OpenLayers. Control. TransformFeature | Create a new transform feature control. |
Functions | |
activate | Activates the control. |
deactivate | Deactivates the control. |
setFeature | Place the transformation box on a feature and start transforming it. |
destroy | Take care of things that are not handled in superclass. |
{OpenLayers.Feature.Vector} Feature currently available for transformation. Read-only, use setFeature to set it manually.
{OpenLayers.Feature.Vector} The transformation box rectangle. Read-only.
{OpenLayers.Geometry.Point} The center of the feature bounds. Read-only.
{Array(OpenLayers.Feature.Vector)} The 8 handles currently available for scaling/resizing. Numbered counterclockwise, starting from the southwest corner. Read-only.
{Array(OpenLayers.Feature.Vector)} The 4 rotation handles currently available for rotating. Numbered counterclockwise, starting from the southwest corner. Read-only.
Create a new transform feature control.
layer | {OpenLayers.Layer.Vector} Layer that contains features that will be transformed. |
options | {Object} Optional object whose properties will be set on the control. |
setFeature: function( feature, initialParams )
Place the transformation box on a feature and start transforming it. If the control is not active, it will be activated.
feature | {OpenLayers.Feature.Vector} |
initialParams | {Object} Initial values for rotation, scale or ratio. Setting a rotation value here will cause the transformation box to start rotated. Setting a scale or ratio will not affect the transormation box, but applications may use this to keep track of scale and ratio of a feature across multiple transforms. |
Activates the control.
activate: function()
Deactivates the control.
deactivate: function()
Place the transformation box on a feature and start transforming it.
setFeature: function( feature, initialParams )
Take care of things that are not handled in superclass.
destroy: function()