-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
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>
Metadata
Metadata
Assignees
Labels
No labels