问题
I'm getting this error only in the web hosted version of my website and I'm using the Key, It works fine in local! Help please!
<script async src="http://maps.googleapis.com/maps/api/js?=AIzaSyDudFyTGhbU2CvJtJNxdfkPcJfRQnZ1pbTg&libraries=geometry">
回答1:
the API key is not being assigned because you are missing the GET parameter key in the url, in this case '?key='
<script async src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDudFyTGhbU2CvJtJNxdfkPcJfRQnZ1pbTg&libraries=geometry">
If it still doesn't work, check out this guide from Google: https://developers.google.com/maps/documentation/javascript/get-api-key
来源:https://stackoverflow.com/questions/38517094/google-maps-api-error-missingkeymaperror