当我试图加载google地图时,我得到了这个错误。
Google错误: MissingKeyMapError
在googling搜索之后,我正在访问本地主机http://localhost:3000/上的应用程序,我注意到需要传递一个API键来解决这个错误,但是如何传递这个键呢?我没有看到与sebm标记的这个键相关的任何属性。
Party-详情. has有以下内容:
<sebm-google-map
[latitude]="lat || centerLat"
[longitude]="lng || centerLng"
[zoom]="8"
(mapClick)="mapClicked($event)">
<sebm-google-map-marker
*ngIf="lat && lng"
[latitude]="lat"
[longitude]="lng">
</sebm-google-map-marker>
</sebm-google-map>发布于 2016-08-14 09:30:54
您可以在您的index.html文件中放置以下脚本
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_GOOGLE_MAPS_API_KEY_HERE"></script>在此之前
<script src="build/js/app.bundle.js"></script>您可以管理api密钥表单。
https://developers.google.com/maps/documentation/javascript/https://stackoverflow.com/questions/38580328
复制相似问题