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

  • Home
  • SEARCH
  • 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 6354821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:38:33+00:00 2026-05-24T22:38:33+00:00

Hi i have pretty large script so i wont post it all here, but

  • 0

Hi i have pretty large script so i wont post it all here, but i really need help, do not know what to do more …

I have ~300 markers in the maps and they all are loading at the same time, and google can not handle or my script can not handle but i am getting “Address could not be found” in half of them even maybe for more (others loads correctly). But if i delete all apart that one everything works as should !

What to do ? Is there a way to load them few at the time step by step, or is there many markers handler or etc ? (not markersManager, i need them all to be seen in all zoom levels)

Tryed with timeout did not helped !

Some of the code :

function initHeadAddress(searchString) {
 if(searchString == 'undefined') {
   map.clearOverlays(); 
   var t = setTimeout("showAddress('Himmelev Bygade 78 B, 4000 Roskilde, Denmark',1,'3T Bygningsentreprise A/S','4000','Roskilde','46328328','null','www.3t.dk',null,null)",1000);
   var t = setTimeout("showAddress('Nørre Allé 51, 7760 Hurup, Denmark',4,'Idealcombi','7760','Hurup','96882500','null','http://www.idealcombi.dk/',null,null)",1000);
    ..... A LOT OF THESE HERE MORE !!!!

   // default one
   showAddress('Denmark', 0, null, null,null,null,null,null,null,searchString);
    } else {
   // if used search function
    showAddress(searchString, 0, null, null,null,null,null,null,null,searchString);
    }
}

ShowAddress function:

