MCPcopy Create free account
hub / github.com/comaps/comaps / LoadXmlFromOSM

Method LoadXmlFromOSM

libs/editor/changeset_wrapper.cpp:143–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void ChangesetWrapper::LoadXmlFromOSM(ms::LatLon const & ll, pugi::xml_document & doc, double radiusInMeters)
144{
145 auto const response = m_api.GetXmlFeaturesAtLatLon(ll.m_lat, ll.m_lon, radiusInMeters);
146 if (response.first != OsmOAuth::HTTP::OK)
147 MYTHROW(HttpErrorException, ("HTTP error", response, "with GetXmlFeaturesAtLatLon", ll));
148
149 if (pugi::status_ok != doc.load_string(response.second.c_str()).status)
150 MYTHROW(OsmXmlParseException,
151 ("Can't parse OSM server response for GetXmlFeaturesAtLatLon request", response.second));
152}
153
154void ChangesetWrapper::LoadXmlFromOSM(ms::LatLon const & min, ms::LatLon const & max, pugi::xml_document & doc)
155{

Callers

nothing calls this directly

Calls 2

GetXmlFeaturesInRectMethod · 0.80

Tested by

no test coverage detected