Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2015-01-23 19:03:52 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-11-30 16:04:00 +0300
commit2bffbb1756898dd403103929e7d8df9a632db5e6 (patch)
treeae83452157a8e0dbb20f05f9039fc41f4877e605 /map/mwm_url.hpp
parent7230f95a75b0f83ce45f5c758959343bc6d3b277 (diff)
[drape] render bookmarks, search and api points
Diffstat (limited to 'map/mwm_url.hpp')
-rw-r--r--map/mwm_url.hpp44
1 files changed, 13 insertions, 31 deletions
diff --git a/map/mwm_url.hpp b/map/mwm_url.hpp
index 36495bc930..efc656daba 100644
--- a/map/mwm_url.hpp
+++ b/map/mwm_url.hpp
@@ -6,8 +6,6 @@
#include "std/string.hpp"
-class ScalesProcessor;
-
namespace url_scheme
{
@@ -20,40 +18,24 @@ struct ApiPoint
string m_style;
};
-class Uri;
-
-/// Handles [mapswithme|mwm]://map?params - everything related to displaying info on a map
-class ParsedMapApi
+struct ParsedMapApi
{
-public:
- ParsedMapApi();
-
- void SetController(UserMarkContainer::Controller * controller);
-
- bool SetUriAndParse(string const & url);
- bool IsValid() const;
- string const & GetGlobalBackUrl() const { return m_globalBackUrl; }
- string const & GetAppTitle() const { return m_appTitle; }
- int GetApiVersion() const { return m_version; }
- void Reset();
- bool GoBackOnBalloonClick() const { return m_goBackOnBalloonClick; }
-
- /// @name Used in settings map viewport after invoking API.
- bool GetViewportRect(m2::RectD & rect) const;
- UserMark const * GetSinglePoint() const;
-
-private:
- bool Parse(Uri const & uri);
- void AddKeyValue(string key, string const & value, vector<ApiPoint> & points);
-
- UserMarkContainer::Controller * m_controller;
string m_globalBackUrl;
string m_appTitle;
- int m_version;
+ int m_version = 0;
/// Zoom level in OSM format (e.g. from 1.0 to 20.0)
/// Taken into an account when calculating viewport rect, but only if points count is == 1
- double m_zoomLevel;
- bool m_goBackOnBalloonClick;
+ double m_zoomLevel = 0.0;
+ bool m_goBackOnBalloonClick = false;
+ bool m_isValid = false;
};
+/// Handles [mapswithme|mwm]://map?params - everything related to displaying info on a map
+/// apiData - extracted data from url. If apiData.m_isValid == true then returned mark or rect is valid
+/// If return nullptr and apiData.m_isValid == true, than more than one api point exists.
+/// In rect returned bound rect of api points
+/// If return not nullptr, than only one api point exists
+UserMark const * ParseUrl(UserMarksController & controller, string const & url,
+ ParsedMapApi & apiData, m2::RectD & rect);
+
}