[Feature] Full control over blocking click, drag and zoom
See original GitHub issueRight now you can add classes to markers no prevent clicking and dragging over them but this insufficient for my use case. I have two cases where I need to set globally if the map should be clickable, draggable and zoomable. The first one is when the map has an overlay over it, something like a modal or popup. The second use case is displaying static but dynamic-generated maps.
@mariusandra would you mind adding these 3 props to the API? I’ll come up with a PR for this ASAP if so.
I’m thinking about using something like
<Map
blockClick={true}
blockDrag={true}
blockZoom={true}
/>
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Requesting or giving remote control - Zoom Support
The remote control feature allows you to take control of another participant's screen in a meeting when they've given you permission.
Read more >Participant controls in a meeting - Zoom Support
You can drag the minimized window around your screen as needed. When you are ready to maximize the meeting window again, click the...
Read more >Using host and co-host controls in a meeting - Zoom Support
Host controls allow you as the host to control various aspects of a Zoom meeting, such as managing the participants. The co-host feature......
Read more >Adjusting your video layout during a virtual meeting
Other video layout controls include rearranging the gallery view order ... return to the full Zoom window click the arrow on the right...
Read more >Controlling slides shared by another participant - Zoom Support
On the sharing toolbar, click Slide Control . Note: This option will only be available when you are in full-screen presentation mode. Select...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hey, in my example all those flags would be
trueby default and it would be up to the user to set them to false to disable them. So nothing breaks with the current API.I think
clickable={false}reads better thanblockClick={true}, but of course just<Map blockClick />is clear as well. The problem comes when you have a dynamic variable setting the state, as in:<Map blockClick={!clicksEnabled} />. In that case it becomes hard to intuitively grasp the code due to the double negative.Looking at what others (google maps, leaflet) do, it appears the convention is to specify things like
scrollWheel: true,draggable: true,keyboard: true,touchZoom: true, etc.So I would go for this way.
I’m sorry for the delay. I ended up getting lost on this and using a transparent overlay over the map solves the issue. If this is requested by more use cases then I’ll work on a pr. I’m closing this.