i’m working with google maps v3 animations and i have a question
this is my example http://gidzior.net/map/v3_animate_marker_directions.html (i’m using placeholder in the input), GM code is from here
how to automatically zoom map when animated marker is 1 km from destination ?
Create a new global variable
zoomedAdd the following into
function animate(d):The reason to use a simple flag and not test
map.getZoom()is because that function call will be slower so we don’t want to callgetZoom()with every animation step. Note that performing the zoom may be problematic if tiles need to be loaded while the animation is continuing.