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

Function GetLatLonFromNode

libs/editor/xml_feature.cpp:63–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63ms::LatLon GetLatLonFromNode(pugi::xml_node const & node)
64{
65 ms::LatLon ll;
66 if (!strings::to_double(node.attribute("lat").value(), ll.m_lat))
67 MYTHROW(editor::NoLatLon, ("Can't parse lat attribute:", string(node.attribute("lat").value())));
68 if (!strings::to_double(node.attribute("lon").value(), ll.m_lon))
69 MYTHROW(editor::NoLatLon, ("Can't parse lon attribute:", string(node.attribute("lon").value())));
70 return ll;
71}
72
73m2::PointD GetMercatorPointFromNode(pugi::xml_node const & node)
74{

Callers 4

ValidateElementFunction · 0.85
GetMercatorCenterMethod · 0.85
GetCenterMethod · 0.85
GetEditJournalMethod · 0.85

Calls 2

to_doubleFunction · 0.50
valueMethod · 0.45

Tested by

no test coverage detected