views:

26

answers:

1

This problem has really troubled me and yet to have a solution.

I have a list of locations with latitude and longitude.

And each time i click on the button next, it suppose to auto open the infowindow of the location one by one each click. However, the infowindow and marker always open at the center. May I know how can I make the location of infowindow randomized instead of opening at the center of the map only? Is there any way I can hide the marker and set the beak of infowindow to the pointer of marker?

Thanks. Kinda urgent.

+1  A: 

How are you opening your infoWindow? The open method on an infoWindow object takes a map parameter and an optional MVCObject parameter. If you specify the appropriate marker for the second parameter, then the info window will be attached to that marker.

N.B. I am assuming you are using the current Google Maps API v3. If you are using the v2 API, let us know.

Cannonade
i am using v2 at the moment.
benmsia