geocoder.geocode()中的语言参数?

时间:2013-12-11 07:26:11

标签: javascript google-maps google-maps-api-3 google-geocoder

我正在尝试使用Google Maps API获取地址组件。

geocoder = new google.maps.Geocoder(); 
marker = new google.maps.Marker(...);
geocoder.geocode({'latLng': marker.getPosition()}, function(...);

但是在某些情况下,当我将标记拖动到指向精确位置时,即使地图语言设置为“en”(英语),我也会在本地化版本中获取geoCoding API响应的几部分address_components。

在创建Geocoder实例时,是否有任何方法可以传递语言参数,以强制它仅以英语返回地址组件。

注意:我没有使用地理编码webservice来获取address_components。

0 个答案:

没有答案