Culdn`t find what makes that error, and how to find a solution...
Working under project:
http://atlas.sitegist.net/business/atlas/?l=en&h=6dff16b6f593384662cb24d66142047a
In project i show different data with integer values, and all that also shown on a map. When i added another visualisation of new data set, error occurs.
Mostly i must do some events in UI, and of course doing some mixing of listed under:
Sometimes error ocuurs in 5 min. Sometimes in first shot, but ostly in 3-4 UI request.
the link above reproduce an error from start, or by 2-3 event triggers.
And such error i have in Chrome console:
Uncaught RangeError: Maximum call stack size exceeded
H.get
(anonymous function)
Mu.(anonymous function).zoomRange_changed
yf
H.set
(anonymous function)
Mu.(anonymous function).zoomRange_changed
yf
H.set
(anonymous function)
Mu.(anonymous function).zoomRange_changed
yf
...
H.set
(anonymous function)
Mu.(anonymous function).zoomRange_changed
yf
And onother one:
<error>
(anonymous function)
$
nm
Du
H.bf
H.mapType_changed
yf
H.set
H.aa
Tg.(anonymous function).J
(anonymous function)
Q.trigger
H.aa
Tg.(anonymous function).J
(anonymous function)
Q.trigger
H.aa
Tg.(anonymous function).J
(anonymous function)
Q.trigger
H.aa
...
H.aa
Tg.(anonymous function).J
(anonymous function)
Q.trigger
Solution under solution didn nott helped me, couse of lack of information about I.set and also I don`t use "Gmaps4rails":
Gmaps4rails Maximum call stack size exceeded?
Non-Terminating Recursive Functions When you call a recursive function, again and again, this limit is exceeded and the error is displayed. So, call recursive functions carefully so that they terminate after a certain condition is met. This will prevent the maximum call stack to overflow and the error will not pop up.
The "RangeError: Maximum call stack size exceeded" error occurs when a function is called so many times that the invocations exceed the call stack limit. To solve the error, specify a base case that has to be met to exit the recursion.
I found a problem in my bounds variable.
When i receiving JSON from server, while parsing it, the code makes bound from each location on a map.
// renew map bounds each time when new query comes
bounds = new google.maps.LatLngBounds ();
...
for (var key in data.locations ) {
...
// For fitting in Bounds, we push the positions of each location
atlas.Map.vars.bounds.extend ( new google.maps.LatLng(
data.locations [key].lat,
data.locations [key].lng
) );
...
}
...
GoogleMap.fitBounds (bounds);
And somehow for the new data type it`s making browser stack to overflow.
(what is very strange, cause it works normal for a even a lot bigier results! (600< elements on a map)).
Made a brute code for fast result:
bounds = new google.maps.LatLngBounds ();
if( KMLLayer.poly.docs[0].bounds != undefined ) {
bounds.extend( KMLLayer.poly.docs[0].bounds.getNorthEast() );
bounds.extend( KMLLayer.poly.docs[0].bounds.getSouthWest() );
}
if( KMLLayer.marks.docs[0].bounds != undefined ) {
bounds.extend( KMLLayer.marks.docs[0].bounds.getNorthEast() );
bounds.extend( KMLLayer.marks.docs[0].bounds.getSouthWest() );
}
GoogleMap.fitBounds (bounds);
I have two KML layers, so i retrieved bounds, if there occurs some, from GeoXML3 layers.
Damn, i spend for it 6 hours and 38 minutes!!!
Maybe i was wrong with this line, what clears global variable badly:
bounds = new google.maps.LatLngBounds ();
original name of variables are litle longer :) bounds === atlas.Map.vars.bounds;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With