Displaying route fetched from server on the map

14 views
Skip to first unread message

richa

unread,
Feb 24, 2018, 11:16:00 AM2/24/18
to osmdroid
I've setup Osmand in the android studio & I want to show navigation from point A to point B using this API :
http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false

This is the response I get by calling this API:

{
    "routes": [
        {
            "legs": [
                {
                    "summary": "",
                    "weight": 537.1,
                    "duration": 380.2,
                    "steps": [],
                    "distance": 1879.4
                },
                {
                    "summary": "",
                    "weight": 649.6,
                    "duration": 469.8,
                    "steps": [],
                    "distance": 2947.6
                }
            ],
            "weight_name": "routability",
            "weight": 1186.7,
            "duration": 850,
            "distance": 4827
        }
    ],
    "waypoints": [
        {
            "hint": "
gfsJgMhgTIYfAAAAOgAAAAsAAAAAAAAAHwAAADoAAAALAAAAAAAAAGHpAAAATMwAqVghAzxMzACtWCEDAQDfCtVtw88=",
            "name": "Friedrichstraße",
            "location": [
                13.3888,
                52.517033
            ]
        },
        {
            "hint": "eCAUgEaR7oEKAAAACQAAABsBAAAAAAAACgAAAAkAAAAbAQAAAAAAAGHpAAB_bswAGIkhA4JuzAD_iCEDAgCfENVtw88=",
            "name": "Torstraße",
            "location": [
                13.397631,
                52.529432
            ]
        },
        {
            "hint": "1CsZgP___38dAAAA2AAAACIAAABQAAAAHQAAAGwAAAAiAAAAKQAAAGHpAABK58wA53AhA0vnzADTcCEDAwC_ENVtw88=",
            "name": "Platz der Vereinten Nationen",
            "location": [
                13.428554,
                52.523239
            ]
        }
    ],
    "code": "Ok"
}

I want to show this route on map. How can I achieve this?
Reply all
Reply to author
Forward
0 new messages