Hi,

I'm trying to get addresses from an XML document and generate markers
on the map using the string values. I'm running into two problems.

(1) When I load the page in IE the makers do not show up. When I re-
load the page, everything is fine and works well.
(2) Any browser other than IE (Firefox, Opera) the markers will never
populate the map.

Any help or explanation would be greatly appreciated:

Here's the function that seems to be stalling:

        function addMarkers(http){

        http.open('get', 'phoneBook.xml', true);
        http.send(null);

        if(http.readystate == 4){
                var response = http.responseXML.documentElement;
                addresses = response.getElementsByTagName("ADDRESS");
                place = new Array();

                marker = new Array();


                for(i=0; i<addresses.length; i++){
                        document.getElementById('tb1').innerHTML = addresses
[i].firstChild.data;
                        place[i] = new GClientGeocoder();
                        if(place){
                                place[i].getLatLng(
                                        addresses[i].firstChild.data,
                                                function(point){
                                                        if(!point){
                                                                
alert(addresses[i].firstChild.data + " Not found");

                                                        }else{
                                                                marker[i] = new 
GMarker(point);
                                                                
map.addOverlay(marker[i]);
                                                                
map.setCenter(new GLatLng(37.4419, -122.1419), 5);
                                                                }
                                                        }
                                                );
                                        }
                                }
                        }
                }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" 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-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to