This joins/bundles a given set of (typically WMS GetFeatureInfo) requests by the base URL. E.g. it merges the following two requests:
https://maps.bvb.de?SERVICE=WMS&REQUEST=GetFeatureInfo&LAYERS=Shinji https://maps.bvb.de?SERVICE=WMS&REQUEST=GetFeatureInfo&LAYERS=Kagawa
to
https://maps.bvb.de?SERVICE=WMS&REQUEST=GetFeatureInfo&LAYERS=Shinji,Kagawa
An array of requests to bundle.
Whether to stringify the output or not. If set to false an object keyed by the base URL and valued by the combined requests params will be returned.
An array of query params to bundle, default is to ['LAYERS', 'QUERY_LAYERS', 'STYLES'].
Creates a valid GetCapabilitiesRequest out of the given URL by checking if SERVICE, REQUEST and VERSION are set.
The URL to validate.
The service to set. Default is to 'WMS'.
The version to set. Default is to '1.3.0'.
The validated URL.
Returns the base path of an URL.
The URL to obtain the base path from.
The base path.
Returns the value of the given query param of the provided URL. If not found, undefined will be returned.
The URL to get the query params from.
The key to get the value from.
The query param value.
Returns the query params of a given URL as object.
The URL to get the query params from.
The query params of the given URL.
Checks if a given URL has the provided query parameter present.
The URL to check.
The query parameter to check.
Whether the parameter is present or not.
Checks if a given URL is valid. Implementation based on https://www.npmjs.com/package/validator.
The URL to validate.
The validation validator
options.
Whether the URL is valid or not.
Joins some query parameters (defined by keys
) of two query objects and
returns the joined query parameters.
var params1 = {FOO: 'foo,bar', BAZ: 'baz', HUMPTY: '1'};
var params2 = {FOO: 'pupe,pape', BAZ: 'baz', DUMPTY: '42'};
var keys = ['FOO'];
var joined = this.joinQueryParams(params1, params2, keys);
// joined is now
// {FOO: 'foo,bar,pupe,pape', BAZ: 'baz', HUMPTY: '1'};
The first object with parameters, where certain
keys might have values that are joined with ,
.
The second object with parameters, where certain
keys might have values that are joined with ,
.
The keys which we will consider for joining. Others will be taken from the first object with parameters.
The joined query parameters.
Transforms an object into a string containing requestParams (without leading questionmark).
An object containing kvp for the request. e.g. {height:400, width:200}
The kvps as a requestString. e.g. 'height=400&width=200'
Returns an object representation of an URL.
The URL to read in.
The parsed URL object.
Returns a string representation of an URL object.
The URL object to write out.
The stringified URL.
Generated using TypeDoc
Helper Class for the URL handling.