[core] Coordinate is now GeometryCoordinate
Also introduced GeometryCoordinates (vector of GeometryCoordinate items), to better cope with GeometryCollection.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
Anchors resample(const std::vector<Coordinate> &line, const float offset, const float spacing,
|
||||
Anchors resample(const GeometryCoordinates &line, const float offset, const float spacing,
|
||||
const float angleWindowSize, const float maxAngle, const float labelLength, const bool continuedLine, const bool placeAtMiddle) {
|
||||
|
||||
const float halfLabelLength = labelLength / 2.0f;
|
||||
@@ -23,8 +23,8 @@ Anchors resample(const std::vector<Coordinate> &line, const float offset, const
|
||||
|
||||
int i = 0;
|
||||
for (auto it = line.begin(), end = line.end() - 1; it != end; it++, i++) {
|
||||
const Coordinate &a = *(it);
|
||||
const Coordinate &b = *(it + 1);
|
||||
const GeometryCoordinate &a = *(it);
|
||||
const GeometryCoordinate &b = *(it + 1);
|
||||
|
||||
const float segmentDist = util::dist<float>(a, b);
|
||||
const float angle = util::angle_to(b, a);
|
||||
@@ -65,7 +65,7 @@ Anchors resample(const std::vector<Coordinate> &line, const float offset, const
|
||||
return anchors;
|
||||
}
|
||||
|
||||
Anchors getAnchors(const std::vector<Coordinate> &line, float spacing,
|
||||
Anchors getAnchors(const GeometryCoordinates &line, float spacing,
|
||||
const float maxAngle, const float textLeft, const float textRight,
|
||||
const float iconLeft, const float iconRight,
|
||||
const float glyphSize, const float boxScale, const float overscaling) {
|
||||
|
||||
Reference in New Issue
Block a user