路径分析返回信息是英文的问题

而我在做路径分析时,需要为用户展示详细的路径信息,由于我希望展示给用户的路径信息是中文的,具体路径分析代码如下:
   public void ExcuteRouteTask()
        {
            if (stopsGraphicsLayer != null)
            {
                if (stopsGraphicsLayer.Graphics.Count > 1)
                {
                    if (routeTask.IsBusy)
                    {
                        routeTask.CancelAsync();
                        stopsGraphicsLayer.Graphics.RemoveAt(stopsGraphicsLayer.Graphics.Count - 1);
                    }
                    routeTask.SolveAsync(new RouteParameters()
                    {
                        Stops = stopsGraphicsLayer,
                        Barriers = myBarriarGraphicsLayer,
                        ReturnDirections = true,
                        DirectionsLanguage = new System.Globalization.CultureInfo("zh-cn"),
//尽管我已经设置返回路径信息是中文,但是返回的路径信息仍然是英文的
                        DirectionsLengthUnits=esriUnits.esriMeters,                      
                        UseTimeWindows = false,
                        OutSpatialReference = MyMap.SpatialReference
                    });
                }
            }
        }
 
下面是解决方案:

问题解答:

将zh-CN 文件夹 从
C:\Program Files (x86)\ArcGIS\Desktop10.1\NetworkAnalyst\Directions\
考到
C:\Program Files\ArcGIS\Server\NetworkAnalyst\Directions\
 
Rest请求时,Directions Language 属性设置为zh-CN即可
posted @ 2013-09-05 11:05  文刀三石  阅读(211)  评论(0编辑  收藏  举报