# Dragging and zooming in Plot.geo

**URL:** <https://talk.observablehq.com/t/dragging-and-zooming-in-plot-geo/10061>\
**Category:** Help\
**Created:** [December 4, 2024, 7:31am UTC](https://talk.observablehq.com/t/dragging-and-zooming-in-plot-geo/10061 "2024-12-04T07:31:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![espinielli](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/espinielli/32/142_2.png) [@espinielli](https://talk.observablehq.com/u/espinielli)\
**Post date:** [December 4, 2024, 7:31am UTC](https://talk.observablehq.com/t/dragging-and-zooming-in-plot-geo/10061/1 "2024-12-04T07:31:49Z")

</div>

I used to zoom and drag maps using _base d3_…I wonder whether something like [d3-versor-dragging](https://observablehq.com/@d3/versor-dragging) is applicable to Plot.geo…or something else, BTW.

Thanks for any feedbacks

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [December 4, 2024, 2:34pm UTC](https://talk.observablehq.com/t/dragging-and-zooming-in-plot-geo/10061/2 "2024-12-04T14:34:39Z")

</div>

Hi Enrico,

here’s a direct port of the D3 notebook for Plot: [Plot: Versor Zooming / Observable | Observable](https://observablehq.com/@observablehq/plot-versor-zooming)

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](https://github.com/observablehq/plot/discussions/) 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 ;-))

---

<div class="post-metadata">

**Author:** ![espinielli](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/espinielli/32/142_2.png) [@espinielli](https://talk.observablehq.com/u/espinielli)\
**Post date:** [December 4, 2024, 5:09pm UTC](https://talk.observablehq.com/t/dragging-and-zooming-in-plot-geo/10061/3 "2024-12-04T17:09:00Z")

</div>

Super thanks!  
here is the [new topic in Github](https://github.com/observablehq/plot/discussions/2258)

---

<div class="post-metadata">

**Author:** ![aaronkyle](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/aaronkyle/32/8106_2.png) [@aaronkyle](https://talk.observablehq.com/u/aaronkyle)\
**Post date:** [December 4, 2024, 9:25pm UTC](https://talk.observablehq.com/t/dragging-and-zooming-in-plot-geo/10061/4 "2024-12-04T21:25:01Z")

</div>

This is oddly far less performant than the source notebook. It seems to barely work on my phone.

---

<div class="post-metadata">

**Author:** ![espinielli](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/espinielli/32/142_2.png) [@espinielli](https://talk.observablehq.com/u/espinielli)\
**Post date:** [December 5, 2024, 2:20pm UTC](https://talk.observablehq.com/t/dragging-and-zooming-in-plot-geo/10061/5 "2024-12-05T14:20:24Z")

</div>

FYI, here is how I used Fil’s code…  
[World FIRs with zoom and rotate / Enrico Spinielli | Observable](https://observablehq.com/@espinielli/world-firs-with-zoom-and-rotate)  
I have issues with labels positioning, I think because I use centroid and for fancy projections it is not the right way…

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [December 5, 2024, 3:38pm UTC](https://talk.observablehq.com/t/dragging-and-zooming-in-plot-geo/10061/6 "2024-12-05T15:38:31Z")

</div>

thanks; let’s continue the discussion [there](https://github.com/observablehq/plot/discussions/2258).

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [December 5, 2024, 4:18pm UTC](https://talk.observablehq.com/t/dragging-and-zooming-in-plot-geo/10061/7 "2024-12-05T16:18:10Z")

</div>

Closed on December 5, 2024, 4:18pm UTC


