polyline string as parameter added

This commit is contained in:
Andreas Gruß
2015-05-31 13:57:27 +02:00
parent b1ef4cfee9
commit 9b0d3dfaeb
5 changed files with 57 additions and 2 deletions
+8
View File
@@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <osrm/route_parameters.hpp>
#include "../algorithms/polyline_compressor.hpp"
RouteParameters::RouteParameters()
: zoom_level(18), print_instructions(false), alternate_route(true), geometry(true),
compression(true), deprecatedAPI(false), uturn_default(false), classify(false),
@@ -131,3 +133,9 @@ void RouteParameters::addCoordinate(
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<0>(received_coordinates)),
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<1>(received_coordinates)));
}
void RouteParameters::getCoordinatesFromGeometry(const std::string geometry_string)
{
PolylineCompressor pc;
coordinates = pc.decode_string(geometry_string);
}