I used to zoom and drag maps using base d3…I wonder whether something like d3-versor-dragging is applicable to Plot.geo…or something else, BTW.
Thanks for any feedbacks
I used to zoom and drag maps using base d3…I wonder whether something like d3-versor-dragging is applicable to Plot.geo…or something else, BTW.
Thanks for any feedbacks
Hi Enrico,
here’s a direct port of the D3 notebook for Plot: Plot: Versor Zooming / Observable | Observable
Note that we ditch and recreate a new chart each time—but it’s probably OK. We could optimize it maybe by working on a render transform, but we would have to write quite a bit more code.
You can disable the zooming part by specifying a zoomExtent [1, 1].
Note: in the future, please create a GitHub discussion instead, as we’re trying to reorganize the knowledge base around the github repo. (In fact if you’re OK to paste the same question there, I will paste the same answer ;-))
Super thanks!
here is the new topic in Github
This is oddly far less performant than the source notebook. It seems to barely work on my phone.
FYI, here is how I used Fil’s code…
World FIRs with zoom and rotate / Enrico Spinielli | Observable
I have issues with labels positioning, I think because I use centroid and for fancy projections it is not the right way…
thanks; let’s continue the discussion there.