Angular service

SessionsService source

Description

Access to spatial-hub sessions

Methods

current -> SessionState

Retrieve the current session state

Example

Output:
 {TODO: example}

Returns

TypeDescription
SessionState

delete (session) -> Promise

Delete a saved session. Must be the same user or ADMIN

Parameters

NameTypeDescription
session string

id

Returns

TypeDescription
Promise

get (session) -> Promise(SessionState)

Retrieve saved session state

Parameters

NameTypeDescription
session string

id

Returns

TypeDescription
Promise(SessionState)

saved session state

list -> Promise(List(SessionState))

Retrieve saved sessions for the logged in user

Example

Output:
 {TODO: example}

Returns

TypeDescription
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

NameTypeDescription
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

NameTypeDescription
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