views:

192

answers:

2

Ok, so I have a site that uses the google maps API, and I want to serve it from more domains. The fact that the API key is tied to a domain greatly hinders my efforts on this front.

Is there any solution more elegant than getting a key for every domain?

+2  A: 

You can set up a proxy. But obviously that will complicate your code, and it's your responsibility to make sure only your domains can access the proxy.

Matthew Flaschen
+2  A: 

There is one way you can avoid using the API key completely - use the version 3 API.

The v3 API is still in 'beta' but it has the key (no pun intended) functionality that most people use for their maps and there are no keys required. Nor will there be in the future according to Google. If you can get by without features like draggable markers, then v3 will work well. I use it for my primary map page and have no problems with it.

timbo
Is this still true?
n8wrl
No. V3 is now out of beta.
timbo