Skip to content

Commit 6aa9ff2

Browse files
LBasarak-nikov
andauthored
fix: format intermediates and invert distance and duration for ign router (#167)
Co-authored-by: Laurent Basara <krasnikov@hotmail.com>
1 parent 92f670a commit 6aa9ff2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ eventually be able to cover all remote open source routing API's, but have to re
1010
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:0 orderedList:0 -->
1111

1212
- [Issues](#issues)
13-
- [Submitting fixes](#submitting-fixes)
13+
- [Pull requests](#pull-requests)
1414
- [Setup](#setup)
1515
- [Tests](#tests)
1616
- [Documentation](#documentation)
@@ -101,7 +101,7 @@ docstrings. To build the documentation:
101101
```bash
102102
# From the root of your git project
103103
cd docs
104-
make hmtl
104+
make html
105105
```
106106

107107
The documentation will have been added to `routingpy/docs/build/html` and you can open `index.html` in your web browser to view

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Or the lastest from source
100100

101101
.. code:: bash
102102
103-
pip install git+git://github.com/mthh/routingpy
103+
pip install git+https://github.com/mthh/routingpy.git
104104
105105
106106
API

routingpy/routers/ign.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def format_coord(arg):
192192
params["end"] = format_coord(end)
193193

194194
if intermediates:
195-
formatted = convert.delimit_list([i for i in intermediates], "|")
195+
formatted = convert.delimit_list([format_coord(i) for i in intermediates], "|")
196196
params["intermediates"] = formatted
197197

198198
if not resource:
@@ -260,8 +260,8 @@ def key_to_int(key):
260260

261261
return Direction(
262262
geometry=geometry,
263-
duration=key_to_int("distance"),
264-
distance=key_to_int("duration"),
263+
duration=key_to_int("duration"),
264+
distance=key_to_int("distance"),
265265
raw=response,
266266
)
267267

0 commit comments

Comments
 (0)