0

I have set up a sample polyline from given coordinates.

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],
......]

When the polyline is clicked, the returned coordinates do not match the coordinates from which the polyline was built.

Is there a way to get all the coordinates between two points of the polyline that belong to the given list of coordinates when the polyline is clicked ?

Also when the map is zoomed, the clicked marker goes off the path off the polyline.

h1m4l
  • 189
  • 3
  • 14
  • It might help to see some of your code, other than just an array of coordinates – duncan Feb 28 '14 at 10:15
  • possible duplicate of [right click on google map polyline isn't actually “on” the polyline](http://stackoverflow.com/questions/19172433/right-click-on-google-map-polyline-isnt-actually-on-the-polyline/19179716#19179716) – geocodezip Feb 28 '14 at 10:26
  • You are placing the marker where you clicked the polyline. Not on the closest waypoint if that's what you want to do? Clarify: *get coordinates between 2 points when polyline is clicked*. When you click the polyline, you click one point, not two. So which 2 points do you want? – MrUpsidown Feb 28 '14 at 10:45

0 Answers0