I can calculate directions (json) on api.map.baidu with: http://api.map.baidu.com/direction?destination=39.988710,116.432340&origin=39.940488,116.355425&mode=driving&coord_type=wgs84
How to form similar url to display same directions over map on https://map.baidu.com/
I would like to generate urls in my app which load directions on map.baidu.com, but it is hard to guess url because website and documentation I found is on Chinese.
Through trial and error, I was able to get it to work with the following pattern:
http://api.map.baidu.com/direction?origin=latlng:39.940488,116.355425|name:origin&destination=latlng:39.988710,116.432340|name:destination&mode=driving®ion=none&output=html
The differences between it and what you had include:
latlng:
|name:(point name)
to each set of coordinates, it will not work without putting something hereoutput=html
parameter