Matrix Distance not returning result

2 posts / 0 new
Last post
steve.bamelis
Matrix Distance not returning result

Hi,

I'm trying to get a distance between two points.

I have the following example JSON 

{locations:[{latLng:{lat:50.877189,lng:4.704374}},{latLng:{lat:50.88843,lng:4.757709}}],options: {allToAll: false}}

I call this on the directions/v2/routematrix

The result of the distance is 0 and I have a message stating "Route matrix failed - unknown error in route computation"

When I do this with {locations:[{latLng:{lat:51.013843,lng:3.705313}},{latLng:{lat:50.88843,lng:4.757709}}],options: {allToAll: false}}

I'm getting a proper distance being 55.235

 

I tried to figure out why I'm getting an error with my first location. 

If I look at the result, it returns to me a street named "Maya Geschenken". The actual streetname is "Tiensestraat 62"

If I do a normal mapquest.com lookup online and I input the street Tiensestraat 62 3000 Leuven, I get a number of possible locations back. 

One of these is the actual correct location, being Tiensestraat 62 3000 Leuven.

The others are located in other zipcodes.

 

How come, when I look by lat/long, which is precise on the location where it should be (Tiensestraat 62 3000 leuven), I'm not getting a result back?

If a lat/long is a distinct location, why is the API not able to determine this?

 

I have now made an alteration to specify

{locations:[{latLng:{lat:50.877189,lng:4.704374}},{latLng:{lat:50.88843,lng:4.757709}}],options: {allToAll: true}}

So, the allToAll is true and I then have to run through all distance results in finding one that is > 0

 

Can someone explain/reply on this? Am I doing something wrong with API call?

 

 

 

 


MQBrianCoakley
It looks like a street in the
It looks like a street in the area is marked as non-automotive. Pedestrian routes work as expected but fastest route type doesn't work. I'll send this over to the development team to investigate. Thanks for the heads up.