Skip to content

Instantly share code, notes, and snippets.

@rkusa
Created September 28, 2010 13:20
Show Gist options
  • Save rkusa/600974 to your computer and use it in GitHub Desktop.
Save rkusa/600974 to your computer and use it in GitHub Desktop.
positionChanged.Skip(1).Zip(positionChanged, (lhs, rhs) => new
{
Position1 = rhs,
Position2 = lhs,
Distance = lhs.Location.GetDistanceTo(rhs.Location)
}).Subscribe(item => Deployment.Current.Dispatcher.BeginInvoke(() =>
{
// handle position ... f.e. add to a map's location collection
}));
@rkusa
Copy link
Author

rkusa commented Sep 28, 2010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment