【发布时间】:2021-04-05 07:15:10
【问题描述】:
我想将 Google 地图与我的 Angular 项目集成。在试用版中,我只是点击此链接 https://angular-maps.com/guides/getting-started/。目前,我陷入了错误:
node_modules/@agm/core/lib/directives/map.d.ts:232:43 - error TS2694: Namespace 'google.maps' has no exported member 'MouseEvent'
232 mapDblClick: EventEmitter<google.maps.MouseEvent>;
我去了文件位置,得到了这个
mapClick: EventEmitter<google.maps.MouseEvent | google.maps.IconMouseEvent>;
/**
* This event emitter gets emitted when the user right-clicks on the map (but not when they click
* on a marker or infoWindow).
*/
mapRightClick: EventEmitter<google.maps.MouseEvent>;
/**
* This event emitter gets emitted when the user double-clicks on the map (but not when they click
* on a marker or infoWindow).
*/
mapDblClick: EventEmitter<google.maps.MouseEvent>;
/**
依赖: npm install @agm/core npm i @types/googlemaps
【问题讨论】:
-
请查看我的答案,解决方案刚刚合并并发布,不再需要解决方法。
标签: javascript angular google-maps-api-3 angular-google-maps