Skip to content

Instantly share code, notes, and snippets.

@KhodeN
Created October 24, 2015 02:05
Show Gist options
  • Save KhodeN/04a4f0f0fd1da0a361c1 to your computer and use it in GitHub Desktop.
Save KhodeN/04a4f0f0fd1da0a361c1 to your computer and use it in GitHub Desktop.
var all_points = [];
var paths = route.getPaths();
var i = 0;
while (paths.get(i) !== null) {
var p = paths.get(i);
var segments = p.getSegments();
$(segments).each(function() {
var pc = this.getCoordinates();
$(pc).each(function() {
all_points.push(this);
});
});
i++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment