{"_id":"d3-tile","_rev":"9-a81b8da890a0a708ec02427dddfcf8e4","name":"d3-tile","description":"Compute the quadtree tiles to display in a rectangular viewport.","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"d3-tile","version":"0.0.1","description":"{DESCRIPTION}","keywords":["d3","d3-module"],"license":"BSD-3-Clause","main":"build/d3-tile.js","jsnext:main":"index","homepage":"https://github.com/curran/d3-tile","repository":{"type":"git","url":"git+https://github.com/curran/d3-tile.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup -f umd -n d3 -o build/d3-tile.js -- index.js","test":"tape 'test/**/*-test.js'","prepublish":"npm run test && uglifyjs build/d3-tile.js -c -m -o build/d3-tile.min.js","postpublish":"zip -j build/d3-tile.zip -- LICENSE README.md build/d3-tile.js build/d3-tile.min.js"},"devDependencies":{"rollup":"0.32","tape":"4","uglify-js":"2"},"dependencies":{"d3-array":"^1.0.0"},"gitHead":"7e471d9d8424b38f932dbda2c6871c7dbf00870d","bugs":{"url":"https://github.com/curran/d3-tile/issues"},"_id":"d3-tile@0.0.1","_shasum":"96d1683479b332ae253eb025b74f0968cbcbe65a","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"curran","email":"curran.kelleher@gmail.com"},"dist":{"shasum":"96d1683479b332ae253eb025b74f0968cbcbe65a","tarball":"https://registry.npmjs.org/d3-tile/-/d3-tile-0.0.1.tgz","integrity":"sha512-+4tbjYpYatJRRhsnOlOzGnMekAv2QhnqpG1QtewyJ1wRWllwg5B1yRzPukCZ/slnyZnrTfqqEuR7MN2pS+/CDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCslea4+oTSJ5K2QuKUg/frua+nnDcQVLMz1wBuMpAHjwIgMTSjzDA9PA2s0+9spkDiapEruzsKKhFMhgK6M3JeZsQ="}]},"maintainers":[{"name":"curran","email":"curran.kelleher@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/d3-tile-0.0.1.tgz_1466610324229_0.9933844478800893"},"directories":{}},"0.0.2":{"name":"d3-tile","version":"0.0.2","description":"{DESCRIPTION}","keywords":["d3","d3-module"],"license":"BSD-3-Clause","main":"build/d3-tile.js","jsnext:main":"index","homepage":"https://github.com/curran/d3-tile","repository":{"type":"git","url":"git+https://github.com/curran/d3-tile.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup -f umd -n d3 -o build/d3-tile.js -- index.js","test":"tape 'test/**/*-test.js'","prepublish":"npm run test && uglifyjs build/d3-tile.js -c -m -o build/d3-tile.min.js","postpublish":"zip -j build/d3-tile.zip -- LICENSE README.md build/d3-tile.js build/d3-tile.min.js"},"devDependencies":{"rollup":"0.32","tape":"4","uglify-js":"2"},"dependencies":{"d3-array":"^1.0.0"},"gitHead":"192bfd8d46bba0de3b91b2fbb7257e926326de9e","bugs":{"url":"https://github.com/curran/d3-tile/issues"},"_id":"d3-tile@0.0.2","_shasum":"09c9618b4b2a0cc13b5d6ed23dce77788ead83f2","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"curran","email":"curran.kelleher@gmail.com"},"dist":{"shasum":"09c9618b4b2a0cc13b5d6ed23dce77788ead83f2","tarball":"https://registry.npmjs.org/d3-tile/-/d3-tile-0.0.2.tgz","integrity":"sha512-D9YfmEuHewkptF/J8vQdT87CfM5Lu6zePg9JOBmSQ2AoVNBGRZ5A3+kHyS1z1SO4wJpOJ2fgx1VABcYJvSrayA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDT3by1fF6Y7EDmHmUGpklaSVtnltnync7BaNBxXJ9JIAIgcuiVQ43RX91sia3TWvjSkBnbUBncV7PP4t3Ci4LmwJU="}]},"maintainers":[{"name":"curran","email":"curran.kelleher@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/d3-tile-0.0.2.tgz_1466610391502_0.9884486107621342"},"directories":{}},"0.0.3":{"name":"d3-tile","version":"0.0.3","description":"Compute the quadtree tiles to display in a rectangular viewport.","keywords":["d3","d3-module"],"homepage":"https://d3js.org/d3-tile/","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"http://bost.ocks.org/mike"},"main":"build/d3-tile.js","jsnext:main":"index","repository":{"type":"git","url":"git+https://github.com/d3/d3-tile.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -g d3-array:d3 -f umd -n d3 -o build/d3-tile.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-tile.js -c -m -o build/d3-tile.min.js","postpublish":"VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-tile.js ../d3.github.com/d3-tile.v0.0.js && cp build/d3-tile.min.js ../d3.github.com/d3-tile.v0.0.min.js && cd ../d3.github.com && git add d3-tile.v0.0.js d3-tile.v0.0.min.js && git commit -m \"d3-tile ${VERSION}\" && git push && cd - && zip -j build/d3-tile.zip -- LICENSE README.md build/d3-tile.js build/d3-tile.min.js"},"dependencies":{"d3-array":"1"},"devDependencies":{"eslint":"2","package-preamble":"0.0","rollup":"0.31","tape":"4","uglify-js":"2"},"gitHead":"9ef4bdf065a1602a3310d944a4c1008075dd1680","bugs":{"url":"https://github.com/d3/d3-tile/issues"},"_id":"d3-tile@0.0.3","_shasum":"b524dd13c2b7c5e4e36b9bc2892e4a5511161d56","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"curran","email":"curran.kelleher@gmail.com"},{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"b524dd13c2b7c5e4e36b9bc2892e4a5511161d56","tarball":"https://registry.npmjs.org/d3-tile/-/d3-tile-0.0.3.tgz","integrity":"sha512-wkAxTUgLWJ+JFtsf0+QHRhP44Mc41m1Ov5x8R0fBwSNRudTK8zSyEs07ayEpf7H6GTKvMrxVLt5BkNc6CCZWog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAyPu3e9OrjCGxnxrAivF2myJPBtw7VvdDJ9kXaEnacQIgEbtyyF0xLVwBEmwTNL+kPhmN0ojoWp7LsuPwGZlwa1Y="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/d3-tile-0.0.3.tgz_1466629915013_0.5959253481123596"},"directories":{}},"0.0.4":{"name":"d3-tile","version":"0.0.4","description":"Compute the quadtree tiles to display in a rectangular viewport.","keywords":["d3","d3-module"],"homepage":"https://d3js.org/d3-tile/","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"http://bost.ocks.org/mike"},"main":"build/d3-tile.js","module":"index","jsnext:main":"index","repository":{"type":"git","url":"git+https://github.com/d3/d3-tile.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -g d3-array:d3 -f umd -n d3 -o build/d3-tile.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-tile.js -c -m -o build/d3-tile.min.js","postpublish":"VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-tile.js ../d3.github.com/d3-tile.v0.0.js && cp build/d3-tile.min.js ../d3.github.com/d3-tile.v0.0.min.js && cd ../d3.github.com && git add d3-tile.v0.0.js d3-tile.v0.0.min.js && git commit -m \"d3-tile ${VERSION}\" && git push && cd - && zip -j build/d3-tile.zip -- LICENSE README.md build/d3-tile.js build/d3-tile.min.js"},"dependencies":{"d3-array":"1"},"devDependencies":{"eslint":"2","package-preamble":"0.0","rollup":"0.31","tape":"4","uglify-js":"2"},"gitHead":"393a87c0ced7031be2c629a784a1469066fb596e","bugs":{"url":"https://github.com/d3/d3-tile/issues"},"_id":"d3-tile@0.0.4","_shasum":"2d5f8dec207bf3e9fdc38fc74e45d7c3ab3aa808","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"curran","email":"curran.kelleher@gmail.com"},"dist":{"shasum":"2d5f8dec207bf3e9fdc38fc74e45d7c3ab3aa808","tarball":"https://registry.npmjs.org/d3-tile/-/d3-tile-0.0.4.tgz","integrity":"sha512-D6OSh8UcHJuzRDeuO/QKz3aV/FjI6HlFsX437IjnDSZopCaDx9fY6dT7BnnAHq+q6Mjz+9nqXGq3vTxNRE9a9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/6Qk1UOb/wx9J9UfOfQD5393ylmdTxEGF7bPsRBVGLgIgDSyOyu0j6hzFPGxyixcXcShjQXb8DxsmJCR9opCuUZ0="}]},"maintainers":[{"name":"curran","email":"curran.kelleher@gmail.com"},{"name":"mbostock","email":"mike@ocks.org"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/d3-tile-0.0.4.tgz_1487658150568_0.9272815755102783"},"directories":{}},"1.0.0":{"name":"d3-tile","version":"1.0.0","description":"Compute the quadtree tiles to display in a rectangular viewport.","keywords":["d3","d3-module"],"homepage":"https://d3js.org/d3-tile/","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"http://bost.ocks.org/mike"},"main":"dist/d3-tile.js","unpkg":"dist/d3-tile.min.js","module":"src/index.js","repository":{"type":"git","url":"git+https://github.com/d3/d3-tile.git"},"scripts":{"test":"tape -r esm 'test/**/*-test.js' && eslint src","prepublishOnly":"rm -rf dist && yarn test && rollup -c","postpublish":"git push && git push --tags && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js"},"devDependencies":{"eslint":"6","esm":"3","rollup":"1","rollup-plugin-terser":"5","tape":"4","tape-await":"0.1"},"gitHead":"e04907a75951bf45ec6d596c88ffafb60b4788ab","bugs":{"url":"https://github.com/d3/d3-tile/issues"},"_id":"d3-tile@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"mbostock","email":"mike@ocks.org"},"dist":{"integrity":"sha512-79fnTKpPMPDS5xQ0xuS9ir0165NEwwkFpe/DSOmc2Gl9ldYzKKRDWogmTTE8wAJ8NA7PMapNfEcyKhI9Lxdu5Q==","shasum":"e5609bc632e5608f69ee56aa294e84cb2edc2678","tarball":"https://registry.npmjs.org/d3-tile/-/d3-tile-1.0.0.tgz","fileCount":8,"unpackedSize":20109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOhXmCRA9TVsSAnZWagAAAasP/i4s+eSBSE4gXdX8BR2j\ne1l8sIHrCrIEIvIzognUbR50pOFwvLWpcp1OZgpy/iuQJ+pIgY67NSWktp7+\nKfExBU21DuC7w02mD/KjorVnRmcOgn49sPgLDED52SnBPgloOjdm6j7WjBDB\n6tf/KEmVoDOMyd2V/meGtyL+OkezolKzpd7aCvRPf6fm0oesPWcuSwWCvpuT\n6LeHxNg2O1iFCfjImtMOrSnG2c0GwAGQOPdAkg6dT/dgocatFWc0N6k8/9AJ\n1+7c4rcmNclN8TvXhRgABxN6uXftl/zsjL3BYHHn+gLNT0RKiiW/5GQdJkea\nzdVeLIRTGfYijExIkMhC4PhREegS8CoCmKvzRxqv5q2jld/i3LmXb8rheYLF\nIdXSljYKQt8WZt5d1xMpzbnYaw4XzARGB415qrhdvQmk2CPV3uZ8UxZEmrgG\nwq6tB610am3lCbE/vaLTCau22MGj9oHlhFLfie5uVQu4WVry4u+7IIvovG4K\n6TpYRo0bOSpBdyDCMnOGXJ3iMcXZH5dDUtYh5w5Knx2JZ0BGu1MKKGUxcPru\nIwUyaC3uHoTUbSx/L63suTaV4HW67VXLqVEZbfL4lZ/kv/PqYeyagH8HF9LX\nOWY5c3NJWaeUDsbYArAXZGa761W0tvKVpq4ccrAZlqp2ZFKyYrMIQSGilm2/\nJlnr\r\n=Riyl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcWHcXyQrxY06Y3S1sYLySBuGkH1NYrN8/MuRW02tBYwIgcqZqJwzByeiu/PRVCe9JnJiPphy2AE6NHDH9xfvVi1Q="}]},"maintainers":[{"name":"curran","email":"curran.kelleher@gmail.com"},{"name":"mbostock","email":"mike@ocks.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/d3-tile_1.0.0_1564087782003_0.062088502319925576"},"_hasShrinkwrap":false}},"readme":"# d3-tile\n\nQuadtree tiles are common for representing large, multi-resolution geometry and images, as in “slippy” maps. d3.tile provides a convenient mechanism for computing which tile coordinates should be visible in the current viewport. Unlike dedicated libraries for slippy maps, such as [Leaflet](https://leafletjs.com/), d3.tile’s tiny, low-level API is agnostic about how the tiles are presented and offers greater flexibility. d3.tile works well with [d3-geo](https://github.com/d3/d3-geo) for geographic maps and [d3-zoom](https://github.com/d3/d3-zoom) for interaction.\n\nFor examples, see the [d3-tile collection](https://observablehq.com/collection/@d3/d3-tile) on Observable.\n\n## Installing\n\nIf you use NPM, `npm install d3-tile`. Otherwise, download the [latest release](https://github.com/d3/d3-tile/releases/latest). You can also load directly as a [standalone library](https://cdn.jsdelivr.net/npm/d3-tile). ES modules, AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/d3-tile@1\"></script>\n<script>\n\nconst tile = d3.tile();\nconst tiles = tile({k: 256, x: 480, y: 250});\n\n</script>\n```\n\n## API Reference\n\n<a href=\"#tile\" name=\"tile\">#</a> d3.<b>tile</b>() · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js), [Examples](https://observablehq.com/collection/@d3/d3-tile)\n\nConstructs a new tile layout with the default settings.\n\n```js\nconst tile = d3.tile();\n```\n\n<a href=\"#_tile\" name=\"_tile\">#</a> <i>tile</i>([…*arguments*]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js), [Examples](https://observablehq.com/@d3/raster-tiles)\n\nComputes the set of tiles to display given the current settings, computing the [scale](#tile_scale) and [translate](#tile_translate) by invoking the corresponding accessors with the given *arguments*. Returns an array of [*x*, *y*, *z*] arrays representing the *x*- (horizontal), *y*- (vertical) and *z*- (zoom) coordinates of the visible tiles. The returned tiles array also has tiles.*scale* and tiles.*translate* properties which together with an individual tile’s *x* and *y* determine the intended location of the tile in the viewport.\n\n```js\nconst tiles = tile({k: 256, x: 480, y: 250});\nconst {translate: [tx, ty], scale: k} = tiles;\nfor (const [x, y, z] of tiles) {\n  console.log(`tile ${x}/${y}/${z} is at ${(x + tx) * k}, ${(y + ty) * k}`);\n}\n```\n\nSee [Raster Tiles](https://observablehq.com/@d3/raster-tiles) for an example.\n\n<a href=\"#tile_extent\" name=\"tile_extent\">#</a> <i>tile</i>.<b>extent</b>([<i>extent</i>]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js)\n\nIf *extent* is specified, sets this tile layout’s viewport extent to the specified array [[*x0*, *y0*], [*x1*, *y1*]], where [*x0*, *y0*] is the top-left corner and [*x1*, *y1*] is the bottom-right corner, and returns this tile layout. If *extent* is not specified, returns the current viewport extent, which defaults to [[0, 0], [960, 500]]. Setting the viewport extent implicitly sets the [viewport size](#tile_size).\n\n```js\nconst tile = d3.tile().extent([[100, 200], [300, 400]]);\n```\n\n<a href=\"#tile_size\" name=\"tile_size\">#</a> <i>tile</i>.<b>size</b>([<i>size</i>]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js)\n\nIf *size* is specified, sets this tile layout’s viewport size to the specified array of numbers [*width*, *height*] and returns this tile layout. If *size* is not specified, returns the current viewport size, which defaults to [960, 500]. This is a convenience method for setting the [viewport extent](#tile_extent) to [[0, 0], [*width*, *height*]].\n\n```js\nconst tile = d3.tile().size([200, 200]);\n```\n\n<a href=\"#tile_scale\" name=\"tile_scale\">#</a> <i>tile</i>.<b>scale</b>([<i>scale</i>]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js)\n\nIf *scale* is specified, sets this tile layout’s scale function and returns this tile layout. If *scale* is a function, it is invoked when the [tile layout](#_tile) is invoked, being passed the same arguments as the tile layout; this function must return a number indicating the desired width and height of the world tile [0, 0, 0].\n\n```js\nconst tile = d3.tile().scale(t => t.scale).translate(t => t.translate);\nconst tiles = tile({scale: 1024, translate: [100, 200]});\n```\n\nIf *scale* is not a function, it assumed to be a constant number, and is wrapped in a function which returns the specified number.\n\n```js\nconst tile = d3.tile().scale(1024).translate([100, 200]);\n```\n\nIf *scale* is not specified, returns the current layout scale function, which defaults to:\n\n```js\nfunction scale(transform) {\n  return transform.k;\n}\n```\n\nThis default is compatible with a [d3-zoom transform](https://github.com/d3/d3-zoom/blob/master/README.md#zoom-transforms).\n\n<a href=\"#tile_translate\" name=\"tile_translate\">#</a> <i>tile</i>.<b>translate</b>([<i>translate</i>]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js)\n\nIf *translate* is specified, sets this tile layout’s translate function and returns this tile layout. If *translate* is a function, it is invoked when the [tile layout](#_tile) is invoked, being passed the same arguments as the tile layout; this function must return an array of numbers [*x*, *y*] indicating the desired coordinates the center of the world tile [0, 0, 0].\n\n```js\nconst tile = d3.tile().scale(t => t.scale).translate(t => t.translate);\nconst tiles = tile({scale: 1024, translate: [100, 200]});\n```\n\nIf *translate* is not a function, it is assumed to be a constant array [*x*, *y*] and is wrapped in a function which returns the specified array.\n\n```js\nconst tile = d3.tile().scale(1024).translate([100, 200]);\n```\n\nIf *translate* is not specified, returns the current layout translate function, which defaults to:\n\n```js\nfunction translate(transform) {\n  return [transform.x, transform.y];\n}\n````\n\nThis default is compatible with a [d3-zoom transform](https://github.com/d3/d3-zoom/blob/master/README.md#zoom-transforms).\n\n<a href=\"#tile_clampX\" name=\"tile_clampX\">#</a> <i>tile</i>.<b>clampX</b>([<i>clamp</i>]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js), [Examples](https://observablehq.com/@d3/wrapped-tiles)\n\nIf *clamp* is specified, sets whether or not the visible tiles will be clamped in the *x*-coordinate and returns this tile layout. If *clamp* is not specified, returns the current *x*-clamp, which defaults to true. If the *x*-clamp is false, then the tile layout will return tiles that are outside the “world” tile [0, 0, 0], with *x*-coordinates that are outside the normal bounds 0 ≤ *x* < 2^*z*. See [d3.tileWrap](#tileWrap) for converting these coordinates to wrapped in-world coordinates. See [Wrapped Tiles](https://observablehq.com/@d3/wrapped-tiles) for example.\n\n```js\nconst tile = d3.tile().clampX(false);\n```\n\n<a href=\"#tile_clampY\" name=\"tile_clampY\">#</a> <i>tile</i>.<b>clampY</b>([<i>clamp</i>]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js)\n\nIf *clamp* is specified, sets whether or not the visible tiles will be clamped in the *y*-coordinate and returns this tile layout. If *clamp* is not specified, returns the current *y*-clamp, which defaults to true. If the *y*-clamp is false, then the tile layout will return tiles that are outside the “world” tile [0, 0, 0], with *y*-coordinates that are outside the normal bounds 0 ≤ *y* < 2^*z*. See [d3.tileWrap](#tileWrap) for converting these coordinates to wrapped in-world coordinates. See also [*tile*.clampX](#tile_clampX).\n\n```js\nconst tile = d3.tile().clampY(false);\n```\n\n<a href=\"#tile_clamp\" name=\"tile_clamp\">#</a> <i>tile</i>.<b>clamp</b>([<i>clamp</i>]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js)\n\nIf *clamp* is specified, sets [*tile*.clampX](#tile_clampX) and [*tile*.clampY](#tile_clampY) to the specified boolean *clamp* and returns this tile layout. If *clamp* is not specified, returns true if *tile*.clampX and *tile*.clampY are both true, and false otherwise.\n\n```js\nconst tile = d3.tile().clamp(false);\n```\n\n<a href=\"#tile_tileSize\" name=\"tile_tileSize\">#</a> <i>tile</i>.<b>tileSize</b>([<i>tileSize</i>]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js)\n\nIf *tileSize* is specified, sets this tile layout’s tile width and height to the specified number *tileSize* and returns this tile layout. If *tileSize* is not specified, returns the current layout tile size, which defaults to 256. 256×256 is the most common tile size among tile providers.\n\n```js\nconst tile = d3.tile().tileSize(512);\n```\n\n<a href=\"#tile_zoomDelta\" name=\"tile_zoomDelta\">#</a> <i>tile</i>.<b>zoomDelta</b>([<i>zoomDelta</i>]) · [Source](https://github.com/d3/d3-tile/blob/master/src/tile.js)\n\nIf *zoomDelta* is specified, sets this tile layout’s zoom offset to the specified number *zoomDelta* and returns this tile layout. If *zoomDelta* is not specified, returns the current zoom offset, which defaults to 0. The zoom offset affects which *z*-coordinate is chosen based on the current [scale](#tile_scale); the default zoom offset of 0 which choose the *z* that is closest the displayed size; a zoom offset of -1 will use *z* - 1, giving tiles that are twice as big (lower resolution); a zoom offset of +1 will use *z* + 1, giving tiles that are twice as small (higher resolution). The latter might be appropriate for showing 256×256 tiles in a 128×128 space on a high-resolution screen.\n\n```js\nconst tile = d3.tile().zoomDelta(2);\n```\n\n<a href=\"#tileWrap\" name=\"tileWrap\">#</a> d3.<b>tileWrap</b>(*tile*) · [Source](https://github.com/d3/d3-tile/blob/master/src/wrap.js), [Examples](https://observablehq.com/@d3/wrapped-tiles)\n\nGiven *tile* coordinates [*x*, *y*, *z*], where *x* and *y* may be outside the “world” tile [0, 0, 0], returns the wrapped tile coordinates [*x′*, *y′*, *z*] where *j* = 2 ^ *z*, *x′* = *x* - ⌊*x* / *j*⌋ * *j* and *y′* = *y* - ⌊*y* / *j*⌋ * *j*. This function is most commonly used in conjunction with [*tile*.clampX](#tile_clampX) to allow horizontal wrapping of web Mercator tiles. See [Wrapped Tiles](https://observablehq.com/@d3/wrapped-tiles) for example.\n\n```js\nd3.tileWrap([-1, 0, 1]) // [1, 0, 1]\nd3.tileWrap([-1, 0, 2]) // [3, 0, 2]\n````\n","maintainers":[{"name":"curran","email":"curran.kelleher@gmail.com"},{"name":"mbostock","email":"mike@ocks.org"}],"time":{"modified":"2022-06-14T07:54:40.751Z","created":"2016-06-22T15:45:27.679Z","0.0.1":"2016-06-22T15:45:27.679Z","0.0.2":"2016-06-22T15:46:35.119Z","0.0.3":"2016-06-22T21:11:55.511Z","0.0.4":"2017-02-21T06:22:31.279Z","1.0.0":"2019-07-25T20:49:42.109Z"},"homepage":"https://d3js.org/d3-tile/","keywords":["d3","d3-module"],"repository":{"type":"git","url":"git+https://github.com/d3/d3-tile.git"},"bugs":{"url":"https://github.com/d3/d3-tile/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md","author":{"name":"Mike Bostock","url":"http://bost.ocks.org/mike"}}