${iServerJava6R_RouteLocatorService_Title}

Inheritance: SuperMap.Web.Service.ServiceBase
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            if (_routeLayer.Features.Count > 1)
            {
                _routeLayer.Features.RemoveAt(1);
            }
            if (string.IsNullOrEmpty(StartValue.Text) || string.IsNullOrEmpty(EndValue.Text))
            {
                MessageBox.Show("请输入里程值!");
                return;
            }

            Route route = new Route();
            if (_routeLayer.Features.Count > 0)
            {
                Feature f = _routeLayer.Features[0];
                route = f.Geometry as Route;

            }

            double sValue = 0;
            double.TryParse(StartValue.Text, out sValue);
            double eValue = 0;
            double.TryParse(EndValue.Text, out eValue);

            if (_routeLayer.Features.Count > 0)
            {
                Feature f = _routeLayer.Features[0];
                route = f.Geometry as Route;
            }
            RouteLocatorParameters param = new RouteLocatorParameters();

            param.SourceRoute = route;
            param.Type = LocateType.LINE;
            param.StartMeasure = sValue;
            param.EndMeasure = eValue;
            param.IsIgnoreGap = false;

            RouteLocatorService service = new RouteLocatorService(_serviceUrl);
            service.ProcessAsync(param);
            service.ProcessCompleted += new EventHandler<RouteLocatorEventArgs>(service_ProcessCompleted);

            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
        }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(MValue.Text))
            {
                MessageBox.Show("请输入里程值!");
                return;
            }
            Route route = new Route();
            if (_routeLayer.Features.Count > 0)
            {
                Feature f = _routeLayer.Features[0];
                route = f.Geometry as Route;

            }
            else
            {
                MessageBox.Show("请先获取路由对象!");
                return;
            }

            double mValue=0;
            double.TryParse(MValue.Text, out mValue);
            if (_routeLayer.Features.Count > 0)
            {
                Feature f = _routeLayer.Features[0];
                route = f.Geometry as Route;
            }

            RouteLocatorParameters param = new RouteLocatorParameters();

            param.SourceRoute = route;
            param.Type = LocateType.POINT;
            param.Measure = mValue;
            param.Offset = 0;
            param.IsIgnoreGap = false;

            RouteLocatorService service = new RouteLocatorService(_serviceUrl);
            service.ProcessAsync(param);
            service.ProcessCompleted += new EventHandler<RouteLocatorEventArgs>(service_ProcessCompleted);

            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);

        }