コード例 #1
0
        /// <summary>
        /// 搜索临近起点
        /// </summary>
        /// <param name="start_x"></param>
        /// <param name="start_y"></param>
        /// <param name="end_x"></param>
        /// <param name="end_y"></param>
        /// <param name="scope"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        public List <SearchResultModels> SearchNearSA(double start_x, double start_y, double end_x, double end_y, int scope, DateTime date)
        {
            List <List> listToday          = listHandler.GetListByDateAndEndAdress(end_x, end_y, date);
            List <SearchResultModels> SRMs = commonService.List2SRM_NS(listToday, start_x, start_y);

            return(SRMs.Where(o => o.Distance > 0 && o.Distance <= scope).OrderBy(o => o.Distance).ToList());
            //return listToday.Where(o => (double)o.EndPoint_x == end_x && (double)o.EndPoint_y == end_y && commonService.getDistanceFromXtoY(start_x, start_y, (double)o.StartPoint_x, (double)o.StartPoint_y) < scope).ToList();
        }