Skip to content

Commit f9f02af

Browse files
committed
Revert "revert the functionality of 944f34b - refs mapnik#2937"
This reverts commit a91d737.
1 parent 5170ae6 commit f9f02af

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/vertex_cache.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,8 @@ vertex_cache & vertex_cache::get_offseted(double offset, double region_width)
155155

156156
// find the point on the offset line closest to the current position,
157157
// which we'll use to make the offset line aligned to this one.
158-
// TODO: `position_closest_to` is disable since it is too expensive:
159-
// https://github.com/mapnik/mapnik/issues/2937
160-
//double seek = offseted_line->position_closest_to(current_position_);
161-
double seek = (position_ + region_width/2.0) * offseted_line->length() / length() - region_width/2.0;
162-
if (seek < 0) seek = 0;
163-
if (seek > offseted_line->length()) seek = offseted_line->length();
158+
double seek = offseted_line->position_closest_to(current_position_);
164159
offseted_line->move(seek);
165-
166160
return *offseted_line;
167161
}
168162

0 commit comments

Comments
 (0)