Map Graph - Disable ScrollZoom & Drag

Hey there,

I would like to disable ScrollZoom and the dragging in a Map graph.

I’ve double checked all the related info and doc you have and tried adding “{scrollZoom: false}” to the Plotly.newPlot as is described in the documentation and although it works with the line charts no luck with the map’s one…

Then I noticed that you have had troubles with that functionalty to be configured on subplots, haven’t you?

Not sure if what I’m asking is what it’s included in your next product release proposals …>

v.2.0.0 wishlist

I’ve prepared a codepen where I’m trying to set it up

Although it looks for me that what I’m trying to do is not a currently supported functionality, any thoughts to work around it?

to summarize it; basically what I’m looking for is:

  • Not allowing the map to zoom-in/out, any kind of dragging functionality but letting it to keep the hover interaction for being able to know what are the points marking to etc (I wanted to change point’s when hovering them)

Thanks in advance guys!

Oh right. That one has already a dedicated issue:

Thanks for your response @etienne !

So, by now, there’s no chance to disable that zoom and dragging functionality in the maps isn’t it?

Regards :wink:

You can add dragmode=False in your layout to disable the drag and zoom. However, users can still access zoom in the hoverbar of plotly.

edit: I realized my solution is for Python but this thread is the top search results for it, so I hope it becomes useful for someone else.

1 Like