**注:**例子中的 1F6D701272402D1E7D8D316CCE519123 是船讯网的官方 key,已经绑定域名 api.shipxy.com,用户无权也无法使用该 key 获取数据,使用该 key 会返回 status 14 的状态码,提示来源域错误。用户如需试用服务,请在控制台创建自己的key。
curl --location 'https://api.shipxy.com/apicall/v3/PlanRouteByPort?key=1F6D701272402D1E7D8D316CCE519123&start_port_code=CNGZG&end_port_code=CNSHG&avoid=&through='
{ "status": 0, "msg": "", "data": { "distance": 915.22, "route": [ { "lng": 113.571144, "lat": 22.844316 }, { "lng": 113.56867, "lat": 22.82417 }, { "lng": 121.58414, "lat": 31.37979 } ] } }