0
我已經下載了wordpress的谷歌地圖插件,輸出公里,但我在英國,所以我需要英里。谷歌地圖API,Wordpress插件,試圖獲得英制輸出
我添加了這行
unitSystem: google.maps.DirectionsUnitSystem.IMPERIAL
的代碼
function calcRoute() {
var start = document.getElementById('origin').value;
var end = document.getElementById('destination').value;
var request = {
origin:start,
destination:end,
travelMode: google.maps.DirectionsTravelMode.DRIVING,
unitSystem: google.maps.DirectionsUnitSystem.IMPERIAL
};
,但它仍然會返回公里。
任何想法如何讓它返回里程?
你在用'request'做什麼? –