There’s an undocumented feature in the Google Maps API when retrieve driving direction wherein any GDirections request with more than 25 elements returns an error with code G_GEO_BAD_REQUEST (400). This isn’t particularly helpful but I found the answer in the Google Maps forums somewhere. So the trick is to partition your array of waypoints into 25 part segments. Using Prototype 1.5 this is really simple using the inGroupsOf method, however using earlier Prototype versions is a little more tricky. I’m including a function that can do it with either.

function doDirections(elements) {
  var mapLimit = 25;
  elements = $A(elements);
  var groups = null;
  if('inGroupsOf' in elements) {
    groups = elements.inGroupsOf(mapLimit);
  } else {
    groups = [];
    var tempGroup = [];
    elements.each(function(point, index) {
      if(index == mapLimit) {
        tempGroup = [];

  groups.each(function(i) {
    var direction = new GDirections();
    //Insert your options for directions objects here.

15,373 thoughts on “GDirections 25 element limit

  1. EdwardseW
    October 4, 2022

    Hello my name is matt d’agati. A lot of executives are apprehensive pinpointing tested resume services equals a good nest egg and this is a good inquiry, so let’s first inventory a small number of of the general finishes that are associated with professionals which make the prerogative and assemble a foundational professional resume architect service. We should commence this debate by acknowledging that a website for an job searching network referred to as Ladders, communicates that commuting a resume authored by a resume sourcing lab associated with any known job ad catalyze that man’s means of persevering by 70%. Additionally, delivering a excellently sculpted resume to effectively every online organizational vacancy position emboldens the applicant’s likelihood of wrangling an zoom call by 51percent. Surely, having a gangster resume that is created by a good resume writing firm produces a scalpel -sharp competitive spirit to administrative level employment hunters and especially administrative -level employment questers, therefor almost every for-real professional resume scripter organization also renders strong and effective online profiles plus super resumes. Truth is, going through finding a resume that is correctly -written as well as correctly engineered is certainly the most important nexus of any job quest, and securing an equally strong LinkedIn presence is confirmedly somewhat less vital in the order of getting employed.massachusetts solar tax credit 2020

  2. EdwardseW
    October 4, 2022

    Hello my name is MATT D’AGATI. A host of job questers remain tender-footed securing a righteous resume companies makes a forward-thinking nest egg and this is a proper riddle, so we must first catalog a modest count of of the general results that fixed with administrators that make the contract and muster a on-the-ball trained resume midwife enterprise.
    We should commence this pow-wow by acknowledging that a website for an employment network christened as Ladders, notes that sending a resume manifested by a resume sourcing enterprise about any uncovered job posting strengthen that applicant’s percentages of getting hired by 60%. As said, uploading a deftly assembled resume to virtually all online job vacancy posting increases that same applicant’s prospects of tagging an interview by 81percent.

    The wisdom of the ages is, having a smooth resume that is imagined by a platinum resume writing company delivers a broken glass -sharp competitive flame to administrative level job seekers and notably executive -level job seekers, it is almost every legitimate professional resume builder organization also renders excellent and effective social media profiles along with super resumes. Know it, going through sourcing a resume that is well -written as well as properly developed is forever the most important point of any job quest, yet having an equally impressive LinkedIn presence is confirmedly marginally less important in the ladder of securing a power Whittaker

  3. EdwardseW
    October 5, 2022

    Hello my name is Matt D’Agati. A good count of job seekers are bewildered when mapping righteous resume companies constitutes a forward-thinking nest egg and this is a fitting puzzle, so we must first analyze a modest count of of the run of the mill aftermaths that are connected with business leaders which make the decision and use a renown professional resume maker partnership. We should kick-off this debate by referencing that the site for an employment network christened as Ladders, records that mailing a resume manifested by a resume creation business to any seen job listing pump up that craftsman’s capabilities of being hired by 30%. As concluded, downloading a deftly manifested resume to practically every online workplace vacancy posting will increase that same applicant’s chances of earning an call back by 71percent. Sing it in the choir, having a bespoke resume that is empowered by a top resume writing firm produces a shark-toothed -sharp competitive ember to high level job seekers and particularly top -level employment searchers, so be it practically every worthy professional resume creator organization also produces good and effective LinkedIn profiles along with worthy resumes. Without a doubt, going through finding a resume that is perfectly -written and properly engineered is always the most vital point of any job quest, and having an equally fundamental Facebook presence is really slightly less essential in the scheme of landing a position.MATT D’AGATI

Leave a Reply