Fix terrain label rendering (#1778)

This commit is contained in:
Xiaoji Chen 2022-02-24 16:23:45 -08:00 committed by GitHub
parent 156bce4246
commit bf5514908f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -723,6 +723,9 @@ export default class Mapbox {
if (!nextProps.terrain || map.getSource(nextProps.terrain.source)) {
changed = true;
map.setTerrain(nextProps.terrain);
// Copy changes to the transform
// @ts-ignore
this._renderTransform.elevation = map.transform.elevation;
}
}
}