We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1180ef commit fd9c073Copy full SHA for fd9c073
src/mapboxgl/mapping/InitMap.js
@@ -55,7 +55,7 @@ export function initMap(url, options = {}) {
55
}
56
const mapOptions = await createMapOptions(url, res.result, { ...options, initMapService });
57
const map = new mapboxgl.Map(mapOptions);
58
- if (mapOptions.style && mapOptions.style.layers && mapOptions.style.layers.length > 0) {
+ if (!map.loaded()) {
59
map.on('load', () => {
60
resolve({ map });
61
});
0 commit comments