Hello googlers, I am fairly new to the API, but have some previous experience with coding.
I have a quick question. I have a markers DB table with only about 200 or so records in it., and i am trying to batch geocode every time i add new records. I used the sample code from the API tutorials, and everything works fine... but what id like to do, and like to suggest for the tutorial, is a small augmentation of the code. this code from the tutorial (http://code.google.com/apis/maps/articles/ phpsqlgeocode.html#geocodephp) is the part that im trying to change. while ($geocode_pending) { $address = $row["address"]; $id = $row["id"]; $request_url = $base_url . "&q=" . urlencode($address); $csv = file_get_contents($request_url) or die("url not loading"); blah blah blah geocode address and update ... usleep($delay); } After that while loop, im trying to look at the record in the table to determine if it already has lat/long data, if so, it doesnt need to be geocoded right? this is the code that i came up with, but it doesnt appear to be working. while ($geocode_pending) { $checkLat = $row["lat"]; $checkLng = $row["lng"]; if ( $checkLat == "0.000000" ){ blah blah blah geocode address and update ... usleep($delay); }//end if }// end while ostensibly, the while loop will look at the row and check if there is a Lat coordinate, if not, it should geocode the address, otherwise, it should move on to the next row. I know this is more of a php problem, but i thought i would post it here as it could improve the efficiency of your service if people werent constantly trying to geocode records that didnt need to be. Any help is greatly appreciated. Thanks much. Dave PS here is the map i am working with. http://sgtclassick.com/gmaps/geocode_locations1.php --~--~---------~--~----~------------~-------~--~----~ 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 google-maps-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---