Here m adding tile created using tiff
mapboxgl.accessToken ='pk.eyJ1IjoiZ2F1cmF2Y2F0c3RlY2giLCJhIjoiY2l1cGo0MTl4MDAxajJ1bng5a2xieTY0diJ9.0fDXNulI91U85ngSc4jGCg';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v9',
zoom: 13,
center: [-122.447303, 37.753574]
});
map.on('load', function () {
map.addSource('terrain-data', {
type: 'raster',
url:'mapbox://gaurav.2on6cgzq'
});
map.addLayer({
"id": "terrain-data",
"type": "line",
"source": "terrain-data",
"source-layer": "contour",
"layout": {
"line-join": "round",
"line-cap": "round"
},
"paint": {
"line-color": "#ff69b4",
"line-width": 1
}
});
});
I am getting :
Error: Source layer "contour" does not exist on source "terrain-data" as specified by style layer "terrain-data"