URLAPI
The purpose of the URLAPI is two-fold:
1) to parse the page's search string, extract information like layers to be activated, the location, etc. and modify the map's state accordingly,
2) to read the map's state and generate a link that said layers to be activated, the location, etc.
Constructor Summary
Public Constructor | ||
public |
constructor(options: URLAPIOptions) |
Member Summary
Public Members | ||
public |
query_: * |
Private Members | ||
private |
In this object all initial values are stored. |
|
private |
|
|
private |
All getters by all parameters |
|
private |
All used keys by all parameters |
|
private |
|
Method Summary
Public Methods | ||
public |
addApiLayer(layer: VectorLayer, key: string) Adds an layer which should be controlled with the URLAPI |
|
public |
getCurrentParameters(): * |
|
public |
makeHTMLSnippet(options: object): string Create query string from map and optional name of config file |
|
public |
Create query string from map and optional name of config file |
Public Constructors
public constructor(options: URLAPIOptions) source
Params:
Name | Type | Attribute | Description |
options | URLAPIOptions |
Public Members
public query_: * source
Private Members
private initialValues_: object source
In this object all initial values are stored. This is needed to create only the needed Parameters for an URL. All getters are called once after the map is ready for the first time to fill this.
private parameters_: URLParameter[] source
Public Methods
public addApiLayer(layer: VectorLayer, key: string) source
Adds an layer which should be controlled with the URLAPI
Params:
Name | Type | Attribute | Description |
layer | VectorLayer | needs to have a {{QuerySource}} |
|
key | string | the key this layer should be controlled by |
public makeHTMLSnippet(options: object): string source
Create query string from map and optional name of config file