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.
{String}
{Object}
{String}
{Object}
Create a vector feature.
nullify references to prevent circular references and memory leaks
OpenLayers.Feature An exact clone of this OpenLayers.Feature
Determins whether the feature intersects with the specified location.
Sets the new state
OpenLayers features can have a number of style attributes.

Properties

fid

{String}

attributes

{Object}

state

{String}

style

{Object}

Functions

OpenLayers. Feature. Vector

Create a vector feature.

Parameters

geometry{OpenLayers.Geometry}
data{Object}
style{Object}

destroy

destroy: function()

nullify references to prevent circular references and memory leaks

clone

clone: function (obj)

Returns

OpenLayers.Feature An exact clone of this OpenLayers.Feature

atPoint

atPoint: function(lonlat,
toleranceLon,
toleranceLat)

Determins whether the feature intersects with the specified location.

Parameters

lonlat{OpenLayers.LonLat}
toleranceLon{float} Optional tolerance in Geometric Coords
toleranceLat{float} Optional tolerance in Geographic Coords

Returns

{Boolean} Whether or not the feature is at the specified location

toState

toState: function(state)

Sets the new state

Parameters

state{String}

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”
A Geometry is a description of a geographic object.
destroy: function()
nullify references to prevent circular references and memory leaks
clone: function (obj)
OpenLayers.Feature An exact clone of this OpenLayers.Feature
Features are combinations of geography and attributes.
atPoint: function(lonlat,
toleranceLon,
toleranceLat)
Determins whether the feature intersects with the specified location.
toState: function(state)
Sets the new state
OpenLayers features can have a number of style attributes.
This class represents a longitude and latitude pair