谷歌地图的地理编码总是使用浏览器语言浏览器、地理、语言、地图

2023-09-11 01:08:59 作者:泪湿ベ回忆つ

我使用的是谷歌AJAX API加载器,并希望得到在德国的所有信息 所以我加载地图API像这样

I am using the google ajax api loader and want to get all the information in german so I am loading the maps api like this

      google.load(地图,2,{语:德});

google.load("maps", "2", {language : "de"});

我已经试过申,蒙古包,德,de_DE这个连恩与ja_JPbut没有成功。

I have tried deu, ger, de, de_DE and even en and ja_JPbut no success.

对于那些谁不明白我的问题: https://m.xsw88.com/allimgs/daicuo/20230911/2205.png 你可以在 HTTP尝试://apps.komola。德/ gmaps.htm 地址为英语对英语的浏览器和德国在德国的浏览器

For those who don't understand my problem: https://m.xsw88.com/allimgs/daicuo/20230911/2206.png you can try it at http://apps.komola.de/gmaps.htm the address is english on the english browser and german on the german browser

推荐答案

这个API文档显示在地图定位的局限性的 HTTP://$c$c.google.com/apis/maps/documentation/#Localization

This API doc indicates the limitations of the map localization http://code.google.com/apis/maps/documentation/#Localization

语言似乎只影响接口(按钮等),base_domain会影响哪些服务,它使用。所以base_domain强制它使用google.de为地理编码服务。

The language appears to just affect the interface (buttons etc), base_domain affects which services it uses. So base_domain forces it to use google.de for the geocoding service.

<script src="http://www.google.com/jsapi?key=KEYHERE" type="text/javascript"></script>

<script type="text/javascript">
     google.load("maps", "2",{language: "de",base_domain: 'google.de'});
     ...
</script>

装载机文档中提到的base_domain。 HTTP://$c$c.google.com/apis/ajax/文档/#GoogleLoad

The loader doc mentions the base_domain. http://code.google.com/apis/ajax/documentation/#GoogleLoad