Class: VisibleVectorModel

Searchbar.VisibleVector VisibleVectorModel

VisibleVectorModel

new VisibleVectorModel(config){void}

modules/searchbar/visibleVector/model.js, line 30
Initialisierung der visibleVector Suche
Name Type Description
config Object Config JSON for Searchbar in visible vector layers
Name Type Default Description
minChars integer 3 optional minimum character count to initialize a seach
Properties:
Name Type Default Description
inUse Boolean false todo
minChars Number 3 todo
layerTypes Array.<String> ["WFS" todo
gfiOnClick Boolean false todo
Fires:
Listens to Events:

Extends

Methods

filterFeaturesArrayRec(aFeatures, sSearchField, sSearchString){array}

modules/searchbar/visibleVector/model.js, line 133
Filters (clustered) features according to given search string.
Name Type Description
aFeatures array Array of features to filter
sSearchField string Feature field key to look for value
sSearchString string Given string to search inside features
Returns:
of features containing searched string

filterVisibleGroupLayer(visibleGroupLayers, layerTypes){Array}

modules/searchbar/visibleVector/model.js, line 89
Filters the allowed layers from the visible group layers.
Name Type Description
visibleGroupLayers Array visible group layers freom modelList
layerTypes Array.<String> possible layer types
Returns:
layers

findMatchingFeatures(models, searchString){array}

modules/searchbar/visibleVector/model.js, line 173
Filters features of all models according to given search string. Searched Fields are defined in config.
Name Type Description
models array Array of models to pick features from
searchString string Given string to search inside features
Returns:
of features containing searched string

getAdditionalInfo(model, feature){mixed}

modules/searchbar/visibleVector/model.js, line 314
Get additional feature info.
Name Type Description
model object model to get feature from
feature object feature to get info from
Returns:
additional info

getCenterFromExtent(extent){Array.<Number>}

modules/searchbar/visibleVector/model.js, line 254
Creates the center coordinate from a given extent.
Name Type Description
extent Array.<Number> extent
Returns:
coordinate

getCentroidPoint(geometry){ol.Coordinate}

modules/searchbar/visibleVector/model.js, line 235
Gets centroid point for a openlayers geometry.
Name Type Description
geometry ol.geom.Geometry geometry to get centroid from
Returns:
coordinate

getFeatureObject(searchField, filteredFeatures, model){array}

modules/searchbar/visibleVector/model.js, line 201
Gets a new feature object.
Name Type Description
searchField string Attribute feature has to be searche through
filteredFeatures ol.Feature openlayers feature
model Backbone.Model model of visibleVector
Returns:
with feature objects

getGfiOnClick(){boolean}

modules/searchbar/visibleVector/model.js, line 363
Getter for gfiOnClick property

getImageSource(feature, model){String|undefined}

modules/searchbar/visibleVector/model.js, line 269
Returns an image source of a feature style.
Name Type Description
feature ol.Feature openlayers feature
model Backbone.Model model to get layer to get style from

getImageSourceFromStyle(layerStyle){undefined|String}

modules/searchbar/visibleVector/model.js, line 296
Checks if style is an image and then returns its image source.
Name Type Description
layerStyle Style Style of layer.
Returns:
Image source of image style.

getLayerTypes(){mixed}

modules/searchbar/visibleVector/model.js, line 346
Getter for layerTypes property

getWithClusterFallback(oFeature, sProperty){mixed}

modules/searchbar/visibleVector/model.js, line 119
Same as Feature.get() but if Feature is actually a cluster, it returns the value of the first child feature found.
Name Type Description
oFeature object The feature object to read the value from
sProperty string Property Key
Returns:
feature property value

isClusteredFeature(oFeature){boolean}

modules/searchbar/visibleVector/model.js, line 108
Checks if given feature is actually a clustered feature with content
Name Type Description
oFeature object Feature to test as cluster
Returns:
if feature is a cluster

prepSearch(searchString){void}

modules/searchbar/visibleVector/model.js, line 53
description
Name Type Description
searchString string String to search for in properties of all model's features
Fires:

setGfiOnClick(value){void}

modules/searchbar/visibleVector/model.js, line 355
Setter for gfiOnClick property
Name Type Description
value boolean todo

setInUse(value){void}

modules/searchbar/visibleVector/model.js, line 372
Setter for inUse property
Name Type Description
value boolean todo

setLayerTypes(value){void}

modules/searchbar/visibleVector/model.js, line 338
Setter for layerTypes property
Name Type Description
value mixed todo

setMinChars(value){void}

modules/searchbar/visibleVector/model.js, line 329
Setter for minChars property
Name Type Description
value mixed todo