Problem: Distance Matrix API for two locations in Europe RRS feed

  • Question



    I tried to get the distance between Amsterdam and Ankara via the Distance Matrix API:,4.870530128479004&destinations=39.92108917236328,32.85390853881836&travelMode=driving&distanceUnit=km&key=myKey

    The coordinates of both cities seem ok, but  I got a distance of -1. The statusCode is 200, the statusDescription is "OK" but with an errorMessage =  "Request accepted but some pairs could not be processed." It is interesting that Bing Maps Geographic Coverage reports for both countries a good coverage.

    The JSON response is as follows:

    "brandLogoUri":"http:\/\/\/Branding\/logo_powered_by.png","copyright":"Copyright © 2019 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
    "resourceSets":[{"estimatedTotal":1,"resources":[{"__type":"DistanceMatrix:http:\/\/\/search\/local\/ws\/rest\/v1","destinations":[{"latitude":39.9210891723633,"longitude":32.8539085388184}],"errorMessage":"Request accepted but some pairs could not be processed.","origins":[{"latitude":52.3348007202148,"longitude":4.870530128479}],"results":[{"destinationIndex":0,"originIndex":0,"totalWalkDuration":0,"travelDistance":-1,"travelDuration":-1}]}]}],"statusCode":200,"statusDescription":"OK","traceId":"3890427a5dfd49e38a3a60ed41bc19c7|DB40061020|"}

    I appreciate any hint.


    Mike Steglich

    Friday, March 1, 2019 6:00 PM

All replies