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:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2019-05-27 15:06:53 +0300
committermpimenov <mpimenov@users.noreply.github.com>2019-05-30 18:53:51 +0300
commitb0868d6d3f371a2aff5db043b219906c95502a42 (patch)
treeaeac2e18d7fdae208b0e2ee919afd19c356b6614 /partners_api
parentc0fb90a4a8b1228144e564a1fd1734136201d549 (diff)
[geometry] LatLon refactoring.
Diffstat (limited to 'partners_api')
-rw-r--r--partners_api/maxim_api.cpp10
-rw-r--r--partners_api/rutaxi_api.cpp2
-rw-r--r--partners_api/uber_api.cpp12
-rw-r--r--partners_api/yandex_api.cpp8
4 files changed, 16 insertions, 16 deletions
diff --git a/partners_api/maxim_api.cpp b/partners_api/maxim_api.cpp
index 68488b0c2a..acd7e06e68 100644
--- a/partners_api/maxim_api.cpp
+++ b/partners_api/maxim_api.cpp
@@ -41,8 +41,8 @@ bool RawApi::GetTaxiInfo(ms::LatLon const & from, ms::LatLon const & to, std::st
url << std::fixed << std::setprecision(6) << baseUrl
<< "/CalculateByCoords?version=1.0&platform=WEB&RefOrgId="
<< MAXIM_CLIENT_ID << "&access-token=" << MAXIM_SERVER_TOKEN
- << "&startLatitude=" << from.lat << "&startLongitude=" << from.lon
- << "&endLatitude=" << to.lat << "&endLongitude=" << to.lon;
+ << "&startLatitude=" << from.m_lat << "&startLongitude=" << from.m_lon
+ << "&endLatitude=" << to.m_lat << "&endLongitude=" << to.m_lon;
return RunSimpleHttpRequest(url.str(), result);
}
@@ -99,9 +99,9 @@ RideRequestLinks Api::GetRideRequestLinks(std::string const & productId, ms::Lat
std::ostringstream orderLink;
std::ostringstream installLink;
- orderLink << "order?refOrgId=" << MAXIM_CLIENT_ID << "&startLatitude=" << from.lat
- << "&startLongitude=" << from.lon << "&endLatitude=" << to.lat
- << "&endLongitude=" << to.lon;
+ orderLink << "order?refOrgId=" << MAXIM_CLIENT_ID << "&startLatitude=" << from.m_lat
+ << "&startLongitude=" << from.m_lon << "&endLatitude=" << to.m_lat
+ << "&endLongitude=" << to.m_lon;
#if defined(OMIM_OS_IPHONE)
installLink << "https://app.appsflyer.com/id579985456?pid=maps_me";
diff --git a/partners_api/rutaxi_api.cpp b/partners_api/rutaxi_api.cpp
index 2e0a6fe369..d9bdfe6ea0 100644
--- a/partners_api/rutaxi_api.cpp
+++ b/partners_api/rutaxi_api.cpp
@@ -54,7 +54,7 @@ bool RawApi::GetNearObject(ms::LatLon const & pos, std::string const & city, std
std::string const & baseUrl /* = kTaxiInfoUrl */)
{
std::ostringstream data;
- data << R"({"latitude": )" << pos.lat << R"(, "longitude": )" << pos.lon << R"(, "city": ")"
+ data << R"({"latitude": )" << pos.m_lat << R"(, "longitude": )" << pos.m_lon << R"(, "city": ")"
<< city << R"("})";
return RunSimpleHttpRequest(baseUrl + "near/", data.str(), result);
diff --git a/partners_api/uber_api.cpp b/partners_api/uber_api.cpp
index a90d7e5887..8deef61119 100644
--- a/partners_api/uber_api.cpp
+++ b/partners_api/uber_api.cpp
@@ -130,7 +130,7 @@ bool RawApi::GetProducts(ms::LatLon const & pos, string & result,
{
ostringstream url;
url << fixed << setprecision(6) << baseUrl << "?server_token=" << UBER_SERVER_TOKEN
- << "&latitude=" << pos.lat << "&longitude=" << pos.lon;
+ << "&latitude=" << pos.m_lat << "&longitude=" << pos.m_lon;
return RunSimpleHttpRequest(url.str(), result);
}
@@ -141,7 +141,7 @@ bool RawApi::GetEstimatedTime(ms::LatLon const & pos, string & result,
{
ostringstream url;
url << fixed << setprecision(6) << baseUrl << "/time?server_token=" << UBER_SERVER_TOKEN
- << "&start_latitude=" << pos.lat << "&start_longitude=" << pos.lon;
+ << "&start_latitude=" << pos.m_lat << "&start_longitude=" << pos.m_lon;
return RunSimpleHttpRequest(url.str(), result);
}
@@ -152,8 +152,8 @@ bool RawApi::GetEstimatedPrice(ms::LatLon const & from, ms::LatLon const & to, s
{
ostringstream url;
url << fixed << setprecision(6) << baseUrl << "/price?server_token=" << UBER_SERVER_TOKEN
- << "&start_latitude=" << from.lat << "&start_longitude=" << from.lon
- << "&end_latitude=" << to.lat << "&end_longitude=" << to.lon;
+ << "&start_latitude=" << from.m_lat << "&start_longitude=" << from.m_lon
+ << "&end_latitude=" << to.m_lat << "&end_longitude=" << to.m_lon;
return RunSimpleHttpRequest(url.str(), result);
}
@@ -281,8 +281,8 @@ RideRequestLinks Api::GetRideRequestLinks(string const & productId, ms::LatLon c
stringstream url;
url << fixed << setprecision(6)
<< "?client_id=" << UBER_CLIENT_ID << "&action=setPickup&product_id=" << productId
- << "&pickup[latitude]=" << from.lat << "&pickup[longitude]=" << from.lon
- << "&dropoff[latitude]=" << to.lat << "&dropoff[longitude]=" << to.lon;
+ << "&pickup[latitude]=" << from.m_lat << "&pickup[longitude]=" << from.m_lon
+ << "&dropoff[latitude]=" << to.m_lat << "&dropoff[longitude]=" << to.m_lon;
return {"uber://" + url.str(), "https://m.uber.com/ul" + url.str()};
}
diff --git a/partners_api/yandex_api.cpp b/partners_api/yandex_api.cpp
index 0cec103a17..5bdda88d21 100644
--- a/partners_api/yandex_api.cpp
+++ b/partners_api/yandex_api.cpp
@@ -60,7 +60,7 @@ bool RawApi::GetTaxiInfo(ms::LatLon const & from, ms::LatLon const & to, std::st
{
std::ostringstream url;
url << std::fixed << std::setprecision(6) << baseUrl << "/taxi_info?clid=" << YANDEX_CLIENT_ID
- << "&rll=" << from.lon << "," << from.lat << "~" << to.lon << "," << to.lat
+ << "&rll=" << from.m_lon << "," << from.m_lat << "~" << to.m_lon << "," << to.m_lat
<< "&class=econom";
return RunSimpleHttpRequest(url.str(), result);
@@ -118,13 +118,13 @@ RideRequestLinks Api::GetRideRequestLinks(std::string const & productId, ms::Lat
std::ostringstream deepLink;
#if defined(OMIM_OS_IPHONE)
- deepLink << "https://3.redirect.appmetrica.yandex.com/route?start-lat=" << from.lat
- << "&start-lon=" << from.lon << "&end-lat=" << to.lat << "&end-lon=" << to.lon
+ deepLink << "https://3.redirect.appmetrica.yandex.com/route?start-lat=" << from.m_lat
+ << "&start-lon=" << from.m_lon << "&end-lat=" << to.m_lat << "&end-lon=" << to.m_lon
<< "&utm_source=mapsme&appmetrica_tracking_id=" << YANDEX_TRACKING_ID
<< "&ref=8d20bf0f9e4749c48822358cdaf6a6c7";
#elif defined(OMIM_OS_ANDROID)
deepLink << "https://redirect.appmetrica.yandex.com/serve/" << YANDEX_TRACKING_ID << "?startlat="
- << from.lat << "&startlon=" << from.lon << "&endlat=" << to.lat << "&endlon=" << to.lon
+ << from.m_lat << "&startlon=" << from.m_lon << "&endlat=" << to.m_lat << "&endlon=" << to.m_lon
<< "&ref=8d20bf0f9e4749c48822358cdaf6a6c7";
#endif