Angular service
SessionsService source
Description
Access to spatial-hub sessions
Methods
-
current -> SessionState
-
Retrieve the current session state
Example
Output: {TODO: example}Returns
Type Description SessionState
-
delete (session) -> Promise
-
Delete a saved session. Must be the same user or ADMIN
Parameters
Name Type Description session string id
Returns
Type Description Promise
-
get (session) -> Promise(SessionState)
-
Retrieve saved session state
Parameters
Name Type Description session string id
Returns
Type Description Promise(SessionState) saved session state
-
list -> Promise(List(SessionState))
-
Retrieve saved sessions for the logged in user
Example
Output: {TODO: example}Returns
Type Description Promise(List(SessionState)) list of sessions
-
load (session)
-
Load a saved session. This adds layers, changes the basemap and sets the zoom/extents of the current session.
Note: map layers are not removed.
Parameters
Name Type Description session string id
-
save
-
UI prompt to name and save the current session
-
saveAndLogin (session, (optional), true, TODO:)
-
Do temporary save session and redirect so that a login is prompted and the session is not lost
Parameters
Name Type Description session SessionState data
(optional) string login template to use instead of the default login URL
true boolean to encode the return URL
TODO: boolean login not required