Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li><p>Ideally you should wrap the code that loads the map inside a document ready or window load event.</p></li> <li><p>I notice that your code is not nested properly inside the <code>GBrowserIsCompatible()</code> block so please fix that.</p></li> <li><p>As far as I remember, Google maps API v2 requires you to call the <a href="http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.setCenter" rel="nofollow"><code>setCenter()</code></a> method before doing any operations on the map. So to begin with, set the center to <code>(0, 0)</code> immediately after creating the map.</p></li> <li><p>I notice that you're downloading XML data before you add markers to the map. You must take into account the time taken by the server to serve the XML data. If you've called the <code>setCenter()</code> before downloading the XML, the map will display while the XML downloads asynchronously. </p></li> <li><p>Inside the code that handles the XML data: when you add a marker, do not call <code>setCenter()</code> immediately. Doing so will cause the function to be called 1000 times if you have 1000 markers in your XML. Instead, just call <code>latlngbounds.extend(point)</code>. Once you have iterated the loop, calculate the zoom/center and call <code>setCenter()</code>. This way you will end up calling this function only twice.</p></li> </ol> <h1>Edit</h1> <p>I've figured out what the problem is. The genxml.php <em>randomly</em> returns the string <code>Google Geo error 620 occurred</code> which cannot be parsed as XML which raises JavaScript errors and no markers are shown. Better have a look at the code of that file and see why this happens randomly. On other times when that file actually returns valid XML, the markers appear as expected.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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