Geoportal Extension for OpenLayers API Reference

Module: Utils

Gp.olUtils

...

Example

detectSupport();
assign();
mergeParams();

Methods

innerassign(dest, source){Object}

Common/Utils.js, line 46

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}

Common/Utils.js, line 14

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)

Common/Utils.js, line 64

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)