In this notebook, I’m trying to use d3-zoom to zoom in on both countries (path) and raster tiles.
I saw an example that was working here: Zoomable Raster & Vector / D3 | Observable
But I am not able adapt it to my own situation.
Any help is welcome
Fil
October 9, 2023, 12:30pm
2
I think you have set the scale and translate of the tile generator to fixed values, so it doesn’t read the transform. See GitHub - d3/d3-tile: Compute the quadtree tiles to display in a rectangular viewport.
But what is wrong with the original example—I don’t understand how your situation is different.
The trouble is that it’s not clear to me how the original example works. I just can’t adapt it to my case.
Fil
October 9, 2023, 3:24pm
4
I think the most important thing to note is that d3.tile’s scale is an accessor that must return the width of the world (the length of the equator in pixels, if you will).