单击时获取折线两点之间的所有坐标

时间:2014-02-28 06:12:03

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

我已根据给定的坐标设置sample polyline

coordinates = [
                    [52.908902047770276,-116.015625],
                    [52.908902047770276,-116.015625],
                    [53.12040528310657,-115.6640625],
                    [53.12040528310657,-115.6640625],
                    [53.33087298301704,-115.6640625],
                    [53.33087298301704,-115.6640625],
                    [53.74871079689897,-115.6640625],
                    [53.74871079689897,-115.6640625],
                    [54.36775852406841,-115.6640625],
                    [54.36775852406841,-115.6640625],
                    [54.97761367069625,-115.3125],
......]

单击折线时,返回的坐标与构建折线的坐标不匹配。

当点击折线时,有没有办法获得折线的两个点之间的所有坐标,这些坐标属于给定的坐标列?

同样,当缩放地图时,单击的标记将离开折线的路径。

0 个答案:

没有答案