2018-02-02 07:34:53 -05:00
|
|
|
#ifndef OSRM_UTIL_TO_OSM_LINK_HPP
|
|
|
|
#define OSRM_UTIL_TO_OSM_LINK_HPP
|
|
|
|
|
|
|
|
#include "util/coordinate.hpp"
|
|
|
|
|
2018-02-23 03:39:41 -05:00
|
|
|
#include <iomanip>
|
2018-02-02 07:34:53 -05:00
|
|
|
#include <string>
|
|
|
|
|
2022-12-11 04:10:26 -05:00
|
|
|
namespace osrm::util
|
2018-02-02 07:34:53 -05:00
|
|
|
{
|
|
|
|
inline std::string toOSMLink(const util::FloatCoordinate &c)
|
|
|
|
{
|
|
|
|
std::stringstream link;
|
2018-02-23 03:39:41 -05:00
|
|
|
link << "http://www.openstreetmap.org/?zoom=18&mlat=" << std::setprecision(10) << c.lat
|
|
|
|
<< "&mlon=" << c.lon;
|
2018-02-02 07:34:53 -05:00
|
|
|
return link.str();
|
|
|
|
}
|
|
|
|
|
|
|
|
inline std::string toOSMLink(const util::Coordinate &c)
|
|
|
|
{
|
|
|
|
std::stringstream link;
|
2018-02-23 03:39:41 -05:00
|
|
|
link << "http://www.openstreetmap.org/?zoom=18&mlat=" << std::setprecision(10)
|
|
|
|
<< toFloating(c.lat) << "&mlon=" << toFloating(c.lon);
|
2018-02-02 07:34:53 -05:00
|
|
|
return link.str();
|
|
|
|
}
|
2022-12-20 12:00:11 -05:00
|
|
|
} // namespace osrm::util
|
2018-02-02 07:34:53 -05:00
|
|
|
|
|
|
|
#endif
|