On Apr 29, 1:08 pm, Pil <[email protected]> wrote:
>
> <a href="" onclick="setKeys('map')">

This would be expected to reload the page, and it does.

> javascript:setKeys("map")
> in the address bar and pressing return seems to take effect sometimes
> but not always.

I haven't got this to fail. It always works.

> There is no way to detect which event is triggered by GEvent - if any.
> So there is no way to detect if the map has lost focus or not. We
> don't know what GEvent.trigger is doing.

Well, it's triggering a click and passing source and target
parameters. It is an undocumented format, though.

> I thought question was:
>
> Is there any possibility to bring the focus back to the map after
> displaying or removing an overlay - without any click or entering any
> command in the address bar?
>
> At the moment I don't know any...

Neither do I. There seems to be no reason that calling the function
shouldn't work -- perhaps 200ms isn't enough time. Note though that
  window.setTimeout(function() {javascript:setKeys("map") },200);
isn't right, as "javascript" won't be known. This should work though:
  window.setTimeout(function() {setKeys("map") },200);

The purpose of a keyboard handler is to obviate use of the mouse, so
even if it's necessary to navigate around the screen back to the "Use
keyboard in map" link, it's not a complete dead loss. But it should be
possible to do it programmatically without user intervention.

Carry on playing with it, I suppose...

Andrew

-- 
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