new Permalink( [options])
Parameters:
Name | Type | Argument | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
Extends
Methods
-
getInitialPosition()
-
Get the initial position passed by the url
-
getLayerByLink(the, an)
-
Get layer given a permalink name (permalink propertie in the layer)
Parameters:
Name Type Description the
string permalink to search for
an
Array.<ol.layer> | undefined array of layer to search in
Returns:
- Type
- ol.layer | false
-
getLink( [search])
-
Get the permalink
Parameters:
Name Type Argument Default Description search
boolean | string <optional>
false false: return full link | true: return the search string only | 'position': return position string
Returns:
- Type
- permalink
-
getUrlParam(key)
-
Get a parameter url.
Parameters:
Name Type Description key
string the key parameter
Returns:
the parameter's value or empty string if not set
- Type
- string
-
getUrlParams()
-
Get the parameters added to the url. The object can be changed to add new values.
Returns:
a key value object added to the url as &key=value
- Type
- Object
-
getUrlReplace()
-
Check if urlreplace is on
Returns:
- Type
- boolean
-
hasUrlParam(key)
-
Has a parameter url.
Parameters:
Name Type Description key
string the key parameter
Returns:
- Type
- boolean
-
setGeohash(b)
-
Set coordinates as geohash
Parameters:
Name Type Description b
boolean -
setMap(map)
-
Set the map instance the control associated with.
Parameters:
Name Type Description map
ol.Map The map instance.
-
setPosition( [force])
-
Set map position according to the current link
Parameters:
Name Type Argument Default Description force
boolean <optional>
false if true set the position even if urlReplace is disabled
-
setUrlParam(key, value)
-
Set a parameter to the url.
Parameters:
Name Type Description key
string the key parameter
value
string | undefined the parameter's value, if undefined or empty string remove the parameter
-
setUrlReplace(replace)
-
Enable / disable url replacement (replaceSate)
Parameters:
Name Type Description replace
bool