summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-11-28 09:49:33 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2018-11-29 14:23:55 +0200
commit369d1f005b8c2b217c3aca3a3782efd01268bb57 (patch)
tree523b48cd03c63db78911b68ea114abc41bfef9fd
parentc0bfa99b66ae0e47c5aede5e6084d964a2deb7d7 (diff)
downloadqtlocation-mapboxgl-369d1f005b8c2b217c3aca3a3782efd01268bb57.tar.gz
[core] Do not consider X axis when constraining scale
m---------mapbox-gl-js0
-rw-r--r--platform/node/test/ignores.json2
-rw-r--r--src/mbgl/map/transform_state.cpp7
-rw-r--r--src/mbgl/renderer/buckets/heatmap_bucket.cpp7
4 files changed, 7 insertions, 9 deletions
diff --git a/mapbox-gl-js b/mapbox-gl-js
-Subproject 9aed7d6785fb6a0b0783f08d3782248906af820
+Subproject 8e267fe230dbafc75914e437d26efab2f81adf1
diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json
index fa4f4f7cd1..c83403e2df 100644
--- a/platform/node/test/ignores.json
+++ b/platform/node/test/ignores.json
@@ -73,6 +73,7 @@
"render-tests/canvas/default": "skip - js specific",
"render-tests/collator/resolved-locale": "Some test platforms don't resolve 'en' locale",
"render-tests/collator/default": "Some test platforms don't resolve 'en' locale",
+ "render-tests/custom-layer-js/depth": "skip - js specific",
"render-tests/custom-layer-js/null-island": "skip - js specific",
"render-tests/custom-layer-js/tent-3d": "skip - js specific",
"render-tests/debug/collision": "https://github.com/mapbox/mapbox-gl-native/issues/3841",
@@ -90,6 +91,7 @@
"render-tests/fill-extrusion-pattern/missing": "https://github.com/mapbox/mapbox-gl-js/issues/3327",
"render-tests/fill-extrusion-pattern/opacity": "https://github.com/mapbox/mapbox-gl-js/issues/3327",
"render-tests/fill-extrusion-pattern/feature-expression": "https://github.com/mapbox/mapbox-gl-js/issues/3327",
+ "render-tests/fill-extrusion-vertical-gradient/false": "https://github.com/mapbox/mapbox-gl-native/issues/13462",
"render-tests/fill-pattern/update-feature-state": "skip - port https://github.com/mapbox/mapbox-gl-js/pull/6263 - needs issue",
"render-tests/geojson/inline-linestring-fill": "current behavior is arbitrary",
"render-tests/geojson/inline-polygon-symbol": "behavior needs reconciliation with gl-js",
diff --git a/src/mbgl/map/transform_state.cpp b/src/mbgl/map/transform_state.cpp
index 554a72cf4a..778d4bd7e7 100644
--- a/src/mbgl/map/transform_state.cpp
+++ b/src/mbgl/map/transform_state.cpp
@@ -375,12 +375,9 @@ void TransformState::constrain(double& scale_, double& x_, double& y_) const {
return;
}
- const double ratioX = (rotatedNorth() ? size.height : size.width) / util::tileSize;
+ // Constrain scale to avoid zooming out far enough to show off-world areas on the Y axis.
const double ratioY = (rotatedNorth() ? size.width : size.height) / util::tileSize;
-
- // Constrain minimum scale to avoid zooming out far enough to show off-world areas on the Y axis.
- // If Y axis ratio is too small to be constrained, use X axis ratio instead.
- scale_ = util::max(scale_, ratioY < 1.0 ? ratioX : ratioY);
+ scale_ = util::max(scale_, ratioY);
// Constrain min/max pan to avoid showing off-world areas on the Y axis.
double max_y = (scale_ * util::tileSize - (rotatedNorth() ? size.width : size.height)) / 2;
diff --git a/src/mbgl/renderer/buckets/heatmap_bucket.cpp b/src/mbgl/renderer/buckets/heatmap_bucket.cpp
index 1ed6064c34..ee7db9a1df 100644
--- a/src/mbgl/renderer/buckets/heatmap_bucket.cpp
+++ b/src/mbgl/renderer/buckets/heatmap_bucket.cpp
@@ -50,10 +50,9 @@ void HeatmapBucket::addFeature(const GeometryTileFeature& feature,
auto y = point.y;
// Do not include points that are outside the tile boundaries.
- // Include all points in Still mode. You need to include points from
- // neighbouring tiles so that they are not clipped at tile boundaries.
- if ((mode == MapMode::Continuous) &&
- (x < 0 || x >= util::EXTENT || y < 0 || y >= util::EXTENT)) continue;
+ if (x < 0 || x >= util::EXTENT || y < 0 || y >= util::EXTENT) {
+ continue;
+ }
if (segments.empty() || segments.back().vertexLength + vertexLength > std::numeric_limits<uint16_t>::max()) {
// Move to a new segments because the old one can't hold the geometry.