Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h1>Solved!!!</h1> <p>I found a problem in my <em>bounds</em> variable.</p> <p>When i receiving JSON from server, while parsing it, the code makes bound from each location on a map.</p> <pre><code>// 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); </code></pre> <p>And somehow for the new data type it`s making browser stack to overflow.</p> <p>(what is very strange, cause it works normal for a even a lot bigier results! (600&lt; elements on a map)).</p> <p>Made a brute code for fast result:</p> <pre><code>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); </code></pre> <p>I have two KML layers, so i retrieved bounds, if there occurs some, from GeoXML3 layers.</p> <p>Damn, i spend for it 6 hours and 38 minutes!!!</p> <p>Maybe i was wrong with this line, what clears global variable badly:</p> <pre><code>bounds = new google.maps.LatLngBounds (); </code></pre> <blockquote> <p>original name of variables are litle longer :) <strong>bounds === atlas.Map.vars.bounds;</strong></p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload