Google maps 谷歌地图路由API V3:特定位置的错误,仅当设置为目的地时?

Google maps 谷歌地图路由API V3:特定位置的错误,仅当设置为目的地时?,google-maps,google-maps-api-3,Google Maps,Google Maps Api 3,我目前正在使用谷歌地图API查找两个地点之间的中转路线。它几乎在所有场合都能正常工作,除非目的地是荷兰的斯希波尔(荷兰国家机场) 无论起始位置是什么,谷歌地图API都不会找到任何通往史基浦的中转路线。奇怪的是,当我在上输入完全相同的位置时,谷歌发现了很多路线。此外,当荷兰斯希波尔作为起点时,一切都很顺利 请参阅,或参阅下面的代码 var directionsService = new google.maps.DirectionsService; directionsService.route(

我目前正在使用谷歌地图API查找两个地点之间的中转路线。它几乎在所有场合都能正常工作,除非目的地是荷兰的斯希波尔(荷兰国家机场)

无论起始位置是什么,谷歌地图API都不会找到任何通往史基浦的中转路线。奇怪的是,当我在上输入完全相同的位置时,谷歌发现了很多路线。此外,当荷兰斯希波尔作为起点时,一切都很顺利

请参阅,或参阅下面的代码

var directionsService = new google.maps.DirectionsService;

directionsService.route({
  origin: 'Rotterdam, Netherlands',
  destination: 'Schiphol, Netherlands', // Change this to e.g. 'The Hague, Netherlands' and it works.
  travelMode: google.maps.TravelMode.TRANSIT,
}, function(response, status) {
  if (status === google.maps.DirectionsStatus.OK) {
    var route = response.routes[0].legs[0];
    window.alert('When Schiphol is destination: noute found!')
  } else {
    window.alert('When Schiphol is destination: no transit routes found.')
  }
});

directionsService.route({
  origin: 'Schiphol, Netherlands',
  destination: 'Rotterdam, Netherlands',
  travelMode: google.maps.TravelMode.TRANSIT,
}, function(response, status) {
  if (status === google.maps.DirectionsStatus.OK) {
    var route = response.routes[0].legs[0];
    window.alert('When Schiphol is origin: route found!')
  } else {
    window.alert('When Schiphol is origin: no transit routes found.')
  }
});

奇怪的它和史基浦的街道地址一起工作吗?(如果有这样的事情存在的话…@Pekka是的,那就行了。奇怪的是,谷歌地图输入自动填充确实建议将荷兰斯希波尔作为一个位置。当然,奇怪的是,荷兰史基浦的
Schiphol
设置为原点就足够了。它和史基浦的街道地址一起工作吗?(如果有这样的事情存在的话…@Pekka是的,那就行了。奇怪的是,谷歌地图输入自动填充确实建议将荷兰斯希波尔作为一个位置。当然,奇怪的是,荷兰史基浦的
Schiphol
设置为原点就足够了。