cfclient.geolocation.setOptions

Setting Geolocation options

You can set the Geolocation options using the setOptions() function.

Method summary

setOptions(options)

  • returns – None
  • params
    •  An object representing the Geolocations options

For instance,

<cfset opt. enableHighAccuracy=false>
<cfset opt. maximumAge=2000>
<cfset opt. timeOut=4000>
<cfset cfclient.geolocation.setOptions(opt)>


Geolocation Options structure

The Geolocation Options object contains the following parameters:

  • enableHighAccuracy(Boolean) - By default, the device attempts to retrieve a position using the network-based methods. Setting this property to true enables ColdFusion to use more accurate methods, such as satellite positioning.
  • timeOut (Number) – The maximum time length (milliseconds) that is allowed to pass from the call to getCurrentPosition or watchPosition until the corresponding geolocationSuccess callback gets executed.
  • maximumAge (Number) - Accept a cached position whose age is no greater than the specified time in milliseconds.

Example

See Using the Geolocation APIs

Get help faster and easier

New user?