summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2017-11-07 13:01:42 -0800
committerChris Loer <chris.loer@gmail.com>2017-11-07 13:28:00 -0800
commitb3dd0feaf95f04ce54873f1c1cd92b047aaccc89 (patch)
tree8d0efa6ca1c53fae6372fa5b7a71c961ac29d93e
parent8a0486ed3c41c216c8de62977cd4efa16db2657d (diff)
downloadqtlocation-mapboxgl-b3dd0feaf95f04ce54873f1c1cd92b047aaccc89.tar.gz
TODO -> explanation for why we calculate tile distances the way we do.
-rw-r--r--src/mbgl/layout/symbol_layout.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp
index 747a46064f..09d8883544 100644
--- a/src/mbgl/layout/symbol_layout.cpp
+++ b/src/mbgl/layout/symbol_layout.cpp
@@ -394,7 +394,8 @@ bool SymbolLayout::anchorIsTooClose(const std::u16string& text, const float repe
return false;
}
-// TODO: this is a weird naive port of JS code; think harder about what makes sense in native
+// Analog of `addToLineVertexArray` in JS. This version doesn't need to build up a line array like the
+// JS version does, but it uses the same logic to calculate tile distances.
std::vector<float> CalculateTileDistances(const GeometryCoordinates& line, const Anchor& anchor) {
std::vector<float> tileDistances(line.size());
if (anchor.segment != -1) {