Make pixelRatio constant across a Map object lifetime
also moves framebuffer size out of TransformState into its own object
This commit is contained in:
@@ -85,13 +85,12 @@ int main(int argc, char *argv[]) {
|
||||
fileSource.setAccessToken(std::string(token));
|
||||
}
|
||||
|
||||
HeadlessView view;
|
||||
HeadlessView view(pixelRatio, width, height);
|
||||
Map map(view, fileSource, MapMode::Still);
|
||||
|
||||
map.setStyleJSON(style, ".");
|
||||
map.setClasses(classes);
|
||||
|
||||
map.resize(width, height, pixelRatio);
|
||||
map.setLatLngZoom({ lat, lon }, zoom);
|
||||
map.setBearing(bearing);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user