relax grammar rules to allow arbitary ordering - currently we're looking for features skipping anything else

ref: https://github.com/mapnik/mapnik/issues/2983
This commit is contained in:
artemp 2015-07-17 10:58:36 +02:00
parent a43faf9017
commit 5423f4c5bf

View file

@ -63,10 +63,9 @@ extract_bounding_box_grammar<Iterator, ErrorHandler>::extract_bounding_box_gramm
start = features(_r1)
;
features = iter_pos[_a = _1] >> -(lit('{') >> -lit("\"type\"")
>> lit(':') >> lit("\"FeatureCollection\"")
>> *(lit(',') >> (json.key_value - lit("\"features\"")))
>> lit(',') >> lit("\"features\"")
features = iter_pos[_a = _1] >> -(lit('{')
>> *((json.key_value - lit("\"features\"")) >> lit(','))
>> lit("\"features\"")
>> lit(':'))
>> lit('[') >> (feature(_r1,_a) % lit(',')) >> lit(']')
;