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)); }
private SearchResultsPointOfInterest ConvertFromCoordinates(string name, Coordinate coordinates) { var latLng = new LatLng(coordinates.Y, coordinates.X, coordinates.Z); return(CoordinatesToPointOfInterestConverter.Convert(latLng, name)); }