title: Check if map is ready to queryRenderedFeatures
body: <pre><code>map.on('mousemove', function (e) {
      map.getCanvas().style.cursor = ''
      // Need to check if markers layer is ready to query else 
      // I get Type error the first few seconds when you move the mouse.
      var features = map.queryRenderedFeatures(e.point, {layers: ['markers']})
      if (!features.length) return;
      map.getCanvas().style.cursor = 'pointer'
  });
  </code></pre>
  
  <p>Its not clear to me how I can check if map has completed rendering. The above code will give error while still rendering the map.</p>
  
  <p><a href="https://i.stack.imgur.com/BGBzu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BGBzu.png" alt="enter image description here"></a></p>