| 2072 | } |
| 2073 | |
| 2074 | void Framework::OnTapEvent(place_page::BuildInfo const & buildInfo) |
| 2075 | { |
| 2076 | auto placePageInfo = BuildPlacePageInfo(buildInfo); |
| 2077 | bool isRoutePoint = placePageInfo.IsRoutePoint(); |
| 2078 | |
| 2079 | if (m_routingManager.IsRoutingActive() && m_routingManager.GetCurrentRouterType() == routing::RouterType::Ruler && |
| 2080 | !buildInfo.m_isLongTap && !isRoutePoint) |
| 2081 | { |
| 2082 | DeactivateMapSelection(); |
| 2083 | |
| 2084 | // Continue route to the point |
| 2085 | RouteMarkData data; |
| 2086 | data.m_title = placePageInfo.GetTitle(); |
| 2087 | data.m_subTitle = std::string(); |
| 2088 | data.m_pointType = RouteMarkType::Finish; |
| 2089 | data.m_intermediateIndex = m_routingManager.GetRoutePointsCount() - 1; |
| 2090 | data.m_isMyPosition = false; |
| 2091 | |
| 2092 | if (placePageInfo.IsBookmark()) |
| 2093 | // Continue route to exact bookmark position. |
| 2094 | data.m_position = placePageInfo.GetBookmarkData().m_point; |
| 2095 | else |
| 2096 | data.m_position = buildInfo.m_mercator; |
| 2097 | |
| 2098 | m_routingManager.ContinueRouteToPoint(std::move(data)); |
| 2099 | |
| 2100 | // Refresh route |
| 2101 | m_routingManager.RemoveRoute(false /* deactivateFollowing */); |
| 2102 | m_routingManager.BuildRoute(); |
| 2103 | |
| 2104 | return; |
| 2105 | } |
| 2106 | |
| 2107 | if (buildInfo.m_isLongTap) |
| 2108 | { |
| 2109 | SwitchFullScreen(); |
| 2110 | } |
| 2111 | else |
| 2112 | { |
| 2113 | auto const prevTrackId = m_currentPlacePageInfo ? m_currentPlacePageInfo->GetTrackId() : kml::kInvalidTrackId; |
| 2114 | DeactivateHotelSearchMark(); |
| 2115 | |
| 2116 | m_currentPlacePageInfo = placePageInfo; |
| 2117 | |
| 2118 | if (m_currentPlacePageInfo->GetTrackId() != kml::kInvalidTrackId) |
| 2119 | { |
| 2120 | if (m_currentPlacePageInfo->GetTrackId() == prevTrackId) |
| 2121 | { |
| 2122 | if (m_drapeEngine) |
| 2123 | { |
| 2124 | m_drapeEngine->SelectObject(df::SelectionShape::ESelectedObject::OBJECT_TRACK, |
| 2125 | m_currentPlacePageInfo->GetMercator(), FeatureID(), false /* isAnim */, |
| 2126 | false /* isGeometrySelectionAllowed */, true /* isSelectionShapeVisible */); |
| 2127 | } |
| 2128 | return; |
| 2129 | } |
| 2130 | GetBookmarkManager().UpdateElevationMyPosition(m_currentPlacePageInfo->GetTrackId()); |
| 2131 | } |
nothing calls this directly
no test coverage detected