[marble] [Bug 374446] New: Improvements to CycleStreets API calls

CycleStreets bugzilla_noreply at kde.org
Mon Jan 2 02:12:32 UTC 2017


https://bugs.kde.org/show_bug.cgi?id=374446

            Bug ID: 374446
           Summary: Improvements to CycleStreets API calls
           Product: marble
           Version: unspecified
          Platform: Other
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: data
          Assignee: marble-bugs at kde.org
          Reporter: kdebugs at cyclestreets.net
  Target Milestone: ---

Hi,

I'm writing from CycleStreets, whose API you have kindly integrated for bicycle
routing:
http://commits.kde.org/marble/af22018eb38e7ff48b10ab0a131809a342db8a1c

We get plenty of requests from Marble users, which is great. Here are a few
enhancements you could make:

Currently Marble makes requests like this:
/api/journey.xml?itinerarypoints=11.431882,44.465502%7C11.437141,44.519076&key=cdccf13997d59e70&plan=balanced&speed=20&useDom=1
(prefixed with http://www.cyclestreets.net )

1) The site is now available as HTTPS. For user privacy, please do change
http://www.cyclestreets.net to https://www.cyclestreets.net . This is naturally
a simple change.

2) plan=shortest is an option currently, but in future we are likely to
deprecate this, as in practice it does not give useful routes. For instance, it
will take someone directly over the top of a very steep hill if that is the
shortest route when a more sensible alternative exists.

3) If you wish, you can send waypoints, i.e. A-B-C-... routing, rather than
just be limited to A-B.

4) JSON output is available, which means simpler parsing and the ability to
obtain an error status. XML will continue to be available, but JSON presumably
would enable the code to be simplified. Just change .xml to .json and remove
&useDom=1.

5) To enable error status (when using JSON), add &reporterrors=1 to the URL.

Overall, therefore, the request would now be:

/api/journey.json?itinerarypoints=11.431882,44.465502%7C11.437141,44.519076&key=cdccf13997d59e70&plan=balanced&speed=20&reporterrors=1
(prefixed with https://www.cyclestreets.net )

If an error occurs, the output would be in this format:

{"error":"The plan parameter must be specified in the v1 API"}

where the value on the right side is a human-readable error.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Marble-bugs mailing list