【发布时间】:2016-08-14 07:28:57
【问题描述】:
仅当我使用 LatLng 或 String 参数时才会创建路线,但我需要通过 PlaceId 创建它但它不起作用
示例:
directionsService.route({
origin: {'placeId': 'ChIJc1lGdwfP20YR3lGOMZD-GTM'},
destination: {'placeId': 'ChIJdTGhqsbP20YR6DZ2QMPnJk0'},
waypoints: [{stopover: true, location: new google.maps.Place('ChIJRVj1dgPP20YRBWB4A_sUx_Q')}],
optimizeWaypoints: true,
travelMode: google.maps.TravelMode.DRIVING
}
【问题讨论】:
标签: javascript google-maps google-maps-api-3 direction