Open 1ec5 opened 4 years ago
Note that mapbox/mapbox-gl-native-ios#291 only affected -[MGLMapSnapshotterTests testRuntimeStyling]
, not -[MGLMapSnapshotterTests testLocalGlyphRendering]
. One of the differences between the two tests is that the style for -testRuntimeStyling
was specifying Null Island at z0 as the default camera, whereas the style for -testLocalGlyphRendering
specifies a default camera over 39.09187°N, 14.41400°W (a bit north of the Azores) at z0.
If a map snapshotter does not define a camera but rather relies on the stylesheet’s
center
andzoom
properties to set a default camera, the snapshot fails to draw anything much of the time, even if a background layer is applied using runtime styling. The on-again, off-again nature of this issue suggests a race condition.This issue has been causing a frequent test failure on CI, mapbox/mapbox-gl-native-ios#291, which we’re working around in mapbox/mapbox-gl-native-ios#293 by hard-coding the default camera at runtime.
There don’t appear to be any unit tests of styles that set a default camera, so that would be a good place to start.
/cc @mapbox/gl-native