I am using this example: http://gmaps-samples-v3.googlecode.com/svn/trunk/transit/transit.html but when I modified the code with the info related to my location, the departure code is not working. I only changed the origin and the destination.

This is the page with my code: http://goo.gl/fgmB9e

Any advice or suggestion?

有帮助吗?

解决方案

I replaced the line:

var tzOffset = (now.getTimezoneOffset() + 60) * 60 * 1000;

with:

var tzOffset = now.getTimezoneOffset();

and it looks like working properly.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top