You can't test the key yourself, because the client side validation
isn't performed against the key itself, but against a "hash" that the
loader returns. The algorithm for deriving a hash from the key is not
published.

The only thing you can do to prevent the message being displayed is to
overwrite the Javascript alert() function with your own alert() function
which doesn't display anything to the user, before calling the API
loader.

        function alert() {}

There's an undocumented variable, with a misleading name, G_INCOMPAT
which is set true if the client side validation fails. (It then causes
GBrowserIsCompatible() to return false.) However, if you use that
directly, there's a danger that Google might remove that undocumented
variable in the future, and then all your pages would fail at once.

But what you can do is to display the Google Maps link if the
GBrowserIsCompatible() check returns false, and only display the API map
if GBrowserIsCompatible() is true. Which you probably want to do anyway,
in case there are people accessing your pages with browsers that
actually are incompatible. GBrowserIsCompatible() is false both for
incompatible browsers and for key validation failures.

Remember to use the Google Maps Link if the browser has Javascript
disabled, and you've covered all the bases.

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


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