http://api.map.baidu.com/direction/v1?mode=driving&origin=永兴村&destination=清华大学&origin_region得到的json数据被json_decode之后就变成了这样Array ( [status] => 2 [message] => Parameter Invalid [info] => Array ( [copyright] => Array ( [text] => @2014 Baidu - Data [imageUrl] => http://api.map.baidu.com/images/copyright_logo.png ) ) [result] => Array ( ) ) ,数据都去哪里了啊
=舟山&destination_region=北京&output=json&ak=gfPnxaaiPyNIhM7c3eZ1kmEL
------解决方案--------------------
直接浏览器访问 http://api.map.baidu.com/direction/v1?mode=driving&origin=永兴村&destination=清华大学&origin_region
=舟山&destination_region=北京&output=json&ak=gfPnxaaiPyNIhM7c3eZ1kmEL
得到
{其中 "message":"Parameter Invalid"
"status":2,
"message":"Parameter Invalid",
"info":{
"copyright":{[ "text":"@2014 Baidu - Data",
"imageUrl":"http://api.map.baidu.com/images/copyright_logo.png"
}
},
"result":[
]
}
参数无效