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 6625081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:43:52+00:00 2026-05-25T21:43:52+00:00

I have a list of JSON objects that I loop through and then (using

  • 0

I have a list of JSON objects that I loop through and then (using the jQuery Gmap plugin found here) create markers for that object and add it to the map.

Problem is that in each browser I’m getting callstack overflow messages:

Uncaught RangeError: Maximum call stack size exceede

in Chrome, and

Too much recursion

in Firefox.

I have NO idea why or how to fix it.

This is my code:

$('#map_canvas').gmap().bind('init', function (evt, map) {
        var webMethod = '<%= NavigationHelper.GetFullUrl("Components/Services/storelocatorservice.asmx/GetStoresByAddress") %>';
        var webParam = '{ "address": "Vaartkom 31/9 3000 Leuven", "language": "<%= Sitecore.Context.Language.CultureInfo.TwoLetterISOLanguageName %>", "radius": "15" }';

        $.ajax({
            type: "POST",
            url: webMethod,
            data: webParam,
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (msg) {
                //$('#map_canvas').gmap('set', 'MarkerClusterer', new MarkerClusterer(map));
                addMarkers($.parseJSON(msg.d));
            }
        });
});

function addMarkers(json) {
        $.each(json, function (i, m) {
            $('#map_canvas').gmap('addMarker', {
                'title': m.Name,
                'position': new google.maps.LatLng(m.Lat, m.Long),
                'name': m.Name,
                'zipcode': m.ZipCode,
                'id': m.LocationId,
                'bounds': true
            }).click(function () {
                $('#map_canvas').gmap('openInfoWindow', {
                    'content': '<h3>' + m.Name + '</h3><p>' + m.ZipCode + '</p><a onclick="getDirections(\'' + m.Id + '\')">Route</a>'
                }, this);
            });
        });
}

Any help is greatly appreciated!

  • 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-25T21:43:52+00:00Added an answer on May 25, 2026 at 9:43 pm

    I have found a fix, not that it fixes the bug itself it just prevents it from happening:
    I have to set the bounds: false when adding a marker and then it won’t overflow the callstack.

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

Sidebar

Related Questions

I currently have a json object, that I loop through and output a list
how can i turn this JSON to a list of objects that have two
I am trying to output some Java objects as JSON, they have List properties
I'm currently attempting to retrieve a list of objects from my database using jQuery.
I have a List that, when serialized as JSON gives me an array of
recently I been trying to create an android app that uses JSON Objects to
I have a controller that returns a list of custom linq-to-sql model objects in
I'm trying to serialize a list of python objects with JSON (using simplejson) and
jQuery part: I have a jQuery UI 1.8 Autocomplete form that fetches remote JSON
I have a large list of objects inside JSON like this: var data =

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.