Ok, I am using Mapbox as my mapping library, I render the map layers using the tiles (geojson) uploaded to the mapbox account. Demo here
The map renders properly but I get lots of 404 not found errors for the source tiles.
How to get rid of these errors?
Here is my code:
mapboxgl.accessToken = 'token';
var map = new mapboxgl.Map({
container: 'map',
//style: 'mapbox://styles/mapbox/streets-v9',
style: 'mapbox://styles/saurabhp/cizmll8v200452sqj5c16hc55?optimize=true', // optimize=true,
center: [-1.41, 6.32],
zoom: 5
});
map.on('load', function () {
map.addLayer({
'id': 'maine',
'type': 'fill',
'layout': {},
'paint': {
'fill-color': {
property: 'NDVI6',
stops: [
[0, '#F2F12D'],
[1, '#EED322'],
[2, '#E6B71E'],
[3, '#DA9C20'],
[4, '#CA8323'],
[5, '#B86B25'],
[6, '#A25626'],
[7, '#8B4225'],
[8, '#723122']
]
},
'fill-opacity': 0.8
},
'source': {
'type': 'vector',
'url': 'mapbox://saurabhp.cizs70g1e003033lkqw0u2rjj-6kayy'
},
"source-layer": "ghanaTestTileset",
});
});