2022.1

Table Of Contents
Call cotgGeolocation([options]) on the new Geolocation element with any settings that you
want to be different from the defaults.
Example: $('#myGeolocation').cotgGeolocation({timeout: 6000});
How to change the default settings is explained in another topic: "Changing default settings for
widgets" on page640.
Option Description Type Default
enableHighAccuracy
By default, the device attempts to
retrieve a position using network-
based methods. Setting this
property to true tells the
framework to use more accurate
methods, such as satellite
positioning.
Boolean false
maximumAge Accept a cached position if it isn't
older than the specified time in
milliseconds.
Number 3000
timeout The maximum length of time
(milliseconds) that is allowed to
pass before the position is
retrieved.
Number 2700
Events
The Geolocation element listens for the following events.
Event Description
clear.cotg
Removes the Geolocation data.
restore-
state.cotg
Restores the state of the widget when the form is reopened in the COTG
app, after the app has restored previously entered values of static input
fields.
Page 659