0
votes

I'm trying to do a map matching on a walking round circuit (starting and ending at the same point). I always get:

{
code: "NoSegment",
message: "Could not find a matching segment for input coordinates",
matchings: [ ]
}

I'm passing 17 coordinates (where the first and the last one are the same), and these coordinates are in the middle of Buenos Aires which is a big city and therefore I'm pretty sure there are enough roads around to match. This is my request:

https://api.mapbox.com/matching/v5/mapbox/walking/-34.59491,-58.41608;-34.59523,-58.41408;-34.59614,-58.41237;-34.59752,-58.4112;-34.59915,-58.41074;-34.60081,-58.41106;-34.60225,-58.41211;-34.60326,-58.41374;-34.6037,-58.41571;-34.60349,-58.41773;-34.60268,-58.41952;-34.60137,-58.4208;-34.59977,-58.4214;-34.59809,-58.42122;-34.5966,-58.4203;-34.5955,-58.41876;-34.59491,-58.41608?access_token=xxx&steps=false&tidy=true&geometries=polyline&overview=false

I don't care about turn by turn instructions therefore steps=false, I only want to snap my points to roads. I've tried increasing the radious, adding timestamps, marking them not as waypoints, but it's always the same, "NoSegment"

&radiuses=50;50;50;50;50;50;50;50;50;50;50;50;50;50;50;50;50&timestamps=0;5;10;15;20;25;30;35;40;45;50;55;60;65;70;75;80&waypoints=0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16

These same coordinates work perfect with BingMaps snap to road API, but I would prefer using Mapbox because it's more transparent on pricing.

1

1 Answers

1
votes

Probably you are adding lat,long in api instead of long, lat. it should be

https://api.mapbox.com/matching/v5/mapbox/walking/long,lat;long,lat?