0
有没有我可以在谷歌地图地理编码器(V3)使用任何属性来动态地设置结果(google.maps.GeocoderResult
)语言?不使用HTML头纸条标记<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=vi-VN"></script>
谷歌地图API地址解析器(V3),如何设置语言上google.maps.GeocoderResult
例如
var G = new google.maps.Geocoder(); // google geocoder
G.geocode({'location': ll/*, 'language':'vi-VN'*/}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results[0]) {
me.set({'locate':results[0].address_components});
me.set({'address':results[0].formatted_address});
} else {
alert("No results found");
}
} else {
alert("Geocoder failed due to: " + status);
}
原因我想建立一个区域树连接点具有如图所示相同区域
us
/ \
new york ...
/\
p1 p2
,P1和P2在同一地区'纽约'
谢谢
@Tritt:谢谢你的建议,我有更新一些信息 –
为什么要动态设置语言? p1和p2在同一个区域。好。所以呢?为什么要用除了用户通过浏览器偏好选择的语言以外的其他语言显示结果? – Trott