Skip to content

Instantly share code, notes, and snippets.

@lyshie
Last active March 5, 2024 08:02
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lyshie/385244be22be697f2e1ef9f123f87859 to your computer and use it in GitHub Desktop.
Save lyshie/385244be22be697f2e1ef9f123f87859 to your computer and use it in GitHub Desktop.
台灣公路 CCTV 列表

API

var cors_proxy = 'https://cors-anywhere.herokuapp.com/';
$.getJSON(cors_proxy + url, function(data) {
});
var keyword = $('#keyword').val();

$.getJSON({
    url: cors_proxy + 'http://api.opencube.tw/location/address',
    data: {
        keyword: keyword
    }
}, function(data) {
    if (data.status == 200) {
        current.lat = data.data.lat;
        current.lng = data.data.lng;
    }
});

台灣公路 CCTV 列表

台灣公路交流道座標

https://www.thb.gov.tw/api/GetExpressways?cityCode=-1
https://www.thb.gov.tw/api/GetExpressways?cityCode=[縣市代碼]
https://www.thb.gov.tw/api/GetExpresswayInterchangeSet?expresswayId=[公路代碼]
https://www.thb.gov.tw/resource/upload/Expressway/[交流道代碼].jpg
https://www.thb.gov.tw/api/GetAllExpresswayStakeSet

[
  {
    "Name": "八里交流道",
    "Mileage": 12,
    "Lon": 121.3742833,
    "Lat": 25.1384667,
    "Id": "7c8c2ab4-ab21-4788-8ec3-c6544129e1f1",
    "Extension": ".jpg"
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment