OpenLayers JavaScript Mapping Library |
OpenLayers. Layer. VectorInstances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources. Create a new image layer with the OpenLayers.Layer.Vector constructor. Inherits fromSummary
featuresArray({OpenLayers.Feature.Vector}) OpenLayers. Layer. VectorCreate a new vector layer Parameters
Returns{OpenLayers.Layer.Vector} A new vector layer addFeatures
Add Features to the layer. Parameters
getFeatureById
Given a feature id, return the feature if it exists in the features array Parameters
Returns{OpenLayers.Feature.Vector} A feature corresponding to the given featureId onFeatureInsert
method called after a feature is inserted. Does nothing by default. Override this if you need to do something on feature updates. Paarameters
preFeatureInsert
method called before a feature is inserted. Does nothing by default. Override this if you need to do something when features are first added to the layer, but before they are drawn, such as adjust the style. Parameters
|
Destroy this layer
destroy: function()
Add Features to the layer.
addFeatures: function( features )
removeFeatures: function( features )
Destroy all features on the layer and empty the selected features array.
destroyFeatures: function ()
Given a feature id, return the feature if it exists in the features array
getFeatureById: function( featureId )
method called after a feature is inserted.
onFeatureInsert: function( feature )
method called before a feature is inserted.
preFeatureInsert: function( feature )