Hi, I am a student from malaysia. I doing some project that is using
google api.

I have found some codes and i modify it to link with database and use
of google api to find the location (lat, lng) for each of the state.

It works perfectly, but only some data that couldnt found the location
and alert the last state that store in data not found. I have tried
all the testing and database linking is work nicely. I really couldn't
find any problems. Can you help me? Thanks you

here is the codes to find the lat and lng...
function resulthub(){
    var hub ="";

        for(var i=0; i < stateArray.length; i++){
        var state = stateArray[i];
        hub += state + "\n";
        document.getElementById('list').value = hub;

        geocoder.getLatLng(state , function(latlng) {
                if (!latlng) {
                  alert(state + ' not found');
                } else {
                   var point = latlng.toString();
                   //alert(point);
                        var marker = new GMarker(point);
                        map.addOverlay(marker);
                    //document.getElementById("lat").value = llp.lat();
                        //document.getElementById("lng").value = llp.lng();
                }
        });
}
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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