diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index a04b506df6..be5ab7ddf5 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -527,14 +527,9 @@ void Framework::DownloadingProgressUpdate(ActiveMapsLayout::TGroup const & group } } -// Fills mapobject's metadata from UserMark -void Framework::InjectMetadata(JNIEnv * env, jclass const clazz, jobject const mapObject, UserMark const * userMark) +// Fills mapobject's metadata +void Framework::InjectMetadata(JNIEnv * env, jclass const clazz, jobject const mapObject, feature::Metadata const & metadata) { - using feature::Metadata; - - Metadata metadata; - frm()->FindClosestPOIMetadata(userMark->GetPivot(), metadata); - static jmethodID const addId = env->GetMethodID(clazz, "addMetadata", "(ILjava/lang/String;)V"); ASSERT ( addId, () ); @@ -542,7 +537,7 @@ void Framework::InjectMetadata(JNIEnv * env, jclass const clazz, jobject const m { // TODO: It is not a good idea to pass raw strings to UI. Calling separate getters should be a better way. // Upcoming change: how to pass opening hours (parsed) into Editor's UI? How to get edited changes back? - jstring metaString = t == Metadata::FMD_WIKIPEDIA ? + jstring metaString = t == feature::Metadata::FMD_WIKIPEDIA ? jni::ToJavaString(env, metadata.GetWikiURL()) : jni::ToJavaString(env, metadata.Get(t)); env->CallVoidMethod(mapObject, addId, t, metaString); @@ -722,6 +717,19 @@ extern "C" ::Framework * fm = frm(); UserMark const * mark = markCopy->GetUserMark(); + search::AddressInfo info; + feature::Metadata metadata; + auto const * feature = mark->GetFeature(); + if (feature) + { + info = fm->GetPOIAddressInfo(*feature); + metadata = feature->GetMetadata(); + } + else + { + // Calculate at least country name for a point. Can we provide more address information? + info.m_country = fm->GetCountryName(mark->GetPivot()); + } switch (mark->GetMarkType()) { case UserMark::Type::API: @@ -741,17 +749,13 @@ extern "C" case UserMark::Type::POI: { - PoiMarkPoint const * poiMark = CastMark(mark); - CallOnPoiActivatedListener(obj, mark->GetPivot(), poiMark->GetInfo(), poiMark->GetMetadata()); + CallOnPoiActivatedListener(obj, mark->GetPivot(), info, metadata); break; } case UserMark::Type::SEARCH: { - SearchMarkPoint const * searchMark = CastMark(mark); - feature::Metadata metadata; - fm->FindClosestPOIMetadata(mark->GetPivot(), metadata); - CallOnAdditionalLayerActivatedListener(obj, searchMark->GetPivot(), searchMark->GetInfo(), metadata); + CallOnAdditionalLayerActivatedListener(obj, mark->GetPivot(), info, metadata); break; } @@ -959,33 +963,6 @@ extern "C" g_framework->ShowTrack(cat, track); } - JNIEXPORT void JNICALL - Java_com_mapswithme_maps_Framework_injectData(JNIEnv * env, jclass clazz, jobject jsearchResult, jlong index) - { - const size_t nIndex = static_cast(index); - - UserMarkControllerGuard guard(frm()->GetBookmarkManager(), UserMarkType::SEARCH_MARK); - ASSERT_LESS(nIndex , guard.m_controller.GetUserMarkCount(), ("Invalid index", nIndex)); - UserMark const * mark = guard.m_controller.GetUserMark(nIndex); - search::AddressInfo const & info= CastMark(mark)->GetInfo(); - - jclass const javaClazz = env->GetObjectClass(jsearchResult); - - static jfieldID const nameId = env->GetFieldID(javaClazz, "mName", "Ljava/lang/String;"); - env->SetObjectField(jsearchResult, nameId, jni::ToJavaString(env, info.GetPinName())); - - static jfieldID const typeId = env->GetFieldID(javaClazz, "mTypeName", "Ljava/lang/String;"); - env->SetObjectField(jsearchResult, typeId, jni::ToJavaString(env, info.GetPinType())); - - static jfieldID const latId = env->GetFieldID(javaClazz, "mLat", "D"); - env->SetDoubleField(jsearchResult, latId, MercatorBounds::YToLat(mark->GetPivot().y)); - - static jfieldID const lonId = env->GetFieldID(javaClazz, "mLon", "D"); - env->SetDoubleField(jsearchResult, lonId, MercatorBounds::XToLon(mark->GetPivot().x)); - - g_framework->InjectMetadata(env, javaClazz, jsearchResult, mark); - } - JNIEXPORT jstring JNICALL Java_com_mapswithme_maps_Framework_nativeGetBookmarkDir(JNIEnv * env, jclass thiz) { @@ -1181,17 +1158,25 @@ extern "C" Java_com_mapswithme_maps_Framework_nativeGetMapObjectForPoint(JNIEnv * env, jclass clazz, jdouble lat, jdouble lon) { PoiMarkPoint const * poiMark = frm()->GetAddressMark(MercatorBounds::FromLatLon(lat, lon)); + search::AddressInfo info; + feature::Metadata metadata; + auto const * feature = poiMark->GetFeature(); + if (feature) + { + metadata = feature->GetMetadata(); + info = frm()->GetPOIAddressInfo(*feature); + } + // TODO(AlexZ): else case? static jclass const klass = jni::GetGlobalClassRef(env, "com/mapswithme/maps/bookmarks/data/MapObject$Poi"); // Java signature : Poi(String name, double lat, double lon, String typeName) static jmethodID const methodID = env->GetMethodID(klass, "", "(Ljava/lang/String;DDLjava/lang/String;)V"); - jobject const mapObject = env->NewObject(klass, methodID, jni::ToJavaString(env, poiMark->GetInfo().GetPinName()), - lat, lon, jni::ToJavaString(env, poiMark->GetInfo().GetPinType())); + jobject const mapObject = env->NewObject(klass, methodID, jni::ToJavaString(env, info.GetPinName()), + lat, lon, jni::ToJavaString(env, info.GetPinType())); ASSERT(mapObject, ()); - - g_framework->InjectMetadata(env, klass, mapObject, poiMark); + g_framework->InjectMetadata(env, klass, mapObject, metadata); return mapObject; } diff --git a/android/jni/com/mapswithme/maps/Framework.hpp b/android/jni/com/mapswithme/maps/Framework.hpp index abeea95626..798d1d0236 100644 --- a/android/jni/com/mapswithme/maps/Framework.hpp +++ b/android/jni/com/mapswithme/maps/Framework.hpp @@ -161,7 +161,7 @@ namespace android void CleanWidgets(); // Fills mapobject's metadata from UserMark - void InjectMetadata(JNIEnv * env, jclass clazz, jobject const mapObject, UserMark const * userMark); + void InjectMetadata(JNIEnv * env, jclass clazz, jobject const mapObject, feature::Metadata const & metadata); using TDrapeTask = function; // Posts a task which must be executed when Drape Engine is alive. diff --git a/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp b/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp index 115aae4989..a7231e4a21 100644 --- a/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp +++ b/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp @@ -85,13 +85,17 @@ extern "C" BookmarkCategory * category = getBmCategory(id); Bookmark const * nBookmark = static_cast(category->GetUserMark(index)); + feature::Metadata metadata; + auto const * feature = nBookmark->GetFeature(); + if (feature) + metadata = feature->GetMetadata(); + // TODO(AlexZ): else case? ASSERT(nBookmark, ("Bookmark must not be null with index:)", index)); - jobject jBookmark = env->NewObject(bookmarkClazz, cId, - id, index, jni::ToJavaString(env, nBookmark->GetName())); - - g_framework->InjectMetadata(env, bookmarkClazz, jBookmark, nBookmark); + jobject jBookmark = env->NewObject(bookmarkClazz, cId, id, index, + jni::ToJavaString(env, nBookmark->GetName())); + g_framework->InjectMetadata(env, bookmarkClazz, jBookmark, metadata); return jBookmark; } diff --git a/android/src/com/mapswithme/maps/Framework.java b/android/src/com/mapswithme/maps/Framework.java index 525af6a545..ff471086c0 100644 --- a/android/src/com/mapswithme/maps/Framework.java +++ b/android/src/com/mapswithme/maps/Framework.java @@ -99,8 +99,6 @@ public class Framework public native static void nativeClearApiPoints(); - public native static void injectData(MapObject.SearchResult searchResult, long index); - public native static void deactivatePopup(); public native static String[] nativeGetMovableFilesExts(); diff --git a/iphone/Maps/Classes/MWMPlacePageEntity.mm b/iphone/Maps/Classes/MWMPlacePageEntity.mm index 8f94d87a0c..568b11dab7 100644 --- a/iphone/Maps/Classes/MWMPlacePageEntity.mm +++ b/iphone/Maps/Classes/MWMPlacePageEntity.mm @@ -55,10 +55,8 @@ static map const kMetaFieldsMap{ [self configureForMyPosition:static_cast(mark)]; break; case Type::SEARCH: - [self configureForSearch:static_cast(mark)]; - break; case Type::POI: - [self configureForPOI:static_cast(mark)]; + [self configureEntityWithFeature:mark->GetFeature()]; break; case Type::BOOKMARK: [self configureForBookmark:mark]; @@ -104,11 +102,6 @@ static map const kMetaFieldsMap{ self.type = MWMPlacePageEntityTypeBookmark; BookmarkCategory * category = f.GetBmCategory(self.bac.first); BookmarkData const & data = static_cast(bookmark)->GetData(); - m2::PointD const & point = bookmark->GetPivot(); - Metadata metadata; - search::AddressInfo info; - f.FindClosestPOIMetadata(point, metadata); - f.GetAddressInfoForGlobalPoint(point, info); self.bookmarkTitle = @(data.GetName().c_str()); self.bookmarkCategory = @(category->GetName().c_str()); @@ -117,24 +110,10 @@ static map const kMetaFieldsMap{ _isHTMLDescription = strings::IsHTML(description); self.bookmarkColor = @(data.GetType().c_str()); - [self configureEntityWithMetadata:metadata addressInfo:info]; + [self configureEntityWithFeature:bookmark->GetFeature()]; [self insertBookmarkInTypes]; } -- (void)configureForSearch:(SearchMarkPoint const *)searchMark -{ -//Workaround for framework bug. -//TODO: Make correct way to get search metadata. - Metadata metadata; - GetFramework().FindClosestPOIMetadata(searchMark->GetPivot(), metadata); - [self configureEntityWithMetadata:metadata addressInfo:searchMark->GetInfo()]; -} - -- (void)configureForPOI:(PoiMarkPoint const *)poiMark -{ - [self configureEntityWithMetadata:poiMark->GetMetadata() addressInfo:poiMark->GetInfo()]; -} - - (void)configureForMyPosition:(MyPositionMarkPoint const *)myPositionMark { self.title = L(@"my_position"); @@ -150,77 +129,82 @@ static map const kMetaFieldsMap{ [self addMetaField:MWMPlacePageMetadataFieldCoordinate]; } -- (void)configureEntityWithMetadata:(Metadata const &)metadata addressInfo:(search::AddressInfo const &)info +// feature can be nullptr if user selected any empty area. +- (void)configureEntityWithFeature:(FeatureType const *)feature { - NSString * const name = @(info.GetPinName().c_str()); - self.title = name.length > 0 ? name : L(@"dropped_pin"); - self.category = @(info.FormatAddress().c_str()); - - auto const presentTypes = metadata.GetPresentTypes(); - - for (auto const & type : presentTypes) + if (feature) { - switch (type) + search::AddressInfo const info = GetFramework().GetPOIAddressInfo(*feature); + feature::Metadata const & metadata = feature->GetMetadata(); + NSString * const name = @(info.GetPinName().c_str()); + self.title = name.length > 0 ? name : L(@"dropped_pin"); + self.category = @(info.GetPinType().c_str()); + + vector const presentTypes = metadata.GetPresentTypes(); + + for (auto const & type : presentTypes) { - case Metadata::FMD_CUISINE: + switch (type) { - NSString * result = @(metadata.Get(type).c_str()); - NSString * cuisine = [NSString stringWithFormat:@"cuisine_%@", result]; - NSString * localizedResult = L(cuisine); - NSString * currentCategory = self.category; - if (![localizedResult isEqualToString:currentCategory]) + case Metadata::FMD_CUISINE: { - if ([localizedResult isEqualToString:cuisine]) + NSString * result = @(metadata.Get(type).c_str()); + NSString * cuisine = [NSString stringWithFormat:@"cuisine_%@", result]; + NSString * localizedResult = L(cuisine); + NSString * currentCategory = self.category; + if (![localizedResult isEqualToString:currentCategory]) { - if (![result isEqualToString:currentCategory]) - self.category = [NSString stringWithFormat:@"%@, %@", self.category, result]; - } - else - { - self.category = [NSString stringWithFormat:@"%@, %@", self.category, localizedResult]; + if ([localizedResult isEqualToString:cuisine]) + { + if (![result isEqualToString:currentCategory]) + self.category = [NSString stringWithFormat:@"%@, %@", self.category, result]; + } + else + { + self.category = [NSString stringWithFormat:@"%@, %@", self.category, localizedResult]; + } } + break; } - break; + case Metadata::FMD_ELE: + { + self.typeDescriptionValue = atoi(metadata.Get(type).c_str()); + if (self.type != MWMPlacePageEntityTypeBookmark) + self.type = MWMPlacePageEntityTypeEle; + break; + } + case Metadata::FMD_OPERATOR: + { + NSString const * bank = @(metadata.Get(type).c_str()); + if (self.category.length) + self.category = [NSString stringWithFormat:@"%@, %@", self.category, bank]; + else + self.category = [NSString stringWithFormat:@"%@", bank]; + break; + } + case Metadata::FMD_STARS: + { + self.typeDescriptionValue = atoi(metadata.Get(type).c_str()); + if (self.type != MWMPlacePageEntityTypeBookmark) + self.type = MWMPlacePageEntityTypeHotel; + break; + } + case Metadata::FMD_URL: + case Metadata::FMD_WEBSITE: + case Metadata::FMD_PHONE_NUMBER: + case Metadata::FMD_OPEN_HOURS: + case Metadata::FMD_EMAIL: + case Metadata::FMD_POSTCODE: + [self addMetaField:kMetaFieldsMap.at(type) value:metadata.Get(type)]; + break; + case Metadata::FMD_INTERNET: + [self addMetaField:kMetaFieldsMap.at(type) value:L(@"WiFi_available").UTF8String]; + break; + default: + break; } - case Metadata::FMD_ELE: - { - self.typeDescriptionValue = atoi(metadata.Get(type).c_str()); - if (self.type != MWMPlacePageEntityTypeBookmark) - self.type = MWMPlacePageEntityTypeEle; - break; - } - case Metadata::FMD_OPERATOR: - { - NSString const * bank = @(metadata.Get(type).c_str()); - if (self.category.length) - self.category = [NSString stringWithFormat:@"%@, %@", self.category, bank]; - else - self.category = [NSString stringWithFormat:@"%@", bank]; - break; - } - case Metadata::FMD_STARS: - { - self.typeDescriptionValue = atoi(metadata.Get(type).c_str()); - if (self.type != MWMPlacePageEntityTypeBookmark) - self.type = MWMPlacePageEntityTypeHotel; - break; - } - case Metadata::FMD_URL: - case Metadata::FMD_WEBSITE: - case Metadata::FMD_PHONE_NUMBER: - case Metadata::FMD_OPEN_HOURS: - case Metadata::FMD_EMAIL: - case Metadata::FMD_POSTCODE: - [self addMetaField:kMetaFieldsMap.at(type) value:metadata.Get(type)]; - break; - case Metadata::FMD_INTERNET: - [self addMetaField:kMetaFieldsMap.at(type) value:L(@"WiFi_available").UTF8String]; - break; - default: - break; } } - [self addMetaField:MWMPlacePageMetadataFieldCoordinate]; } diff --git a/map/framework.cpp b/map/framework.cpp index c49890b993..1686d05ba5 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -267,7 +267,6 @@ Framework::Framework() m_stringsBundle.SetDefaultString("dropped_pin", "Dropped Pin"); m_stringsBundle.SetDefaultString("my_places", "My Places"); - m_stringsBundle.SetDefaultString("my_position", "My Position"); m_stringsBundle.SetDefaultString("routes", "Routes"); m_stringsBundle.SetDefaultString("routing_failed_unknown_my_position", "Current location is undefined. Please specify location to create route."); @@ -1171,11 +1170,7 @@ void Framework::ShowSearchResult(search::Result const & res) else ShowRect(df::GetRectForDrawScale(scale, center)); - search::AddressInfo info; - info.MakeFrom(res); - - SearchMarkPoint * mark = static_cast(guard.m_controller.CreateUserMark(center)); - mark->SetInfo(info); + UserMark * mark = guard.m_controller.CreateUserMark(center); if (ft) mark->SetFeature(move(ft)); else @@ -1266,14 +1261,7 @@ void Framework::FillSearchResultsMarks(search::Results const & results) Result const & r = results.GetResult(i); if (r.HasPoint()) - { - AddressInfo info; - info.MakeFrom(r); - - m2::PointD const pt = r.GetFeatureCenter(); - SearchMarkPoint * mark = static_cast(guard.m_controller.CreateUserMark(pt)); - mark->SetInfo(info); - } + guard.m_controller.CreateUserMark(r.GetFeatureCenter()); } } @@ -1621,9 +1609,9 @@ bool Framework::ShowMapForURL(string const & url) } else { - PoiMarkPoint * mark = GetAddressMark(point); - if (!name.empty()) - mark->SetName(name); + PoiMarkPoint * mark = UserMarkContainer::UserMarkForPoi(); + mark->SetPtOrg(point); + // TODO(AlexZ): Do we really have to set custom name here if it's not empty? ActivateUserMark(mark, false); } } @@ -1800,11 +1788,9 @@ BookmarkAndCategory Framework::FindBookmark(UserMark const * mark) const PoiMarkPoint * Framework::GetAddressMark(m2::PointD const & globalPoint) const { - search::AddressInfo info; - GetAddressInfoForGlobalPoint(globalPoint, info); PoiMarkPoint * mark = UserMarkContainer::UserMarkForPoi(); mark->SetPtOrg(globalPoint); - mark->SetInfo(info); + mark->SetFeature(GetFeatureAtMercatorPoint(globalPoint)); return mark; } @@ -1895,14 +1881,7 @@ UserMark const * Framework::OnTapEventImpl(m2::PointD pxPoint, bool isLong, bool m2::PointD const pxPoint2d = m_currentModelView.P3dtoP(pxPoint); if (isMyPosition) - { - search::AddressInfo info; - info.m_name = m_stringsBundle.GetString("my_position"); - MyPositionMarkPoint * myPosition = UserMarkContainer::UserMarkForMyPostion(); - myPosition->SetInfo(info); - - return myPosition; - } + return UserMarkContainer::UserMarkForMyPostion(); df::VisualParams const & vp = df::VisualParams::Instance(); @@ -1927,24 +1906,19 @@ UserMark const * Framework::OnTapEventImpl(m2::PointD pxPoint, bool isLong, bool bool needMark = false; m2::PointD mercatorPivot; - search::AddressInfo info; - feature::Metadata metadata; unique_ptr feature; if (fid.IsValid()) { feature = GetPOIByID(fid); mercatorPivot = feature::GetCenter(*feature); - info = GetPOIAddressInfo(*feature); - metadata = feature->GetMetadata(); needMark = true; } else if (isLong) { mercatorPivot = m_currentModelView.PtoG(pxPoint); + // TODO(AlexZ): Should we change mercatorPivot to found feature's center? feature = GetFeatureAtMercatorPoint(mercatorPivot); - if (feature) - info = GetPOIAddressInfo(*feature); needMark = true; } @@ -1952,8 +1926,6 @@ UserMark const * Framework::OnTapEventImpl(m2::PointD pxPoint, bool isLong, bool { PoiMarkPoint * poiMark = UserMarkContainer::UserMarkForPoi(); poiMark->SetPtOrg(mercatorPivot); - poiMark->SetInfo(info); - poiMark->SetMetadata(move(metadata)); // Set or reset feature. poiMark->SetFeature(move(feature)); return poiMark; diff --git a/map/framework.hpp b/map/framework.hpp index a60e414803..adbc5d7517 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -481,10 +481,10 @@ public: //@} private: - search::AddressInfo GetPOIAddressInfo(FeatureType const & ft) const; void GetLocality(m2::PointD const & pt, search::AddressInfo & info) const; public: + search::AddressInfo GetPOIAddressInfo(FeatureType const & ft) const; /// Get feature at given point even if it's invisible on the screen. /// TODO(AlexZ): Refactor out other similar methods. /// @returns nullptr if no feature was found at the given mercator point. diff --git a/map/user_mark.cpp b/map/user_mark.cpp index abcfc0d00a..75ad6d654a 100644 --- a/map/user_mark.cpp +++ b/map/user_mark.cpp @@ -1,5 +1,7 @@ -#include "user_mark.hpp" -#include "user_mark_container.hpp" +#include "map/user_mark.hpp" +#include "map/user_mark_container.hpp" + +#include "indexer/classificator.hpp" namespace { @@ -77,6 +79,23 @@ void UserMark::FillLogEvent(UserMark::TEventContainer & details) const details.emplace("lat", strings::to_string(ll.lat)); details.emplace("lon", strings::to_string(ll.lon)); details.emplace("markType", ToString(GetMarkType())); + + if (m_feature) + { + string name; + m_feature->GetReadableName(name); + details.emplace("name", move(name)); + string types; + m_feature->ForEachType([&types](uint32_t type) + { + if (!types.empty()) + types += ','; + types += classif().GetReadableObjectName(type); + }); + // Older version of statistics used "type" key with AddressInfo::GetPinType() value. + details.emplace("types", move(types)); + details.emplace("metaData", m_feature->GetMetadata().Empty() ? "0" : "1"); + } } UserMarkCopy::UserMarkCopy(UserMark const * srcMark, bool needDestroy) @@ -96,15 +115,8 @@ UserMark const * UserMarkCopy::GetUserMark() const return m_srcMark; } -SearchMarkPoint::SearchMarkPoint(search::AddressInfo const & info, m2::PointD const & ptOrg, - UserMarkContainer * container) - : UserMark(ptOrg, container) - , m_info(info) -{ -} - SearchMarkPoint::SearchMarkPoint(m2::PointD const & ptOrg, UserMarkContainer * container) - : UserMark(ptOrg, container) +: UserMark(ptOrg, container) { } @@ -118,42 +130,13 @@ UserMark::Type SearchMarkPoint::GetMarkType() const return UserMark::Type::SEARCH; } -search::AddressInfo const & SearchMarkPoint::GetInfo() const -{ - return m_info; -} - -void SearchMarkPoint::SetInfo(search::AddressInfo const & info) -{ - m_info = info; -} - -feature::Metadata const & SearchMarkPoint::GetMetadata() const -{ - return m_metadata; -} - -void SearchMarkPoint::SetMetadata(feature::Metadata && metadata) -{ - m_metadata = metadata; -} - unique_ptr SearchMarkPoint::Copy() const { - return unique_ptr( - new UserMarkCopy(new SearchMarkPoint(m_info, m_ptOrg, m_container))); -} - -void SearchMarkPoint::FillLogEvent(UserMark::TEventContainer & details) const -{ - UserMark::FillLogEvent(details); - details.emplace("name", m_info.GetPinName()); - details.emplace("type", m_info.GetPinType()); - details.emplace("metaData", m_metadata.Empty() ? "0" : "1"); + return unique_ptr(new UserMarkCopy(new SearchMarkPoint(m_ptOrg, m_container))); } PoiMarkPoint::PoiMarkPoint(UserMarkContainer * container) - : SearchMarkPoint(m2::PointD(0.0, 0.0), container) {} + : SearchMarkPoint(m2::PointD::Zero(), container) {} UserMark::Type PoiMarkPoint::GetMarkType() const { @@ -169,11 +152,6 @@ void PoiMarkPoint::SetPtOrg(m2::PointD const & ptOrg) m_ptOrg = ptOrg; } -void PoiMarkPoint::SetName(string const & name) -{ - m_info.m_name = name; -} - MyPositionMarkPoint::MyPositionMarkPoint(UserMarkContainer * container) : PoiMarkPoint(container) { diff --git a/map/user_mark.hpp b/map/user_mark.hpp index 725423516d..30306a9d02 100644 --- a/map/user_mark.hpp +++ b/map/user_mark.hpp @@ -82,28 +82,12 @@ private: class SearchMarkPoint : public UserMark { public: - SearchMarkPoint(search::AddressInfo const & info, - m2::PointD const & ptOrg, - UserMarkContainer * container); - SearchMarkPoint(m2::PointD const & ptOrg, UserMarkContainer * container); string GetSymbolName() const override; UserMark::Type GetMarkType() const override; - search::AddressInfo const & GetInfo() const; - void SetInfo(search::AddressInfo const & info); - - feature::Metadata const & GetMetadata() const; - void SetMetadata(feature::Metadata && metadata); - unique_ptr Copy() const override; - - virtual void FillLogEvent(TEventContainer & details) const override; - -protected: - search::AddressInfo m_info; - feature::Metadata m_metadata; }; class PoiMarkPoint : public SearchMarkPoint @@ -114,7 +98,6 @@ public: unique_ptr Copy() const override; void SetPtOrg(m2::PointD const & ptOrg); - void SetName(string const & name); }; class MyPositionMarkPoint : public PoiMarkPoint