function showAddress(address, markerType, companyname,postnr, by, phone, fax, web, email, searchString) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              //alert("Adresse " +address+ " blev ikke fundet");
              console.log("Adresse " +address+ " blev ikke fundet");
            } else {            
                var myIcon = new GIcon(G_DEFAULT_ICON);
                myIcon.shadow = null;
                myIcon.infoWindowAnchor = new GPoint(9, 2)

                if (markerType == '0') {
                    myIcon.image = '/files/billeder/../Templates/Designs/Ideal2011/images/Map/googleempty.png';
                    myIcon.iconSize = new GSize(18, 18);    
                }
                if (markerType == '1') {
                    myIcon.image = '/files/billeder/../Templates/Designs/Ideal2011/images/Map/googlered.png';
                    myIcon.iconSize = new GSize(18, 18);


                    $('#dotRedCheckbox').click(
                        function(){
                            if(!$(this).hasClass('activeMarker')){
                                marker.hide();
                            } else {
                                marker.show();
                            }
                        }
                    );
                }
                else if (markerType == '2') {
                    myIcon.image = '/files/billeder/../Templates/Designs/Ideal2011/images/Map/googlelblue.png';
                    myIcon.iconSize = new GSize(18, 18);

                    $('#dotlBlueCheckbox').click(
                        function(){
                            if(!$(this).hasClass('activeMarker')){
                                marker.hide();
                            } else {
                                marker.show();
                            }
                        }
                    );
                }
                else if (markerType == '3') {
                    myIcon.image = '/files/billeder/../Templates/Designs/Ideal2011/images/Map/googledblue.png';
                    myIcon.iconSize = new GSize(18 , 18);

                    $('#dotdBlueCheckbox').click(
                        function(){
                            if(!$(this).hasClass('activeMarker')){
                                marker.hide();
                            } else {
                                marker.show();
                            }
                        }
                    );
                }
                else if (markerType == '4') {
                    myIcon.image = '/files/billeder/../Templates/Designs/Ideal2011/images/Map/googlegreen.png';
                    myIcon.iconSize = new GSize(18, 18);

                    $('#dotGreenCheckbox').click(
                        function(){
                            if(!$(this).hasClass('activeMarker')){
                                marker.hide();
                            } else {
                                marker.show();
                            }
                        }
                    );
                }
                var markerOptions = { icon: myIcon };
                var marker = new GMarker(point, markerOptions);

                marker.getPoint();

                if(markerType != 0){        
                    points.push(point);
                    markers.push(marker);       
                }

                if (markerType == 0) {
                    if(searchString == 'undefined'){
                        map.setCenter(point, 6);
                    } else {
                        map.setCenter(point, 13);

                        LatD = point.lat().toFixed(5);
                        LngD = point.lng().toFixed(5);

                        find_closest_marker(LatD, LngD);
                        find_closest_marker2(LatD, LngD);
                        find_closest_marker3(LatD, LngD);
                    }
                } 

                Lat = point.lat().toFixed(5);
                Lng = point.lng().toFixed(5);


                var image = '<img src="http://cbk0.google.com/cbk?output=thumbnail&w=85&h=70&ll='+Lat+','+Lng+'" />'; // alt="'+address+'"

                map.addOverlay(marker);

                if(markerType != 0) {

                    if(fax != "" && fax != null && fax != 'null'){
                        var newfax = "Mob.: "+fax+"<br/>";
                    } else {
                        var newfax = "";    
                    };
                    if(web != "" && web != null && web != 'null'){
                        var newweb = "<a href='"+web+"'>"+web+"</a><br/>";
                    } else {
                        var newweb = "";    
                    };
                    if(postnr != "" && postnr != null && postnr != 'null'){
                        var newpostnr = postnr;
                    } else {
                        var newpostnr = ""; 
                    };
                    if(phone != "" && phone != null && phone != 'null'){
                        var newphone = phone;
                    } else {
                        var newphone = "";  
                    };

                    //address = address.replace("Denmark, ","");
                    //address = address.replace(", Denmark","");
                    //address = address.replace(", 2650 Hvidovre","");
                    //address = address.replace(", Hurup","");
                    //address = address.replace("UK, ","");
                    address2 = address.split(',');
                    address = address2[0];

                    var infoboxInfo = '<div class="infoboxall"><div class="infoboxinfo"><div class="infoboxAddress">'+companyname +"</div>"+ address + '<br/>' + newpostnr + " " + by+ "<br/>" + "Tlf.: " + newphone + "<br/>" + newfax + newweb+"<a href='mailto:"+email+"'>"+email+"</a>"+'</div>' + image+'</div>';
                    //marker.openInfoWindowHtml(address);
                    //GEvent.addListener(marker, 'click',marker.openInfoWindowHtml(address));
                    GEvent.addListener(marker, "click", function()
                    {marker.openInfoWindowHtml(infoboxInfo);});

                    marker.markerType = markerType;
                    marker.title = companyname;
                    marker.address = address;
                    marker.postby = newpostnr+ " " + by;
                    marker.phone = newphone;
                    marker.fax = newfax;
                    marker.web = newweb;
                    marker.email = email;

                }

            }
          }
        );
      }
    }

Anyone any ideas ? How i said script is working as should if there is 5 markers or so … but shows only some of them when all are inserted ? Ideas ?

  • 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-24T22:38:33+00:00Added an answer on May 24, 2026 at 10:38 pm

    Yes you can do this as I did this in a previous project where the markers are loaded from the database (I use API v3 in this project but the concept is the same). Since the API accept like 5 requests at the same time from the same IP, I did a “marker queue”. When a marker can’t be placed because the API returns an error I put it in the queue and every second or so, I try to add the next marker from the queue until the queue is empty.

    Just check the source of “gmaps3.js” in the previous link to see how I did this. If you have more questions, let me know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty large table: 20+ million rows and I need to update
I have a pretty large db in MySql, and I need to take backups
I have a pretty large site and every page is built from several included
I'm looking at building a Rails application which will have some pretty large tables
I have a bunch of pretty large CSV (comma separated values) files and I
I have an application that is pretty memory hungry. It holds a large amount
I have pretty much finished my first working Symbian application, but in my hastened
I would like to have pretty URLs for my tagging system along with all
I have built a PHP calendar system and have pretty much everything done but
I have a pretty large insert statement something like INSERT INTO multimedia (filename, regex,

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.