【问题标题】:In Google Maps Draggable Directions how do you identify the location dragged to在 Google Maps Draggable Directions 中,您如何识别拖动到的位置
【发布时间】:2014-12-24 15:48:24
【问题描述】:

关于……

https://developers.google.com/maps/documentation/javascript/examples/directions-draggable

以及通过...打开可拖动的使用

var rendererOptions = {
    draggable: true
};

并且使用监听器...

google.maps.event.addListener(directionsDisplay, 
    'directions_changed', function() {}

我只能通过使用...检索路线的每个角落和缝隙。

result = directionsDisplay.directions;

但我想要的不在这个对象内。

我想知道的是我刚刚用来改变路线的点在哪里。因为我只想存储那个点而不是沿途的每个点。

感谢您的帮助,因为这是必需的。

【问题讨论】:

    标签: javascript google-maps google-maps-api-3 google-api


    【解决方案1】:

    找到了。它位于:

    directionsDisplay.directions.routes[0].legs[0].via_waypoints;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-12
      • 2013-09-02
      • 1970-01-01
      相关资源
      最近更新 更多