On Apr 27, 1:51 pm, parky128 <[email protected]> wrote:
> Was there supposed to be a link to your example in your most reply?

No: same link. http://www.acleach.me.uk/gmaps/keyboardhandler.htm

> Weirdly though, if I hover over a marker to open the info window and
> then close that window, the keyboard navigation comes back!

You click in the map when you close the infoWindow.

> This is baffling me now.

Spoof the map-click event to enable the handler; a click outside the
map (which my example also spoofs) disables the handler. So when you
click a button, you disable the handler. Clicking in the map enables
the handler.

Because clicking the button to add the markers (or remove them)
disables the handler, you need to spoof the map-click which re-enables
it. That worked for me: entering
javascript:GEvent.trigger(document,"click",
{srcElement:document.getElementById("myMap"),target:document.getElementById("myMap"),nodeType:
1})
in the address bar re-enabled the handler. You could do that in your
code when you need it.

It would probably be a good idea to have two functions, say
enableHandler() and disableHandler() which you can call when you need
them.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to