Link to home
Start Free TrialLog in
Avatar of dlearman1
dlearman1Flag for United States of America

asked on

Why doesn't Google directions work?

Please see this jsFiddle:  https://jsfiddle.net/midnightCabbie/tbh90epL/

Other than opening in a Bootstrap modal this application should be a basic dynamic Google map with turn-by-turn directions.  I must be missing something basic in js.  Help spotting this would be really appreciated.
Avatar of Mukesh Yadav
Mukesh Yadav
Flag of India image

Can you please have a look on console for the errors and fix them in jsfiddle. If you can't figure out them let us know.
https://jsfiddle.net/tbh90epL/35/

Some pointers
  • JQuery not added
  • Function in wrong place
Avatar of dlearman1

ASKER

Shaun... I added "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" to the fiddle as an external resource. Shouldn't this be sufficient.

Shaun & Mukersh... I appreciate that you are taking this on as a "teaching moment", and I get your point. I will try to isolate the problems using the Firebug js debugger. You need to understand that these questions do not often arise from an academic process. Usually, we've been handed a project to accomplish with a client and a deadline.
After filling From: Enter your location as India I clicked on Show Directions then I am getting this error in console:

Uncaught ReferenceError: calcRouteArtessa is not defined

Can you please add the definition for this function as well to jsfiddle.
ASKER CERTIFIED SOLUTION
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your help Shaun, this works