diff --git a/drape_frontend/drape_engine.cpp b/drape_frontend/drape_engine.cpp index c2c311fa06..53fab55799 100644 --- a/drape_frontend/drape_engine.cpp +++ b/drape_frontend/drape_engine.cpp @@ -236,6 +236,7 @@ void DrapeEngine::UpdateUserMarksGroup(MarkGroupID groupId, UserMarksProvider * renderInfo->m_depth = mark->GetDepth(); renderInfo->m_depthLayer = mark->GetDepthLayer(); renderInfo->m_minZoom = mark->GetMinZoom(); + renderInfo->m_minTitleZoom = mark->GetMinTitleZoom(); renderInfo->m_isVisible = mark->IsVisible(); renderInfo->m_pivot = mark->GetPivot(); renderInfo->m_pixelOffset = mark->GetPixelOffset(); diff --git a/drape_frontend/user_mark_shapes.cpp b/drape_frontend/user_mark_shapes.cpp index 2c3a28b373..579cf5a348 100644 --- a/drape_frontend/user_mark_shapes.cpp +++ b/drape_frontend/user_mark_shapes.cpp @@ -142,7 +142,7 @@ void CacheUserMarks(TileKey const & tileKey, ref_ptr texture { ColoredSymbolViewParams params = itSym->second; if (params.m_shape == ColoredSymbolViewParams::Shape::Circle) - symbolSize = m2::PointF(params.m_radiusInPixels, params.m_radiusInPixels); + symbolSize = m2::PointF(params.m_radiusInPixels * 2.0f, params.m_radiusInPixels * 2.0f); else symbolSize = params.m_sizeInPixels; @@ -205,14 +205,14 @@ void CacheUserMarks(TileKey const & tileKey, ref_ptr texture { symbolSize = renderInfo.m_symbolSizes->at(static_cast(tileKey.m_zoomLevel - 1)) * vs; } - else + else if (!symbolName.empty()) { textures->GetSymbolRegion(symbolName, region); symbolSize.x = max(region.GetPixelSize().x, symbolSize.x); symbolSize.y = max(region.GetPixelSize().y, symbolSize.y); } - if (renderInfo.m_titleDecl != nullptr) + if (renderInfo.m_titleDecl != nullptr && renderInfo.m_minTitleZoom <= tileKey.m_zoomLevel) { for (auto const & titleDecl : *renderInfo.m_titleDecl) { diff --git a/drape_frontend/user_mark_shapes.hpp b/drape_frontend/user_mark_shapes.hpp index 1686065234..b325b6ae92 100644 --- a/drape_frontend/user_mark_shapes.hpp +++ b/drape_frontend/user_mark_shapes.hpp @@ -16,6 +16,7 @@ namespace df struct UserMarkRenderParams { int m_minZoom = 1; + int m_minTitleZoom = 1; m2::PointD m_pivot = m2::PointD(0.0, 0.0); m2::PointD m_pixelOffset = m2::PointD(0.0, 0.0); dp::Anchor m_anchor = dp::Center; diff --git a/drape_frontend/user_marks_provider.hpp b/drape_frontend/user_marks_provider.hpp index 8685c764c2..b9892aad2f 100644 --- a/drape_frontend/user_marks_provider.hpp +++ b/drape_frontend/user_marks_provider.hpp @@ -66,6 +66,7 @@ public: virtual bool HasSymbolPriority() const = 0; virtual bool HasTitlePriority() const = 0; virtual int GetMinZoom() const = 0; + virtual int GetMinTitleZoom() const = 0; virtual FeatureID GetFeatureID() const = 0; virtual bool HasCreationAnimation() const = 0; diff --git a/map/routing_manager.cpp b/map/routing_manager.cpp index 857a284980..a831394e84 100644 --- a/map/routing_manager.cpp +++ b/map/routing_manager.cpp @@ -57,7 +57,7 @@ namespace char const kRouterTypeKey[] = "router"; double const kRouteScaleMultiplier = 1.5; -float const kStopMarkerScale = 2.0f; +float const kStopMarkerScale = 2.2f; float const kTransferMarkerScale = 4.0f; string const kRoutePointsFile = "route_points.dat"; @@ -472,8 +472,11 @@ void CreateTransitMarks(vector const & transitMarks, std::map const & transitMarks, std::mapAddTitle(titleDecl); @@ -511,12 +515,14 @@ void CreateTransitMarks(vector const & transitMarks, std::mapAddTitle(titleDecl); titleDecl.m_primaryText = mark.m_titles.back().m_text; titleDecl.m_primaryTextFont.m_color = df::GetColorConstant(mark.m_titles.back().m_color); + titleDecl.m_primaryOffset.y = kTransferTitleOffset; titleDecl.m_anchor = dp::Anchor::Top; titleDecl.m_primaryOptional = true; transitMark->AddTitle(titleDecl); @@ -542,6 +548,7 @@ void CreateTransitMarks(vector const & transitMarks, std::mapAddTitle(titleDecl); @@ -586,9 +593,9 @@ void CreateTransitMarks(vector const & transitMarks, std::mapsecond.m_radiusInPixels != params.m_radiusInPixels) coloredSymbol.insert(make_pair(zoomLevel, params)); } - transitMark->SetMinZoom(16); transitMark->SetColoredSymbols(coloredSymbol); transitMark->SetPriority(UserMark::Priority::Transit_Stop); + transitMark->SetMinTitleZoom(kMinStopTitleZoom); } } } diff --git a/map/routing_mark.cpp b/map/routing_mark.cpp index 327b421251..1ceec7b412 100644 --- a/map/routing_mark.cpp +++ b/map/routing_mark.cpp @@ -18,7 +18,7 @@ static std::string const kTransitMarkTextOutline = "RouteMarkPrimaryTextOutline" float const kRouteMarkPrimaryTextSize = 11.0f; float const kRouteMarkSecondaryTextSize = 10.0f; float const kRouteMarkSecondaryOffsetY = 2.0f; -float const kTransitMarkTextSize = 13.0f; +float const kTransitMarkTextSize = 12.0f; } // namespace RouteMarkPoint::RouteMarkPoint(m2::PointD const & ptOrg, UserMarkContainer * container) @@ -401,6 +401,12 @@ void TransitMark::SetMinZoom(int minZoom) m_minZoom = minZoom; } +void TransitMark::SetMinTitleZoom(int minTitleZoom) +{ + SetDirty(); + m_minTitleZoom = minTitleZoom; +} + void TransitMark::AddTitle(dp::TitleDecl const & titleDecl) { SetDirty(); diff --git a/map/routing_mark.hpp b/map/routing_mark.hpp index 6a5df9ae71..93d7db3900 100644 --- a/map/routing_mark.hpp +++ b/map/routing_mark.hpp @@ -123,6 +123,9 @@ public: void SetMinZoom(int minZoom); int GetMinZoom() const override { return m_minZoom; } + void SetMinTitleZoom(int minTitleZoom); + int GetMinTitleZoom() const override { return m_minTitleZoom; } + void SetSymbolSizes(SymbolSizesZoomInfo const & symbolSizes); drape_ptr GetSymbolSizes() const override; @@ -139,6 +142,7 @@ public: private: int m_minZoom = 1; + int m_minTitleZoom = 1; Priority m_priority; FeatureID m_featureId; TitlesInfo m_titles; diff --git a/map/user_mark.hpp b/map/user_mark.hpp index b57dd534bb..14926099aa 100644 --- a/map/user_mark.hpp +++ b/map/user_mark.hpp @@ -57,6 +57,7 @@ public: bool HasSymbolPriority() const override { return false; } bool HasTitlePriority() const override { return false; } int GetMinZoom() const override { return 1; } + int GetMinTitleZoom() const override { return GetMinZoom(); } FeatureID GetFeatureID() const override { return FeatureID(); } bool HasCreationAnimation() const override { return false; }