new Vector( [opt_options])
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
opt_options |
Mapspace.nvdb.source.VectorOptions |
<optional> |
Options. |
- Source:
- mapspace-nvdb/source/vector.js
Extends
Methods
-
clear( [opt_fast])
-
Remove all features from the source.
Parameters:
Name Type Argument Description opt_fastboolean <optional>
Skip dispatching events.
- Inherited From:
- Source:
- mapspace/source/servervector.js
-
clearExtent(extent)
-
Remove all extents cached that overlap the given extent. This is useful to allow for a later reloading of features in the given extent. If this function is not called it is not guaranteed that loading of features is done because it depends on the extents cached.
Parameters:
Name Type Description extentMapspace.Extent Extent.
- Inherited From:
- Source:
- mapspace/source/servervector.js
-
clearExtents()
-
Remove all extents cached. This is useful when it is wanted to force a new request no matter what previous extents have been done. For example, in 3D viewers.
- Inherited From:
- Source:
- mapspace/source/servervector.js
-
createReprojected(projection)
-
Returns a Promise that creates a new
Mapspace.source.Vectorbut with the features reprojected to a new projection.Parameters:
Name Type Description projectionstring | Mapspace.ProjectionInfo Projection for the resulting features.
- Inherited From:
- Source:
- mapspace/source/servervector.js
Returns:
A Promise that returns a
Mapspace.source.Vectorfor the resolve function and an Error for the reject function.- Type
- Promise
-
getFeatureType(viewType, resolution)
-
Gets the best feature type to show for the given resolution.
Parameters:
Name Type Argument Description viewTypeMapspace.ViewType The type of viewer.
resolutionnumber <nullable>
Optional resolution. If no resolution is provided then the last feature type in the list returned by
getFeatureTypesForResolutionsis used.- Inherited From:
- Source:
- mapspace/source/servervector.js
Returns:
- Type
- string
-
getFeatureTypesForResolutions(viewType)
-
Gets the array of objects that define the feature types for different resolutions.
Parameters:
Name Type Description viewTypeMapspace.ViewType The type of viewer.
- Inherited From:
- Source:
- mapspace/source/servervector.js
Returns:
- Type
- Array.<Mapspace.FeatureTypeResolution> | undefined
-
getLoadingStrategy(viewType)
-
Gets the function that determines the strategy to load features.
A function that takes an
ol.Extentand a resolution as arguments, and returns an array ofol.Extentwith the extents to load. Usually this is one of the standardol.loadingstrategystrategies.Parameters:
Name Type Description viewTypeMapspace.ViewType The type of viewer.
- Inherited From:
- Source:
- mapspace/source/servervector.js
Returns:
- Type
- ol.LoadingStrategy | undefined
-
getServices()
-
Returns the reference to the
Mapspace.nvdb.Servicesobject that uses this source to make requests to the NVDB services.- Source:
- mapspace-nvdb/source/vector.js
Returns:
The services object.
-
loadAllFeatures(extent, projection, callback)
-
This is a method to load features that is only useful when this source is in a layer inside a
Mapspace.oblique.ViewerorMapspace.street.Viewerso we can load all the needed features just in one call.Parameters:
Name Type Description extentol.Extent Extent.
projectionol.proj.Projection Projection of the extent.
callbackfunction Function to call each time new features are loaded.
- Overrides:
- Source:
- mapspace-nvdb/source/vector.js
-
loadFeatures(extent, resolution, projection, featureType, strategy, callback)
-
This is a overriden of the
ol.source.Vector#loadFeaturesmethod.The feature type here is ignored.
A callback is provided so when loading ends some extra actions can be taken, specially in viewers of type
Mapspace.threed.Viewer.Parameters:
Name Type Description extentol.Extent Extent.
resolutionnumber Resolution.
projectionol.proj.Projection Projection of the extent.
featureTypestring Feature type to use.
strategyol.LoadingStrategy Loading strategy to use.
callbackfunction | undefined Optional function to call each time new features are loaded.
- Overrides:
- Source:
- mapspace-nvdb/source/vector.js
-
notifyFeaturesChanged()
-
Triggers a FEATURESCHANGED event.
- Inherited From:
- Source:
- mapspace/source/servervector.js
-
resolutionToFeatureType(viewType, resolution)
-
Return the correct feature type name for a given resolution or null if feature types are not defined.
Parameters:
Name Type Description viewTypeMapspace.ViewType The type of viewer.
resolutionnumber Resolution.
- Inherited From:
- Source:
- mapspace/source/servervector.js
Returns:
Feature type name or null.
- Type
- string
-
setFeatureTypesForResolutions(viewTypes, value)
-
Sets the array of objects that define the feature types for different resolutions.
Parameters:
Name Type Description viewTypesMapspace.ViewType | Array.<Mapspace.ViewType> The types of viewer.
valueArray.<Mapspace.FeatureTypeResolution> | undefined - Inherited From:
- Source:
- mapspace/source/servervector.js
-
setFilter(filter, callback)
-
Sets the array of conditions for filtering features. As this is a time consuming operation, new filter should be compared with current to call only when the filter has changed. This function should not be called, and call
Mapspace.layer.Vector#setFilterinstead, that calls this function and also stores the filter.Parameters:
Name Type Argument Description filterMapspace.Filter The array of conditions that features must follow to be downloaded (if source is a
Mapspace.layer.ServerVector) and/or rendered.callbackfunction <nullable>
An optional function to be called when the apply of the filter has finished.
- Inherited From:
- Overrides:
- Source:
- mapspace/source/servervector.js
-
setLoadingStrategy(viewTypes, value)
-
Sets the function that determines the strategy to load features.
Parameters:
Name Type Description viewTypesMapspace.ViewType | Array.<Mapspace.ViewType> The types of viewer.
valueol.LoadingStrategy | undefined - Inherited From:
- Source:
- mapspace/source/servervector.js