-
Hello, I'm trying to display a raster map layer but only have the tiles as jpg. My map component: <ReactMapGL>
<Source type="raster" tiles={['http://localhost:5000/{z}/{x}/{y}.jpg']}>
<Layer type="raster" paint={{ "raster-opacity": 0.5 }} />
</Source>
</ReactMapGL> At the same time, I'm serving the image files locally using npm However, I still am unable to see the tiles on my map. In the development console, the network requests for the tiles |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
oh I found out that my file server did not have cors enabled which resulted in the blocked request. Works when served with |
Beta Was this translation helpful? Give feedback.
oh I found out that my file server did not have cors enabled which resulted in the blocked request. Works when served with
http-server
with cors enabled