title: Converting from WGS84 to EPSG:27700 raster tiles without drawing a map
body: <p>Using this example from OS Data Hub - <a href="https://labs.os.uk/public/os-data-hub-examples/os-maps-api/zxy-27700-basic-map" rel="nofollow noreferrer">https://labs.os.uk/public/os-data-hub-examples/os-maps-api/zxy-27700-basic-map</a></p>
  <p>I can get a list of tiles displayed on the map, I would like to get the coordinates of the tile without drawing the map.</p>
  <p>Starting from a single point in WGS84 (lat/long) I can convert this to EPSG:27700 using Proj4js</p>
  <pre><code>var source = new proj4.Proj('EPSG:4326');
  
  proj4.defs(&quot;EPSG:27700&quot;,&quot;+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs&quot;);
  
  var dest = new proj4.Proj('EPSG:27700');
  
  var coords=proj4.transform(source, dest, [X,Y]);
  </code></pre>
  <p>I then need to translate this into coordinates for the raster tile, which is done in the leaflet example with this code:</p>
  <pre><code>var crs = new L.Proj.CRS('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs', {
      resolutions: [ 896.0, 448.0, 224.0, 112.0, 56.0, 28.0, 14.0, 7.0, 3.5, 1.75 ],
      origin: [ -238375.0, 1376256.0 ]
  });
  </code></pre>
  <p>How can i replicate this step to produce the tile coordinates, without having to draw the leaflet map?</p>
  <p>I ultimately want to use the coordinates to grab &amp; save a single tile from the OS Data Hub with this format:</p>
  <p><a href="https://api.os.uk/maps/raster/v1/zxy/layer/%7Bz%7D/%7Bx%7D/%7By%7D.png?key=" rel="nofollow noreferrer">https://api.os.uk/maps/raster/v1/zxy/layer/%7Bz%7D/%7Bx%7D/%7By%7D.png?key=</a></p>