本文介绍了对同一台服务器使用多个Google Maps API密钥?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 我有一台服务器作为网格。 我有3个移动应用程序,每个都有自己的Google Maps API Key 这三个应用程序都会调用我的服务器,它会使用特定的应用程序密钥调用Google apis。 所以App1有key1 App2有key2 app3有key3当我需要App1的指示时,我的服务器调用google api with key 1 当我需要App2的指示时,我的服务器通过key 2 调用google api,当我需要App3的指示时,我的服务器用key 3调用google api 所以我的服务器就像一个API网格。这是否违反谷歌条款?恐怕他们会查看服务器的IP地址,看看有3个密钥被使用,并假设我在禁止的同一应用中使用了不同的密钥。 解决方案简短的回答(摘自常见问题)非常简单:不,在这种情况下不能使用两个键。 请参阅 https://developers.google.com/maps/faq#usage_avoidance - 他们甚至保留有权从任何网站禁止访问地图API这样做,就像您担心的那样。使用多个关键字,甚至是尽管它只能为您提供方便,但对于他们来说,它们意味着要欺骗并绕过限制每天和每次服务的25,000个请求。他们不喜欢这一点,因为他们希望地图API的大用户支付费用。价格在同一页面上 。 您应该完整阅读常见问题段落了解服务条款和使用限制 - 这段内容很短,但有时会有点棘手。您会发现在某些情况下,您实际上不必支付甚至当超出限制时: 您正在使用google earth API 原生地图API来自移动平台 您仅通过嵌入显示Google地图 您的应用符合公众利益由Google自行决定) 另外,您还可以并不总是需要提供API密钥,尽管这些产品可能仍然只能用于有限使用:例如地理编码API 。 我猜你不是在你的电话过境之后的其中一种情况下(至少子弹2和3)通过你的服务器。在移动应用中使用本地API可以解决这个问题,但这确实意味着我想的一些发展。 值得注意的是,您应该申请一个特殊的为某些用例映射API for business 许可证,例如当只有付费用户才能看到您的地图。 总之,在使用需要一个产品的产品时,您需要有一个Google Maps API密钥。或者说,每个域名至多一个。 I have a server which acts as a mesh.I have 3 mobile apps, each having it's own google maps api Keyall three apps call my server which calls the google apis with the specific app key.so App1 has key1App2 has Key 2App3 has key 3when I need the directions for App1, my server calls google api with key 1when I need the directions for App2, my server calls google api with key 2when I need the directions for App3, my server calls google api with key 3So my server works like an API mesh. Is this against google terms? I am afraid they will look at the ip address of the server, see there are 3 keys used and assume I am using different Keys for same applications which is prohibited. 解决方案 The short answer (drawn from the FAQ) is quite simply : no, you can't use two keys in this case.See https://developers.google.com/maps/faq#usage_avoidance- they even reserve "the right to withhold access to the maps API from any site" doing so, just as you feared.Using more than one key, even though it could only be a matter of convenience for you, means for them trying to cheat and bypass the limitation of 25,000 requests per day and per service. And they don't like that, because they want big users of their maps API to pay, of course. Prices are listed on the same page.You should read the FAQ paragraphs "Understanding the Terms of Service" and "Usage limits" completely - it is quite short but sometimes a little tricky. You'll see that there are a few situations in which you do not actually have to pay even when exceeding limitations :you are using the google earth APIyou are using a native maps API from a mobile platformyou are showing a google map through an embed onlyyour apps are "in the public interest (as determined by Google at its discretion)"Also, you do not always need to provide an API key, though these products may still be available for limited use only : take for instance the geocoding API.I guess you're not in one of those cases (at least bullets 2 and 3) since your calls transit through your server. Using the native APIs in mobile apps would solve the problem, but it does mean quite some development I guess.It is also worth noting that you should apply for a special maps API for business license for some use cases, e.g. when only paying users get to see your map.In conclusion, you need to have one single google maps API key when it comes to using their products that require one. Or rather, at most one per domain name. 这篇关于对同一台服务器使用多个Google Maps API密钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-07 00:10