Dragging and zooming in Plot.geo #2258
-
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 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Hi Enrico, here’s a port of the D3 notebook for Plot: Plot: Versor Zooming / Observable | Observable I fixed several issues since yesterday's version:
You can disable the zooming part by specifying a zoomExtent The centroid transform is not great for labels, because when a shape extends on both sides of the map, its centroid might be in the middle. See #2098 for a better alternative. |
Beta Was this translation helpful? Give feedback.
Hi Enrico,
here’s a port of the D3 notebook for Plot: Plot: Versor Zooming / Observable | Observable
I fixed several issues since yesterday's version:
You can disable the zooming part by specifying a zoomExtent
[1, 1]
.The centroid transform is not great for labels, because when a shape extends on both sides of the map, its centroid might be in the middle. See #2098 for a better alternative.