Class

WebLocation


Description

The device location provided by the browser.

Methods

Name

Parameters

Returns

Shared

Request

highAccuracy As Boolean

Start

highAccuracy As Boolean

Stop

Events

Name

Parameters

Returns

Closed

Error

error As RuntimeException

LocationChanged

latitude As Double, longitude As Double, accuracy As Double, altitude As Double, altitudeAccuracy As Double, course As Double, speed As Double

Opening

Method descriptions


WebLocation.Request

Request(highAccuracy As Boolean)

Requests the user's location a single time. Setting highAccuracy to True uses more power on mobile devices.


WebLocation.Start

Start(highAccuracy As Boolean)

Starts monitoring the user's location. Setting highAccuracy to True uses more power on mobile devices.

Only start monitoring the device location when you really need the information especially on mobile devices as monitoring uses a lot of power.


WebLocation.Stop

Stop

Stops monitoring the user's location.

Call this method as soon as you no longer need to monitor the device location especially on mobile devices as monitoring uses a lot of power.

Event descriptions


WebLocation.Closed

Closed

The control has been removed from the browser either because the page has closed or the control's Close method was called.


WebLocation.Error

Error(error As RuntimeException)

Called when an error occurs when calling the Start or Request methods.

This event will be called if the browser does not support geolocation or you attempt to use it over a regular HTTP connection.


WebLocation.LocationChanged

LocationChanged(latitude As Double, longitude As Double, accuracy As Double, altitude As Double, altitudeAccuracy As Double, course As Double, speed As Double)

Called when the device location information is received from the browser.


WebLocation.Opening

Opening

The control has been created and the page is opening but has not been sent to the browser yet.

The Opening event handler can be used to initialize non-visual properties and settings for controls.

In most cases, you should use the Shown event to initialize controls.

Notes

WebLocation works only over HTTPS connections.

Compatibility

Web projects on all supported operating systems.