小编am1*_*101的帖子

React-Google-Maps:缩放 +/-,地图/卫星图标不可见

我在地图上没有看到缩放 +/-、地图/卫星和人类图标。我正在按照文档中指定的步骤进行操作。有没有我必须通过的特定道具?或者有什么悬而未决的问题?谢谢你的帮助。

这是我的 GoogleMap 组件的片段 -

*

withScriptjs(
      withGoogleMap(() => {
       return (<GoogleMap
          // google={google}
          defaultZoom={8}
          center={selectedAirportPos}
          // center={{lat: 39.996944444444445, lng: -82.89194444444445 }}
          // defaultCenter={{ lat: -34.397, lng: 150.644 }}
           defaultOptions={{
            // defaultCenter: {lat: -34.397, lng: 150.644 },
            disableDefaultUI: true,
            mapTypeId: 'terrain',//google.maps.MapTypeId.TERRAIN,
          }}
        >
           <GMapsAirportMarker
             withInfoWindow={allMarkersState[selectedAirport.id]}
             withInfoWindowContent={this.selectedInfoWindowContent(selectedAirport)}
             position={selectedAirportPos}
             icon
Run Code Online (Sandbox Code Playgroud)

*

reactjs react-google-maps

3
推荐指数
1
解决办法
4141
查看次数

标签 统计

react-google-maps ×1

reactjs ×1