Angular service

Core source

Description

Core service of HSL and Core module, keeps important app-level settings.

Members

NameTypeDescription
current_panel_queryable
sidebarExpanded


Methods

closePanel (which)

Close selected panel (either unpinned panels or actual mainpanel). If default panel is defined, it is opened instead.

Parameters

NameTypeDescription
which Object

Panel to close (panel scope)

exists (controllerName) -> Boolean

Test if selected panel controller is defined in application.

Parameters

NameTypeDescription
controllerName String

Controler to test (angular name of controller)

Returns

TypeDescription
Boolean

Controller existence

fullScreenMap

Helper function for single page HS map applications. Not reccomended, used only for compability reasons and might be removed.

getCurrentLanguagePrefix

Get code of current language

getCurrentLanguagePrefix

Get code of current language

hidePanels

Close opened panel programmaticaly. If sidebar toolbar is used in app, sidebar stay expanded with sidebar labels. Cannot resolve unpinned panels.

init

Initialization function for HS layers elements and their sizes. Stores element and container references and sets event listeners for map resizing.

initSizeListeners

Add event listeners for updating HS element and map size after browser resizing or complete load of application.

isAuthorized -> Boolean

Do authorization check of User, currently authorization is possible only in connection with Lifearray app

Returns

TypeDescription
Boolean

Check result - true for authorized user

isMobile -> String

Test if screen of used device is mobile type (current breakdown is screen width 800px)

Returns

TypeDescription
String

Returns "mobile" or ""

listAvailableLanguages

Get array of available languages based on translations.js or translations_extended.js files which have gettextCatalog services in them

openStatusCreator

Open status creator panel

panelEnabled (which, status) -> Boolean

Get or set panel visibility in sidebar. When panel is disabled it means that it's not displayed in sidebar (it can be opened programmaticaly) but it's functionality is running. Use with status parameter as setter.

Parameters

NameTypeDescription
which String

Selected panel (panel name)

status Boolean

Visibility status of panel to set

Returns

TypeDescription
Boolean

Panel enabled/disabled status for getter function

panelVisible (which, scope) -> Boolean

Find if selected panel is currently opened (in sidebar or as unpinned window)

Parameters

NameTypeDescription
which String

Name of panel to test

scope $scope

Angular scope of panels controller (optional, needed for test of unpinned panels)

Returns

TypeDescription
Boolean

Panel opened/closed status

resetMap

Do complete reset of map (view, layers) according to app config

searchVisible (is) -> Boolean

DEPRECATED?

Parameters

NameTypeDescription
is booelan

New status of search panel

Returns

TypeDescription
Boolean

Current status of Search panel

setDefaultPanel (which)

Sets new default panel (Panel which is opened first and which displayed if previous active panel is closed)

Parameters

NameTypeDescription
which String

New panel to be default (specify panel name)

setLanguage (lang)

Set current active language for translating. (Currently cs and nl options supported).

Parameters

NameTypeDescription
lang String

Language to select

setMainPanel (which, by_gui, queryable)

Sets new main panel (Panel displayed in expanded sidebar). Change GUI and queryable status of map (when queryable and with hs.query component in app, map does info query on map click).

Parameters

NameTypeDescription
which String

New panel to activate (panel name)

by_gui Boolean

Whether function call came as result of GUI action

queryable Boolean

If map should be queryable with new mainpanel. When parameter ommited, map enable queries.

setSizeByContainer

Change container for HS element.

setSizeByContainer

Change HS element size programmatically (currently accept only integer value of pixels).

updateElementSize

Update HS element size by its container sizes.

updateMapSize

Update map size.