It's a simple timing problem.

You can't add an overlay to a map that hasn't been centred.

If the data is really being fetched from a server, then the fetch is
asynchronous, and the data arrives after you've centred the map even
though the data is requested before the map is centred.

If the data is being fetched from cache, then (some) browsers may well
perform the fetch synchronously, so in this code

          addGemeenten();
          // DEFINE MAP CENTER
          map.setCenter(new GLatLng(53.33, 6.63), 10);

the markers added by addGemeenten() can be added before the
map.setCenter() is performed.

Try this:
          // DEFINE MAP CENTER
          map.setCenter(new GLatLng(53.33, 6.63), 10);
          addGemeenten();

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to