Address PR comments
This commit is contained in:
@@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
RouteParameters::RouteParameters()
|
||||
: zoom_level(18), print_instructions(false), alternate_route(true), geometry(true),
|
||||
compression(true), deprecatedAPI(false), uturn_default(false), classify(false), mapped_points(true),
|
||||
compression(true), deprecatedAPI(false), uturn_default(false), classify(false),
|
||||
matching_beta(5), gps_precision(5), check_sum(-1), num_results(1)
|
||||
{
|
||||
}
|
||||
@@ -146,22 +146,28 @@ void RouteParameters::addCoordinate(
|
||||
coordinates.emplace_back(
|
||||
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<0>(received_coordinates)),
|
||||
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<1>(received_coordinates)));
|
||||
is_source.emplace_back(true);
|
||||
is_destination.emplace_back(true);
|
||||
}
|
||||
|
||||
void RouteParameters::addDestination(
|
||||
const boost::fusion::vector<double, double> &received_coordinates)
|
||||
{
|
||||
destinations.emplace_back(
|
||||
coordinates.emplace_back(
|
||||
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<0>(received_coordinates)),
|
||||
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<1>(received_coordinates)));
|
||||
is_source.emplace_back(false);
|
||||
is_destination.emplace_back(true);
|
||||
}
|
||||
|
||||
void RouteParameters::addSource(
|
||||
const boost::fusion::vector<double, double> &received_coordinates)
|
||||
{
|
||||
sources.emplace_back(
|
||||
coordinates.emplace_back(
|
||||
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<0>(received_coordinates)),
|
||||
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<1>(received_coordinates)));
|
||||
is_source.emplace_back(true);
|
||||
is_destination.emplace_back(false);
|
||||
}
|
||||
|
||||
void RouteParameters::getCoordinatesFromGeometry(const std::string &geometry_string)
|
||||
@@ -170,4 +176,3 @@ void RouteParameters::getCoordinatesFromGeometry(const std::string &geometry_str
|
||||
coordinates = pc.decode_string(geometry_string);
|
||||
}
|
||||
|
||||
void RouteParameters::setMappedPointsFlag(const bool flag) { mapped_points = flag; }
|
||||
|
||||
Reference in New Issue
Block a user