예제 #1
0
        public async Task <IActionResult> GetPointOfInterest(string source, string id, string language = "")
        {
            if (source.Equals(Sources.COORDINATES, StringComparison.InvariantCultureIgnoreCase))
            {
                var latLng = CoordinatesToPointOfInterestConverter.GetLatLngFromId(id);
                return(Ok(CoordinatesToPointOfInterestConverter.Convert(latLng, id)));
            }
            var poiItem = await _pointsOfInterestAggregatorService.Get(source, id, language);

            if (poiItem == null)
            {
                return(NotFound());
            }
            return(Ok(poiItem));
        }
예제 #2
0
        private SearchResultsPointOfInterest ConvertFromCoordinates(string name, Coordinate coordinates)
        {
            var latLng = new LatLng(coordinates.Y, coordinates.X, coordinates.Z);

            return(CoordinatesToPointOfInterestConverter.Convert(latLng, name));
        }