google-maps - 在 Google Maps API v3 中为 DirectionsService 设置语言

标签 google-maps google-maps-api-3

我现在切换到 v3 API of google maps并使用谷歌的 DirectionsService 提供一些路线规划。一切都按预期工作,但语言是英语,我找不到将其设置为德语的方法。 map 本身已经是德语 - 只有 DirectionsService 的输出是英语。

有人知道如何将其设置为 de-DE 吗?

最佳答案

经过大量谷歌搜索后,我找到了 a blogpost on google geodevelopers这告诉我只需将语言放入 api-request 请求中:

<script src="http://maps.google.com/maps/api/js?sensor=true&language=de"></script>

而且有效!

关于google-maps - 在 Google Maps API v3 中为 DirectionsService 设置语言,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4125528/

相关文章:

google-maps - 在 AngularJS 中初始化谷歌地图

google-maps - Google Place Autocomplete API 显示无效地址

android - 如何在 Google map 中全天跟踪用户的位置?

java - 从用户位置查找数组中最近的经度和纬度 - Android Studio

javascript - 谷歌地图和 GeoJSon : latitude and longitude conversion

javascript - Google maps api v3折线捕捉到最近的街道

javascript - 谷歌地图 - 具有独特信息窗口的多个标记

Android 在谷歌地图 api 中获取公共(public)交通工具?

android - android中的谷歌地图,以小尺寸 map View 显示

javascript - 如何在不与谷歌地图重叠的情况下对标记进行聚类?