1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.
  2. Better Analytics for WordPress Get It Free

Google Map formatted Adress in an array

Discussion in 'jQuery' started by aldimeola1122, Apr 1, 2013.

  1. #1
    i want to put formatted_adress(google map) in an array, but it works not,
    var x =0:
    $.each(data, function(a, b){
                      var degerler;
                      degerler = new google.maps.LatLng(icerik.Yer.Latitude,icerik.Yer.Longitude);
                      geocoder = new google.maps.Geocoder();
                      geocoder.geocode({'latLng': degerler}, function(results, status) {
                        if (status == google.maps.GeocoderStatus.OK) {
                          if (results[1]) {
                            //now i want to put this formatted_adress in an Array
                            var arr[x] = results[0].formatted_address;
                            ++x;
     
                          }//end Results[1]
                        }//end status
                      });//end geocoder.geocode
     
                });
    Code (markup):
    How can i put this results[0].formatted_adress in array x?
    var arr[x] = results[0].formatted_address;
    Code (markup):
    Thanks in advance.
     
    aldimeola1122, Apr 1, 2013 IP