AlexH
AlexH

Reputation: 2887

Using google maps API with varied domains

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?

Upvotes: 2

Views: 1022

Answers (2)

timbo
timbo

Reputation: 14334

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.

Upvotes: 3

Matthew Flaschen
Matthew Flaschen

Reputation: 284927

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.

Upvotes: 2

Related Questions