new ol.source.TileVector(options) experimental
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| options | Options. 
 | |||||||||||||||||||||||||||||||
Fires:
- 
            addfeature(ol.source.VectorEvent) - Triggered when a feature is added to the source.
- 
            changeexperimental - Triggered when the revision counter is increased.
- 
            changefeature(ol.source.VectorEvent) experimental - Triggered when a feature is updated.
- 
            clear(ol.source.VectorEvent) experimental - Triggered when the clear method is called on the source.
- 
            propertychange(ol.ObjectEvent) - Triggered when a property is changed.
- 
            removefeature(ol.source.VectorEvent) - Triggered when a feature is removed from the source. Seesource.clear()for exceptions.
Extends
Methods
- 
    addFeature(feature) inheritedsrc/ol/source/vectorsource.js, line 185
- 
    
    Add a single feature to the source. If you want to add a batch of features at once, call source.addFeatures()instead.Name Type Description featureol.Feature Feature to add. 
- 
    addFeatures(features) inheritedsrc/ol/source/vectorsource.js, line 269
- 
    
    Add a batch of features to the source. Name Type Description featuresArray.<ol.Feature> Features to add. 
- 
    changed() inherited experimentalsrc/ol/observable.js, line 51
- 
    
    Increases the revision counter and dispatches a 'change' event. 
- 
    clear(opt_fast) inheritedsrc/ol/source/vectorsource.js, line 373
- 
    
    Remove all features from the source. Name Type Description fastboolean Skip dispatching of removefeatureevents.
- 
    forEachFeature(callback, opt_this){S|undefined} inheritedsrc/ol/source/vectorsource.js, line 425
- 
    
    Iterate through all features on the source, calling the provided callback with each one. If the callback returns any "truthy" value, iteration will stop and the function will return the same value. Name Type Description callbackfunction Called with each feature on the source. Return a truthy value to stop iteration. thisT The object to use as thisin the callback.Returns:The return value from the last call to the callback.
 
- 
    forEachFeatureInExtent(extent, callback, opt_this){S|undefined} inherited experimentalsrc/ol/source/vectorsource.js, line 484
