This commit is contained in:
2025-07-16 07:51:38 +09:00
parent 8f4d89325b
commit 5c3112cb18

View File

@@ -68,24 +68,10 @@
<span id="loading">Loading...</span>
</div>
<script>
const trainAPI = 'https://gis.korail.com/api/train?bbox=120.6263671875,28.07910949377748,134.0736328125,45.094739803960664'
const server = ''
let openPopupTrainId = null;
let followingTrainId = null;
let isFollowing = false;
async function myFetch(url, options = {}) {
let headers = options.headers
return fetch('https://proxy/', {
headers: {
'X-Proxy-URL': url,
'X-Proxy-Header': JSON.stringify(headers),
'X-Proxy-Cache': '0'
}
});
}
const map = L.map('map').setView([36.5, 128], 7.5);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
@@ -205,13 +191,7 @@
}
}
myFetch(trainAPI, {
headers: {
"x-requested-with": "com.korail.talk",
"referer": "https://gis.korail.com/korailTalk/entrance",
"user-agent": "korailtalk AppVersion/6.3.3"
}
})
fetch('/api/train')
.then(response => response.json())
.then(data => {
trainLayer.clearLayers();