[core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
This commit is contained in:
@@ -73,8 +73,8 @@ TEST(Memory, Vector) {
|
||||
float ratio { 2 };
|
||||
|
||||
HeadlessFrontend frontend { { 256, 256 }, ratio, test.threadPool };
|
||||
MapAdapter map(frontend, MapObserver::nullObserver(), ratio, test.fileSource,
|
||||
test.threadPool, MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()));
|
||||
MapAdapter map(frontend, MapObserver::nullObserver(), test.fileSource, test.threadPool,
|
||||
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()).withPixelRatio(ratio));
|
||||
map.jumpTo(CameraOptions().withZoom(16));
|
||||
map.getStyle().loadURL("mapbox://streets");
|
||||
|
||||
@@ -86,8 +86,8 @@ TEST(Memory, Raster) {
|
||||
float ratio { 2 };
|
||||
|
||||
HeadlessFrontend frontend { { 256, 256 }, ratio, test.threadPool };
|
||||
MapAdapter map(frontend, MapObserver::nullObserver(), ratio, test.fileSource,
|
||||
test.threadPool, MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()));
|
||||
MapAdapter map(frontend, MapObserver::nullObserver(), test.fileSource, test.threadPool,
|
||||
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()).withPixelRatio(ratio));
|
||||
map.getStyle().loadURL("mapbox://satellite");
|
||||
|
||||
frontend.render(map);
|
||||
@@ -124,8 +124,8 @@ TEST(Memory, Footprint) {
|
||||
public:
|
||||
FrontendAndMap(MemoryTest& test_, const char* style)
|
||||
: frontend(Size{ 256, 256 }, 2, test_.threadPool)
|
||||
, map(frontend, MapObserver::nullObserver(), 2, test_.fileSource
|
||||
, test_.threadPool, MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize())) {
|
||||
, map(frontend, MapObserver::nullObserver(), test_.fileSource, test_.threadPool,
|
||||
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()).withPixelRatio(2)) {
|
||||
map.jumpTo(CameraOptions().withZoom(16));
|
||||
map.getStyle().loadURL(style);
|
||||
frontend.render(map);
|
||||
|
||||
Reference in New Issue
Block a user