URI API——公交、驾车、步行导航
接口说明:
/index.php?title=uri/api/web
wm_sample.php
......case 'location':$newsTpl = "<xml><ToUserName><![CDATA[%s]]></ToUserName><FromUserName><![CDATA[%s]]></FromUserName><CreateTime>%s</CreateTime><MsgType><![CDATA[news]]></MsgType><ArticleCount>1</ArticleCount><Articles><item><Title><![CDATA[导航]]></Title><Description><![CDATA[点击后导航到我的公司]]></Description><PicUrl><![CDATA[]]></PicUrl><Url><![CDATA[%s]]></Url></item></Articles><FuncFlag>0</FuncFlag></xml>"//URI接口$url = "http://api./direction?origin=latlng:{$latitude},{$longitude}|name:你的位置&destination=latlng:23:4545454,116.4545454|name:我的公司&mode=driving®ion=西安&output=html&src=yourCompanyName|yourAppName";$resultStr = sprintf($newsTpl,$fromUsername,$toUsername,$time,$url);echo $resultStr;break;......