Hi You could change your PHP file to return XML result centered on Geolocation results using mysql_num_rows()
$result = mysql_query($query); if (!$result) { die("Invalid query: " . mysql_error()); } header("Content-type: text/xml"); if (mysql_num_rows($result)==0) $node = $dom->createElement("marker"); $newnode = $parnode->appendChild($node); $newnode->setAttribute("name", "No Records Found"); $newnode->setAttribute("address","Centered on Location); $newnode->setAttribute("lat", $row['lat']); $newnode->setAttribute("lng", $row['lng']); $newnode->setAttribute("distance",0); else { // Iterate through the rows, adding XML nodes for each while ($row = @mysql_fetch_assoc($result)){ $node = $dom->createElement("marker"); $newnode = $parnode->appendChild($node); $newnode->setAttribute("name", $row['name']); $newnode->setAttribute("address", $row['address']); $newnode->setAttribute("lat", $center_lat); $newnode->setAttribute("lng", $center_lng); $newnode->setAttribute("distance", $row['distance']); } } I have not tried this out yet Regards Davie I On Oct 17, 7:54 pm, BruceB <bru...@google.com> wrote: > Might be a design choice, but if it were me I would simply check for zero > results from your search service, and if there are no results I would center > the map on the lat/lng that was returned from the geocoder (i.e. save the > geocode response in a variable that you can access from your search service > callback). You could also expand the search radius in a step-wise fashion, > but it might be useful to signal the user that you're doing so -- otherwise > they might get annoyed with the wait time (if there's no indication of > what's going on). But you'll want to put a maximum search radius into your > logic, or you might end up in an endless loop. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to google-maps-js-api-v3@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.