On May 3, 2:36 am, sandeesh phulkar <
sandypassi...@gmail.com> wrote:
> I have a set of addresses which i want to plot on Google Map.
> This is the code i have written:-
>
> var geocoder = new google.maps.Geocoder();
> var map = new google.maps.Map(document.getElementById("map"), myOptions);
> // I have about 50 addresses in address2[]
>
> for (var i=0;i<address2.length;i++){
> geocoder.geocode( { address: address2[i]}, function(results, status) {
>
> // 1. alert('Hi');
> if (status == google.maps.GeocoderStatus.OK) {
> map.setCenter(results[0].geometry.location);
> marker = new google.maps.Marker({
> position: results[0].geometry.location,
> map: map,
> title: ""
> });
> }
>
> });
>
> }
>
> The issue which I am facing is:-
> Not all of the addresses are getting plotted.
> Only the first 11 addresses are getting plotted with the marker...
>
> But if I include an alert as shown in the code.(alert('Hi'));
> It gives me an alert before plotting every address and all the 50
> addreses are plotted.
> Any Suggestions????
Geocoding is subject to quotas and rate limits. Don't geocode
coordinates to plot the markers. Only use the geocoder for "user"