使用 google.maps.DirectionsService.route() 和 google.maps.DirectionsRenderer.setDirections() 方法,是否可以更改目的地信息窗口上的文本,而无需为旅程创建自定义解析器?
我在 API 中看不到任何允许您访问路线标记的内容。
我不想要任何代码,只是是/否,以及正确方向的提示。
当前功能:
   变种请求 = {
        原点:原点,
        目的地:新 google.maps.LatLng(dest.lat(), dest.lng()),
        travelMode:google.maps.DirectionsTravelMode.DRIVING,
        地区:“GB”
    };
    方向Service.route(请求,功能(结果,状态){
        如果(状态 == google.maps.DirectionsStatus.OK){
          方向显示.setDirections(结果);
        }
    });
谢谢,心理学