
Intenté usar el folleto de reacción para mostrar el mapa en mi aplicación de reacción e hice cosas que se basan en los documentos, pero por alguna razón, mi marcador está roto, aquí está mi código
const foodIcon = new L.icon({ iconUrl: require('../images/makanan.png'), iconSize: [35,45] }) const position = [51.505, -0.09] <div id="map"> <div className="map-container"> <MapContainer style={{ width: '100%', height: '600px' }} center={position} zoom={13} scrollWheelZoom={false}> <TileLayer attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" /> <Marker position={position} icon={ foodIcon }> <Popup> Hello </Popup> </Marker> </MapContainer> </div>Vuelva a verificar la ruta de la imagen y si tiene la imagen en el lugar correcto. Funciona para mi.