Mashup Builder > Widgets > Geotag Widget
Geotag Widget
The Geotag has three modes:
Stealth Tracking — Continually (see note below) obtains a location without visual representation on the screen.
Controlled Tracking — Capable of continually (see note below) obtaining a location, but has a visual control by which to turn on or off this capability. By default when the control is visible, tracking is disabled. The user must turn it on to commence tracking.
Static Grab — Upon mashup initialization, the location is obtained once and never again unless the entire mashup is reloaded. There is no visual representation on the screen in this mode.
* 
“Continually” is determined by the device. For example, the rate at which a stationary laptop will track your position is much slower than a handheld GPS-enabled smart phone.
* 
Styles and common widget properties are not included in the table below.
Property Name
Description
Base Type
Default Value
Bindable? (Y/N)
Localizable? (Y/N)
TrackLocation
Widget will track the movement of your location. Without ShowControls, the widget will continuously track as long as the mashup is live. Displaying the controls allows you to turn on/off the tracking. Binding to this informs other widgets of location tracking.
BOOLEAN
n/a
Y
N
EnableHighAccuracy
Devices such as smart phones have the ability to use their GPS capabilities. Enabling high accuracy uses the GPS capabilities over just the network abilities. Enabling high accuracy can impact the performance and is also governed by device permissions.
BOOLEAN
True
Y
N
MinimumUpdateFrequency
The minimum time in seconds in between widget attempts to update the location value.
NUMBER
5
N
N
Timeout
The time in seconds the widget is willing to wait for a location.
NUMBER
T
T
MaximumCacheAge
The time in seconds a cached location lives. Subsequent location calls within the MaximumCacheAge will return the cached location value.
NUMBER
0
N
N
CurrentLocation
The current location - Longitude, Latitude, Elevation, and Units - in WGS84.
LOCATION
n/a
Y
N
DateTime
The date & time the current location was detected or error returned.
DATETIME
n/a
Y
N
ShowDataLoading
Shows data while loading.
BOOLEAN
True
N
N
Heading
The compass heading (degrees clockwise from true north) when the current location was detected. Only relevant when TrackLocation is true.
NUMBER
n/a
Y
N
Speed
The speed (meters/second) you are traveling when the current location was detected. Only relevant when TrackLocation is true.
NUMBER
n/a
Y
N
ShowControls
If tracking your location, you can display a runtime control to start/stop the tracking.
BOOLEAN
False
N
N
LocationAccuracy
The accuracy (measured in meters) of your location.
NUMBER
n/a
Y
N
ErrorMessage
The error message returned if obtaining the location fails.
STRING
n/a
Y
N
ErrorCode
The error code returned if obtaining the location fails.
NUMBER
n/a
Y
N
ShowDataLoading
Allows the loading data to be visible.
BOOLEAN
True
N
N
Changed
Event. When a location is successfully obtained, the Changed event is triggered. This event can be used to execute services such as AddStreamEntry to record the updated CurrentLocation.
n/a
n/a
Y
N
Visible
Is the widget visible in runtime?
BOOLEAN
True
N
N
Exceptions
If the Geotag fails to obtain a location, an error is thrown. (A location failure does not trigger the Changed event.) The error is broken into two bindable parts:
ErrorCode — A number from 0 - 3.
ErrorMessage — Corresponds to the ErrorCode in the following way:
'Permission denied' == 1 : Typically returned when the end user chooses not to share their location.
'Position unavailable' == 2 : Network failure of some kind.
'Timeout' == 3 : Location attainment via the network doesn't occur within the time (in seconds) specified via the Timeout property.
'Unknown error' == 0
In addition to the ErrorMessage and ErrorCode, the DateTime property is updated with the time at which the error occurred.
* 
If the Geotag is configured to TrackLocation, and ShowControls is turned on, the exception control will display in the UI. You can click the control to try and obtain your location again.