0

I've got a website vith a view of a (long) street, with markers appearing all along it that have different information on them about that location.

What I'm trying to do is create a button so when you press it, it starts at the bottom of the street and slowly moves the map along the street, opening each pop-up as you go then closing it when the next one opens.

The markers are all generated using a php loop linked to a database of information and I'm using InfoBubble to create the pop-ups.

Ross Coulbeck
  • 602
  • 1
  • 9
  • 22

1 Answers1

0

You can use the google function bounds.extend and fitBounds: Google Map API v3 — set bounds and center and add some of your markers to the array and wait a bit and add new markers to the array and rinse and repeat. You can use a javascript timer to wait. Or you can save your path and use fitbounds only on that marker.

Edit: When you have the next bounds with getBounds you can calculate delta x and delta y, e.g. x2-x1 and y2-y1 from 2 points of the start bound and the target bound.

Community
  • 1
  • 1
Micromega
  • 12,486
  • 7
  • 35
  • 72