Thank you  for having a look.

Actually I tryed both setCenter and panTo methods, but none had any
effects. I'm new to the v3 API and quite limited when it comes to
Javascript

@Rossoko, good to know, I'll increase the timer fire delay


So here is the code I used (the map on the url provided shows 350
markers, but the code below only shows 2 markers)
How would you set the panTo ? As my markers are defined inside an
array: markerArray[]...?


var myLatlng = new google.maps.LatLng(50,3);

  var myOptions = {
        zoom: 10,
        center: myLatlng,
                mapTypeId: google.maps.MapTypeId.TERRAIN,
        scrollwheel: 0,
                navigationControl: 0,
        scaleControl: 0,
                mapTypeControl: 0,
                streetViewControl: false
        }

        var map = new
google.maps.Map(document.getElementById('activity_map'), myOptions);
        var infoWindow = new google.maps.InfoWindow();
        var markerArray = [];

        function makeMarker(options){
                var pushPin = new google.maps.Marker({map:map});
                pushPin.setOptions(options);
                google.maps.event.addListener(pushPin, 'click', function(){
                infoWindow.setOptions(options);
                infoWindow.open(map, pushPin);
                });
                markerArray.push(pushPin);
                return pushPin;
        }

        google.maps.event.addListener(map, 'click', function(){
                infoWindow.close();
        });


        function showPrevInfo(){
                google.maps.event.trigger(markerArray[j],'click');
                --j;
                if(j<0)
                        j=349 ;
        };
        ////////////// 2 markers below (there are actually 350)
        var image = new google.maps.MarkerImage("http://www.retromundi.com/
plugins/community/puarcade/favicon.png",
        new google.maps.Size(16,16),
        new google.maps.Point(0,0),
        new google.maps.Point(0, 16)
        );

        makeMarker({
                        position: new
google.maps.LatLng(52.480793883973796,-1.9762086868286132),
                        title: "Giemidor",
                        content: "<div id=\"content\" 
style=\"width:200px;height:90px;
\"><div id=\"avatar\" style=\"float:left;padding:8px;\"><a href=\"/
profile/4099-giemidor.html\"><img src=\"http://www.retromundi.com/
images/avatar/thumb_a2d93f7ca1e9f677b948be3c.jpg\" width=\"50\" height=
\"50\" alt=\"app\" /></a></div><div id=\"activity\" ><b>2010-11-24
11:00:29</b><br /><a href='/profile/4099-giemidor.html' >Giemidor</a>
has ranked #1 scoring 68750 in the game <a href='/games/strategy-games/
star-craft-2-td.html'>Star Craft 2 TD</a></div></div>",
                        icon: image,
                        zIndex: 349
        });
        ///////////////// next marker
        var image = new google.maps.MarkerImage("http://www.retromundi.com/
plugins/community/puarcade/favicon.png",
        new google.maps.Size(16,16),
        new google.maps.Point(0,0),
        new google.maps.Point(0, 16)
        );

        makeMarker({
                        position: new
google.maps.LatLng(35.25459097465025,-91.64520263671875),
                        title: "Fridget1",
                        content: "<div id=\"content\" 
style=\"width:200px;height:90px;
\"><div id=\"avatar\" style=\"float:left;padding:8px;\"><a href=\"/
profile/6982-fridget1.html\"><img src=\"http://www.retromundi.com/
images/avatar/thumb_b4b329ec2eb9f663dd5c30e1.jpg\" width=\"50\" height=
\"50\" alt=\"app\" /></a></div><div id=\"activity\" ><b>2010-11-24
04:38:32</b><br /><a href='/profile/6982-fridget1.html' >Fridget1</a>
has ranked #3 scoring 1683 in the game <a href='/games/puzzle-games/
addicube.html'>AddiCube</a></div></div>",
                        icon: image,
                        zIndex: 348
        });
        /////////// markers end
        var x=1;
        google.maps.event.addListener(map, 'mouseover', function(){ /////////
stops the timer on map mouseover
                x=0;
        });

        google.maps.event.addListener(map, 'mouseout', function()
{ ////////// restarts the timer on map mouse out
                x=1;
                Timer();
        });

        function Timer() {
                if(x==1){
                        showPrevInfo();
                        setTimeout("Timer()",4000);
                }
        }

        Timer(x);



Thanks for your help!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to