d3-tiles and zoom

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

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.

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).

Ok. It works.
Thank you.