TrailAPI

FREEMIUM
Par trailapi | Mise à jour il y a 4 mois | Travel
Popularité

9 / 10

Latence

604ms

Niveau de service

97%

Retour à toutes les discussions

Bad list of maps returned

avatar
nthrasher
il y a un an

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?

avatar
trailapi commented il y a un an

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.

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires
Note : 4 - Votes : 5