Google Groups Home
Help | Sign in
GeoCoder getLocations() and LocalityName
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
snappa  
View profile
 More options Jul 5, 8:35 pm
From: snappa <bill.snap...@gmail.com>
Date: Sat, 5 Jul 2008 17:35:47 -0700 (PDT)
Local: Sat, Jul 5 2008 8:35 pm
Subject: GeoCoder getLocations() and LocalityName
Can someone point me to a "clear, precise" description of the fields
in the AddressDetails returned by the "getLocations()" method of
GClientGeocoder?  I've searched and read numerous posts about the
inconsistencies around this API and nowhere have I seen anything that
gives me the confidence that this API works consistently enough to
stand on its own.

I just want to be able to know that the results coming back will be
consistent.  When a valid address including a town is passed in I
still get times when the LocalityName does not come back.  I want to
be able to do a lookup passing in "street and zip code" or "street,
city/town, state" or "street, city/town, state, and zip code" and get
consistent results back.

The odd thing is that regardless of whether I pass in "street and zip
code", "street, town, state", "street, town, state, zip code" to
maps.google.com the correct, conistent address is shown when the
results are returned.

Thoughts / pointers greatly appreciated.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ralph  
View profile
 More options Jul 5, 9:16 pm
From: Ralph <Ralph.A...@gmail.com>
Date: Sat, 5 Jul 2008 18:16:19 -0700 (PDT)
Local: Sat, Jul 5 2008 9:16 pm
Subject: Re: GeoCoder getLocations() and LocalityName
Is it this:
http://code.google.com/apis/maps/faq.html#geocoder_differences

Ralph

On Jul 6, 3:35 am, snappa <bill.snap...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
snappa  
View profile
 More options Jul 5, 11:00 pm
From: snappa <bill.snap...@gmail.com>
Date: Sat, 5 Jul 2008 20:00:15 -0700 (PDT)
Local: Sat, Jul 5 2008 11:00 pm
Subject: Re: GeoCoder getLocations() and LocalityName
No it is not.  I'm looking up a simple address in the US.

The fact that the getLocations() method returns different structures
when returning results to represent a street name for example makes
this an API that could use a little more detail.  For example:

place.AddressDetails.Country.AdministrativeArea.SubAdministrativeArea.Thoro ughfare.ThoroughfareName
place.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.Thoro ughfareName

Wouldn't it make sense to represent a street name one way and if a
field like "town" is not present then just omit it?

On Jul 5, 9:16 pm, Ralph <Ralph.A...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
snappa  
View profile
 More options Jul 7, 12:32 pm
From: snappa <bill.snap...@gmail.com>
Date: Mon, 7 Jul 2008 09:32:35 -0700 (PDT)
Local: Mon, Jul 7 2008 12:32 pm
Subject: Re: GeoCoder getLocations() and LocalityName
Can anyone shed some light on the expected structure of the
getLocations results?

I could understand all the variants IF there were a type denoting
which format to expect so that parsing were predictable but have not
seen this documented anywhere.

Any help / pointers would be appreciated.

Thanks in advance.

On Jul 5, 11:00 pm, snappa <bill.snap...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josh Rosenthal  
View profile
 More options Aug 18, 12:33 pm
From: "Josh Rosenthal" <maric...@gmail.com>
Date: Mon, 18 Aug 2008 12:33:44 -0400
Local: Mon, Aug 18 2008 12:33 pm
Subject: Re: GeoCoder getLocations() and LocalityName

A bit belated, but I'm going to respond with a possible solution in case it
is still of use, or in hopes that someone else will have a better solution.

As best as I can tell, the two uncertainties for a full address in the US
are the presence of a SubAdministrativeArea and the presence of a Locality.

In other words, ThoroughfareName can be at:

place.AddressDetails.Country.AdministrativeArea.*
SubAdministrativeArea.Locality*.Thoroughfare.ThoroughfareName
place.AddressDetails.Country.AdministrativeArea.*SubAdministrativeArea*
.Thoroughfare.ThoroughfareName
place.AddressDetails.Country.AdministrativeArea.*Locality*
.Thoroughfare.ThoroughfareName
place.AddressDetails.Country.AdministrativeArea.Thoroughfare.ThoroughfareNa me

For which the most efficient way I've found to deal with this are

var locationData =
place.AddressDetails.Country.AdministrativeArea.SubAdministrativeArea ||
place.AddressDetails.Country.AdministrativeArea;
locationData = locationData.Locality || locationData;

Any better solutions? Possible cases I missed?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google