Constructor
new BoxesFactory(viewer)
Creates an instance.
Parameters:
Name | Type | Description |
---|---|---|
viewer |
Viewer | instance of the Viewer class that will host the boxes. |
Extends
Members
mode
A mutator defining the kind of subclass.
- Overrides:
- Source:
Methods
close()
Close this factory. Disable its interaction processor.
- Overrides:
- Source:
getButtonObject()
Utility. Returns the toolbox button that will activate this instance.
Returns:
a button
hide()
Hide all the objects created by one subclass. (e.g. all the markers)
- Overrides:
- Source:
measure(feature, addFeature)
Calculates some measurements associated to the box described in feature.
The measurements are stored in an entry "measurements" of feature "properties" property.
> The measurements are calculated remotely by the YAFITSS server.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
feature |
Feature | the OpenLayers feature expected to represent a box. | |
addFeature |
boolean | true | Deprecated, don't use it. |
open(interaction, cursor)
Behaviour when an instance is activated.
Parameters:
Name | Type | Description |
---|---|---|
interaction |
Interaction | |
cursor |
cursor |
- Overrides:
- Source:
- See:
prepareBox(iRA0, iRA1, iDEC0, iDEC1) → {Feature}
Creates an OpenLayers feature that describres a box given bottom left and upper right coordinates.
A label is automatically generated that will be displayed beside the box.
Parameters:
Name | Type | Description |
---|---|---|
iRA0 |
number | lower 1st coordinate |
iRA1 |
* | upper 1st coordinate |
iDEC0 |
* | lower 2nd coordinate |
iDEC1 |
* | upper 2nd coordinate |
Returns:
- Type
- Feature
remove(feature)
Remove one object created by a subclass.
Parameters:
Name | Type | Description |
---|---|---|
feature |
* | the object to remove. |
- Overrides:
- Source:
selected(box)
Behaviour when a box is selected.
Parameters:
Name | Type | Description |
---|---|---|
box |
Feature |
- Overrides:
- Source:
show()
Make visible all the objects created by one subclass. (e.g. all the markers)
- Overrides:
- Source:
unselected(feature)
Modify the look of feature to show that it's been unselected. ( e.g. display it normally )
Parameters:
Name | Type | Description |
---|---|---|
feature |
an instance created by a subclass. |
- Overrides:
- Source: