mirror of
https://github.com/morgan9e/KorailMap
synced 2026-04-13 16:04:07 +09:00
Fix
This commit is contained in:
22
index.html
22
index.html
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user