Pamela
Very cool.  Thanks for the JSON output link.  thanks again!
g

On Aug 19, 8:52 pm, "pamela (Google Employee)" <[email protected]>
wrote:
> Hi gtuerk-
>
> The Locality seems to be under SubAdministrativeArea for that geocode.
> I checked that by using the HTTP geocoder JSON 
> output:http://maps.google.com/maps/geo?q=165%20Halsey%20St,%20Newark,%20NJ%2...
>
> Our documentation does not make it clear that the AddressDetails is a
> bit of a strange format - it follows an XML schema which dictates that
> address parts are nested differently for different addresses, and it
> can honestly make it pretty hard to parse. We're working on improving
> the geocoding format as well as the documentation.
>
> Anyway, you should be able to add the necessary code based on that
> output for now.
>
> - pamela
>
> On Thu, Aug 20, 2009 at 2:22 AM, gtuerk<[email protected]> wrote:
>
> > A number of addresses that come back from the Client Geocoder have:
>
> > Address
> > Country
> > AdministrativeArea
>
> > but when it comes to the Locality the details are missing.  Try 60
> > Hudson St, New York, NY 10013 or
> > 165 Halsey St, Newark, NJ 07102.  Both of these locations successfully
> > return as placemarks (including point) but their child attribution for
> > Locality is missing.  Is this a problem with the maps from Teleatlas?
> > Or a problem with how the ClientGeocoder gets its data?  I've included
> > a snippet of how I walk the attribution to see if there's a different
> > child object I should be looking at.  thanks
> > gabe
>
> > --------------------
>
> > private function selectLocation(event:Event):void{
> >                        var selectedLocation:Object = 
> > geocodeLocations.getItemAt
> > (event.currentTarget.selectedIndex);
>
> >                        //prepare map
> >                        map.clearOverlays();
> >                        map.setCenter(selectedLocation.point, 
> > parameters.zoomLevel,
> > MapType.HYBRID_MAP_TYPE);
> >                        var options:MarkerOptions = new MarkerOptions({
> >                          strokeStyle: {color: 0x00FF00},
> >                          fillStyle: {color: 0x00FF00,alpha: 0.8},
> >                          label: "S",
> >                          labelFormat: {bold: false},
> >                          tooltip: "Selected Geocode Location",
> >                          radius: 12,
> >                          hasShadow: true,
> >                          clickable: false,
> >                          draggable: true,
> >                          gravity: 0.5,
> >                          distanceScaling: false
> >                        });
> >                        var geocodedLoc:Marker = new 
> > Marker(selectedLocation.point,
> > options);
> >                        map.addOverlay(geocodedLoc);
>
> >                        Alert.show("My location is: " +
> > selectedLocation.addressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareName
> > + ", " +
>
> > selectedLocation.addressDetails.Country.AdministrativeArea.AdministrativeAreaName.toString
> > () +
> >                        
> > selectedLocation.addressDetails.Country.CountryName.toString());
> >                        trace(selectedLocation);
> >                        //now set the geocode form for user to accept the 
> > results
> >                        if (selectedLocation.addressDetails.Country != null){
> >                                country = 
> > selectedLocation.addressDetails.Country.CountryName;
> >                                if 
> > (selectedLocation.addressDetails.Country.AdministrativeArea !=
> > null){
> >                                        state =
> > selectedLocation.addressDetails.Country.AdministrativeArea.AdministrativeAreaName;
> >                                        if
> > (selectedLocation.addressDetails.Country.AdministrativeArea.Locality !
> > = null){
> >                                                city =
> > selectedLocation.addressDetails.Country.AdministrativeArea.Locality.LocalityName;
> >                                                if
> > (selectedLocation.addressDetails.Country.AdministrativeArea.Locality.PostalCode
> >  !
> > = null){
> >                                                        postalCode =
> > selectedLocation.addressDetails.Country.AdministrativeArea.Locality.PostalCode.PostalCodeNumber;
> >                                                }
> >                                                if
> > (selectedLocation.addressDetails.Country.AdministrativeArea.Locality.Thoroughfare
> >  !
> > = null){
> >                                                        address =
> > selectedLocation.addressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareName
> >                                                }
> >                                        }
> >                                }
> >                        }
> >                        if (selectedLocation.point != null){
> >                                latitude = selectedLocation.point.lat();
> >                                longitude = selectedLocation.point.lng();
> >                        }
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" 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-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to