You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught TypeError TypeError: Failed to fetch
at (c:\Users*\Desktop*\index.html:17:13)
--- Promise.then ---
at (c:\Users*\Desktop*\kml\index.html:19:18)
@ c:\Users*\Desktop**\kml\index.html:17:13
here is my code
// Load kml file
fetch('https://github.com/fullfocusbtw1/123123123.git')
.then(res => res.text())
.then(kmltext => {
// Create new kml overlay
const parser = new DOMParser();
const kml = parser.parseFromString(kmltext, 'text/xml');
const track = new L.KML(kml);
map.addLayer(track);
// Adjust map to show the kml
const bounds = track.getBounds();
map.fitBounds(bounds);
});
</script>
</body>
The text was updated successfully, but these errors were encountered:
You are trying to fetch a html file not a kml file. Try this: fetch('https://raw.githubusercontent.com/fullfocusbtw1/123123123/main/UspihMapUa%20(1).kml')
Uncaught TypeError TypeError: Failed to fetch
at (c:\Users*\Desktop*\index.html:17:13)
--- Promise.then ---
at (c:\Users*\Desktop*\kml\index.html:19:18)
@ c:\Users*\Desktop**\kml\index.html:17:13
here is my code
The text was updated successfully, but these errors were encountered: