Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6115077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:02:58+00:00 2026-05-23T15:02:58+00:00

I am doing a google map which will read a set of coordinates and

  • 0

I am doing a google map which will read a set of coordinates and put the marker on the map one by one.

Below is my idea:

function A{
   for loop( 
      set marker
      call setTimeout('A',2seconds)
   )    
}

my idea is to set a marker and use setTimeout to wait 2 seconds and then set the next marker.

However, it doesn’t work. it show all the markers at the same time and repeat to renew all markers.

How can i achieve my goal?
Thanks for your help!!!!!!!!!!!!!!!

Here is my code:

function marker(){
    var marker;
    var i=0;

    while(i<locations.length){
        marker = new google.maps.Marker({
            position: new google.maps.LatLng(locations[i][1], locations[i][2]),
            animation: google.maps.Animation.DROP,
            map: map
            });
        i=i+1;
        var t=setTimeout("marker()",2000);
    }
}
marker();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:02:59+00:00Added an answer on May 23, 2026 at 3:02 pm

    You need to return after setting the first marker. You also need a parameter to A which specifies which marker to show.

    function marker(i){
        if (i > locations.length) return;
    
        var marker;
    
        marker = new google.maps.Marker({
            position: new google.maps.LatLng(locations[i][1], locations[i][2]),
            animation: google.maps.Animation.DROP,
            map: map
            });
    
        var t=setTimeout("marker("+(i+1)+")",2000);
    }
    marker(0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use google map API for my desktop application. The application will
I'm currently developing an app which uses tabs and google map. What I want
I'm trying to center a google map on a single marker pulled from a
I'm putting together a Google Map which contains the locations of various test centres
I've looked at Google's map API, which is all javascript and terribly slow on
Hi I am doing a project on Integration of google map v3.0. I finished
This is inside the google initialize function and works fine. It's the code below
My google maps API code is not doing the map markers correctly. For some
I'm am curently doing an application with Google Maps, where I am checking the
I am doing: html = new WebClient().DownloadString( http://www.google.com/search?sourceid=chrome&ie=UTF-8&q= + biocompany); and i am getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.