| 2915 | } |
| 2916 | |
| 2917 | void SetHostingBuildingAddress(FeatureID const & hostingBuildingFid, DataSource const & dataSource, |
| 2918 | search::ReverseGeocoder const & coder, osm::EditableMapObject & emo) |
| 2919 | { |
| 2920 | if (!hostingBuildingFid.IsValid()) |
| 2921 | return; |
| 2922 | |
| 2923 | FeaturesLoaderGuard g(dataSource, hostingBuildingFid.m_mwmId); |
| 2924 | auto hostingBuildingFeature = g.GetFeatureByIndex(hostingBuildingFid.m_index); |
| 2925 | if (!hostingBuildingFeature) |
| 2926 | return; |
| 2927 | |
| 2928 | search::ReverseGeocoder::Address address; |
| 2929 | if (coder.GetExactAddress(*hostingBuildingFeature, address)) |
| 2930 | { |
| 2931 | if (emo.GetHouseNumber().empty()) |
| 2932 | emo.SetHouseNumber(address.GetHouseNumber()); |
| 2933 | if (emo.GetStreet().m_defaultName.empty()) |
| 2934 | // TODO(mgsergio): Localize if localization is required by UI. |
| 2935 | emo.SetStreet({address.GetStreetName(), ""}); |
| 2936 | } |
| 2937 | } |
| 2938 | } // namespace |
| 2939 | |
| 2940 | bool Framework::CanEditMapForPosition(m2::PointD const & position) const |
no test coverage detected