Skip to content
Florian Richter edited this page Oct 20, 2015 · 4 revisions

return to API Documentation

RoutingService

Try it!

Path: route
Produces: "application/x-javascript;charset=utf-8"
RolesAllowed: route

Request

GET /route?cfg={"sources":[{"lat":59.911667,"lng":10.750833,"id":"","tm":{"bike":{"speed":20,"uphill":40,"downhill":-20}}}],"targets":[{"lat":59.92285034353424,"lng":10.734672546386719,"id":""}],"pathSerializer":"compact","elevation":true}&cb=jQuery1102016712046810425818_1444997640749&key=ENTER-KEY-HERE&_=1444997640753 HTTP/1.1
Host: api.route360.net
Connection: keep-alive
Accept: */*
Referer: http://sykledit.route360.net/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,de-DE;q=0.6,de;q=0.4

Takes parameters:

parameter type full name
cfg String (JSON) APIConfig
network Network
layerManager
— pFrom Point startingPoint
—— id String id
—— label String label
—— x double x
—— y double y
routing
serializer

Response

jQuery21407051629743073136_1445327375342({
    "code":"ok",
    "data":{
        "routes":
        [{
                "travelTime":1826,
                "length":6822.425397322593,
                "id":"",
                "segments":[{
                        "travelTime":316,
                        "length":321.8185920694664,
                        "endname":"target",
                        "type":"WALK",
                        "points":[
                            [6895731,1480753,37],
                            [...],
                            [6895793,1481185,36]
                        ]
                    },{
                        "departureTime":30300,
                        "travelTime":180,
                        "routeShortName":"U7",
                        "arrivalTime":30480,
                        "length":1629.0551578760137,
                        "endname":"U Mierendorffplatz (Berlin)",
                        "type":"TRANSIT",
                        "startname":"U Bismarckstr. (Berlin)",
                        "routeType":400,
                        "tripHeadSign":"S+U Rathaus Spandau (Berlin)",
                        "isTransit":true,
                        "points":[
                            [6895793,1481185,0],
                            [...],
                            [6893147,1481137,0]
                        ]
                    }
                ]
            }
        ]
    },
    "message":""
})
key type
code String
data JSONObject
— routes JSONArray[JSONObject]
—— travelTime Integer
—— length Double
—— id String
—— segments JSONArray[JSONObjects]
——— travelTime Integer
——— length Double
——— endname String
——— type String
——— points JSONArray[JSONArray[Int,Int,Int]]
——— departureTime Integer
——— routeShortName String
——— arrivalTime Integer
——— startName String
——— routeType Integer
——— tripHeadSign String
——— isTransit Boolean
Clone this wiki locally