Google Map Selection

61 views
Skip to first unread message

pogue5

unread,
Feb 9, 2012, 1:15:57 PM2/9/12
to google-map...@googlegroups.com
I have a generic question about google maps. I don't believe this question requires a link of any kind.
Is there a keyboard shortcut which one can implement when on a google maps page so that you can select the map without clicking on it? I was searching for google maps keyboard shortcuts and could not find anything which has this functionality.

Many thanks..

greg

Rossko

unread,
Feb 9, 2012, 2:52:21 PM2/9/12
to Google Maps JavaScript API v3
> Is there a keyboard shortcut which one can implement when on a google maps
> page so that you can select the map without clicking on it?

That would be a function of the webpage - "shift focus to some
arbritary element on this page" - and not of the map. You might look
outside the maps arena.

This is about v2 API but should give you some ideas
http://dev.opera.com/articles/view/keyboard-accessible-google-maps/

You might want to add your 'star' to this outstanding enhancement
request
http://code.google.com/p/gmaps-api-issues/issues/detail?id=1374

Andrew Leach

unread,
Feb 9, 2012, 3:18:45 PM2/9/12
to google-map...@googlegroups.com
On 9 February 2012 19:52, Rossko <ros...@culzean.clara.co.uk> wrote:
>
> This is about v2 API but should give you some ideas
> http://dev.opera.com/articles/view/keyboard-accessible-google-maps/

Hmm. Most of that article was written (in one form or another) by
Pamela Fox. That particularly applies to the keyboard switcher, which
first appeared in the Version 2 Group.

Here's a V2 example of keyboard accessibility, such as it is:
http://www.acleach.me.uk/gmaps/keyboardhandler.htm -- you can tab to
the links and then use the keyboard to control the map (arrow keys and
+ and - I think). Unfortunately the only way to click the map is with
the mouse.

I haven't tried anything with Version 3 though.

Message has been deleted

pogue5

unread,
Feb 10, 2012, 9:28:42 AM2/10/12
to google-map...@googlegroups.com
I tried these functions:

function setKeys() { var event = {srcElement: mapContainer, target: mapContainer, nodeType: 1}; google.maps.event.trigger(document, "click", event); } function noKeys() { var event = {srcElement: body, target: body, nodeType: 1}; google.maps.event.trigger(document, "click", event); }

There is a surprisingly small amount of information on the web about v3 implementation of your code.
I was able to use the trigger to activate the click event of a marker but not the map in general. Maybe the syntax is different in v3.
Would the v3 implementation use the same syntax?

pogue5

unread,
Feb 10, 2012, 1:00:38 PM2/10/12
to google-map...@googlegroups.com
I was able to find a solution on another message board using the jquery javascript file. Heres the link if it is helpful to anyone else.
http://stackoverflow.com/questions/9195814/google-maps-v3-keyboard-accessibility/9218055#9218055
This solution enables a user to tab down to the map and immediately access keyboard functionality.
The problem now is setting up the map so that markers can be selected using a keyboard. I don't know if that is even possible and it seems like a difficult undertaking.
Reply all
Reply to author
Forward
0 new messages