GeolocationProvider.SetOverridePosition Method

Definition

Sets an override position for the user's location. You can clear the override position by calling GeolocationProvider.ClearOverridePosition

Note

To call location-override APIs, an app must declare the runFullTrust restricted capability.

Important

The Windows.Devices.Geolocation.Provider APIs are part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form.

public:
 virtual LocationOverrideStatus SetOverridePosition(BasicGeoposition newPosition, PositionSource positionSource, double accuracyInMeters) = SetOverridePosition;
LocationOverrideStatus SetOverridePosition(BasicGeoposition const& newPosition, PositionSource const& positionSource, double const& accuracyInMeters);
public LocationOverrideStatus SetOverridePosition(BasicGeoposition newPosition, PositionSource positionSource, double accuracyInMeters);
function setOverridePosition(newPosition, positionSource, accuracyInMeters)
Public Function SetOverridePosition (newPosition As BasicGeoposition, positionSource As PositionSource, accuracyInMeters As Double) As LocationOverrideStatus

Parameters

newPosition
BasicGeoposition

The override position.

positionSource
PositionSource

The source that's overriding the position.

accuracyInMeters
Double

double

The accuracy of the override position, in meters.

Returns

A status indicating the result of the call.

Windows requirements

App capabilities
runFullTrust

Remarks

See Remarks in GeolocationProvider.

Applies to

See also