问题
I'd like to add an API_KEY for GoogleMaps
for testing and in documentation I've read this :
Tip: During development and testing, you can register a project for testing purposes in the Google Cloud Platform Console and use a generic, unrestricted API key. When you are ready to move your app into production, register a separate project for production, create an Android-restricted API key, and add the key to your application.
My question is, do I have to put my Credit card even if it's a testing API_KEY? I do not get the purpose to put my Creadit card to use Google Maps, isn't it free?
回答1:
As long as you're using a testing API key it is free to register and use. But when you move your app to commercial level you have to pay for it. When you enable billing, google gives you $200 credit free each month that means if your app's map usage is low you can still use it for free even after the billing enabled, if it exceeds the credit limit now you have to pay for it.
回答2:
There seems no way to have google maps api key free without credit card. To test the functionality of google map you can use it while leaving the api key field "EMPTY". It will show a message saying "For Development Purpose Only". And that way you can test google map functionality without putting billing information for google map api key.
<script src="https://maps.googleapis.com/maps/api/js?key=&callback=initMap" async defer></script>
来源:https://stackoverflow.com/questions/52248646/googlemaps-api-key-for-testing