[node] Fix order of operations when setting zoom and center
Zoom must be set first, to avoid center potentially getting constrained. Fixes #7351
This commit is contained in:
@@ -371,15 +371,15 @@ void NodeMap::startRender(NodeMap::RenderOptions options) {
|
||||
map->setClasses(options.classes);
|
||||
}
|
||||
|
||||
if (map->getZoom() != options.zoom) {
|
||||
map->setZoom(options.zoom);
|
||||
}
|
||||
|
||||
mbgl::LatLng latLng(options.latitude, options.longitude);
|
||||
if (map->getLatLng() != latLng) {
|
||||
map->setLatLng(latLng);
|
||||
}
|
||||
|
||||
if (map->getZoom() != options.zoom) {
|
||||
map->setZoom(options.zoom);
|
||||
}
|
||||
|
||||
if (map->getBearing() != options.bearing) {
|
||||
map->setBearing(options.bearing);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user