×
A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2012.821 | Released: 23 May 2012, 2:01am | What's New | Download Now

system.setLocationAccuracy()

Description:

Sets the desired accuracy of location (GPS) events to distance in meters. Note: the actual accuracy depends on the capabilities of the device and/or platform. On the iPhone, accuracy is limited to discrete distances: <10, 10, 100, 1000, and 3000 meters. Higher accuracy (smaller distances) requires more battery life, so use larger distance to preserve battery life.

Related Items:

Location Events

Syntax:

1
system.setLocationAccuracy( distance )

Example:

system.setLocationAccuracy( 10 )  -- set GPS accuracy to 10 meters

Parameters:

frequency

Location accuracy in meters.

Returns:

Nothing.

Remarks:
Supported on operating systems and platforms for build numbers shown:
  • Mac OS X:
    Corona SDK 1.0
  • Windows:
    Corona SDK 2.0
  • iOS:
    Corona SDK 1.0
  • Android:
    Corona SDK 2.0

Replies

iwoof@yahoo.com's picture
iwoof@yahoo.com
User offline. Last seen 1 day 13 hours ago. Offline
Joined: 21 Jan 2011

Parameters: description is incorrect.

It should be:

1
2
Parameters:
   distance

Not frequency as it is currently shown.

--Woof!