react js google map api display is not working

27 Views Asked by At

I'm use @react-google-maps/api": "^2.19.0". and then display screent is not ok , plase see attact image.

       <GoogleMap
          ref={ref}
          mapContainerStyle={containerStyle}
          center={center}
          zoom={Zoom}
          onLoad={onLoad}
          onUnmount={onUnmount}
          //mapTypeId="satellite"   //-- กำหนดให้แสดงแผนที่ดาวเทียม --
          mapTypeId='hybrid'
        > 
          {
            path ? null :              //-- ถ้ามี path ไม่ต้องใส่ marker --
              markersObj.map((marker, index) => (
                <Marker key={index} position={marker} />
              ))
          } 
          <Polygon
            path={path}
            options={{
              strokeColor: '#FF0000', // Color of the polygon's border
              strokeWeight: 3,        // Thickness of the polygon's border
              fillColor: '#FF0000',   // Color of the polygon's fill
              fillOpacity: 0.35       // Opacity of the polygon's fill
            }}
          />
        </GoogleMap>

how to fix display on screen.

0

There are 0 best solutions below