我收到错误作为无效的Google API密钥错误。
该页面无法显示Google地图元素。提供的Google Api密钥无效,或者此网站未经过授权即可使用。错误代码invalidKeyOrUnauthorizedURLMapError。
以下是头文字
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAmo6D4JJMMv-HIDDENHIDDENHIDDEN"></script>
<script type="text/javascript">
function initialize() {
var mapOptions = {
center: { lat: -34.397, lng: 150.644 },
zoom: 8
};
var map = new google.maps.Map(document.getElementById('googleMapView'), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
到目前为止,我只在localhost中尝试添加了一个引用者。浏览器密钥
如何解决错误
答案 0 :(得分:1)
通过启用更多的谷歌地图API找到它。