Beispiel #1
0
        public IHttpActionResult GetPinDetailsByGroupId([FromUri] int groupId, [FromUri] string lat = "0", [FromUri] string lng = "0")
        {
            try
            {
                GeoCoordinate centerCoordinate = null;
                if (!lat.Equals("0") && !lat.Equals("0"))
                {
                    centerCoordinate = new GeoCoordinate(double.Parse(lat.Replace('$', '.')), double.Parse(lng.Replace('$', '.')));
                }

                var group = _finderService.GetPinDetailsForGroup(groupId, centerCoordinate);
                return(Ok(group));
            }
            catch (Exception ex)
            {
                var apiError = new ApiErrorDto("Get Pin Details Failed", ex);
                throw new HttpResponseException(apiError.HttpResponseMessage);
            }
        }