Geoportal Extension for OpenLayers
API Reference

Module: Helper

module:~utils/HelperUtils

...

Example

import HelperUtils from "gpf-ext-ol/utils/HelperUtils"
ou 
import {HelperUtils} from "gpf-ext-ol

HelperUtils.detectSupport();
HelperUtils.assign();
HelperUtils.mergeParams();

Methods

innerassign(dest, source){Object}

Utils/Helper.js, line 50

Copies all source object members to dest

Name Type Description
dest Object

destination object where properties and method will be copied

source Object

source object from which properties and method will be copied

innerdetectSupport(){Boolean}

Utils/Helper.js, line 18

this method is called by the constructor.
this information is useful to switch to touch mode.
Detection : test for desktop or tactile

Returns:
- true for desktop userAgent, false for mobile

innermergeParams(dest, source, replace)

Utils/Helper.js, line 68

Merge two objects parameters (deeper than assign)

Name Type Description
dest Object

destination object where properties and method will be merge

source Object

source object from which properties and method will be merge

replace Boolean

replace destination value by source if exists or not (true by default)