We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d0fccd commit ddc8f2bCopy full SHA for ddc8f2b
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