# Class WfsPermalinkService

#### Hierarchy

- WfsPermalinkService

- Defined in src/statemanager/WfsPermalink.js:118
- Defined in src/statemanager/WfsPermalink.js:333
- Defined in src/statemanager/WfsPermalink.js:343
- Defined in src/statemanager/WfsPermalink.js:355

#####
Index

### Constructors

constructor

### Properties

$http_
_gmfFitOptions
defaultFeatureNS_
defaultFeaturePrefix_
maxFeatures_
pointRecenterZoom_
result_
url_
wfsTypes_

### Methods

clear
clearResult_
createFilters_
getExtent_
issue
issueRequest_
and_
joinFilters_
or_

## Constructors

### constructor

- new WfsPermalinkService($http: IHttpService, ngeoPermalinkOgcserverUrl: string, ngeoQueryResult: QueryResult, ngeoWfsPermalinkOptions: ngeoWfsPermalinkOptions, gmfFitOptions: gmfFitOptions): WfsPermalinkService

- WFS permalink service that can be used to load features with a WFS GetFeature request given query parameters.

  Resulting features are then highlighted and the map is zoomed to the nearest map extent.

  Configuration:

  ngeoWfsPermalinkOptions: wfsTypes: - featureType: <featureType> label: <attribute used as label> - ...

  Parameters:

  - `wfs_layer` tells what layer will be queried
  - `wfs_showFeatures` (boolean) tells if the features should be highlighted and listed (when true) or if the map should only be recentered on the features (when false). Default is true.
  - other parameters will be considered as WFS attribute/values filters and must be of the form: `wfs_<layer attribute name>=<a comma-separated list of values>`

  Example: http://example.com?wfs_layer=parcels&wfs_city=Oslo&wfs_number=12,34,56 will load parcels #12, 34 and 56 of the city of Oslo.

  It is possible to define several groups of filtering parameters by:

  - adding a `wfs_ngroups` parameter telling how many groups are defined
  - prefixing all filtering parameters by the number of each group, starting at 0. For instance `wfs_0_<layer attribute name>`

  Example: http://example.com?wfs_layer=parcels&wfs_ngroups=2&wfs_0_city=Oslo&wfs_0_number=12,34,56&wfs_1_city=Paris&wfs_1_number=78,90 will load parcels #12, 34 and 56 of the city of Oslo as well as parcels #78 and 90 of the city of Paris.

  ### Ngdoc

  service

  ### Ngname

  ngeoWfsPermalink

  ### Ng Inject

  #### Parameters

  - ##### $http: IHttpService

    Angular $http service.

  - ##### ngeoPermalinkOgcserverUrl: string

    URL to the WFS server

  - ##### ngeoQueryResult: QueryResult

    The ngeo query result service.

  - ##### ngeoWfsPermalinkOptions: ngeoWfsPermalinkOptions

    The options to configure the ngeo wfs permalink service with.

  - ##### gmfFitOptions: gmfFitOptions

    The fit options.

  #### Returns WfsPermalinkService

  - Defined in src/statemanager/WfsPermalink.js:118

## Properties

### $http_

$http_: IHttpService

- Defined in src/statemanager/WfsPermalink.js:167

### _gmfFitOptions

_gmfFitOptions: gmfFitOptions

- Defined in src/statemanager/WfsPermalink.js:137

### defaultFeatureNS_

defaultFeatureNS_: string

- Defined in src/statemanager/WfsPermalink.js:152

### defaultFeaturePrefix_

defaultFeaturePrefix_: string

- Defined in src/statemanager/WfsPermalink.js:157

### maxFeatures_

maxFeatures_: number

- Defined in src/statemanager/WfsPermalink.js:135

### pointRecenterZoom_

pointRecenterZoom_: number

- Defined in src/statemanager/WfsPermalink.js:162

### result_

result_: QueryResult

- Defined in src/statemanager/WfsPermalink.js:172

### url_

url_: string

- Defined in src/statemanager/WfsPermalink.js:130

### wfsTypes_

wfsTypes_: Object

- Defined in src/statemanager/WfsPermalink.js:142

## Methods

### clear

- clear(): void

- Clear the results.

  #### Returns void

  - Defined in src/statemanager/WfsPermalink.js:178

### clearResult_

- clearResult_(): void

- Clear every features for all result sources and reset the total counter as well.

  #### Returns void

  - Defined in src/statemanager/WfsPermalink.js:370

### createFilters_

- createFilters_(filterGroups: WfsPermalinkFilterGroup[]): Filter

- Create OGC filters for the filter groups extracted from the query params.

  ### Returns

  OGC filters.

  #### Parameters

  - ##### filterGroups: WfsPermalinkFilterGroup[]

    Filter groups.

  #### Returns Filter

  - Defined in src/statemanager/WfsPermalink.js:299

### getExtent_

- getExtent_(features: FeatureLike[]): Extent

- ### Returns

  The extent of all features.

  #### Parameters

  - ##### features: FeatureLike[]

    Features.

  #### Returns Extent

  - Defined in src/statemanager/WfsPermalink.js:278

### issue

- issue(queryData: WfsPermalinkData, map: Map, zoomLevel??: number): void

- Build a WFS GetFeature request for the given query parameter data, send the request and add the received features to QueryResult.

  #### Parameters

  - ##### queryData: WfsPermalinkData

    Query data for the WFS request.

  - ##### map: Map

    The ol3 map object to get the current projection from.

  - ##### `Optional` zoomLevel: number = undefined

    The level to zoom on when recentering on features.

  #### Returns void

  - Defined in src/statemanager/WfsPermalink.js:190

### issueRequest_

- issueRequest_(wfsType: WfsType, filter: Filter, map: Map, showFeatures: boolean, zoomLevel??: number): void

- #### Parameters

  - ##### wfsType: WfsType

    Type.

  - ##### filter: Filter

    Filter.

  - ##### map: Map

    The ol3 map object to get the current projection from.

  - ##### showFeatures: boolean

    Show features or only zoom to feature extent?

  - ##### `Optional` zoomLevel: number = undefined

    The level to zoom on when recentering on features.

  #### Returns void

  - Defined in src/statemanager/WfsPermalink.js:218

### `Static` and_

- and_(filters: Filter[]): Filter

- Join a list of filters with `and(...)`.

  ### Returns

  The joined filters.

  #### Parameters

  - ##### filters: Filter[]

    The filters to join.

  #### Returns Filter

  - Defined in src/statemanager/WfsPermalink.js:333

### `Static` joinFilters_

- joinFilters_(filters: Filter[], joinFn: ((arg0: Filter, arg1: Filter) => Filter)): Filter

- Join a list of filters with a given join function.

  ### Returns

  The joined filters.

  #### Parameters

  - ##### filters: Filter[]

    The filters to join.

  - ##### joinFn: ((arg0: Filter, arg1: Filter) => Filter)

    The function to join two filters.

    - - (arg0: Filter, arg1: Filter): Filter

      - #### Parameters

        - ##### arg0: Filter

        - ##### arg1: Filter

        #### Returns Filter

  - Defined in src/statemanager/WfsPermalink.js:355

### `Static` or_

- or_(filters: Filter[]): Filter

- Join a list of filters with `or(...)`.

  ### Returns

  The joined filters.

  #### Parameters

  - ##### filters: Filter[]

    The filters to join.

  #### Returns Filter

  - Defined in src/statemanager/WfsPermalink.js:343

Generated using TypeDoc