The 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
And it’s also the start point of the rotate handle. (OpenLayers.Feature.Vector)
overFeature: function( feature )
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
feature | {OpenLayers.Feature.Vector} The selected feature. |
downFeature: function( pixel )
Called when the drag handler detects a mouse-down.
pixel | {OpenLayers.Pixel} Location of the mouse event. |
upFeature: function( pixel )
Called when the drag handler detects a mouse-up.
pixel | {OpenLayers.Pixel} Location of the mouse event. |
outFeature: function( feature )
Called when the feature handler detects a mouse-out on a feature.
feature | {OpenLayers.Feature.Vector} The feature that the mouse left. |
setMap: function( map )
Set the map property for the control and all handlers.
map | {OpenLayers.Map} The control’s map. |
Set the size of the capture box. Then the box will be redrawn on the map
paperSize | {OpenLayers.Size} The paper size, in mm |
scaleDenominator | The denominator of target scale |
validateResolution: function()
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
(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
isDragging: function()
Check if it’s currently in rotatiing mode
isRotating: 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()