简体   繁体   English

谷歌地图 api 密钥是免费的吗?

[英]is google maps api key free?

I am having this issue my app is on development and the map were working just fine .我遇到了这个问题,我的应用程序正在开发中,地图工作得很好。 as soon as I restrict the api key the map stop working .一旦我限制了 api 键,地图就会停止工作。 if I change it back to unrestricted start working again .如果我把它改回无限制重新开始工作。 I been reading all day trying to figure out if I am missing something .我整天都在阅读,试图弄清楚我是否遗漏了什么。 do I need to pay for this to work ?我需要为此付费吗? any ideas有任何想法吗

Thanks谢谢

Google Maps APIs are free for a wide variety of use cases, with predictable overage pricing and usage limits for APIs and annual contracts for enterprise deployments. Google Maps API 可免费用于各种用例,API 具有可预测的超额定价和使用限制以及企业部署的年度合同。

Your issue is probably related to how you are enabling restrictions inside Google Developers Console.您的问题可能与您在 Google Developers Console 中启用限制的方式有关。 Assuming you are doing this for Android, it requires you to add package name (that you can get from AndroidManifest.xml file) and SHA-1 certificate fingerprint that you can generate using following command.假设您为 Android 执行此操作,则需要您添加包名称(您可以从 AndroidManifest.xml 文件中获取)和可以使用以下命令生成的 SHA-1 证书指纹。

keytool -list -v -keystore mystore.keystore

Once you add these two to the console, it should be in-effect within 5 minutes of the update.将这两个添加到控制台后,它应该会在更新后 5 分钟内生效。

HOW TO REGISTER A FREE GOOGLE MAPS API KEY如何注册免费的 GOOGLE 地图 API 密钥

if you want to use Google Maps as basemaps, you need to register a free API key that can be obtained from the Google API Console and enable the “Google Maps Javascript API” within Maps Marker Pro respectively Leaflet Maps Marker如果你想使用谷歌地图作为底图,你需要注册一个可以从谷歌 API 控制台获取的免费 API 密钥,并在 Maps Marker Pro 中分别启用“Google Maps Javascript API” Leaflet Maps Marker

In order to get this to work , first check your app package name if is the same with the api key using on the manifest, most important your app have to complete all signing application package .为了使其工作,首先检查您的应用程序包名称是否与清单上使用的 api 密钥相同,最重要的是您的应用程序必须完成所有签名应用程序包。 https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/signing/ https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/signing/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM