diff --git a/bindings/python/mapnik_parameters.cpp b/bindings/python/mapnik_parameters.cpp index 9bc746756..21504d3ba 100644 --- a/bindings/python/mapnik_parameters.cpp +++ b/bindings/python/mapnik_parameters.cpp @@ -196,6 +196,12 @@ std::shared_ptr create_parameter(mapnik::value_unicode_string return std::make_shared(key_utf8,value); } +bool contains(mapnik::parameters const& p, std::string const& key) +{ + parameters::const_iterator pos = p.find(key); + return pos != p.end(); +} + // needed for Python_Unicode to std::string (utf8) conversion std::shared_ptr create_parameter_from_string(mapnik::value_unicode_string const& key, mapnik::value_unicode_string const& ustr) @@ -233,6 +239,7 @@ void export_parameters() .def("__getitem__",get_params_by_key2) .def("__getitem__",get_params_by_index) .def("__len__",get_params_size) + .def("__contains__",contains) .def("append",add_parameter) .def("iteritems",iterator()) ; diff --git a/tests/visual_tests/styles/building-symbolizer-opacity.xml b/tests/visual_tests/styles/building-symbolizer-opacity.xml index b6db1c611..5ddd40d4c 100644 --- a/tests/visual_tests/styles/building-symbolizer-opacity.xml +++ b/tests/visual_tests/styles/building-symbolizer-opacity.xml @@ -4,6 +4,9 @@ background-image-opacity=".5" background-image-comp-op="soft-light" > + + 512, 512 + - \ No newline at end of file + diff --git a/tests/visual_tests/styles/line-opacity-multi-render.xml b/tests/visual_tests/styles/line-opacity-multi-render.xml index f4ad94d48..37bda8e7d 100644 --- a/tests/visual_tests/styles/line-opacity-multi-render.xml +++ b/tests/visual_tests/styles/line-opacity-multi-render.xml @@ -1,4 +1,7 @@ + + 512,512 + - + poly @@ -22,4 +25,4 @@ - \ No newline at end of file + diff --git a/tests/visual_tests/styles/marker-line-placement-many-vertices.xml b/tests/visual_tests/styles/marker-line-placement-many-vertices.xml index 66cc71ea2..6c9d155d2 100644 --- a/tests/visual_tests/styles/marker-line-placement-many-vertices.xml +++ b/tests/visual_tests/styles/marker-line-placement-many-vertices.xml @@ -1,6 +1,9 @@ + + 600, 400 + My Style diff --git a/tests/visual_tests/styles/marker-multi-policy.xml b/tests/visual_tests/styles/marker-multi-policy.xml index 937cc15ae..7c77c3ec4 100644 --- a/tests/visual_tests/styles/marker-multi-policy.xml +++ b/tests/visual_tests/styles/marker-multi-policy.xml @@ -1,4 +1,7 @@ + + 600,400 + - \ No newline at end of file + diff --git a/tests/visual_tests/styles/marker-on-line-spacing-eq-width.xml b/tests/visual_tests/styles/marker-on-line-spacing-eq-width.xml index c4ad7d961..c4962ce9b 100644 --- a/tests/visual_tests/styles/marker-on-line-spacing-eq-width.xml +++ b/tests/visual_tests/styles/marker-on-line-spacing-eq-width.xml @@ -1,6 +1,9 @@ + + 600,400 + alpha @@ -50,4 +53,4 @@ - \ No newline at end of file + diff --git a/tests/visual_tests/styles/marker-on-line.xml b/tests/visual_tests/styles/marker-on-line.xml index 42f67a425..87d22f1f9 100644 --- a/tests/visual_tests/styles/marker-on-line.xml +++ b/tests/visual_tests/styles/marker-on-line.xml @@ -1,4 +1,7 @@ + + 600,400 + - + frame @@ -71,4 +74,4 @@ x,y - \ No newline at end of file + diff --git a/tests/visual_tests/styles/marker-whole-multi-polygon.xml b/tests/visual_tests/styles/marker-whole-multi-polygon.xml index 110ef7f78..4b95c31f1 100644 --- a/tests/visual_tests/styles/marker-whole-multi-polygon.xml +++ b/tests/visual_tests/styles/marker-whole-multi-polygon.xml @@ -1,4 +1,7 @@ + + 512,512 + - + - + - + - + - + - + - + - + - \ No newline at end of file + diff --git a/tests/visual_tests/styles/shield-on-polygon.xml b/tests/visual_tests/styles/shield-on-polygon.xml index c4f2f9e55..da92ef1ec 100644 --- a/tests/visual_tests/styles/shield-on-polygon.xml +++ b/tests/visual_tests/styles/shield-on-polygon.xml @@ -1,6 +1,9 @@ + + 600,400 + -180,-85.05112877980659,180,85.05112877980659 @@ -46,4 +49,4 @@ - \ No newline at end of file + diff --git a/tests/visual_tests/styles/shieldsymbolizer-1.xml b/tests/visual_tests/styles/shieldsymbolizer-1.xml index 0af96590a..848ca0ede 100644 --- a/tests/visual_tests/styles/shieldsymbolizer-1.xml +++ b/tests/visual_tests/styles/shieldsymbolizer-1.xml @@ -2,11 +2,15 @@ + + 490, 100; 495, 100; 497, 100; 498, 100; 499, 100; 500, 100; 501, 100; 502, 100; 505, 100; 510, 100 + My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/shieldsymbolizer-2.xml b/tests/visual_tests/styles/shieldsymbolizer-2.xml index 7acf4276d..9f4473bcf 100644 --- a/tests/visual_tests/styles/shieldsymbolizer-2.xml +++ b/tests/visual_tests/styles/shieldsymbolizer-2.xml @@ -2,11 +2,15 @@ + + 490, 100; 495, 100; 497, 100; 498, 100; 499, 100; 500, 100; 501, 100; 502, 100; 505, 100; 510, 100 + My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/shieldsymbolizer-3.xml b/tests/visual_tests/styles/shieldsymbolizer-3.xml index 01e3dc151..67c60f54c 100644 --- a/tests/visual_tests/styles/shieldsymbolizer-3.xml +++ b/tests/visual_tests/styles/shieldsymbolizer-3.xml @@ -2,11 +2,15 @@ + + 490, 100; 495, 100; 497, 100; 498, 100; 499, 100; 500, 100; 501, 100; 502, 100; 505, 100; 510, 100 + My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/shieldsymbolizer-4.xml b/tests/visual_tests/styles/shieldsymbolizer-4.xml index 14fe55ebf..6693ba00a 100644 --- a/tests/visual_tests/styles/shieldsymbolizer-4.xml +++ b/tests/visual_tests/styles/shieldsymbolizer-4.xml @@ -2,11 +2,15 @@ + + 490, 100; 495, 100; 497, 100; 498, 100; 499, 100; 500, 100; 501, 100; 502, 100; 505, 100; 510, 100 + My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simple-E.xml b/tests/visual_tests/styles/simple-E.xml index d937efa01..799a3d65c 100644 --- a/tests/visual_tests/styles/simple-E.xml +++ b/tests/visual_tests/styles/simple-E.xml @@ -6,6 +6,7 @@ My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simple-N.xml b/tests/visual_tests/styles/simple-N.xml index a5e6eebdf..5b9b79d15 100644 --- a/tests/visual_tests/styles/simple-N.xml +++ b/tests/visual_tests/styles/simple-N.xml @@ -6,6 +6,7 @@ My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simple-NE.xml b/tests/visual_tests/styles/simple-NE.xml index 8589c77d9..aee999c0e 100644 --- a/tests/visual_tests/styles/simple-NE.xml +++ b/tests/visual_tests/styles/simple-NE.xml @@ -6,6 +6,7 @@ My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simple-NW.xml b/tests/visual_tests/styles/simple-NW.xml index c133eb16e..bf4d35ffe 100644 --- a/tests/visual_tests/styles/simple-NW.xml +++ b/tests/visual_tests/styles/simple-NW.xml @@ -6,6 +6,7 @@ My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simple-S.xml b/tests/visual_tests/styles/simple-S.xml index 2ceb0c594..a868ea30a 100644 --- a/tests/visual_tests/styles/simple-S.xml +++ b/tests/visual_tests/styles/simple-S.xml @@ -6,6 +6,7 @@ My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simple-SE.xml b/tests/visual_tests/styles/simple-SE.xml index eea79a652..5c411a0e2 100644 --- a/tests/visual_tests/styles/simple-SE.xml +++ b/tests/visual_tests/styles/simple-SE.xml @@ -6,6 +6,7 @@ My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simple-SW.xml b/tests/visual_tests/styles/simple-SW.xml index d7038b308..bc0712931 100644 --- a/tests/visual_tests/styles/simple-SW.xml +++ b/tests/visual_tests/styles/simple-SW.xml @@ -6,6 +6,7 @@ My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simple-W.xml b/tests/visual_tests/styles/simple-W.xml index ea8258984..f687644ca 100644 --- a/tests/visual_tests/styles/simple-W.xml +++ b/tests/visual_tests/styles/simple-W.xml @@ -6,6 +6,7 @@ My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simple-shield.xml b/tests/visual_tests/styles/simple-shield.xml index 80efe2c6e..3ea2f6442 100644 --- a/tests/visual_tests/styles/simple-shield.xml +++ b/tests/visual_tests/styles/simple-shield.xml @@ -1,6 +1,9 @@ + + 600,400 + My Style diff --git a/tests/visual_tests/styles/simple.xml b/tests/visual_tests/styles/simple.xml index a10fbdac5..ff4492542 100644 --- a/tests/visual_tests/styles/simple.xml +++ b/tests/visual_tests/styles/simple.xml @@ -1,11 +1,15 @@ + + 800, 100; 600, 100; 400, 100; 300, 100; 250, 100; 150, 100; 100, 100 + My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv diff --git a/tests/visual_tests/styles/simplify-douglas-peucker.xml b/tests/visual_tests/styles/simplify-douglas-peucker.xml index 8580801b0..2553c3829 100644 --- a/tests/visual_tests/styles/simplify-douglas-peucker.xml +++ b/tests/visual_tests/styles/simplify-douglas-peucker.xml @@ -1,4 +1,7 @@ + + 500, 1000 + - \ No newline at end of file + diff --git a/tests/visual_tests/styles/text-charplacement.xml b/tests/visual_tests/styles/text-charplacement.xml index 5a8a705c4..3eb09d16c 100644 --- a/tests/visual_tests/styles/text-charplacement.xml +++ b/tests/visual_tests/styles/text-charplacement.xml @@ -1,5 +1,8 @@ + + 512,512 + @@ -22,10 +25,10 @@ { "type": "FeatureCollection", - + "features": [ - - { "type": "Feature", + + { "type": "Feature", "properties": { "label": "this,that", "wrap-character":",", @@ -33,7 +36,7 @@ }, "geometry" : { "type": "Point", "coordinates": [ 2.5, 2.5 ] } }, - { "type": "Feature", + { "type": "Feature", "properties": { "label": "this-that", "wrap-character":"-", @@ -43,7 +46,7 @@ } ] } - + geojson @@ -71,4 +74,4 @@ x,y - \ No newline at end of file + diff --git a/tests/visual_tests/styles/text-malayalam.xml b/tests/visual_tests/styles/text-malayalam.xml index 48b24c955..689f884ac 100644 --- a/tests/visual_tests/styles/text-malayalam.xml +++ b/tests/visual_tests/styles/text-malayalam.xml @@ -2,13 +2,16 @@ + + 800, 100 + My Style csv + -0.05, -0.01, 0.95, 0.01 ../data/points.csv - -1,-1,1,1