infowindow.js:15未捕获的TypeError:f.get不是react组件中的函数

时间:2018-08-25 21:13:24

标签: reactjs google-maps

我在React Component中使用此代码 此逻辑的目标是在单击show infowindow

之后
clickInfoWindow = (event, element) => { 
    const { map } = this.state;
    let placeID = event.currentTarget.id;
    let { allMarkers, InfoWindow } = this.state;
    let infowindow = InfoWindow.find(infowindow=>infowindow.marker.id == placeID)
    let marker = infowindow.marker;
    console.log(marker, infowindow);
    infowindow.open(marker, map)
    this.closeInfowindow();
}

我已经在另一个组件中创建了带有Google Maps构造函数的对象信息窗口。(单击here component in gist

App.js

0 个答案:

没有答案