- 
    
    Iterate through all features whose bounding box intersects the provided extent (note that the feature's geometry may not intersect the extent), calling the callback with each feature. If the callback returns a "truthy" value, iteration will stop and the function will return the same value. If you are interested in features whose geometry intersects an extent, call the source.forEachFeatureIntersectingExtent()method instead.When useSpatialIndexis set to false, this method will loop through all features, equivalent tool.source.Vector#forEachFeature.Name Type Description extentol.Extent Extent. callbackfunction Called with each feature whose bounding box intersects the provided extent. thisT The object to use as thisin the callback.Returns:The return value from the last call to the callback.
 
- 
    forEachFeatureIntersectingExtent(extent, callback, opt_this){S|undefined} inherited experimentalsrc/ol/source/vectorsource.js, line 525
- 
    
    Iterate through all features whose geometry intersects the provided extent, calling the callback with each feature. If the callback returns a "truthy" value, iteration will stop and the function will return the same value. If you only want to test for bounding box intersection, call the source.forEachFeatureInExtent()method instead.Name Type Description extentol.Extent Extent. callbackfunction Called with each feature whose geometry intersects the provided extent. thisT The object to use as thisin the callback.Returns:The return value from the last call to the callback.
 
- 
    get(key){*} inheritedsrc/ol/object.js, line 150
- 
    
    Gets a value. Name Type Description keystring Key name. Returns:Value.
 
- 
    getAttributions(){Array.<ol.Attribution>} inheritedsrc/ol/source/source.js, line 104
- 
    
    Get the attributions of the source. Returns:Attributions.
 
- 
    getClosestFeatureToCoordinate(coordinate){ol.Feature} inheritedsrc/ol/source/vectorsource.js, line 623
- 
    
    Get the closest feature to the provided coordinate. This method is not available when the source is configured with useSpatialIndexset tofalse.Name Type Description coordinateol.Coordinate Coordinate. Returns:Closest feature.
 
- 
    
    Get the extent of the features currently in the source. This method is not available when the source is configured with useSpatialIndexset tofalse.Returns:Extent.
 
- 
    getFeatureById(id){ol.Feature} inheritedsrc/ol/source/vectorsource.js, line 693
- 
    
    Get a feature by its identifier (the value returned by feature.getId()). Note that the index treats string and numeric identifiers as the same. So source.getFeatureById(2)will return a feature with id'2'or2.Name Type Description idstring | number Feature identifier. Returns:The feature (ornullif not found).
 
- 
    getFeatures(){Array.<ol.Feature>} inheritedsrc/ol/source/vectorsource.js, line 564
- 
    
    Get all features on the source. Returns:Features.
 
- 
    getFeaturesAtCoordinate(coordinate){Array.<ol.Feature>} inheritedsrc/ol/source/vectorsource.js, line 587
- 
    
    Get all features whose geometry intersects the provided coordinate. Name Type Description coordinateol.Coordinate Coordinate. Returns:Features.
 
- 
    getFeaturesAtCoordinateAndResolution(coordinate, resolution){Array.<ol.Feature>} experimentalsrc/ol/source/tilevectorsource.js, line 223
- 
    
    Get all features whose geometry intersects the provided coordinate for the provided resolution. Name Type Description coordinateol.Coordinate Coordinate. resolutionnumber Resolution. Returns:Features.
 
- 
    getFeaturesCollection(){ol.Collection.<ol.Feature>} inherited experimentalsrc/ol/source/vectorsource.js, line 554
- 
    
    Get the features collection associated with this source. Will be nullunless the source was configured withuseSpatialIndexset tofalse, or with anol.Collectionasfeatures.
- 
    getFeaturesInExtent(extent){Array.<ol.Feature>} inherited experimentalsrc/ol/source/vectorsource.js, line 607
- 
    
    Get all features in the provided extent. Note that this returns all features whose bounding boxes intersect the given extent (so it may include features whose geometries do not intersect the extent). This method is not available when the source is configured with useSpatialIndexset tofalse.Name Type Description extentol.Extent Extent. Returns:Features.
 
- 
    getKeys(){Array.<string>} inheritedsrc/ol/object.js, line 164
- 
    
    Get a list of object property names. Returns:List of property names.
 
- 
    getLogo(){string|olx.LogoOptions|undefined} inheritedsrc/ol/source/source.js, line 114
- 
    
    Get the logo of the source. Returns:Logo.
 
- 
    getProjection(){ol.proj.Projection} inherited experimentalsrc/ol/source/source.js, line 124
- 
    
    Get the projection of the source. Returns:Projection.
 
- 
    getProperties(){Object.<string, *>} inheritedsrc/ol/object.js, line 174
- 
    
    Get an object of all property names and values. Returns:Object.
 
- 
    getRevision(){number} inherited experimentalsrc/ol/observable.js, line 70
- 
    
    Get the version number for this object. Each time the object is modified, its version number will be incremented. Returns:Revision.
 
- 
    getState(){ol.source.State} inherited experimentalsrc/ol/source/source.js, line 140
- 
    
    Get the state of the source, see ol.source.Statefor possible states.Returns:State.
 
- 
    on(type, listener, opt_this){goog.events.Key} inheritedsrc/ol/observable.js, line 83
- 
    
    Listen for a certain type of event. Name Type Description typestring | Array.<string> The event type or array of event types. listenerfunction The listener function. thisObject The object to use as thisinlistener.Returns:Unique key for the listener.
 
- 
    once(type, listener, opt_this){goog.events.Key} inheritedsrc/ol/observable.js, line 96
- 
    
    Listen once for a certain type of event. Name Type Description typestring | Array.<string> The event type or array of event types. listenerfunction The listener function. thisObject The object to use as thisinlistener.Returns:Unique key for the listener.
 
- 
    removeFeature(feature) inheritedsrc/ol/source/vectorsource.js, line 803
- 
    
    Remove a single feature from the source. If you want to remove all features at once, use the source.clear()method instead.Name Type Description featureol.Feature Feature to remove. 
- 
    set(key, value) inheritedsrc/ol/object.js, line 203
- 
    
    Sets a value. Name Type Description keystring Key name. value* Value. 
- 
    setAttributions(attributions) inherited experimentalsrc/ol/source/source.js, line 158
- 
    
    Set the attributions of the source. Name Type Description attributionsArray.<ol.Attribution> Attributions. 
- 
    setProperties(values) inheritedsrc/ol/object.js, line 216
- 
    
    Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties). Name Type Description valuesObject.<string, *> Values. 
- 
    un(type, listener, opt_this) inheritedsrc/ol/observable.js, line 109
- 
    
    Unlisten for a certain type of event. Name Type Description typestring | Array.<string> The event type or array of event types. listenerfunction The listener function. thisObject The object which was used as thisby thelistener.
- 
    unByKey(key) inheritedsrc/ol/observable.js, line 122
- 
    
    Removes an event listener using the key returned by on()oronce(). Note that using theol.Observable.unByKeystatic function is to be preferred.Name Type Description keygoog.events.Key The key returned by on()oronce().
- 
    unset(key) inheritedsrc/ol/object.js, line 229
- 
    
    Unsets a property. Name Type Description keystring Key name. 
 OpenLayers 3
 OpenLayers 3