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 <iomanip>
|
||||
#include <string>
|
||||
|
||||
namespace osrm
|
||||
@ -12,17 +13,16 @@ namespace util
|
||||
inline std::string toOSMLink(const util::FloatCoordinate &c)
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << c.lat << "&mlon=" << c.lon << "#map=19/"
|
||||
<< c.lat << "/" << c.lon;
|
||||
link << "http://www.openstreetmap.org/?zoom=18&mlat=" << std::setprecision(10) << c.lat
|
||||
<< "&mlon=" << c.lon;
|
||||
return link.str();
|
||||
}
|
||||
|
||||
inline std::string toOSMLink(const util::Coordinate &c)
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << toFloating(c.lat)
|
||||
<< "&mlon=" << toFloating(c.lon) << "#map=19/" << toFloating(c.lat) << "/"
|
||||
<< toFloating(c.lon);
|
||||
link << "http://www.openstreetmap.org/?zoom=18&mlat=" << std::setprecision(10)
|
||||
<< toFloating(c.lat) << "&mlon=" << toFloating(c.lon);
|
||||
return link.str();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user