Increase precision of coordinates in OSM links
This commit is contained in:
parent
ac23e3b223
commit
cf56b5ddbf
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "util/coordinate.hpp"
|
#include "util/coordinate.hpp"
|
||||||
|
|
||||||
|
#include <iomanip>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace osrm
|
namespace osrm
|
||||||
@ -12,17 +13,16 @@ namespace util
|
|||||||
inline std::string toOSMLink(const util::FloatCoordinate &c)
|
inline std::string toOSMLink(const util::FloatCoordinate &c)
|
||||||
{
|
{
|
||||||
std::stringstream link;
|
std::stringstream link;
|
||||||
link << "http://www.openstreetmap.org/?mlat=" << c.lat << "&mlon=" << c.lon << "#map=19/"
|
link << "http://www.openstreetmap.org/?zoom=18&mlat=" << std::setprecision(10) << c.lat
|
||||||
<< c.lat << "/" << c.lon;
|
<< "&mlon=" << c.lon;
|
||||||
return link.str();
|
return link.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string toOSMLink(const util::Coordinate &c)
|
inline std::string toOSMLink(const util::Coordinate &c)
|
||||||
{
|
{
|
||||||
std::stringstream link;
|
std::stringstream link;
|
||||||
link << "http://www.openstreetmap.org/?mlat=" << toFloating(c.lat)
|
link << "http://www.openstreetmap.org/?zoom=18&mlat=" << std::setprecision(10)
|
||||||
<< "&mlon=" << toFloating(c.lon) << "#map=19/" << toFloating(c.lat) << "/"
|
<< toFloating(c.lat) << "&mlon=" << toFloating(c.lon);
|
||||||
<< toFloating(c.lon);
|
|
||||||
return link.str();
|
return link.str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user