Share via


Geolocator.PositionChanged Event

Definition

Raised when the ___location is updated.

// Register
event_token PositionChanged(TypedEventHandler<Geolocator, PositionChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void PositionChanged(event_token const* cookie) const;

// Revoke with event_revoker
Geolocator::PositionChanged_revoker PositionChanged(auto_revoke_t, TypedEventHandler<Geolocator, PositionChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<Geolocator,PositionChangedEventArgs> PositionChanged;
function onPositionChanged(eventArgs) { /* Your code */ }
geolocator.addEventListener("positionchanged", onPositionChanged);
geolocator.removeEventListener("positionchanged", onPositionChanged);
- or -
geolocator.onpositionchanged = onPositionChanged;
Public Custom Event PositionChanged As TypedEventHandler(Of Geolocator, PositionChangedEventArgs) 

Event Type

Windows requirements

App capabilities
___location ID_CAP_LOCATION [Windows Phone]

Remarks

You can access information about the event with the PositionChangedEventArgs object that is passed to your event handler.

Tip

When using an emulator, you must manually change the emulated ___location in order to trigger the PositionChanged event.

Applies to

See also