【问题标题】:How to leverage GoogleMap MarkerShape in React?如何在 React 中利用 GoogleMap MarkerShape?
【发布时间】:2022-01-04 06:43:26
【问题描述】:

我正在尝试在 React 中利用 GoogleMap Marker,但形状界面似乎不起作用。 这是我的代码,图像显示正确但形状不正确,有什么问题吗?

        const myIcon = {
          url: './IMG_4033.JPG',
          scaledSize: new window.google.maps.Size(100, 100),
          anchor: { x: 100, y: 100 }
        };
        const marker_shape = {coords: [50, -50, 50], type: "circle"};
        return(<><Marker icon={myIcon} animation={window.google.maps.Animation.DROP} position={ lat: 46.97722, lng: -68.992028 } shape={marker_shape} /></>);

任何信息将不胜感激!

【问题讨论】:

    标签: reactjs google-maps


    【解决方案1】:
    https://developers.google.com/maps/documentation/javascript/react-map
    

    这个可能对你兄弟有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-02-19
      • 1970-01-01
      • 2021-04-04
      • 1970-01-01
      • 1970-01-01
      • 2021-10-31
      • 1970-01-01
      相关资源
      最近更新 更多