Class: ParseConfig

BKGWebMap. ParseConfig

Class to test if json config file exists and then parse it.

new ParseConfig()

Source:

Methods

createConfigLayers(map, defaultConfigLayers, userConfigLayers, setLayers, callback) → {function}

Parse layers configuration
Parameters:
Name Type Description
map object Map object
defaultConfigLayers object Default layers configuration
userConfigLayers object | array Layers configuration defined by user
setLayers boolean Boolean to check if setLayers() is used.
callback function Callback function
Source:
Returns:
Type
function

createConfigStyles(stylesArray, defineStyles) → {Object}

Parse styles
Parameters:
Name Type Description
stylesArray array Styles configuration defined by user
defineStyles boolean Boolean to check if defineStyles() is used
Source:
Returns:
Type
Object

createConfigTarget(div, setTarget) → {string}

Parse map target.
Parameters:
Name Type Description
div string ID of map div.
setTarget boolean Boolean to check if div ID is defined in setTarget()
Source:
Returns:
Type
string

createConfigView(defaultConfigView, userConfigView, setView) → {object}

Parse map view configuration.
Parameters:
Name Type Description
defaultConfigView object Default view configuration.
userConfigView object View configuration defined in setView().
setView boolean Boolean to check if setView() is used.
Source:
Returns:
Type
object

createControlPanel(map, controlsConfig, setControls, standardPositionControls) → {Object|boolean}

Create panel control
Parameters:
Name Type Description
map Object OpenLayers map
controlsConfig Object | null Controls configuration defined by user
setControls boolean Boolean to check if setControls() is used
standardPositionControls object Object with standardPositionControls
Source:
Returns:
Type
Object | boolean

createControls(map, controlsConfig, setControls, panel, standardPositionControls) → {Array}

Create controls
Parameters:
Name Type Description
map Object OpenLayers map
controlsConfig Object | null Controls configuration defined by user
setControls boolean Boolean to check if setControls() is used
panel Object | boolean Panel object
standardPositionControls object Object with standardPositionControls
Source:
Returns:
Type
Array

getSecurityOptions(securityConfig, setSecurity, callback) → {function}

Options for generating and using UUID for secure BKG services
Parameters:
Name Type Description
securityConfig Object Security parameters
setSecurity boolean If setSecurity() was used in code
callback function Callback function
Source:
Returns:
Type
function

LoadJSON(configFile, configUrlOrJson, callback) → {function}

Tests if config JSON exists in Server
Parameters:
Name Type Description
configFile boolean Find if the configuration will be loaded from a file
configUrlOrJson null | string | object URL of JSON configuration file or object with configuration
callback function Callback to use JSON
Source:
Returns:
Type
function