I need help to solve a problem that I have by using Webpack with React-leaflet, when I want to load the tiles of my map I get this error message for each tiles
GET http://localhost:9080/home/drigtime/Documents/electron-webpack-quick-start/static/tiles/amakna/3/11/6.jpg 404 (Not Found)
Here is my component code :
class MapComponent extends Component {
state = {
crs: L.CRS.Simple,
hightLight: [],
lat: -250,
lng: 425,
markers: [],
maxZoom: 4,
minZoom: 0,
zoom: 3
};
render() {
const { lat, lng, zoom, crs, maxZoom, minZoom } = this.state;
const position = [lat, lng];
return (
<Map
center={position}
zoom={zoom}
maxZoom={maxZoom}
minZoom={minZoom}
crs={crs}
>
<MapCoord />
<MapArea />
<HightLight />
<TileLayer url={join(__static, "./tiles/amakna/{z}/{x}/{y}.jpg")} />
</Map>
);
}
}
Am I doing something wrong ? How can I load my map tiles in the development environment ?
Here is the repo of my project https://github.com/Drigtime/owltouch/tree/beta