From 705d1dff4565be16d1bd070f3a3da76d8cb40cb9 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Mon, 25 Jan 2016 12:55:47 +0300 Subject: [PATCH] Convenient method in OSM Server API. --- editor/server_api.cpp | 5 +++++ editor/server_api.hpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/editor/server_api.cpp b/editor/server_api.cpp index 29411eb6dd..8051f723ee 100644 --- a/editor/server_api.cpp +++ b/editor/server_api.cpp @@ -122,4 +122,9 @@ OsmOAuth::Response ServerApi06::GetXmlFeaturesAtLatLon(double lat, double lon) c return GetXmlFeaturesInRect(rect); } +OsmOAuth::Response ServerApi06::GetXmlFeaturesAtLatLon(ms::LatLon const & ll) const +{ + return GetXmlFeaturesAtLatLon(ll.lat, ll.lon); +} + } // namespace osm diff --git a/editor/server_api.hpp b/editor/server_api.hpp index b0de50fdfa..d4fb8309df 100644 --- a/editor/server_api.hpp +++ b/editor/server_api.hpp @@ -2,6 +2,7 @@ #include "editor/osm_auth.hpp" +#include "geometry/latlon.hpp" #include "geometry/rect2d.hpp" #include "std/map.hpp" @@ -43,6 +44,7 @@ public: /// @returns OSM xml string with features in the bounding box or empty string on error. OsmOAuth::Response GetXmlFeaturesInRect(m2::RectD const & latLonRect) const; OsmOAuth::Response GetXmlFeaturesAtLatLon(double lat, double lon) const; + OsmOAuth::Response GetXmlFeaturesAtLatLon(ms::LatLon const & ll) const; private: OsmOAuth m_auth;