Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Events on drawRoute #436

Open
wangfowen opened this issue Jul 20, 2015 · 1 comment
Open

Events on drawRoute #436

wangfowen opened this issue Jul 20, 2015 · 1 comment

Comments

@wangfowen
Copy link

I'm trying to trigger a click event on drawRoute and cannot through the current version of the script. What I've found works is manually adding click to the polyline_options within drawRoute, like such:

 var polyline_options = {
   path: e[e.length - 1].overview_path,
   strokeColor: options.strokeColor,
   strokeOpacity: options.strokeOpacity,
   strokeWeight: options.strokeWeight,
   click: options.click
 };

This works for my use case but is obviously a hack and would have to manually add the rest of the events if I were to support those. What would be a less hacky way of doing this? Any chance of it being added in an upcoming version?

By the way, this script is awesome and makes using Google Maps API significantly more pleasant! Thank you for it :) Also, I coincidentally happen to be working on something involving the Lima region of the map as well for this use case.

@hpneo
Copy link
Owner

hpneo commented Jul 28, 2015

Hi, I'm working on a modularized version of gmaps (check #404), so I will put this feature in gmaps.routes. Thanks for the feedback!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants