diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2016-05-12 15:34:40 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2016-05-13 10:02:16 +0300 |
commit | 7d7e58b6df38fb185959d7ae8343b1f2b9e1b142 (patch) | |
tree | b01e6fe36b1ee0c5aab0860890ae6887777f0ebf /map/api_mark_point.hpp | |
parent | 07e00fcfb88fae9233bf93535c56a63afa4adac1 (diff) |
Small refactoring of API-mark
Diffstat (limited to 'map/api_mark_point.hpp')
-rw-r--r-- | map/api_mark_point.hpp | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/map/api_mark_point.hpp b/map/api_mark_point.hpp index cfd687c1e3..666f398288 100644 --- a/map/api_mark_point.hpp +++ b/map/api_mark_point.hpp @@ -1,37 +1,42 @@ #pragma once -#include "map/styled_point.hpp" +#include "map/user_mark.hpp" +#include "map/user_mark_container.hpp" -class ApiMarkPoint : public style::StyledPoint +#include "geometry/point2d.hpp" + +#include "std/string.hpp" + +namespace style +{ + +// Fixes icons which are not supported by MapsWithMe. +string GetSupportedStyle(string const & s, string const & context, string const & fallback); +// Default icon. +string GetDefaultStyle(); + +} // style + +class ApiMarkPoint : public UserMark { public: - ApiMarkPoint(m2::PointD const & ptOrg, UserMarkContainer * container) - : StyledPoint(ptOrg, container) - { - } + ApiMarkPoint(m2::PointD const & ptOrg, UserMarkContainer * container); ApiMarkPoint(string const & name, string const & id, string const & style, - m2::PointD const & ptOrg, UserMarkContainer * container) - : StyledPoint(ptOrg, container), m_name(name), m_id(id), m_style(style) - { - } - - string GetSymbolName() const override { return "api-result"; } + m2::PointD const & ptOrg, UserMarkContainer * container); - UserMark::Type GetMarkType() const override { return UserMark::Type::API; } + string GetSymbolName() const override; + UserMark::Type GetMarkType() const override; + m2::PointD const & GetPixelOffset() const override; string const & GetName() const { return m_name; } - void SetName(string const & name) { m_name = name; } string const & GetID() const { return m_id; } - void SetID(string const & id) { m_id = id; } void SetStyle(string const & style) { m_style = style; } - - // StyledPoint overrides: - string const & GetStyle() const override { return m_style; } + string const & GetStyle() const { return m_style; } private: string m_name; |