@@ -26,7 +26,7 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"aws-sdk": "^2.2.21",
|
||||
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#a42cd0cb818356d91fc6b61e2b64801e57486ac0",
|
||||
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#45066f6e78c780211d9587df2352597e07a197b5",
|
||||
"node-gyp": "^3.2.1",
|
||||
"request": "^2.67.0",
|
||||
"tape": "^4.2.2"
|
||||
|
||||
@@ -69,7 +69,7 @@ void LineBucket::addGeometry(const GeometryCoordinates& vertices) {
|
||||
|
||||
const float miterLimit = layout.join == JoinType::Bevel ? 1.05f : float(layout.miterLimit);
|
||||
|
||||
const double sharpCornerOffset = SHARP_CORNER_OFFSET * (util::EXTENT / (util::tileSize * overscaling));
|
||||
const double sharpCornerOffset = SHARP_CORNER_OFFSET * (float(util::EXTENT) / (util::tileSize * overscaling));
|
||||
|
||||
const GeometryCoordinate firstVertex = vertices.front();
|
||||
const GeometryCoordinate lastVertex = vertices[len - 1];
|
||||
|
||||
@@ -60,7 +60,7 @@ SymbolBucket::SymbolBucket(uint32_t overscaling_, float zoom_, const MapMode mod
|
||||
: overscaling(overscaling_),
|
||||
zoom(zoom_),
|
||||
tileSize(util::tileSize * overscaling_),
|
||||
tilePixelRatio(util::EXTENT / tileSize),
|
||||
tilePixelRatio(float(util::EXTENT) / tileSize),
|
||||
mode(mode_) {}
|
||||
|
||||
SymbolBucket::~SymbolBucket() {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <mbgl/util/constants.hpp>
|
||||
#include <mbgl/util/interpolate.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
namespace mbgl {
|
||||
@@ -21,6 +22,8 @@ Anchors resample(const GeometryCoordinates &line, const float offset, const floa
|
||||
|
||||
Anchors anchors;
|
||||
|
||||
assert(spacing > 0.0);
|
||||
|
||||
int i = 0;
|
||||
for (auto it = line.begin(), end = line.end() - 1; it != end; it++, i++) {
|
||||
const GeometryCoordinate &a = *(it);
|
||||
|
||||
Reference in New Issue
Block a user