如何在反应中使用 google-map-react 制作静态地图?

问题描述

我有这个:

 <GoogleMapReact
      bootstrapURLKeys={{ key: 'key' }}
      defaultCenter={center}
      defaultZoom={zoom}
>
  <TacoMarker
   link={shop.id}
   lat={latitude}
   lng={longitude}
  />

 </GoogleMapReact>

我可以给你传什么道具?会像 scrollEnabled = {false} 吗?

解决方法

dfs <- list(df1,df2,df3,df4,df5,df6,df7,df8,df9,df10,df11,df12,df13,df14,df15,df16,df17,df18,df19) dfs2 <- lapply( dfs,function(d) tail( d,-7 ) ) ## rest of the code with dfs2 被编写为使用 Maps JavaScript API。请注意,Maps JavaScript API 与 Maps Static API 不同。如果您想在您的 React 代码中显示静态地图,您可以直接将 Maps Static API URL 放在 google-map-react 标签的 src 参数中。

这是一个示例代码片段:

<img/>