[core] Add setter/getter for size property in MapOptions
This commit is contained in:
@@ -32,8 +32,8 @@ public:
|
||||
float pixelRatio { 1 };
|
||||
HeadlessFrontend frontend { pixelRatio, threadPool };
|
||||
|
||||
MapAdapter map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, std::make_shared<StubFileSource>(),
|
||||
threadPool, MapOptions().withMapMode(MapMode::Static)};
|
||||
MapAdapter map { frontend, MapObserver::nullObserver(), pixelRatio, std::make_shared<StubFileSource>(),
|
||||
threadPool, MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize())};
|
||||
|
||||
void checkRendering(const char * name) {
|
||||
test::checkImage(std::string("test/fixtures/annotations/") + name,
|
||||
|
||||
@@ -25,9 +25,9 @@ TEST(API, RenderWithoutCallback) {
|
||||
float pixelRatio { 1 };
|
||||
HeadlessFrontend frontend { pixelRatio, threadPool };
|
||||
|
||||
auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(), frontend.getSize(),
|
||||
auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(),
|
||||
pixelRatio, std::make_shared<StubFileSource>(), threadPool,
|
||||
MapOptions().withMapMode(MapMode::Static));
|
||||
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()));
|
||||
map->renderStill(nullptr);
|
||||
|
||||
// Force Map thread to join.
|
||||
|
||||
@@ -23,8 +23,8 @@ TEST(CustomGeometrySource, Grid) {
|
||||
auto threadPool = sharedThreadPool();
|
||||
float pixelRatio { 1 };
|
||||
HeadlessFrontend frontend { pixelRatio, *threadPool };
|
||||
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, *threadPool,
|
||||
MapOptions().withMapMode(MapMode::Static),
|
||||
Map map(frontend, MapObserver::nullObserver(), pixelRatio, *threadPool,
|
||||
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()),
|
||||
ResourceOptions().withCachePath(":memory:").withAssetPath("test/fixtures/api/assets"));
|
||||
map.getStyle().loadJSON(util::read_file("test/fixtures/api/water.json"));
|
||||
map.jumpTo(CameraOptions().withCenter(LatLng { 37.8, -122.5 }).withZoom(10.0));
|
||||
|
||||
@@ -93,8 +93,8 @@ TEST(CustomLayer, Basic) {
|
||||
ThreadPool threadPool(4);
|
||||
float pixelRatio { 1 };
|
||||
HeadlessFrontend frontend { pixelRatio, threadPool };
|
||||
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, threadPool,
|
||||
MapOptions().withMapMode(MapMode::Static),
|
||||
Map map(frontend, MapObserver::nullObserver(), pixelRatio, threadPool,
|
||||
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()),
|
||||
ResourceOptions().withCachePath(":memory:").withAssetPath("test/fixtures/api/assets"));
|
||||
map.getStyle().loadJSON(util::read_file("test/fixtures/api/water.json"));
|
||||
map.jumpTo(CameraOptions().withCenter(LatLng { 37.8, -122.5 }).withZoom(10.0));
|
||||
|
||||
@@ -38,8 +38,8 @@ public:
|
||||
ThreadPool threadPool { 4 };
|
||||
float pixelRatio { 1 };
|
||||
HeadlessFrontend frontend { pixelRatio, threadPool };
|
||||
MapAdapter map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource,
|
||||
threadPool, MapOptions().withMapMode(MapMode::Static)};
|
||||
MapAdapter map { frontend, MapObserver::nullObserver(), pixelRatio, fileSource,
|
||||
threadPool, MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize())};
|
||||
};
|
||||
|
||||
std::vector<Feature> getTopClusterFeature(QueryTest& test) {
|
||||
|
||||
@@ -27,9 +27,9 @@ TEST(API, RecycleMapUpdateImages) {
|
||||
float pixelRatio { 1 };
|
||||
|
||||
HeadlessFrontend frontend { pixelRatio, threadPool };
|
||||
auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(), frontend.getSize(),
|
||||
auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(),
|
||||
pixelRatio, std::make_shared<StubFileSource>(), threadPool,
|
||||
MapOptions().withMapMode(MapMode::Static));
|
||||
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()));
|
||||
|
||||
EXPECT_TRUE(map);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user