Also, you can script the key so that you can have the same page on
different domains. I think I saw this solution here somewhere, but
can't remember and I don't feel like fighting with the search. I
included the script to write the key below, but you can see it at:
http://www.healthypetmobilevet.com/area.shtml

Here's the relevant code if it doesn't get mangled:

              <script type="text/javascript">
                document.write(
                '<script src="http://maps.google.com/maps?
file=api&amp;v=2&amp;sensor=false&amp;key=' +
                  ({
                  'www.healthypetmobilevet.com':
'ABQIAAAAkzMwfHDLTrxt8VNR0yq9FRQ7EqE0mOyfVG40L6fNq7Un8buj8hQTV6eQ_fNtisF9PNXuKtCC-
_2uug',
                  'www.healthypetmobilevet.net':
'ABQIAAAAkzMwfHDLTrxt8VNR0yq9FRTT5nT7mmUboUV6vFITvKVSE86WjBTs3oH3H2BTBOBAzOYLFbvT49Gmhg',
                  'www.healthypetsmobilevet.com':
'ABQIAAAAkzMwfHDLTrxt8VNR0yq9FRQAb7A2k6llMjrlfZxpWKtqTAYuIRQ4vMl3gWTn69w6B8Bj-
Mt0TQYPRw',
                  'www.healthypetsmobilevet.net':
'ABQIAAAAkzMwfHDLTrxt8VNR0yq9FRSqBBNKHnueDMwRMKZAV9_6Da27iBT6Av6VDcSwotyMoKrk5Uf7YvCegw',
                  'healthypetmobilevet.com':
'ABQIAAAAkzMwfHDLTrxt8VNR0yq9FRQjCe8R_zz67cVP9fK3JICqhKPGhxQjnUIMvULceH4pi3kluMyJsrc_yg',
                  'healthypetmobilevet.net':
'ABQIAAAAkzMwfHDLTrxt8VNR0yq9FRTSYZgRQ5dBplpJNYmYjT89Hrv5gxTWOcVpoNxQG7nj4V5sapNWKJJTSg',
                  'healthypetsmobilevet.com':
'ABQIAAAAkzMwfHDLTrxt8VNR0yq9FRQx0MeLAPr3QMS-
p6PgiWPiKUde2hTEnnXi8ymwpVdpNQVIUgbLovdUCg',
                  'healthypetsmobilevet.net':
'ABQIAAAAkzMwfHDLTrxt8VNR0yq9FRQSua4aPdgE8oMwuPybsuaP0LIbaBSTFw09g5XHDrsRY6klPYIQhEFKOA'
                  }[location.host] ||
'ABQIAAAAkzMwfHDLTrxt8VNR0yq9FRQ7EqE0mOyfVG40L6fNq7Un8buj8hQTV6eQ_fNtisF9PNXuKtCC-
_2uug') +
                  '" type="text/javascript"><\/script>' );

-Brian

On Oct 6, 5:47 pm, Gregory Short <[email protected]> wrote:
> On Oct 6, 2009, at 4:36 PM, Scott Wilcox wrote:
>
>
>
> > On 6 Oct 2009, at 21:43, City IT wrote:
> >> I am with city government, we have two url's to get the our city  
> >> site,
> >> but we recently created a crime map for the police dept.  The API key
> >> was generated based on the link:  
> >> http://www.shreveportla.gov/dept/police/crimemaps/crimemap.html
> >> ,
> >> which works wonderfully.   When the other url is used:
> >>http://www.ci.shreveport.la.us/dept/police/crimemaps/crimemap.html 
> >> the
> >> users get 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 athttp://code.google.com/apls/maps/";.
>
> >> Do I need to generate another API Key  and used them both in my  
> >> script
> >> or is there so way to redirect to the code already in use?
>
> >> We contracted this portion to another vendor, so I don't know all the
> >> details of the script used, but I do have access to the script and  
> >> can
> >> make changes.
>
> > Yes, you'll need a separate key for thewww.ci.shreveportla.gov
> > subdomain.
>
> Marginally more accurately: api keys fully support subdomains, but  
> neither of your two domains are subdomains of the other. They are two  
> completely different domains:
>
> www.shreveportla.govwww.ci.shreveport.la.us
>
> They don't even share the same TLD, and as such will require separate  
> keys, as stated by Wilcox. If your domains were actuallywww.shreveportla.gov
>   andwww.ci.shreveportla.gov, of course, you *could* in fact use just  
> one key, which would need to be registered for shreveportla.gov.
>
> -G
--~--~---------~--~----~------------~-------~--~----~
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