Gmail Calendar Documents Reader Web more »
Help | Sign in
Google Groups Home
Reverse geocoding - No postal code in Placemark
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
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mathieu Maes  
View profile  
 More options Nov 12, 2:34 pm
From: Mathieu Maes <mathieu.m...@gmail.com>
Date: Thu, 12 Nov 2009 11:34:44 -0800 (PST)
Local: Thurs, Nov 12 2009 2:34 pm
Subject: Reverse geocoding - No postal code in Placemark
Hi,

I'm working on a webpage where a user needs to select a city by
clicking on an area in google maps. I'm using the GClientGeocoder
object to perform a "reverse geocoding" on the clicked location.

I found out that the return value (Placemark object) can contain the
postalcode and locality name in many different structures. And in some
cases, the object doesn't even contain a postal code.

Example:
{
    "id": "p1",
    "address": "Bornem, 2880 Bornem, België",
    "AddressDetails": {
        "Accuracy": 4,
        "Country": {
            "AdministrativeArea": {
                "AdministrativeAreaName": "Vlaams Gewest",
                "SubAdministrativeArea": {
                    "Locality": {
                        "DependentLocality": {
                            "DependentLocalityName": "Bornem"
                        },
                        "LocalityName": "Bornem"
                    },
                    "SubAdministrativeAreaName": "Antwerpen"
                }
            },
            "CountryName": "België",
            "CountryNameCode": "BE"
        }
    },
    "ExtendedData": {
        "LatLonBox": {
            "north": 51.1276965,
            "south": 51.0716417,
            "east": 4.298899,
            "west": 4.1708396
        }
    },
    "Point": {
        "coordinates": "[4.2348693,51.0996776,0]"
    }

}

So, place.address does contain both locality and postalcode, but
place.addressDetail does not... What gives ?

Thx for your replies,
Mathew


    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.
Marcelo  
View profile  
 More options Nov 12, 2:45 pm
From: Marcelo <marcelo...@hotmail.com>
Date: Thu, 12 Nov 2009 11:45:11 -0800 (PST)
Local: Thurs, Nov 12 2009 2:45 pm
Subject: Re: Reverse geocoding - No postal code in Placemark
On Nov 12, 8:34 pm, Mathieu Maes <mathieu.m...@gmail.com> wrote:

> So, place.address does contain both locality and postalcode, but
> place.addressDetail does not... What gives ?

It probably gives another star, (yours), to issue 606:
http://code.google.com/p/gmaps-api-issues/issues/detail?id=606
;-)

--
Marcelo - http://maps.forum.nu
--


    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.
Andrew Leach  
View profile  
 More options Nov 12, 3:10 pm
From: Andrew Leach <andrew.leac...@googlemail.com>
Date: Thu, 12 Nov 2009 12:10:41 -0800 (PST)
Local: Thurs, Nov 12 2009 3:10 pm
Subject: Re: Reverse geocoding - No postal code in Placemark
On Nov 12, 7:34 pm, Mathieu Maes <mathieu.m...@gmail.com> wrote:

> Hi,

> I'm working on a webpage where a user needs to select a city by
> clicking on an area in google maps. I'm using the GClientGeocoder
> object to perform a "reverse geocoding" on the clicked location.

Are you really reverse geocoding? If I reverse geocode the location
you give (51.0996776,4.2328693) I do get a postal code:
http://maps.google.com/maps/geo?q=51.0996776,4.2348693&output=xml&oe=...
http://maps.google.com/maps/geo?q=51.0996776,4.2348693&output=json&oe...

However, geocoding the address doesn't (even in the "address" field
where you show it):
http://maps.google.com/maps/geo?q=Bornem,%202880%20Bornem,%20Belgium&...

This indicates to me that Belgian postal codes aren't available to the
geocoder, but are available to the reverse geocoder. What did you
actually do to get the output you posted?

(You may need to add a key to those links)

Andrew


    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.
Mathieu Maes  
View profile  
 More options Nov 12, 3:56 pm
From: Mathieu Maes <mathieu.m...@gmail.com>
Date: Thu, 12 Nov 2009 12:56:36 -0800 (PST)
Local: Thurs, Nov 12 2009 3:56 pm
Subject: Re: Reverse geocoding - No postal code in Placemark
On 12 nov, 20:45, Marcelo <marcelo...@hotmail.com> wrote:
> It probably gives another star, (yours), to issue 606:http://code.google.com/p/gmaps-api-issues/issues/detail?id=606
> ;-)
> --
> Marcelo -http://maps.forum.nu
> --

Signed! Well, you can't blame google because Belgium is politically so
complexe! :p

On 12 nov, 21:10, Andrew Leach <andrew.leac...@googlemail.com> wrote:

> Are you really reverse geocoding? If I reverse geocode the location
> you give (51.0996776,4.2328693) I do get a postal code:http://maps.google.com/maps/geo?q=51.0996776,4.2348693&output=xml&oe=......

> However, geocoding the address doesn't (even in the "address" field
> where you show it):http://maps.google.com/maps/geo?q=Bornem,%202880%20Bornem,%20Belgium&...

> This indicates to me that Belgian postal codes aren't available to the
> geocoder, but are available to the reverse geocoder. What did you
> actually do to get the output you posted?
> Andrew

I used example code found here:
http://code.google.com/intl/nl/apis/maps/documentation/services.html#...

I can find a postal code most of the times (I currently need 3
different parsers because the postal code and locality are on 3
different places in the object), but in the case mentioned above I
can't find a postal code in the address details.

The weird thing is that the postal code is present in the "summarized"
address. I could try parsing that string instead, it would work, but
it would be bad practice imo.

Thanks for your replies!
Mathew


    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
©2009 Google