public async Task <BaiYeMapItem> GetMapInfo(string adr, bool usehpic) { //处理输入的文本 adr = processinput(adr); //先进行POI查询,如果是转悠地名则 不需要转化GPS var poi = POIService.GetPoiByName(adr); if (poi != null) { return(GetMapInfoByGPS(adr, poi.gpslng, poi.gpslat, usehpic, poi)); } else { //地址转化 var gps = await helper.GeoLoc2GPS(adr); if (gps == null) { return(null); } _logger.LogInformation($"地址转化:{gps.lat}-{gps.lng}"); return(GetMapInfoByGPS(adr, gps.lng, gps.lat, usehpic)); } }