title: Get map tiles bounding box
body: <p>Is it possible to get tiles LngLat bounding box? (and center/width if possible)</p>
  <p>I.e given any tile &quot;id&quot; (e.g <code>6/33/24</code>), calculate wanted coordinates. I'm so desperate to get an answer that I don't even care in what language it's written.</p>
  <hr />
  <h3>Context</h3>
  <p>Tile &quot;id&quot; has 3 parts: <code>6/33/24</code> (<code>z/x/y</code>).</p>
  <p><code>z</code> being floored zoom (0-24) and <code>x/y</code> tile number from left/top origin point.</p>
  <p>When zoom is 1, whole map is divided into 4 equal tiles (shown in graphic). Every time zoom (<code>z</code>) increases, each tile is subdivided into 4 equal tiles (e.g zoom 2 = 16 tiles).</p>
  <pre><code> _______________________
  |          |           |
  |  1/0/0   |   1/1/0   |
  |          |           |
  |__________|___________|
  |          |           |
  |  1/0/1   |   1/1/1   |
  |          |           |
  |__________|___________|
  </code></pre>
  <hr />
  <h3>Why?</h3>
  <p>I want to implement client-side marker cache and binding them to tiles seems to be the most reasonable solution. I know how to get tiles (loop over <code>sourceCaches</code> tiles or use few <code>transform</code> methods) but I have no idea how to get LngLat data from tile matrices or tile IDs.</p>
  <p>Super basic JavaScript concept of marker cache (for context):</p>
  <pre class="lang-js prettyprint-override"><code>const markerCache = {
    cache: {},
  
    getMarkersForTile: function(key) { // tiles have unique keys
      if (this.cache[key]) {
        return Promise.resolve(this.cache[key]);
      }
  
      // ??? what should be in &quot;getTileBounds&quot;?
      const bounds = getTileBounds(key);
      
      return fetchMarkersForTile(bounds).then(markers =&gt; {
        this.cache[key] = markers;
        return markers;
      });
    }
  };
  </code></pre>