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

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

Properties

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”,
  • hoverStrokeColor: “red”,
  • hoverStrokeOpacity: 1,
  • hoverStrokeWidth: 0.2,
  • pointRadius: 6,
  • hoverPointRadius: 1,
  • hoverPointUnit: “%”,
  • pointerEvents: “visiblePainted”

Other style properties that have no default values

  • externalGraphic,
  • graphicWidth,
  • graphicHeight,
  • graphicOpacity
  • graphicXOffset
  • graphicYOffset
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.