Behaviors are bundled functionality for maps. There are a number of behaviors available to maps, each with their own properties.
General Properties
- id
- Values:
- string
- Description:
- Identifier of the behavior.
- Example:
- 'behavior_type_id'
- type
- Values:
- string
- Description:
- The type of behavior which dictates the callbacks.
- Example:
- 'openlayers_behaviors_tooltip'
Tooltips
Example:
'behaviors' = array(
'openlayers_views_tooltip_id' = array(
'id' => 'openlayers_views_tooltip_id',
'type' => 'openlayers_behaviors_tooltip',
'layer' => 'layer_name',
'attribute' => 'openlayers_tooltip',
),
),
- layer
- Values:
- string
- Description:
- Which layer to assign this behavior to. This probably will be a Vector layer.
- Example:
- 'layer_name'
- attribute
- Values:
- string
- Description:
- The key of the attribute to use from the feature as the display text. See Features. This will be name by default.
- Example:
- 'name'
- attribute_id
- Values:
- string
- Description:
- The HTML identifier to be used for the the div around the text. Defaults to Map ID and 'tooltip-text'.
- Example:
- $map['id'] . '-tooltip-text'
- container_id
- Values:
- string
- Description:
- The HTML identifier to be used main tooltip div. Defaults to Map ID and 'tooltip'.
- Example:
- $map['id'] . '-tooltip'
- offset_top
- Values:
- integer
- Description:
- Pixels to offset tooltip from the top. Defaults to 10.
- Example:
- 10
- offset_left
- Values:
- integer
- Description:
- Pixels to offset tooltip from the left. Defaults to 12.
- Example:
- 12
Popups
Example:
'behaviors' = array(
'openlayers_views_popup' = array(
'id' => 'openlayers_views_popup',
'type' => 'openlayers_behaviors_popup',
'attribute' => 'openlayers_popup',
),
),
- attribute
- Values:
- string
- Description:
- The key of the attribute to use from the feature as the display text. See Features. This will be name by default.
- Example:
- 'name'
Draw Features
Zoom to Layer(s)
Cluster
Declutter
Fullscreen