Hi all!
I am having a problem using AXAJ to refresh the markers on the map.

I'll post the code:

<script type="text/javascript">
        //<![CDATA[
                var map;

                function load() {
      if (GBrowserIsCompatible()) {
                map = new GMap2(document.getElementById("map"));
                map.addControl(new GLargeMapControl());
                map.addControl(new GScaleControl());
                map.addControl(new GOverviewMapControl());
                  map.addControl(new GMapTypeControl());
        map.addMapType(G_PHYSICAL_MAP);
        map.setCenter(new GLatLng(45.407929, 12.012117), 6);
                map.setMapType(G_PHYSICAL_MAP);
                map.removeMapType(G_HYBRID_MAP);

// some variables here that creates icons are removed because the code
was too long.

                                setInterval(loadMarkers(map),30000);
                        }
    }

                function loadMarkers(map) {
        map.clearOverlays();
      var request = GXmlHttp.create();
      request.open("GET", "mapData.php", true);
      request.onreadystatechange = function() {
                                if (request.readyState == 4) {
                                        eval(request.responseText);
                                }
      }
      request.send(null);
                        setInterval(loadMarkers(map),30000);
    }

mapData.php returns a text cointainings the markers to be added. I've
checked with alert function the response and it is correct. Anyone can
help me to understand what's wrong and why there's no markers on the
map?

thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
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