void action_DrawCompleted(object sender, DrawEventArgs e)
{
_elementsLayer.Children.Remove(pushpin);
//this.boder.Visibility = Visibility.Collapsed;
Route route = new Route();
if (_routeLayer.Features.Count > 0)
{
Feature f = _routeLayer.Features[0];
route = f.Geometry as Route;
}
pushpin.IsEnabled = false;
pushpin.Location = e.Geometry.Bounds.Center;
pushpin.Background = new SolidColorBrush(Colors.Red);
pushpin.Content = "O";
_elementsLayer.AddChild(pushpin);
_queryPoint = (e.Geometry as GeoPoint).Location;
RouteCalculateMeasureParameters param = new RouteCalculateMeasureParameters();
param.IsIgnoreGap = true;
param.Point = _queryPoint;
param.SourceRoute = route;
param.Tolerance = 100;
RouteCalculateMeasureService service = new RouteCalculateMeasureService(_serviceUrl);
service.ProcessComplated += service_ProcessComplated;
service.Failed += service_Failed;
service.ProcessAsync(param);
}