diff --git a/include/mapnik/marker_helpers.hpp b/include/mapnik/marker_helpers.hpp index 49c011a3b..f36bc70e4 100644 --- a/include/mapnik/marker_helpers.hpp +++ b/include/mapnik/marker_helpers.hpp @@ -163,17 +163,24 @@ template void apply_markers_multi(feature_impl const& feature, attributes const& vars, Converter & converter, Processor & proc, symbolizer_base const& sym) { using apply_vertex_converter_type = detail::apply_vertex_converter; - using vertex_processor_type = geometry::vertex_processor; - + apply_vertex_converter_type apply(converter, proc); auto const& geom = feature.get_geometry(); geometry::geometry_types type = geometry::geometry_type(geom); - if (type == geometry::geometry_types::Point - || type == geometry::geometry_types::LineString - || type == geometry::geometry_types::Polygon) + if (type == geometry::geometry_types::Point) { - apply_vertex_converter_type apply(converter, proc); - mapnik::util::apply_visitor(vertex_processor_type(apply), geom); + geometry::point_vertex_adapter va(geom.get>()); + converter.apply(va, proc); + } + else if (type == geometry::geometry_types::LineString) + { + geometry::line_string_vertex_adapter va(geom.get>()); + converter.apply(va, proc); + } + else if (type == geometry::geometry_types::Polygon) + { + geometry::polygon_vertex_adapter va(geom.get>()); + converter.apply(va, proc); } else { @@ -231,8 +238,34 @@ void apply_markers_multi(feature_impl const& feature, attributes const& vars, Co { MAPNIK_LOG_WARN(marker_symbolizer) << "marker_multi_policy != 'each' has no effect with marker_placement != 'point'"; } - apply_vertex_converter_type apply(converter, proc); - mapnik::util::apply_visitor(vertex_processor_type(apply), geom); + if (type == geometry::geometry_types::MultiPoint) + { + for (auto const& pt : geom.get>()) + { + geometry::point_vertex_adapter va(pt); + converter.apply(va, proc); + } + } + else if (type == geometry::geometry_types::MultiLineString) + { + for (auto const& line : geom.get>()) + { + geometry::line_string_vertex_adapter va(line); + converter.apply(va, proc); + } + } + else if (type == geometry::geometry_types::MultiPolygon) + { + for (auto const& poly : geom.get>()) + { + geometry::polygon_vertex_adapter va(poly); + converter.apply(va, proc); + } + } + else if (type == geometry::geometry_types::GeometryCollection) + { + // no-op for GeometryCollection + } } } } diff --git a/test/data-visual b/test/data-visual index f5623b5a3..93e70a5ae 160000 --- a/test/data-visual +++ b/test/data-visual @@ -1 +1 @@ -Subproject commit f5623b5a312c58cd9c1926008fcf114944c769a3 +Subproject commit 93e70a5ae91b2bd4b8fc3912a7e6e4b017021b2b