Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable keyboard navigation in a Google Map

I have an inline Google Map that, when clicked, can be navigated through using the keyboard arrow keys. This doesn't allow a person to use the arrow keys to scroll the actual page unless they click somewhere else on the page first. Is there a way to disable this navigation by arrow keys?

like image 466
Voriki Avatar asked Feb 11 '13 03:02

Voriki


People also ask

How do I hide controls on Google Maps?

Disabling the Default UI To do so, set the map's disableDefaultUI property (within the MapOptions object) to true . This property disables any UI control buttons from the Maps JavaScript API.


1 Answers

set the option keyboardShortcuts of the map to false

like image 200
Dr.Molle Avatar answered Oct 18 '22 02:10

Dr.Molle