d3 / d3-tile

Compute the quadtree tiles to display in a rectangular viewport.

Home Page:https://observablehq.com/collection/@d3/d3-tile

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tile.zoomDelta is undocumented.

curran opened this issue · comments

Add documentation for zoomDelta.

Some documentation on zoomDelta and how it works would be terrific. I am attempting to use d3-tile now and having to go via trial and error since I am not finding other docs or examples that make use of this version.

Researching this a bit, and here's what I found:

Demos related to zoomDelta:

From #2:

It’s for showing tiles at different resolution than the screen. For example, if you have a HiDPI screen, you might take 256×256 tiles and display them in a 128×128 space.

I put this together for the documentation:

image

https://observablehq.com/d/6acb6597d1d35e6d

It would be cool to put them next to each other programmatically, but I haven't figured out the Observable syntax/API for having multiple SVG elements in a div.

Your notebook is private; can you click the notebook menu (the three horizontal dots in the header) and click on “Enable link sharing” so I can see it?

Ah, looks nearly identical to my approach, although I used a function to avoid duplicating the code. Great minds think alike? 😉

https://observablehq.com/@d3/tile-zoomdelta