GIScience / openrouteservice-js

:pushpin: The JavaScript API to consume openrouteservice(s) painlessly!
https://openrouteservice.org
Apache License 2.0
191 stars 35 forks source link

URL for Matrix Service is wrong #39

Closed silika closed 2 years ago

silika commented 2 years ago

When we use Matrix service Matrix.calculate({ locations: [[8.690958, 49.404662], [8.687868, 49.390139], [8.687868, 49.390133]], profile: "driving-car", sources: ['all'], destinations: ['all'] }) Browser send request to https://api.openrouteservice.org/matrix/v2/matrix/driving-car/json Word 'matrix' uses twice in URL

amoncaldas commented 2 years ago

Hey @silika I could not reproduce this issue. There is an automated test that run requests using all the endpoints, including matrix and it is working. All the tests are passing, including the using matrix. You can check the test here: https://github.com/GIScience/openrouteservice-js/blob/master/spec/OrsMatrixSpec.js#L22

Additionally, only to make sure, I have run it locally on debug mode and the URL used to run the request is correct. You can check this in the screenshot below. There is probably some bug in your code when using the library. Maybe you are passing wrong parameters to it? matrix-url