Hi,
I'm trying to display more addresses on the same map.
On 10th address, the script report the error ("not found") as wired in
showAddress()
Is 10 address the max limit in GoogleMaps?

For example, following code in Playgroung (http://code.google.com/apis/
ajax/playground/#geocoding_simple) woks well, but if you add a
"showAddress" line more, the last line will alert "not found"
var map = null;
var geocoder = null;

function initialize() {
  if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(37.4419, -122.1419), 13);
    geocoder = new GClientGeocoder();


     showAddress("Via  Dotti  1 Bologna BO","pippo")
     showAddress("VIA  Montebello 1 Bologna BO","plu" )
     showAddress("Via  Dotti  2 Bologna BO","pippo")
     showAddress("VIA  MONTEBELLO 2 Bologna BO","plu" )
     showAddress("Via  Dotti  3 Bologna BO","pippo")
     showAddress("VIA  Montebello 3 Bologna BO","plu" )
     showAddress("Via  Dotti  4 Bologna BO","pippo")
     showAddress("VIA  Montebello 4 Bologna BO","plu" )
     showAddress("Via  Dotti  5 Bologna BO","pippo")
     showAddress("VIA    Marconi 8  Bologna BO","plu" )
     showAddress("VIA    Marconi 18  Bologna BO","plu" )
     /*no more showAddress() allowed !!! */
  }
}

function showAddress(address) {
  if (geocoder) {
    geocoder.getLatLng(
      address,
      function(point) {
        if (!point) {
          alert(address + " not found");
        } else {
          map.setCenter(point, 13);
          var marker = new GMarker(point);
          map.addOverlay(marker);
          marker.openInfoWindowHtml(address);
        }
      }
    );
  }
}

-- 
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