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
path: root/map
diff options
context:
space:
mode:
authorDmitry Kunin <dkunin@mapswith.me>2013-06-09 21:50:55 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:56:28 +0300
commita1317df958b3e0ae972eb1ba2e44ea4cfa2eea8d (patch)
tree2e4649b28ea2c64979eea130d07f8c353b823e9a /map
parente2a23b915c03ad0292470c6b4996e00380d885b6 (diff)
[android] Balloon after rendering initialization (ge0, geo).
*TODO the same for "mapswithme".
Diffstat (limited to 'map')
-rw-r--r--map/framework.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/map/framework.cpp b/map/framework.cpp
index dc9ae8d65c..e5d1255830 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -1458,6 +1458,22 @@ bool Framework::SetViewportByURL(string const & url, url_api::Request & request)
m2::RectD view(MercatorBounds::LonToX(z.minX()), MercatorBounds::LatToY(z.minY()),
MercatorBounds::LonToX(z.maxX()), MercatorBounds::LatToY(z.maxY()));
SetViewPortSync(view);
+
+ // Populate request if request has only one point
+ // with this one point to show balloon.
+ // @todo: refacotor to more general model, Point and ApiPoint must not exist together.
+ if (m_ParsedMapApi.GetPoints().size() == 1)
+ {
+ url_scheme::ApiPoint const apiPoint = m_ParsedMapApi.GetPoints().front();
+ url_api::Point point;
+
+ request.m_viewportLat = point.m_lat = apiPoint.m_lat;
+ request.m_viewportLon = point.m_lon = apiPoint.m_lon;
+ point.m_name = apiPoint.m_title; point.m_id = apiPoint.m_url;
+
+ request.m_points.push_back(point);
+ }
+
return true;
}
}