In case anyone else runs into the same problem, I have a solution:
function checkURL(){
if(document.URL ==
'http://www.yoursite.com/map.html'){
locationKey =
"your-api-key";
}
else{
locationKey =
"the--api-key-for-the-other-url";
}
var part1 = '<script
src="http://maps.google.com/maps?
file=api&v=2&key=';
var part2 = '"
type="text/javascript">'+ '</scr'+ 'ipt>';
document.write(part1+locationKey+part2);
}
checkURL();
hope that helps!
On Apr 20, 9:17 pm, davehearne <[email protected]> wrote:
> Hi Barry,
> thanks for the link,
> didn't see that when I was searching for information.
> Thanks again,
> Dave
>
> On Mar 30, 2:33 pm, Barry Hunter <[email protected]> wrote:
>
> >http://groups.google.com/group/Google-Maps-API/search?q=API+key+with+...
>
> > On 30/03/2009, davehearne <[email protected]> wrote:
>
> > > Hello,
> > > I have recently built a website for a client and he has 2 URLs for one
> > > website.
> > > www.thesisbindingireland.com
> > > www.thesisonline.ie
>
> > > I have a map on the location page of this site and it works fine with
> > > the first URL I have mentioned but I need a way around to get it to
> > > work with the second URL also.
> > > Any suggestions would be greatly appreciated.
> > > Thank You,
> > > Dave
>
> > --
> > Barry
>
> > -www.nearby.org.uk-www.geograph.org.uk-
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---