在Google Maps API v3中设置DirectionsService的语言

Nil*_*ann 2 google-maps google-maps-api-3

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

任何人都知道如何设置它de-DE

Nil*_*ann 14

经过大量的谷歌搜索后,我在google geodevelopers上发布了一个博客文章,告诉我只需将语言放入api-request请求:

<script src="http://maps.google.com/maps/api/js?sensor=true&language=de"></script>
Run Code Online (Sandbox Code Playgroud)

它的工作原理!