Contents:
An XML interface to the routing engine (and other CycleStreets components) is available for mobile and potentially other uses. It is already being used in a range of mobile apps and we are keen to encourage wide usage.
Apply for an API key for use in your mobile/website application.
In all cases, arguments are all passed via the query string directly from the URL as a standard GET request.
An API key (see above) is required for all calls.
http://www.../api/journey.xml?key=registeredapikey&plan=quietest&…
API usage policy: Please read our API usage policy, which attempts to ensure reasonable use. We aim to be flexible where possible; if you have any concerns about provisions please contact us as we are keen not to put off potential users.
Uptime: Please see our Server reliability and uptime policy.
Compression: Support for mod_deflate is enabled on the server, so the XML should be being delivered compressed. Ensure your client library is set to send the appropriate Accept-encoding header.
Journey lengths must be at least 10 metres, and not more than 380 km.
The following is based on this route:
Buckingham Palace, via Horse Guards Parade to Westminster Abbey.
http://www.cyclestreets.net/api/journey.xml?key=registeredapikey&plan=quietest&itinerarypoints=-0.140085,51.502022,Buckingham+Palace|-0.129204,51.504353,Horse+Guards+Parade|-0.129394,51.499496,Westminster+Abbey
This section is unfinished and should not be treated as final. This information is currently ignored by the CycleStreets routing engine - but in the future it is hoped this information can improve the quality of the recommended route.
These parameters become camel cased in the output, i.e. clientRouteId, startBearing and startSpeed.
Extra example: Thoday Street, Cambridge via Mulbery Close to Great St Mary's Church
http://www.cyclestreets.net/api/journey.xml?key=registeredapikey&itinerarypoints=0.117950,52.205302,City+Centre|0.131402,52.221046,Mulberry+Close|0.147324,52.199650,Thoday+Street&plan=quietest&useDom=1&clientrouteid=159&startspeed=20&startbearing=317
If a journey has already been planned you can re-use the journey's itinerary by specifying the journey's itinerary number and the new route type. This is useful if, for instance a user has requested the fastest route, but now wants to view the quietest route for the same start and finish points. Apart from the key and the optional useDom these are the only required parameters in this usage:
Example: choosing the fastest route type based on an earlier planned route http://www.cyclestreets.net/journey/345529/ from Thoday Street, Cambridge to Great St Mary's Church:
http://www.cyclestreets.net/api/journey.xml?key=registeredapikey&useDom=1&itinerary=345529&plan=fastest
Returns markers that describe the route. If an error is detected it returns a single marker:
<markers><marker type="error" id="1" code="" description="" /></markers>
In that, code is an integer, and description can be displayed to the user.
If &useDom=1 was set in the parameter list it will return GML formatted info, which is the preferred format.
The output contains a sections describing the route as a whole, and is followed by the detailed segments.
These contain the resolved waypoints - which are the requested waypoints after they have been 'snapped' to the nearest point on the cycle network.
Example:
<waypoint longitude="0.117950" latitude="52.205303" sequenceId="1"/>
These represent each stage of the journey - usually a whole street.
The following two sections show sample results from journey.xml calls.
Here's a sample of GML formatted output (when using &useDom=1).
<?xml version="1.0"?> <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:cs="http://www.cyclestreets.net/schema/xml/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengeospatial.net//wfs/1.0.0/WFS-basic.xsd"> <gml:featureMember> <cs:route> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335 0.124766,52.202145 0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859 0.125167,52.201862 0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389 0.130827,52.202194 0.131244,52.20229 0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851 0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968</gml:coordinates> </gml:LineString> <cs:start>King's Parade</cs:start> <cs:finish>Thoday Street</cs:finish> <cs:start_longitude>0.117950</cs:start_longitude> <cs:start_latitude>52.205303</cs:start_latitude> <cs:startBearing>0</cs:startBearing> <cs:startSpeed>0</cs:startSpeed> <cs:finish_longitude>0.147324</cs:finish_longitude> <cs:finish_latitude>52.199650</cs:finish_latitude> <cs:crow_fly_distance>2099</cs:crow_fly_distance> <cs:event>depart</cs:event> <cs:whence>2010-11-10 17:19:20</cs:whence> <cs:speed>20</cs:speed> <cs:itinerary>343830</cs:itinerary> <cs:clientRouteId>0</cs:clientRouteId> <cs:plan>quietest</cs:plan> <cs:note> </cs:note> <cs:length>3281</cs:length> <cs:time>800</cs:time> <cs:busynance>5094</cs:busynance> <cs:quietness>64</cs:quietness> <cs:signalledJunctions>2</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:west>0.117950</cs:west> <cs:south>52.199650</cs:south> <cs:east>0.147324</cs:east> <cs:north>52.205303</cs:north> <cs:name>King's Parade to Thoday Street</cs:name> <cs:walk>1</cs:walk> <cs:type>route</cs:type> <cs:leaving>2010-11-10 17:19:20</cs:leaving> <cs:arriving>2010-11-10 17:32:40</cs:arriving> </cs:route> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502</gml:coordinates> </gml:LineString> <cs:name>King's Parade</cs:name> <cs:flow>with</cs:flow> <cs:distance>27</cs:distance> <cs:time>5</cs:time> <cs:busynance>40</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>1</cs:startBearing> <cs:turn>bear left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502</cs:points> <cs:distances>0,17,5,5</cs:distances> <cs:elevations>17,17,17,17</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505</gml:coordinates> </gml:LineString> <cs:name>St Mary's Street, NCN 11</cs:name> <cs:flow>with</cs:flow> <cs:distance>55</cs:distance> <cs:time>10</cs:time> <cs:busynance>79</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>148</cs:startBearing> <cs:turn>sharp right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505</cs:points> <cs:distances>0,7,5,27,16</cs:distances> <cs:elevations>17,17,17,17,17</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089</gml:coordinates> </gml:LineString> <cs:name>Market Street, NCN 11</cs:name> <cs:flow>with</cs:flow> <cs:distance>141</cs:distance> <cs:time>39</cs:time> <cs:busynance>299</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>62</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089</cs:points> <cs:distances>0,15,18,7,33,33,35</cs:distances> <cs:elevations>17,17,17,17,19,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059</gml:coordinates> </gml:LineString> <cs:name>Sidney Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>13</cs:distance> <cs:time>3</cs:time> <cs:busynance>13</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>95</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Cycle Track</cs:provisionName> <cs:color>#ff0000</cs:color> <cs:type>segment</cs:type> <cs:points>0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059</cs:points> <cs:distances>0,5,4,4</cs:distances> <cs:elevations>19,19,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273</gml:coordinates> </gml:LineString> <cs:name>Sidney Street</cs:name> <cs:flow>against</cs:flow> <cs:distance>121</cs:distance> <cs:time>18</cs:time> <cs:busynance>135</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>154</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273</cs:points> <cs:distances>0,36,28,13,20,18,6</cs:distances> <cs:elevations>19,19,19,18,16,16,16</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457</gml:coordinates> </gml:LineString> <cs:name>St Andrew's Street</cs:name> <cs:flow>against</cs:flow> <cs:distance>362</cs:distance> <cs:time>110</cs:time> <cs:busynance>695</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>142</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>1</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457</cs:points> <cs:distances>0,37,26,88,10,30,27,13,82,49</cs:distances> <cs:elevations>16,15,15,17,17,17,18,18,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335</gml:coordinates> </gml:LineString> <cs:name>Link between Regent Street and St Andrew's Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>16</cs:distance> <cs:time>9</cs:time> <cs:busynance>71</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>135</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335</cs:points> <cs:distances>0,6,4,6</cs:distances> <cs:elevations>19,19,19,20</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.124595,52.202335 0.124766,52.202145 0.125005,52.201889</gml:coordinates> </gml:LineString> <cs:name>Regent Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>57</cs:distance> <cs:time>9</cs:time> <cs:busynance>68</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>151</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.124595,52.202335 0.124766,52.202145 0.125005,52.201889</cs:points> <cs:distances>0,24,33</cs:distances> <cs:elevations>20,20,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859</gml:coordinates> </gml:LineString> <cs:name>Link with Regent Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>10</cs:distance> <cs:time>3</cs:time> <cs:busynance>13</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>129</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Unsegregated Shared Use</cs:provisionName> <cs:color>#ff8888</cs:color> <cs:type>segment</cs:type> <cs:points>0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859</cs:points> <cs:distances>0,3,3,4</cs:distances> <cs:elevations>19,19,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.125135,52.201859 0.125167,52.201862 0.125266,52.201885</gml:coordinates> </gml:LineString> <cs:name>Link with Parkers Piece (east-west)</cs:name> <cs:flow>with</cs:flow> <cs:distance>9</cs:distance> <cs:time>3</cs:time> <cs:busynance>12</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>79</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Unsegregated Shared Use</cs:provisionName> <cs:color>#ff8888</cs:color> <cs:type>segment</cs:type> <cs:points>0.125135,52.201859 0.125167,52.201862 0.125266,52.201885</cs:points> <cs:distances>0,2,7</cs:distances> <cs:elevations>19,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389</gml:coordinates> </gml:LineString> <cs:name>Parkers Piece (east-west)</cs:name> <cs:flow>against</cs:flow> <cs:distance>352</cs:distance> <cs:time>82</cs:time> <cs:busynance>456</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>81</cs:startBearing> <cs:turn>straight on</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Unsegregated Shared Use</cs:provisionName> <cs:color>#ff8888</cs:color> <cs:type>segment</cs:type> <cs:points>0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389</cs:points> <cs:distances>0,200,96,56</cs:distances> <cs:elevations>19,18,17,18</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.130356,52.202389 0.130827,52.202194</gml:coordinates> </gml:LineString> <cs:name>Link between Parkers Piece (east-west) and Gonville Place</cs:name> <cs:flow>with</cs:flow> <cs:distance>39</cs:distance> <cs:time>22</cs:time> <cs:busynance>38</cs:busynance> <cs:walk>1</cs:walk> <cs:startBearing>124</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Footpath</cs:provisionName> <cs:color>#008800</cs:color> <cs:type>segment</cs:type> <cs:points>0.130356,52.202389 0.130827,52.202194</cs:points> <cs:distances>0,39</cs:distances> <cs:elevations>18,17</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.130827,52.202194 0.131244,52.20229 0.131654,52.202339</gml:coordinates> </gml:LineString> <cs:name>Link between Mill Road and Gonville Place</cs:name> <cs:flow>with</cs:flow> <cs:distance>58</cs:distance> <cs:time>14</cs:time> <cs:busynance>73</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>70</cs:startBearing> <cs:turn>bear left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Unsegregated Shared Use</cs:provisionName> <cs:color>#ff8888</cs:color> <cs:type>segment</cs:type> <cs:points>0.130827,52.202194 0.131244,52.20229 0.131654,52.202339</cs:points> <cs:distances>0,30,28</cs:distances> <cs:elevations>17,17,17</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071</gml:coordinates> </gml:LineString> <cs:name>Mill Road</cs:name> <cs:flow>with</cs:flow> <cs:distance>916</cs:distance> <cs:time>220</cs:time> <cs:busynance>1499</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>124</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>1</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Road</cs:provisionName> <cs:color>#33aa33</cs:color> <cs:type>segment</cs:type> <cs:points>0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071</cs:points> <cs:distances>0,52,11,42,29,67,58,22,41,41,21,33,12,19,14,90,2,14,63,2,34,34,87,46,1,68,9,4</cs:distances> <cs:elevations>17,19,19,19,19,19,19,19,19,19,19,19,19,19,19,18,20,20,19,19,18,18,19,19,19,18,18,18</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615</gml:coordinates> </gml:LineString> <cs:name>Cavendish Road</cs:name> <cs:flow>with</cs:flow> <cs:distance>177</cs:distance> <cs:time>33</cs:time> <cs:busynance>210</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>15</cs:startBearing> <cs:turn>turn left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615</cs:points> <cs:distances>0,25,148,4</cs:distances> <cs:elevations>18,18,18,18</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992</gml:coordinates> </gml:LineString> <cs:name>St Philip's Road</cs:name> <cs:flow>with</cs:flow> <cs:distance>173</cs:distance> <cs:time>49</cs:time> <cs:busynance>301</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>115</cs:startBearing> <cs:turn>turn right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992</cs:points> <cs:distances>0,6,99,8,7,47,6</cs:distances> <cs:elevations>18,19,17,17,17,19,19</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851</gml:coordinates> </gml:LineString> <cs:name>Catharine Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>329</cs:distance> <cs:time>59</cs:time> <cs:busynance>383</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>21</cs:startBearing> <cs:turn>turn left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851</cs:points> <cs:distances>0,238,20,21,21,15,14</cs:distances> <cs:elevations>19,16,15,15,15,15,16</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.147,52.201851 0.14705,52.201942</gml:coordinates> </gml:LineString> <cs:name>Link joining Roundabout, Cromwell Road, Catharine Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>11</cs:distance> <cs:time>2</cs:time> <cs:busynance>13</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>19</cs:startBearing> <cs:turn>bear right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.147,52.201851 0.14705,52.201942</cs:points> <cs:distances>0,11</cs:distances> <cs:elevations>16,16</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061</gml:coordinates> </gml:LineString> <cs:name>Roundabout</cs:name> <cs:flow>with</cs:flow> <cs:distance>50</cs:distance> <cs:time>22</cs:time> <cs:busynance>133</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>350</cs:startBearing> <cs:turn>bear left</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061</cs:points> <cs:distances>0,13,12,15,10</cs:distances> <cs:elevations>16,16,13,13,15</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053</gml:coordinates> </gml:LineString> <cs:name>Fairfax Road</cs:name> <cs:flow>with</cs:flow> <cs:distance>85</cs:distance> <cs:time>19</cs:time> <cs:busynance>115</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>111</cs:startBearing> <cs:turn>sharp right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053</cs:points> <cs:distances>0,9,10,41,8,17</cs:distances> <cs:elevations>15,15,15,13,13,14</cs:elevations> </cs:segment> </gml:featureMember> <gml:featureMember> <cs:segment> <gml:LineString srsName="EPSG:4326"> <gml:coordinates>0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968</gml:coordinates> </gml:LineString> <cs:name>Thoday Street</cs:name> <cs:flow>with</cs:flow> <cs:distance>280</cs:distance> <cs:time>69</cs:time> <cs:busynance>448</cs:busynance> <cs:walk>0</cs:walk> <cs:startBearing>232</cs:startBearing> <cs:turn>sharp right</cs:turn> <cs:signalledJunctions>0</cs:signalledJunctions> <cs:signalledCrossings>0</cs:signalledCrossings> <cs:provisionName>Quiet Street</cs:provisionName> <cs:color>#000000</cs:color> <cs:type>segment</cs:type> <cs:points>0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968</cs:points> <cs:distances>0,8,10,38,29,50,145</cs:distances> <cs:elevations>14,14,14,14,14,16,17</cs:elevations> </cs:segment> </gml:featureMember> </wfs:FeatureCollection>
Here's a sample of generic XML formatted output (when using &useDom=0).
<?xml version="1.0" encoding="UTF-8"?> <markers xmlns:cs="http://www.cyclestreets.net/schema/xml/"> <marker start="King's Parade" finish="Thoday Street" start_longitude="0.117950" start_latitude="52.205303" startBearing="0" startSpeed="0" finish_longitude="0.147324" finish_latitude="52.199650" crow_fly_distance="2099" event="depart" whence="2010-11-10 16:39:50" speed="20" itinerary="343767" clientRouteId="0" plan="quietest" note="" length="3281" time="800" busynance="5094" quietness="64" signalledJunctions="2" signalledCrossings="0" west="0.117950" south="52.199650" east="0.147324" north="52.205303" name="King's Parade to Thoday Street" walk="1" type="route" leaving="2010-11-10 16:39:50" arriving="2010-11-10 16:53:10" coordinates="0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335 0.124766,52.202145 0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859 0.125167,52.201862 0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389 0.130827,52.202194 0.131244,52.20229 0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851 0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968" /> <marker name="King's Parade" flow="with" distance="27" time="5" busynance="40" walk="0" startBearing="1" turn="bear left" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.117867,52.205288 0.117872,52.205441 0.117904,52.205482 0.117978,52.205502" distances="0,17,5,5" elevations="17,17,17,17" /> <marker name="St Mary's Street, NCN 11" flow="with" distance="55" time="10" busynance="79" walk="0" startBearing="148" turn="sharp right" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.117978,52.205502 0.118032,52.205448 0.118107,52.205437 0.118507,52.205463 0.118734,52.205505" distances="0,7,5,27,16" elevations="17,17,17,17,17" /> <marker name="Market Street, NCN 11" flow="with" distance="141" time="39" busynance="299" walk="0" startBearing="62" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.118734,52.205505 0.118932,52.20557 0.11916,52.20565 0.119246,52.205681 0.119653,52.205841 0.120082,52.205971 0.120563,52.206089" distances="0,15,18,7,33,33,35" elevations="17,17,17,17,19,19,19" /> <marker name="Sidney Street" flow="with" distance="13" time="3" busynance="13" walk="0" startBearing="95" turn="bear right" signalledJunctions="0" signalledCrossings="0" provisionName="Cycle Track" color="#ff0000" type="segment" points="0.120563,52.206089 0.120631,52.206085 0.120683,52.206078 0.12073,52.206059" distances="0,5,4,4" elevations="19,19,19,19" /> <marker name="Sidney Street" flow="against" distance="121" time="18" busynance="135" walk="0" startBearing="154" turn="bear right" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.12073,52.206059 0.120959,52.205765 0.121141,52.205536 0.121251,52.205444 0.121492,52.205345 0.121741,52.205292 0.121827,52.205273" distances="0,36,28,13,20,18,6" elevations="19,19,19,18,16,16,16" /> <marker name="St Andrew's Street" flow="against" distance="362" time="110" busynance="695" walk="0" startBearing="142" turn="straight on" signalledJunctions="1" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.121827,52.205273 0.122161,52.205009 0.122373,52.204815 0.122983,52.204117 0.123057,52.204041 0.123242,52.2038 0.123415,52.203579 0.123511,52.203476 0.124111,52.202835 0.124478,52.202457" distances="0,37,26,88,10,30,27,13,82,49" elevations="16,15,15,17,17,17,18,18,19,19" /> <marker name="Link between Regent Street and St Andrew's Street" flow="with" distance="16" time="9" busynance="71" walk="0" startBearing="135" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.124478,52.202457 0.124541,52.202419 0.124565,52.202385 0.124595,52.202335" distances="0,6,4,6" elevations="19,19,19,20" /> <marker name="Regent Street" flow="with" distance="57" time="9" busynance="68" walk="0" startBearing="151" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.124595,52.202335 0.124766,52.202145 0.125005,52.201889" distances="0,24,33" elevations="20,20,19" /> <marker name="Link with Regent Street" flow="with" distance="10" time="3" busynance="13" walk="0" startBearing="129" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Unsegregated Shared Use" color="#ff8888" type="segment" points="0.125005,52.201889 0.125044,52.20187 0.125083,52.201862 0.125135,52.201859" distances="0,3,3,4" elevations="19,19,19,19" /> <marker name="Link with Parkers Piece (east-west)" flow="with" distance="9" time="3" busynance="12" walk="0" startBearing="79" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Unsegregated Shared Use" color="#ff8888" type="segment" points="0.125135,52.201859 0.125167,52.201862 0.125266,52.201885" distances="0,2,7" elevations="19,19,19" /> <marker name="Parkers Piece (east-west)" flow="against" distance="352" time="82" busynance="456" walk="0" startBearing="81" turn="straight on" signalledJunctions="0" signalledCrossings="0" provisionName="Unsegregated Shared Use" color="#ff8888" type="segment" points="0.125266,52.201885 0.128164,52.20216 0.12955,52.202301 0.130356,52.202389" distances="0,200,96,56" elevations="19,18,17,18" /> <marker name="Link between Parkers Piece (east-west) and Gonville Place" flow="with" distance="39" time="22" busynance="38" walk="1" startBearing="124" turn="bear right" signalledJunctions="0" signalledCrossings="0" provisionName="Footpath" color="#008800" type="segment" points="0.130356,52.202389 0.130827,52.202194" distances="0,39" elevations="18,17" /> <marker name="Link between Mill Road and Gonville Place" flow="with" distance="58" time="14" busynance="73" walk="0" startBearing="70" turn="bear left" signalledJunctions="0" signalledCrossings="0" provisionName="Unsegregated Shared Use" color="#ff8888" type="segment" points="0.130827,52.202194 0.131244,52.20229 0.131654,52.202339" distances="0,30,28" elevations="17,17,17" /> <marker name="Mill Road" flow="with" distance="916" time="220" busynance="1499" walk="0" startBearing="124" turn="bear right" signalledJunctions="1" signalledCrossings="0" provisionName="Road" color="#33aa33" type="segment" points="0.131654,52.202339 0.13228,52.202076 0.132418,52.202019 0.132928,52.201805 0.133287,52.20166 0.134104,52.201328 0.134795,52.201027 0.135064,52.200916 0.135563,52.20071 0.136058,52.200508 0.136321,52.200405 0.136742,52.200253 0.136892,52.200195 0.137123,52.200104 0.137288,52.200035 0.138386,52.199593 0.138401,52.199581 0.13858,52.199516 0.139368,52.199215 0.139387,52.199207 0.139815,52.199059 0.140267,52.198929 0.141393,52.198555 0.142005,52.198376 0.142015,52.198376 0.142917,52.198116 0.143034,52.198082 0.143084,52.198071" distances="0,52,11,42,29,67,58,22,41,41,21,33,12,19,14,90,2,14,63,2,34,34,87,46,1,68,9,4" elevations="17,19,19,19,19,19,19,19,19,19,19,19,19,19,19,18,20,20,19,19,18,18,19,19,19,18,18,18" /> <marker name="Cavendish Road" flow="with" distance="177" time="33" busynance="210" walk="0" startBearing="15" turn="turn left" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.143084,52.198071 0.143176,52.198288 0.143718,52.199577 0.143734,52.199615" distances="0,25,148,4" elevations="18,18,18,18" /> <marker name="St Philip's Road" flow="with" distance="173" time="49" busynance="301" walk="0" startBearing="115" turn="turn right" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.143734,52.199615 0.143814,52.199593 0.145211,52.199341 0.145323,52.199333 0.145412,52.199303 0.146076,52.199188 0.146166,52.1992" distances="0,6,99,8,7,47,6" elevations="18,19,17,17,17,19,19" /> <marker name="Catharine Street" flow="with" distance="329" time="59" busynance="383" walk="0" startBearing="21" turn="turn left" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.146166,52.1992 0.14743,52.201195 0.147501,52.20137 0.147463,52.201561 0.147353,52.201736 0.147199,52.201836 0.147,52.201851" distances="0,238,20,21,21,15,14" elevations="19,16,15,15,15,15,16" /> <marker name="Link joining Roundabout, Cromwell Road, Catharine Street" flow="with" distance="11" time="2" busynance="13" walk="0" startBearing="19" turn="bear right" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.147,52.201851 0.14705,52.201942" distances="0,11" elevations="16,16" /> <marker name="Roundabout" flow="with" distance="50" time="22" busynance="133" walk="0" startBearing="350" turn="bear left" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.14705,52.201942 0.147017,52.202061 0.147167,52.202114 0.147386,52.202114 0.147506,52.202061" distances="0,13,12,15,10" elevations="16,16,13,13,15" /> <marker name="Fairfax Road" flow="with" distance="85" time="19" busynance="115" walk="0" startBearing="111" turn="sharp right" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.147506,52.202061 0.147635,52.20203 0.147788,52.202026 0.148368,52.20211 0.148448,52.202164 0.14863,52.202053" distances="0,9,10,41,8,17" elevations="15,15,15,13,13,14" /> <marker name="Thoday Street" flow="with" distance="280" time="69" busynance="448" walk="0" startBearing="232" turn="sharp right" signalledJunctions="0" signalledCrossings="0" provisionName="Quiet Street" color="#000000" type="segment" points="0.14863,52.202053 0.148542,52.202011 0.148537,52.201923 0.148601,52.201584 0.148498,52.201328 0.148237,52.200905 0.147489,52.19968" distances="0,8,10,38,29,50,145" elevations="14,14,14,14,14,16,17" /> </markers>
Example: Thoday Street, Cambridge.
http://cambridge.cyclestreets.net/api/nearestpoint.xml?key=registeredapikey&longitude=0.117950&latitude=52.205302
Nearestpoint returns the id of the point nearest the given longitude / latitude. Use this method as a way of finding the actual start and finish co-ordinates that the journey planner will choose to find a route. They may be upto about a kilometre away from where you want to start.
Returns markers that describe the point - inspect the returned xml for the self explanatory details.
Note: in future we plan to make this more GML compliant, like the route listing. This is not yet implemented.
This is mainly a wrapper to OSM's Nominatim. However, we add other logic (e.g. bounding box, name near) and data (postcodes, station codes), so please use our geocoder interface rather than Nominatim directly, for consistency.
Please ensure you comply with the Nominatim Usage Policy. Normal bona-fide use should be perfectly compliant.
Example: Thoday Street
http://cambridge.cyclestreets.net/api/geocoder.xml?key=registeredapikey&w=0.113937&s=52.201937&e=0.121963&n=52.208669&zoom=16&street=thoday%20street
returns a list of results, including the name, latitude, longitude and where it is 'near'.
If the boundaries are supplied, then the geocoder will tend to prefer results in this part and near surrounding parts of the country when the zoom is 12 or higher (this logic may change in future to be zoom-agnostic if the bounding box is sent).
Sending z= will be treated as zoom= . z= is now deprecated and will be disabled in due course.
This is an interface to the same data used for the Points of interest pages.
To get the supported types:
http://www.cyclestreets.net/api/poitypes.xml?key=registeredapikey
To include square icons (as base64 encoded string), with the sizes available being 12/16/20/24/32/48/64px, default 16px (with unsupported sizes equivalent to not supplying the flag), amend this to:
http://www.cyclestreets.net/api/poitypes.xml?key=registeredapikey&icons=16
Having now selected a type, e.g. 'cycleparking' using poitypes, now get the actual POIs within a specified radius from a centre-point. For instance, this call will return all bike shops in Cambridge within a 5km distance in order of proximity, nearest first (this call is is the standard scenario for mobile use) :
http://www.cyclestreets.net/api/pois.xml?key=registeredapikey&type=cycleparking&longitude=0.117950&latitude=52.205303&radius=5
or this similar call, which instead works on a bounding box basis, spreading the points out evenly within the bounding box (and therefore will be more useful for desktop applications) instead:
http://www.cyclestreets.net/api/pois.xml?key=registeredapikey&type=cycleparking&n=52.209285&e=0.125325&s=52.201395&w=0.111035
The default is a limit of 50 items returned. If you add &limit=… you can set a different limit. The maximum limit available is 400; if you supply a larger limit than 400, it will be replaced with 400.
If you add &editlinks=1 the output will include a field showing the URL where the source data for the POI may be edited; if it is not an editable POI, this field will be present but empty.
If you add &useDom=1 the format will be GML instead of generic XML.
Notes [updated 22nd September 2011] on this API function:
The photomap is filled with icons from an XML feed. It is not yet a stable interface, and may change without notice. It is currently optimised for filling the photomap viewer. To do that that it breaks the visible map into a 10x10 grid and chooses one photo from each grid cell. It behaves differently according to the zoom level and the number of available photos.
http://cambridge.cyclestreets.net/api/photos.xml?key=registeredapikey&useDom=1&latitude=52.209124&longitude=0.127299&zoom=13&w=0.085500&s=52.182195&e=0.169099&n=52.236053&category=cycleparking&metacategory=good&limit=25&suppressplaceholders=1&minimaldata=1
The values for category and metacategory can be found using the photomapcategories API call documented below.
This API function returns all the photo categories (e.g. cycleparking,obstruction,etc.) and metacategories (e.g. good,bad,event,etc.) available in the Photomap (e.g. see the categorisation page or the legend on the main Photomap page).
Note that, amongst the data in the returned XML, there will be included a unixtime value indicating the cache validity, e.g.: <validuntil>1284497262</validuntil>
http://www.cyclestreets.net/api/photomapcategories.xml?key=registeredapikey
Retrieves data on a single photo from the Photomap.
Required data:
http://www.cyclestreets.net/api/photo.xml?key=registeredapikey&id=80
The Photomap is intended as a campaigning tool to enable citizens to geolocate and tag problems such as lack of cycle parking, or to highlight good practice, so that this data can be used by cycle campaign groups. A variety of sites (e.g. Cycling Sorted) are being built around this database, and photos are used within route listings on the main site, and on the Photomap for general browsing.
This function is used to add photos to the Photomap.
Clients should initially call (and then cache the result of) photomapcategories.xml so that a list of categories and metacategories can be displayed. This then enables the user to say that their photo represents e.g. a cycle parking problem (category=cycleparking,metacategory=bad) when uploading the photo as detailed below. A caption should ideally also be added.
Currently this assumes the client will extract the lat/long/datetime from the photo. However, this may be changed in future.
If an error occurs, the (normally-empty) <error> XML node will be filled with a code node and a human-readable message node whose value can be shown to the user. Error handling responses via the API are not yet complete; please contact us if this is a priority for you.
The license for the photo content will be taken from the user's default settings, which currently have to be set on the site.
It requires a POST request and sends back standard XML:
POST values listed below to
https://www.cyclestreets.net/api/addphoto.xml?key=registeredapikey
Note that this should be sent to https://... as this call transmits user credentials, which should not be sent over the network unencrypted. This is not yet enforced but is likely to be shortly.
Required and recommended data:
Additional optional metadata:
There are other metadata key/value pairs which can be sent but which may not be supported in future, so are not listed here.
Photo addition requires a signin username and password. There is therefore a user creation API call.
It requires a POST request and sends back standard XML:
POST values listed below to
https://www.cyclestreets.net/api/usercreate.xml?key=registeredapikey
Note that this should be sent to https://... as this call transmits user credentials, which should not be sent over the network unencrypted. This is not yet enforced but is likely to be shortly.
Required data:
Response example:
<signin> <request>therequestedusername</request> <result> <code>1</code> <message>Please check your e-mail later to confirm the account creation.</message> </result> </signin>
where code is either 0 (=failure) or 1 (=success), and message is a human-readable message (which is present for both success or failure) that should be passed on to the user.
Submits an item of feedback (e.g. on a route). Clients are strongly encouraged to implement this call, so that we get feedback from users on problematic routes.
It requires a POST request and sends back standard XML:
POST values listed below to
https://www.cyclestreets.net/api/feedback.xml?key=registeredapikey
Note that this should be sent to https://... as this call can transmit a name and e-mail address, which, being personal data, should not be sent over the network unencrypted. This is not yet enforced but is likely to be shortly.
Required data:
Response example:
<feedback>
<request>theitineraryid</request>
<result>
<code>1</code>
<message>Thank you for submitting this feedback. [possibly more text here if the user has given an e-mail address]</message>
<url>http://www.cyclestreets.net/journey/{theitineraryid}/</url>
<feedbackid>1845</feedbackid>
</result>
</feedback>
where code is either 0 (=failure) or 1 (=success), and message is a human-readable message (which is present for both success or failure) that should be passed on to the user.
The URL value currently gives the webpage of the journey, but in future this might change.
The feedbackid value currently does not relate to any URL but may become used in the future.
Information about the current availability and performance of the site.
http://www.cyclestreets.net/api/status.xml?key=registeredapikey