Skip to content

Commit

Permalink
Handle large errors in marker placement.
Browse files Browse the repository at this point in the history
Closes #1485.
  • Loading branch information
herm committed Apr 1, 2013
1 parent ded74f6 commit 5f137bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/mapnik/markers_placement.hpp
Expand Up @@ -151,10 +151,9 @@ class markers_placement : mapnik::noncopyable
//Error for this marker is too large. Skip to the next position.
if (std::fabs(error_) > max_err_allowed)
{
if (error_ > spacing_)
while (error_ > spacing_)
{
MAPNIK_LOG_WARN(markers_placement) << "Extremely large error (" << error_ << ") in markers_placement. Please file a bug report.";
error_ = 0.0; //Avoid moving backwards
error_ -= spacing_; //Avoid moving backwards
}
spacing_left_ += spacing_ - error_;
error_ = 0.0;
Expand Down

0 comments on commit 5f137bc

Please sign in to comment.