Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fullMapStart + inlineDirections bug #52

Closed
milansimek opened this issue Mar 21, 2015 · 4 comments
Closed

fullMapStart + inlineDirections bug #52

milansimek opened this issue Mar 21, 2015 · 4 comments

Comments

@milansimek
Copy link

When fullMapStart is enabled, inline directions don't work.

I fixed is by changing the following:

in method directionsRequest on line 1032:

Change:

if(destination) {

to:

if(destination && origin) {

Maybe there is a more elegant fix, but this works for me at the moment.

Thanks for the great plugin by the way!

@milansimek
Copy link
Author

Actually this is a better fix, the directions click listener registers twice, it can be solved as follows:

Change:

if(_this.settings.inlineDirections === true){

To:

if(_this.settings.inlineDirections === true && typeof firstRun === "undefined"){

@bjorn2404
Copy link
Owner

Thanks, I think I might go with the following since the origin has to exist for directions to work but either appear to fix the issue:

if(_this.settings.inlineDirections === true && typeof origin !== 'undefined'){

@milansimek
Copy link
Author

Hi Bjorn,

Sounds good to me. Your version should make the code more solid for various cases.

Thanks!

@bjorn2404
Copy link
Owner

Updated in v2.0.6.

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

No branches or pull requests

2 participants