You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ Basic example
122
122
client = openrouteservice.Client(key='') # Specify your personal API key
123
123
routes = client.directions(coords)
124
124
125
-
printroutes
125
+
print(routes)
126
126
127
127
For convenience, all request performing module methods are wrapped inside the ``client`` class. This has the
128
128
disadvantage, that your IDE can't auto-show all positional and optional arguments for the
@@ -132,14 +132,29 @@ The slightly more verbose alternative, preserving your IDE's smart functions, is
132
132
133
133
.. code:: python
134
134
135
-
import openrouteservice
136
-
from openrouteservice.directions import directions
135
+
import openrouteservice
136
+
from openrouteservice.directions import directions
137
137
138
138
coords = ((8.34234,48.23424),(8.34423,48.26424))
139
139
140
140
client = openrouteservice.Client(key='') # Specify your personal API key
141
141
routes = directions(client, coords) # Now it shows you all arguments for .directions
142
142
143
+
Optimize route
144
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
145
+
If you want to optimize the order of multiple waypoints in a simple `Traveling Salesman Problem <https://en.wikipedia.org/wiki/Travelling_salesman_problem>`_,
0 commit comments