Thanks.
The script in the original file is:
<script type="text/javascript">
(function() {
GoogleMapsApiKey = {
'polygonzo.googlecode.com':
'ABQIAAAAgNQJhbWKFHRJJiHCXotPZxRjD_g9JWob_BY_bvArK_nQq_fZHhRbCusPq8UtDEYXGnyRj6wwa3Mbvw',
'gigapad':
'ABQIAAAAgNQJhbWKFHRJJiHCXotPZxTCDaeoAnk9GZSdGi854AcXbJXoXRS9QqxqDWHL54Twi5thIIANaCUAeA',
'gigapad.local':
'ABQIAAAAgNQJhbWKFHRJJiHCXotPZxTM3oEyKJfFfMe3pRkahPyHmmHL_xSjOVWnaIMs0gtUrFuoOJzsQiPnKA',
'mg.to':
'ABQIAAAAL7MXzZBubnPtVtBszDCxeRQjDwyFD3YNj60GgWGUlJCU_q5i9hSSSzj0ergKKMY55eRpMa05FE3Wog',
'padlet':
'ABQIAAAAL7MXzZBubnPtVtBszDCxeRSuIOvo2pGs7VouOPMgaUBd9TDiaBTE5gjPTrifBPED7VUFoeKD_Ysmkw',
'padlet.local':
'ABQIAAAAgNQJhbWKFHRJJiHCXotPZxTbToHSggDWprRoD6gaXq5geEyxiBTRRmW6BwPHdCzJ2mh90uajjkpAOA',
's.mg.to':
'ABQIAAAAL7MXzZBubnPtVtBszDCxeRQ9jbX8zKuYy1oz9F5p7GBNeAnoJRS9Itc8RizuhplTF59tia4NLgrdHQ',
'': ''
}[location.host];
document.write(
'<script type="text/javascript"
src="http://www.google.com/jsapi?
key=', GoogleMapsApiKey, '">',
'<\/script>'
);
})();
</script>
I'm trying to replace this with my own API key, as follows:
<script type="text/javascript">
(function() {
GoogleMapsApiKey = {
'http://www.snappingturtle.net':
'ABQIAAAA1RLepL8p1MTYVaqzJCgGOhTrLurDFxcCqBLWmzHUpc6rm-
tbdxQ08c5oNPyloD4qyqScoXYJW8-m8Q',
'': ''
}[location.host];
document.write(
'<script type="text/javascript"
src="http://www.google.com/jsapi?
key=', GoogleMapsApiKey, '">',
'<\/script>'
);
})();
</script>
but this gets the error
> The Google Maps API server rejected your request. This could be because the
> API key used on this site was registered for a different web site. You can
> generate a new key for this web site at http://code.google.com/apis/maps/.
Although it is my API key.
If I replace that whole block of code with the simpler script which
Google provides:
<script src="http://maps.google.com/maps?
file=api&v=2&sensor=true_or_false&key=ABQIAAAA1RLepL8p1MTYVaqzJCgGOhTrLurDFxcCqBLWmzHUpc6rm-
tbdxQ08c5oNPyloD4qyqScoXYJW8-m8Q" type="text/javascript"></script>
then it doesn't work at all.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---