OnLocationChanged Event

Fires when the geolocation changes.


    SiteKiosk.GeoLocation.OnLocationChanged = handler
    latitude Long value that contains the new latitude.
    longitude Long value that contains the new longitude.
    new_time Date value that contains the date the event was fired.
    In order to be able to use this event, you must have configured a location sensor in the Windows control panel under Location and Other Sensors.

    The object that caused the event can be referenced in the event function using "this".
    The following example shows the new location after it has changed.

    <SCRIPT TYPE="text/javascript">
    SiteKiosk.GeoLocation.OnLocationChanged = OnLocationChanged;
    function OnLocationChanged(latitude,longitude,new_time)
       var time = new Date();
       time.setTime((new_time - 25569) * 24 * 3600 * 1000);
       alert("New Location: " + latitude + " " +  longitude + " " + time);

Applies to
    SiteKiosk v9.0 (and later versions).

Back to top