Geolocator.PositionChanged Geolocator.PositionChanged Geolocator.PositionChanged Geolocator.PositionChanged Geolocator.PositionChanged Event

Definition

Raised when the location is updated.

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

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

// Revoke with event_revoker
PositionChanged_revoker PositionChanged(auto_revoke_t, TypedEventHandler<Geolocator, PositionChangedEventArgs> const& handler) const;
public event TypedEventHandler<Geolocator, PositionChangedEventArgs> PositionChanged
Public Event PositionChanged As TypedEventHandler (Of Geolocator, PositionChangedEventArgs)
function onPositionChanged(eventArgs){/* Your code */}


geolocator.addEventListener("positionChanged", onPositionChanged);
geolocator.removeEventListener("positionChanged", onPositionChanged);

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.

See also