Make pixelRatio constant across a Map object lifetime

also moves framebuffer size out of TransformState into its own object
This commit is contained in:
Konstantin Käfer
2015-07-01 12:39:21 +02:00
parent 3a07cb2f1e
commit 675ddddee7
40 changed files with 308 additions and 214 deletions

View File

@@ -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);