On Dec 14, 11:02 pm, Charlie <[email protected]> wrote:
>
> It appears that the browsers are receiving the same code, but for some
> reason not interpreting it the same.
What about www? A location.host for "www.bullitcountyhistory.org" is
not the same as location.host for "bullitcountyhistory.org", and that
will mess up your key-switching.
What you might try is first defining a string
var tld = location.host.toLowerCase();
tld = tld.substring(tld.length-3);
and then just using the TLD portion of the hostname:
{
'org': 'ABQIAAAA1h...',
'com': 'ABQIAAAA1h...'
}[tld] +
What that does is convert your hostname to lowercase and then take
just the last three characters. That way it doesn't matter if the URL
is camel-case, or uses "www" or not. Since a key for
bullitcountyhistory.com will also work for www.bullitcountyhistory.com,
if you get a key for the first one you only need to check that your
URL has "com" at the end.
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.