private MapItem BuildMapItem(OrgUnitSearchResultDto location, int locationNumber) { var mapItem = new MapItem() { Title = location.Name, LocationNumber = locationNumber, LocationAddress = string.Format("{0}, {1}, {2} {3}", location.Address1, location.City, location.StateName, location.PostalCode), LocationPhoneNum = location.Phone, DirectUrl = _view.CalculateLocationUrl(location.Id, _baseDetailPageUrl), HasCustomCoordinates = location.HasCustomCoordinates, Latitude = location.Latitude.HasValue ? location.Latitude.ToString() : null, Longitude = location.Longitude.HasValue ? location.Longitude.ToString() : null, ImageUrl = location.ImageUrl }; return mapItem; }
private MapItem BuildMapItem(ProviderSearchResultDto provider, int locationNumber) { var mapItem = new MapItem() { Title = provider.FullName, LocationNumber = locationNumber, LocationName = provider.PrimaryOrgUnitName, LocationAddress = string.Format("{0}, {1}, {2} {3}", provider.PrimaryOrgUnitAddress1, provider.PrimaryOrgUnitCity, provider.PrimaryOrgUnitState, provider.PrimaryOrgUnitPostalCode), LocationPhoneNum = provider.Phone, DirectUrl = _view.CalculateProviderDetailUrl(provider.DirectUrl, provider.Id, _baseDetailPageUrl), HasCustomCoordinates = provider.PrimaryOrgUnitHasCustomCoordinates, Latitude = provider.PrimaryOrgUnitLatitude.HasValue ? provider.PrimaryOrgUnitLatitude.ToString() : null, Longitude = provider.PrimaryOrgUnitLongitude.HasValue ? provider.PrimaryOrgUnitLongitude.ToString() : null, ImageUrl = provider.ImageUrl }; return mapItem; }