core, android: add support for camera roll (#3011)

This commit is contained in:
Nathan Olson
2026-01-20 00:57:48 -08:00
committed by GitHub
parent a4cf4d3ffa
commit 10dbd5d68d
57 changed files with 1275 additions and 207 deletions

View File

@@ -34,6 +34,10 @@ TEST(Style, Properties) {
ASSERT_EQ("", style.getName());
ASSERT_EQ((LatLng{20, 10}), *style.getDefaultCamera().center);
style.loadJSON(R"STYLE({"centerAltitude": 999})STYLE");
ASSERT_EQ("", style.getName());
ASSERT_EQ(999, *style.getDefaultCamera().centerAltitude);
style.loadJSON(R"STYLE({"bearing": 24})STYLE");
ASSERT_EQ("", style.getName());
ASSERT_EQ(LatLng{}, *style.getDefaultCamera().center);
@@ -47,6 +51,10 @@ TEST(Style, Properties) {
ASSERT_EQ("", style.getName());
ASSERT_EQ(60, *style.getDefaultCamera().pitch);
style.loadJSON(R"STYLE({"roll": 99})STYLE");
ASSERT_EQ("", style.getName());
ASSERT_EQ(99, *style.getDefaultCamera().roll);
style.loadJSON(R"STYLE({})STYLE");
ASSERT_EQ(Milliseconds(300), *style.getTransitionOptions().duration);
ASSERT_EQ(std::optional<Duration>{}, style.getTransitionOptions().delay);