GraffitiGeolocation

View Categories

Enumerations #

This class exposes no enumerations.

Constants #

This object exposes no constants.

Events #

NameParametersReturn TypeDescription
DataAvailableNoneNoneRaised when new data has arrived.
StateChangedNoneNoneRaised when the authorization status of the user’s browser has changed. If the user has authorized access, the Supported property’s value will be True.

Methods #

NameParametersReturn TypeDescription
RequestLocationNoneNonePerforms a single location request.
StartNoneNoneSignals the user’s browser to periodically send a location update.
StopNoneNoneSignals the user’s browser to no longer send periodic location updates.

Properties #

NameTypeDefault ValueDescription
ActiveBooleanFalseWill be True when the user’s browser is sending periodic updates after the Start method has been called.
AllowedBooleanFalseWhen False, the user has either disabled Location Services, blocked location sharing for the browser, or denied access to the page when prompted.
PositionGraffitiGeolocationPositionNilThe user’s current location.
SupportedBooleanFalseWhen True, the user’s browser both supports and has allowed access to the geolocation JavaScript API.

Notes #

Proper Functioning and Permissions #

In order for GraffitiGeolocation to function correctly in many cases, your web applications must be served with SSL enabled (via HTTPS) with a valid certificate. You should always wait for the StateChanged event to be raised in order to determine if the user’s browser is Supported and they Allowed location services. Location services may be disabled system-wide by your user, for the browser, or for the site. In those instances, the value of the Allowed property will be False.