On Sat, Apr 23, 2011 at 6:13 AM, Andrew Leach <[email protected]> wrote:
> There are very few ways that you can get the API to work on an > internal network (and I'm not going to say how it can work, because > that circumvents the security). It's best always to use localhost and > work on the server itself. "localhost" doesn't actually need a key at > all. Sorry to disagree, but that's incorrect except for the last sentence. The free Maps API works fine for development and testing on local/internal networks. There is no trick to getting the API to work, and no security issue. You can't go into *production* on a private network with the free API, but the Terms of Service specifically allow the use of private servers for development and testing. See section 9.1.1(b): http://code.google.com/apis/maps/terms.html While the development and testing exception in that section was a fairly recent addition to the TOS (added as a result of a bug report I filed on the TOS), it was always Google's informal policy. They never objected to people developing and testing on local networks; it's only production apps that they care about. To get an API key for a local test server, simply request an API for its URL as you would any other API key. For example, I have a test server on my LAN named 'testpad', and I use an API key for this URL: http://testpad/ As to whether it's "best" to use localhost and work on the server itself, the only advantage of using localhost is that you don't need an API key. It is convenient, but inadequate for proper testing of a Maps API app on multiple OSes and browsers. For that you need to put the app on a server - either a public server, or a local server for development and testing. (And this is why Google never objected to this kind of API use.) So, KimG, back to your question: simply get an API key for the http: URL of your local test server and you'll be all set. Don't worry if you're just experimenting with the API; that certainly counts as "development and testing". Andrew, please forgive me if I'm beating this issue to the ground. :-) I've seen similar comments from several of the regular contributors to the list, and I don't want people to be misled on this point. -Mike -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
