//....
directionsDisplay = new google.maps.DirectionsRenderer();
directionsDisplay.setMap(map);
directionsService = new google.maps.DirectionsService();
var request = {
origin : new google.maps.LatLng(origin.lat, origin.lng),
destination : new google.maps.LatLng(destination.lat, destination.lng),
travelMode : google.maps.DirectionsTravelMode.DRIVING,
unitSystem : google.maps.DirectionsUnitSystem.METRIC,
region: 'de'
};
directionsService.route(request, function(result, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(result);
}
});
//....
英语成绩结果我得到这样的如何检索在谷歌地图API V3
Head southwest on 吳江路/吴江路 toward 泰兴路/泰興路
Turn left at 茂名北路
Continue onto 茂名南路
Turn right at 淮海中路
Slight left to stay on 淮海中路
Turn left at 华山路/華山路
的说明是英文对我的浏览器,而法国在我的法国同事的法国火狐,街道名字是中国人,我以为我用德语要求信息region: 'de'
现在好吧,也许中国的街道不是德语可用,但设置区域为gb,en,甚至zh似乎什么都不做。 我真的希望文本只是一种语言,最好是英文。
编辑我敢肯定的街道名称都可以在英语,因为当我使用地理编码结果都是英文的如Shimen Road (No.1)
EDIT2与http://maps.google.com/maps/api/js?sensor=false&
语言= CS我能够迫使把指示变成一种语言,但仍然是街道名称被卡在中文中。使用geocoder API,我可以收到中文街道名称,中文翻译成英语/德语/法语(当德语/法语翻译缺失时,可以回退到英语),为什么路线名称被中文卡住是没有意义的。这可能只是谷歌方面的一个缺陷/故意,但我有点怀疑它。
是否有原因
很酷,这清除了地区偏见的事情。该参数确实会强制语言使用说明。然而,街道名称仍然是中文,所以一半在那里。 – Moak 2011-03-19 08:32:23