TrailAPI

フリーミアム
よって trailapi | 更新済み 5 days ago | Travel
人気

9.3 / 10

レイテンシー

1,069ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

Bad list of maps returned

Rapid account: Nthrasher
nthrasher
2 years ago

I’m getting the same 3 (wrong) maps returned by the ‘Trail Map List’ endpoint no matter what id I put in. The steps I’m taking are:

  1. Enter a lat/lon in ‘Find Bike Trails’ endpoint. This seems to work well and I choose a trail ID.
  2. Use trail id from step 1 in the ‘Trail Map List’ endpoint. Always get 3 maps returned, ids: 3857, 3910, 24127. At least one of those is a trail in Hawaii (I chose lat/lon coords and trail ids from both Casper, WY and Colorado Springs, CO just to see if I would get different results).

Should I be doing something differently?

Update:

Wanted to give a specific example. I’m using the example given by trailapi to the previous comment.

Search for bike trails within 5 miles of a point in southwestern Colorado Springs, CO:

https://trailapi-trailapi.p.rapidapi.com/trails/explore/?lat=38.79634&lon=-104.8846&radius=5’
I get something like 36 responses. Among them is “Captain Jack’s”, which was mentioned in the previous comment. In the previous comment trailapi claims the trail id is ‘7’. However, this is the response I see for Captain Jack’s.

{15 items
"id":288892
"name":“Captain Jack’s”
“url”:“https://www.singletracks.com/bike-trails/captain-jacks/”
“length”:“5.0"
“description”:…”
“city”:“Colorado Springs”
“region”:“Colorado”
“country”:“United States”
“lat”:“38.79908"
“lon”:”-104.88353"
“difficulty”:“Intermediate”
“features”:“Night riding allowed”
“rating”:4.24
"thumbnail":“https://images.singletracks.com/blog/wp-content/uploads/2010/09/l_ac02e72152e64a53bd2f74350b37fcc6-0-orig.jpg”
}
Clearly the id is supposed to be ‘288892’. So…

https://trailapi-trailapi.p.rapidapi.com/trails/288892/maps/
The response I get is:

[3 items
0:{7 items
"name":": Official Map"
“id”:“3857"
“description”:”"
“updated”:“2020-06-17T12:26:16+00:00"
“elevation_gain”:“103"
“start_location”:“0.000000,0.000000"
“distance”:“13736”
}
1:{7 items
"name”:”: Official Map”
“id”:“3910"
“description”:“Mostly fire road (feels like singletrack) with steep drop into and out of the canyon midway. Watch for hikers, dogs and horses.”
“updated”:“2020-06-17T12:27:38+00:00"
“elevation_gain”:“344"
“start_location”:“0.000000,0.000000"
“distance”:“15924”
}
2:{7 items
"name”:”: SWMBA Trails”
“id”:“24127"
“description”:””
“updated”:“2020-07-20T20:45:01+00:00”
“elevation_gain”:“0”
“start_location”:“41.498790,-109.414715”
“distance”:“24005”
}
]
(Note, none of those maps is for Captain Jack’s)

Indeed, if I use ‘7’ as the id in the ‘…/trails/<id>/maps/’ endpoint I get back maps for Captain Jack’s. Where is ‘7’ coming from? What am I doing wrong here?

Rapid account: Trailapi
trailapi Commented 2 years ago

Thanks for the message and the detailed info! We looked into this and have corrected the error.

Trail IDs were re-indexed in 2020, and 7 was the old ID for Captain Jack’s. The API translated old to new IDs, but wasn’t properly recognizing the new ones being returned by the explore endpoint.

Please let us know if you’re still having issues.

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