BoxSymbol Clock.png
This is an archive.
See the new ClickWiki at https://clickwiki.github.io. This version is just an archive for the purposes of migrating content to the new structure.


Jump to: navigation, search

Location object

Icon Location object.png
Author Official extension or is supported by Clickteam.
Status Released
Release Date Unknown
Last Updated {{{LastUpdated}}}
Available for Multimedia Fusion 2 Standard Multimedia Fusion Developer 2 Clickteam Fusion 2.5 Free Edition Clickteam Fusion 2.5 Standard Clickteam Fusion 2.5 Developer
Supported Runtimes iOS Runtime Android Runtime HTML5 Runtime XNA Runtime (now deprecated) UWP Runtime
License Free
Attributes {{{Attributes}}}
Download
Includes Examples No
Includes Help Files Yes
Links
Downloadable via the Extension Manager
Included by default.
Alternates {{{Alternates}}}

The Location object allows you to retrieve the position of the device from the integrated GPS sensor. You can recover the latitude, longitude, altitude and other data from this object. Please note that the GPS device in any phone drains a lot of power. This is why you should restrain its use to crucial parts of your application. The GPS circuits are turned on at the beginning of a frame that includes the Location object, and turned off when the frame exits.

Properties

Accuracy

This property allows you to set the precision factor of the GPS device. It can have several values:

  • Best accuracy
  • Nearest ten meters
  • Hundred meter
  • Kilometer
  • Three kilometers

Distance

This property sets the minimal distance at which the device reports a new measure. You should keep this value to a reasonable amount to avoid multiple reports in short periods of time.

Conditions

Location services enabled

This condition returns true if the device on which the application runs has GPS services enabled.

A new location is available

This condition returns true as soon as the integrated GPS has returned a new location. Once you have this condition, you can get the values from the expressions of the location object.

Actions

Set distance filter

This action has the same effect than the distance property of the object. It allows you to set the minimal distance at which the object will return a new location.

Set accuracy

This action has the same effect than the property. It allows you to set the accuracy of the device. It accepts a number from 0 to 4:

  • 0 - Best accuracy
  • 1 - Nearest ten meters
  • 2 - Hundred meters
  • 3 - Kilometer
  • 4 - Three kilometers

Expressions

Coordinates

Latitude

Latitude( "Location object" )

Returns the current latitude of the device in the form of a floating point number.

Longitude

Longitude( "Location object" )

Returns the current longitude of the device in the form of a floating point number.

Altitude

Altitude( "Location object" )

Returns the current altitude of the device in meters above the sea level.

Other values

Course

Course( "Location object" )

This expression is only valid after the second measure of position. It returns the distance between the previous measure and the current measure, in meters.

Speed

Speed( "Location object" )

This expression is only valid after the second measure of position. It returns the speed of travel between the previous measure and the current measure, in meters per seconds.

Time since last update

TimeLast( "Location object" )

Returns, in milliseconds, the time elapsed since the previous update of the GPS position.

Distance filter

DistFilter( "Location object" )

Returns the current distance filter value.

Accuracy

Accuracy( "Location object" )

Returns the current accuracy value


Contributors to this page

Advaith (100.0%)