forked from organicmaps/organicmaps
Do not display information about coastline features in place page and client code.
This commit is contained in:
parent
6e7d55dd6f
commit
df03661560
2 changed files with 7 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "drape_frontend/watch/feature_processor.hpp"
|
||||
|
||||
#include "indexer/categories_holder.hpp"
|
||||
#include "indexer/classificator.hpp"
|
||||
#include "indexer/classificator_loader.hpp"
|
||||
#include "indexer/drawing_rules.hpp"
|
||||
#include "indexer/editable_map_object.hpp"
|
||||
|
@ -1656,7 +1657,8 @@ void Framework::ForEachFeatureAtPoint(TFeatureTypeFn && fn, m2::PointD const & m
|
|||
unique_ptr<FeatureType> Framework::GetFeatureAtPoint(m2::PointD const & mercator) const
|
||||
{
|
||||
unique_ptr<FeatureType> poi, line, area;
|
||||
ForEachFeatureAtPoint([&](FeatureType & ft)
|
||||
uint32_t const coastlineType = classif().GetCoastType();
|
||||
ForEachFeatureAtPoint([&, coastlineType](FeatureType & ft)
|
||||
{
|
||||
// TODO @alexz
|
||||
// remove manual parsing after refactoring with usermarks'll be finished
|
||||
|
@ -1673,6 +1675,9 @@ unique_ptr<FeatureType> Framework::GetFeatureAtPoint(m2::PointD const & mercator
|
|||
// Buildings have higher priority over other types.
|
||||
if (area && ftypes::IsBuildingChecker::Instance()(*area))
|
||||
return;
|
||||
// Skip/ignore coastlines.
|
||||
if (feature::TypesHolder(ft).Has(coastlineType))
|
||||
return;
|
||||
area.reset(new FeatureType(ft));
|
||||
break;
|
||||
case feature::GEOM_UNDEFINED:
|
||||
|
|
|
@ -491,6 +491,7 @@ public:
|
|||
search::AddressInfo GetFeatureAddressInfo(FeatureID const & fid) const;
|
||||
vector<string> GetPrintableFeatureTypes(FeatureType const & ft) const;
|
||||
/// Get "best for the user" feature at given point even if it's invisible on the screen.
|
||||
/// Ignores coastlines and prefers buildings over other area features.
|
||||
/// @returns nullptr if no feature was found at the given mercator point.
|
||||
unique_ptr<FeatureType> GetFeatureAtPoint(m2::PointD const & mercator) const;
|
||||
using TFeatureTypeFn = function<void(FeatureType &)>;
|
||||
|
|
Loading…
Add table
Reference in a new issue