pombreda / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

The Placemark object doesn't return the street #441

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release : 1.1.0

Platform information (OS : Windows, Browser : all, GWT version : 2.0.3).  Does 
the issue exist on other platforms? I don't know

I don't recieve the Street : 

recieved json :
_xdc_._0gieyjk6a && _xdc_._0gieyjk6a( {
  "name": "761 Flore duquet, Québec, QC,G1X4R1",
  "Status": {
    "code": 200,
    "request": "geocode"
  },
  "Placemark": [ {
    "id": "p1",
    "address": "761 Rue Flore Duquet, QC G1X 4S5, Canada",
    "AddressDetails": {
   "Accuracy" : 8,
   "Country" : {
      "AdministrativeArea" : {
         "AdministrativeAreaName" : "QC",
         "SubAdministrativeArea" : {
            "DependentLocality" : {
               "DependentLocalityName" : "Sainte-Foy",
               "PostalCode" : {
                  "PostalCodeNumber" : "G1X 4S5"
               },
               "Thoroughfare" : {
                  "ThoroughfareName" : "761 Rue Flore Duquet"
               }
            },
            "SubAdministrativeAreaName" : "Communauté-Urbaine-de-Québec"
         }
      },
      "CountryName" : "Canada",
      "CountryNameCode" : "CA"
   }
},
    "ExtendedData": {
      "LatLonBox": {
        "north": 46.7831398,
        "south": 46.7768445,
        "east": -71.3086669,
        "west": -71.3149621
      }
    },
    "Point": {
      "coordinates": [ -71.3118072, 46.7799965, 0 ]
    }
  } ]
}
 )

the method getStreet looks for the Locality object while it is not recieved in 
the json code :

public final native String getStreet() /*-{
    var AdministrativeArea = this.AddressDetails.Country.AdministrativeArea;
    if (AdministrativeArea) {
      var Area = AdministrativeArea.SubAdministrativeArea || AdministrativeArea;
      var Locality = Area.Locality;
      var DependentLocality = (Locality && Locality.DependentLocality) || null;
      var Thoroughfare = (DependentLocality && DependentLocality.Thoroughfare)  
        || (Locality && Locality.Thoroughfare) || (Area.Thoroughfare);
      return Thoroughfare && Thoroughfare.ThoroughfareName || null;
    }
    return null;
  }-*/;

Workaround if you have one: none

Links to the relevant Google Group posts: 
http://code.google.com/p/gwt-google-apis/issues/detail?id=103

Original issue reported on code.google.com by zakaria.bouslama@gmail.com on 1 Jan 2011 at 9:11

GoogleCodeExporter commented 9 years ago
Have similar problems too. My problem is that if no administrative area is 
available, but only sub-administrative, no city, street, postcode etc. is 
available although it's available in the response under the subadminstrative ...

Original comment by felixnut...@gmail.com on 7 Feb 2011 at 1:21

GoogleCodeExporter commented 9 years ago
If you guys want to spin a patch, I'll be happy to put it in.

Original comment by zundel@google.com on 7 Feb 2011 at 2:58

GoogleCodeExporter commented 9 years ago
Maps v2 API is now deprecated

Original comment by zundel@google.com on 28 Oct 2011 at 4:28