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.

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,
    Code (Text):
    1. var x =0:
    2. $.each(data, function(a, b){
    3.                   var degerler;
    4.                   degerler = new google.maps.LatLng(icerik.Yer.Latitude,icerik.Yer.Longitude);
    5.                   geocoder = new google.maps.Geocoder();
    6.                   geocoder.geocode({'latLng': degerler}, function(results, status) {
    7.                     if (status == google.maps.GeocoderStatus.OK) {
    8.                       if (results[1]) {
    9.                         //now i want to put this formatted_adress in an Array
    10.                         var arr[x] = results[0].formatted_address;
    11.                         ++x;
    12.  
    13.                       }//end Results[1]
    14.                     }//end status
    15.                   });//end geocoder.geocode
    16.  
    17.             });
    How can i put this results[0].formatted_adress in array x?
    Code (Text):
    1. var arr[x] = results[0].formatted_address;
    Thanks in advance.
    aldimeola1122, Apr 1, 2013 IP