Methods
-
module:ol/featureloader.xhr(url, format){module:ol/featureloader~FeatureLoader}
featureloader.js, line 117 -
Create an XHR feature loader for a
urlandformat. The feature loader loads features (with XHR), parses the features, and adds them to the vector source.Name Type Description urlstring | module:ol/featureloader~FeatureUrlFunction Feature URL service.
formatmodule:ol/format/Feature~FeatureFormat Feature format.
Returns:
The feature loader.
Type Definitions
-
module:ol/source/Vectorsources use a function of this type to load features.This function takes an
module:ol/extent~Extentrepresenting the area to be loaded, a{number}representing the resolution (map units per pixel) and anmodule:ol/proj/Projectionfor the projection as arguments.thiswithin the function is bound to themodule:ol/source/Vectorit's called from.The function is responsible for loading the features and adding them to the source.
-
module:ol/source/Vectorsources use a function of this type to get the url to load features from.This function takes an
module:ol/extent~Extentrepresenting the area to be loaded, a{number}representing the resolution (map units per pixel) and anmodule:ol/proj/Projectionfor the projection as arguments and returns a{string}representing the URL.