public IActionResult GetRegion(decimal lat, decimal lng)
        {
            var regionPredictor = new RegionPrediction();

            return(Ok(regionPredictor.GetRegion(new LatLongModel
            {
                Latitude = float.Parse(lat.ToString()),
                Longitude = float.Parse(lng.ToString())
            })));
        }
예제 #2
0
        public static int getRegionFun(string latitude, string longitude)
        {
            var regionPredictor = new RegionPrediction();
            var prediction      = regionPredictor.GetRegion(new LatLongModel
            {
                Latitude  = float.Parse(latitude),
                Longitude = float.Parse(longitude)
            });
            int region = (int)prediction.RegionId;

            return(region);
        }