Widgets OpenLayers. Control. MapCapturer |
OpenLayers. Control. MapCapturerThe MapCapturer control shows a box on the map to illustrate the area that will be captured. Normally the capture information will be used to print the map. If the MapCapturer is configured not show the capture box, then the current viewport will be used as the capture area. The user can move or rotate the capture box to change the area he’d like to capture. And the user can hold SHIFT key to snapp to a certain angle when he is rotating the capture box Inherits FromSummary
rotateHandleStart. It’s the feature representing the center point of capture box.And it’s also the start point of the rotate handle. (OpenLayers.Feature.Vector) overFeature
Called when the feature handler detects a mouse-over on a feature. This enables the drag control if the event target is the outer polygon, and the rotate control will be activated if the event target is the inner polygon Parameters
downFeature
Called when the drag handler detects a mouse-down. Parameters
upFeature
Called when the drag handler detects a mouse-up. Parameters
outFeature
Called when the feature handler detects a mouse-out on a feature. Parameters
setMap
Set the map property for the control and all handlers. Parameters
setRegionSet the size of the capture box. Then the box will be redrawn on the map Parameters
validateResolution
Check if the capture box could display completely on current screen view port. If it cannot, then an warning message will show up to warn the user. Then the user could zoom out to get the box back Returns(Boolean) True if the box can display completely, otherwise false. |
Called when the feature handler detects a mouse-over on a feature.
overFeature: function( feature )
Check if it’s currently in dragging to move mode
dragging: function()
Called when the drag handler detects a mouse-down.
downFeature: function( pixel )
Set the cursor according to current action: moving or rotating
setCursor: function()
Move the feature according to the mouse-move
moveFeature: function( evt )
Draw the snapping line
drawSnappingHint: function( angle )
Clear the snapping line
clearSnappingHint: function()
Calculates the rotate angle, in degree and counterclockwise
calculateAngle: function( pixel, origin )
Called when the drag handler detects a mouse-up.
upFeature: function( pixel )
Called when the feature handler detects a mouse-out on a feature.
outFeature: function( feature )
Called when the drag handler detects a mouse-out (from the map viewport).
cancel: function()
Set the map property for the control and all handlers.
setMap: function( map )
Draw the capture box, rotate handle etc.
drawFeatures: function()
Clear the capture box, rotate handle etc.
clearFeatures: function()
Create the capture box feature
createCaptureBox: function()
Create the rotate handle feature
createRotateHandle: function()
Check if the capture box could display completely on current screen view port.
validateResolution: function()
Get the capture area.
getCaptureBox: function()
Get the normalized capture box
getNormalizedCapture: function()
Get the capture rotation
getCaptureRotation: function()
Enable the capture box to display it on the map
enable: function()
Disable the capture box.
disable: function()