Google Maps API密钥如何工作 [英] How Google Maps API Keys work

查看:129
本文介绍了Google Maps API密钥如何工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用中,我正在使用Google提供的3项服务: Google Maps API(地图) Google路线(获取路线和从点到另一点的路线) Google地方信息(我在其中输入文字的地方,建议的地方会在每次文字更改时开始出现) 我的问题是,这3个服务使用相同的密钥? 我需要为每个服务创建密钥吗?

In my app i am using 3 services from google: Google Maps API(The Map) Google Directions (To get directions and route from point to another) Google Places (Where i type text and suggested places start to appear on each text change) My question here is, these 3 services use the same key? Do i need to create a key for each service ?

推荐答案

API密钥与名称所指出的不同,它们不是特定于API的.相反,它们是特定于侧面的(客户端或服务器端).

API-keys, unlike the name points out, are not API specific. Instead, they are side-specific (client side or server side).

如果所有应用程序都是服务器端的,则可以使用一个服务器端API密钥来处理所有请求.相反,如果您只是在没有服务器的情况下制作HTML5 Web应用程序,则可以使用浏览器API密钥来处理所有请求.

If all your application is server sided then you can use one server side API key for all your requests. If instead you are simply making an HTML5 web app, without a server, then you can use a browser API key for all your requests.

但是请注意,某些API也支持API密钥.有关此的更多信息,您可以阅读以下文档:

Please note however, that some APIs also support API-keys. For more information about this you can read the following documentation:

此外,我想作一个小的更正.没有Google Maps API这样的东西.但是,我们确实有一个JavaScritp API,我相信您正在使用:p

Furthermore, I would like to make a small correction. There is no such thing as a Google Maps API. We do have however a JavaScritp API, which is what I believe you are using :p

玩得开心,欢迎光临!

这篇关于Google Maps API密钥如何工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