RapidAPI logo

Great Circle Mapper

フリーミアム
開発者 marcusgoede
更新日 6ヶ月前
旅行
8.7/10
人気度
172ms
レイテンシ
93%
正常稼働率

「Great Circle Mapper 」のドキュメント

Use Great Circle Mapper to calculate the air distance and flight time between all airports worldwide.

全文を表示する
Aviation
GETAir Route Calculation
GETAircraft Type Read
GETAirport Read
GETAirport Search
GETAir Route Calculation

calculate distance and flight time for any airports and any speed

ヘッダーパラメータ
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
varySTRING
REQUIRED
content-typeSTRING
REQUIRED
必須パラメータ
speedSTRING
REQUIREDSpeed in kts
routeSTRING
REQUIREDICAO airport cides, separated by hyphens
コードスニペット
unirest.get("https://greatcirclemapper.p.rapidapi.com/airports/route/EGLL-KJFK/510")
.header("X-RapidAPI-Host", "greatcirclemapper.p.rapidapi.com")
.header("X-RapidAPI-Key", "ログインしてキーを取得")
.header("vary", "Accept-Encoding")
.header("content-type", "text/html;charset=UTF-8")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
サンプルレスポンス
概要
リクエストURL: https://greatcirclemapper.p.rapidapi.com/airports/route/{route}/{speed}
リクエストメソッド: GET
レスポンスヘッダ
"accept-ranges": "none"
"content-type": "text/html;charset=UTF-8"
"date": "Wed, 24 Jul 2019 18:38:32 GMT"
"server": "RapidAPI-1.0.20"
"vary": "Accept-Encoding"
"x-rapidapi-region": "AWS - us-east-1"
"x-rapidapi-version": "1.0.20"
"content-length": "1105"
"connection": "Close"
レスポンスボディ
{"totals":{"distance_km":5554.53,"distance_nm":2999.21,"flight_time_min":372.85,"speed_kmh":944.52,"speed_kts":"510"},"legs":[{"origin":{"id":"2434","ident":"EGLL","name":"London Heathrow Airport","elevation_ft":"83.00","icao_code":"EGLL","iata_code":"LHR","alias":"LHR-EGLL-london-heathrow-airport","latitude_deg":"51.4706001282","longitude_deg":"-0.4619410038","latitude_minsec":"51°28'14\"N","longitude_minsec":"0°27'42\"W","link":"http:\/\/www.greatcirclemapper.net\/en\/airport\/LHR-EGLL-london-heathrow-airport.html"},"destination":{"id":"3622","ident":"KJFK","name":"John F Kennedy International Airport","elevation_ft":"13.00","icao_code":"KJFK","iata_code":"JFK","alias":"JFK-KJFK-john-f-kennedy-international-airport","latitude_deg":"40.6398010300","longitude_deg":"-73.7789001500","latitude_minsec":"40°38'23\"N","longitude_minsec":"73°46'44\"W","link":"http:\/\/www.greatcirclemapper.net\/en\/airport\/JFK-KJFK-john-f-kennedy-international-airport.html"},"distance_km":5554.53,"distance_nm":2999.21,"flight_time_min":373,"heading_deg":287.93693010005,"heading_compass":"WNW"}]}

SDKをインストール(NodeJS)

インストール

Node.jsでUnirestを使用するには、NPMモジュールをインストールしてください。

$ npm install unirest

インストール完了後は、簡単にリクエストを行うことができるようになります。

var unirest = require('unirest');

リクエスト

unirest.get("https://greatcirclemapper.p.rapidapi.com/airports/route/EGLL-KJFK/510")
.header("X-RapidAPI-Host", "greatcirclemapper.p.rapidapi.com")
.header("X-RapidAPI-Key", "ログインしてキーを取得")
.header("vary", "Accept-Encoding")
.header("content-type", "text/html;charset=UTF-8")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2認証
クライアントID
クライアントシークレット
OAuth2認証