Fixes issue #533
This commit is contained in:
parent
a255f222ef
commit
f7fdb8b54e
@ -33,7 +33,7 @@ template <typename Iterator, class HandlerT>
|
|||||||
struct APIGrammar : qi::grammar<Iterator> {
|
struct APIGrammar : qi::grammar<Iterator> {
|
||||||
APIGrammar(HandlerT * h) : APIGrammar::base_type(api_call), handler(h) {
|
APIGrammar(HandlerT * h) : APIGrammar::base_type(api_call), handler(h) {
|
||||||
api_call = qi::lit('/') >> string[boost::bind(&HandlerT::setService, handler, ::_1)] >> *(query);
|
api_call = qi::lit('/') >> string[boost::bind(&HandlerT::setService, handler, ::_1)] >> *(query);
|
||||||
query = ('?') >> (+(zoom | output | jsonp | checksum | location | hint | compressed_geometry | language | instruction | alt_route | old_API) ) ;
|
query = ('?') >> (+(zoom | output | jsonp | checksum | location | hint | cmp | language | instruction | alt_route | old_API) ) ;
|
||||||
|
|
||||||
zoom = (-qi::lit('&')) >> qi::lit('z') >> '=' >> qi::short_[boost::bind(&HandlerT::setZoomLevel, handler, ::_1)];
|
zoom = (-qi::lit('&')) >> qi::lit('z') >> '=' >> qi::short_[boost::bind(&HandlerT::setZoomLevel, handler, ::_1)];
|
||||||
output = (-qi::lit('&')) >> qi::lit("output") >> '=' >> string[boost::bind(&HandlerT::setOutputFormat, handler, ::_1)];
|
output = (-qi::lit('&')) >> qi::lit("output") >> '=' >> string[boost::bind(&HandlerT::setOutputFormat, handler, ::_1)];
|
||||||
@ -53,7 +53,7 @@ struct APIGrammar : qi::grammar<Iterator> {
|
|||||||
}
|
}
|
||||||
qi::rule<Iterator> api_call, query;
|
qi::rule<Iterator> api_call, query;
|
||||||
qi::rule<Iterator, std::string()> service, zoom, output, string, jsonp, checksum, location, hint,
|
qi::rule<Iterator, std::string()> service, zoom, output, string, jsonp, checksum, location, hint,
|
||||||
compressed_geometry, stringwithDot, language, instruction, geometry,
|
stringwithDot, language, instruction, geometry,
|
||||||
cmp, alt_route, old_API;
|
cmp, alt_route, old_API;
|
||||||
|
|
||||||
HandlerT * handler;
|
HandlerT * handler;
|
||||||
|
Loading…
Reference in New Issue
Block a user