diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2018-07-04 20:38:09 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2018-07-17 11:23:06 +0300 |
commit | 05e757aa6fe8431711058a2aee5e10957d132ec5 (patch) | |
tree | 8cf9f29625508b34c020e6fbd63bc529e950eeda | |
parent | 7aca9e09c04700496d6f8b20268b93cb688a6abe (diff) | |
download | qtlocation-mapboxgl-05e757aa6fe8431711058a2aee5e10957d132ec5.tar.gz |
[core] Increase pitch to 67.5 degrees
-rw-r--r-- | include/mbgl/util/constants.hpp | 2 | ||||
m--------- | mapbox-gl-js | 0 | ||||
-rw-r--r-- | platform/glfw/glfw_view.cpp | 2 | ||||
-rw-r--r-- | platform/node/test/ignores.json | 5 | ||||
-rw-r--r-- | scripts/style-spec.js | 10 | ||||
-rw-r--r-- | test/map/transform.test.cpp | 2 |
6 files changed, 17 insertions, 4 deletions
diff --git a/include/mbgl/util/constants.hpp b/include/mbgl/util/constants.hpp index 7110d9e26b..f3d06b52c9 100644 --- a/include/mbgl/util/constants.hpp +++ b/include/mbgl/util/constants.hpp @@ -33,7 +33,7 @@ constexpr double EARTH_RADIUS_M = 6378137; constexpr double LATITUDE_MAX = 85.051128779806604; constexpr double LONGITUDE_MAX = 180; constexpr double DEGREES_MAX = 360; -constexpr double PITCH_MAX = M_PI / 3; +constexpr double PITCH_MAX = 67.5 * DEG2RAD; constexpr double MIN_ZOOM = 0.0; constexpr double MAX_ZOOM = 25.5; constexpr float MIN_ZOOM_F = MIN_ZOOM; diff --git a/mapbox-gl-js b/mapbox-gl-js -Subproject e3f5816b2bfa9358a1302f31f70ebee5efdc3cd +Subproject 75ec1b91abe7cbdf52565a43bd080611f5a4c0f diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index 60cc20e05a..6af78f2174 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -265,7 +265,7 @@ void GLFWView::onKey(GLFWwindow *window, int key, int /*scancode*/, int action, double easing = bearing - routeMap->getBearing(); easing += easing > 180.0 ? -360.0 : easing < -180 ? 360.0 : 0; routeMap->setBearing(routeMap->getBearing() + (easing / 20)); - routeMap->setPitch(60.0); + routeMap->setPitch(67.5); routeMap->setZoom(18.0); }; view->animateRouteCallback(view->map); diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json index 51a50ff387..b71e8d8b03 100644 --- a/platform/node/test/ignores.json +++ b/platform/node/test/ignores.json @@ -87,5 +87,8 @@ "render-tests/combinations/symbol-translucent--fill-extrusion-translucent": "needs investigation", "render-tests/feature-state/composite-expression": "skip - port https://github.com/mapbox/mapbox-gl-js/pull/6263 - needs issue", "render-tests/feature-state/data-expression": "skip - port https://github.com/mapbox/mapbox-gl-js/pull/6263 - needs issue", - "render-tests/feature-state/vector-source": "skip - port https://github.com/mapbox/mapbox-gl-js/pull/6263 - needs issue" + "render-tests/feature-state/vector-source": "skip - port https://github.com/mapbox/mapbox-gl-js/pull/6263 - needs issue", + "render-tests/symbol-placement/line-center-buffer": "https://github.com/mapbox/mapbox-gl-native/issues/12300", + "render-tests/symbol-placement/line-center": "https://github.com/mapbox/mapbox-gl-native/issues/12300", + "render-tests/text-max-angle/line-center": "https://github.com/mapbox/mapbox-gl-native/issues/12300" } diff --git a/scripts/style-spec.js b/scripts/style-spec.js index dd9a127b70..586633265b 100644 --- a/scripts/style-spec.js +++ b/scripts/style-spec.js @@ -2,3 +2,13 @@ var spec = module.exports = require('../mapbox-gl-js/src/style-spec/reference/v8 // Make temporary modifications here when Native doesn't have all features that JS has. delete spec.paint_line['line-gradient']; + +// https://github.com/mapbox/mapbox-gl-native/issues/12300 +delete spec.layout_symbol['symbol-placement']['values']['line-center']; +spec.layout_symbol['icon-keep-upright']['requires'][2]['symbol-placement'] = 'line'; +spec.layout_symbol['text-keep-upright']['requires'][2]['symbol-placement'] = 'line'; +spec.layout_symbol['text-max-angle']['requires'][1]['symbol-placement'] = 'line'; +spec.layout_symbol['icon-rotation-alignment']['values']['map']['doc'] = spec.layout_symbol['icon-rotation-alignment']['values']['map']['doc'].replace(" or `line-center`",""); +spec.layout_symbol['icon-rotation-alignment']['values']['auto']['doc'] = spec.layout_symbol['icon-rotation-alignment']['values']['auto']['doc'].replace(" or `line-center`",""); +spec.layout_symbol['text-rotation-alignment']['values']['map']['doc'] = spec.layout_symbol['text-rotation-alignment']['values']['map']['doc'].replace(" or `line-center`",""); +spec.layout_symbol['text-rotation-alignment']['values']['auto']['doc'] = spec.layout_symbol['text-rotation-alignment']['values']['auto']['doc'].replace(" or `line-center`",""); diff --git a/test/map/transform.test.cpp b/test/map/transform.test.cpp index 11c2c1cc6b..f33d55780e 100644 --- a/test/map/transform.test.cpp +++ b/test/map/transform.test.cpp @@ -599,7 +599,7 @@ TEST(Transform, PitchBounds) { ASSERT_DOUBLE_EQ(transform.getState().getPitch() * util::RAD2DEG, 0.0); ASSERT_DOUBLE_EQ(transform.getState().getMinPitch() * util::RAD2DEG, 0.0); - ASSERT_DOUBLE_EQ(transform.getState().getMaxPitch() * util::RAD2DEG, 60.0); + ASSERT_NEAR(transform.getState().getMaxPitch() * util::RAD2DEG, 67.5, 1e-5); transform.setMinPitch(45.0 * util::DEG2RAD); transform.setPitch(0.0 * util::DEG2RAD); |