OpenLayers.Feature.Vector - OpenLayers

# OpenLayers. Feature. Vector

Vector features use the OpenLayers.Geometry classes as geometry description. They have an ‘attributes’ property, which is the data object, and a ‘style’ property, the default values of which are defined in the OpenLayers.Feature.Vector.style objects.

#### Inherits from

- OpenLayers.Feature

Summary

OpenLayers. Feature. Vector | Vector features use the OpenLayers.Geometry classes as geometry description.
Properties |
geometry | {OpenLayers.Geometry}
attributes | {Object} This object holds arbitrary properties that describe the feature.
style | {Object}
Constructor |
OpenLayers. Feature. Vector | Create a vector feature.
Constants |
OpenLayers. Feature. Vector. style | OpenLayers features can have a number of style attributes.

### Properties

### geometry

{OpenLayers.Geometry}

### attributes

{Object} This object holds arbitrary properties that describe the feature.

### style

{Object}

### Constructor

### OpenLayers. Feature. Vector

Create a vector feature.

#### Parameters

geometry | {OpenLayers.Geometry} The geometry that this feature represents.
attributes | {Object} An optional object that will be mapped to the attributes property.
style | {Object} An optional style object.

### Constants

### OpenLayers. Feature. Vector. style

OpenLayers features can have a number of style attributes. The ‘default’ style will typically be used if no other style is specified.

#### Default style properties

- fillColor: “#ee9900”,
- fillOpacity: 0.4,
- hoverFillColor: “white”,
- hoverFillOpacity: 0.8,
- strokeColor: “#ee9900”,
- strokeOpacity: 1,
- strokeWidth: 1,
- strokeLinecap: “round”, [butt | round | square]
- strokeDashstyle: “solid”, [dot | dash | dashdot | longdash | longdashdot | solid]
- hoverStrokeColor: “red”,
- hoverStrokeOpacity: 1,
- hoverStrokeWidth: 0.2,
- pointRadius: 6,
- hoverPointRadius: 1,
- hoverPointUnit: “%”,
- pointerEvents: “visiblePainted”
- cursor: “”

#### Other style properties that have no default values

- externalGraphic,
- graphicWidth,
- graphicHeight,
- graphicOpacity,
- graphicXOffset,
- graphicYOffset,
- graphicName,
- display

A Geometry is a description of a geographic object.
OpenLayers features can have a number of style attributes.
Features are combinations of geography and attributes.
{Object} This object holds arbitrary properties that describe the feature.
Close