administrative_level_3 and sublocality_level_3

3,676 views
Skip to first unread message

DiTieM

unread,
Mar 26, 2011, 9:06:54 AM3/26/11
to Google Maps JavaScript API v3
Apologies if this forum is not for maps geolocation, but I use it in
google maps js api v3.

According to the documentation ( http://code.google.com/apis/maps/documentation/geocoding/
)

"The following types are supported and returned by the HTTP Geocoder:
(...)
administrative_area_level_3 indicates a third-order civil entity below
the country level. This type indicates a minor civil division. Not all
nations exhibit these administrative levels."

The values that I am getting in some areas (of USA) for
administrative_level_3 are just numbers (and I never got anything
different, as the example of the documentation says). Is this
expected?

In Japan, I am getting sublocality_level_2 and sublocality_level_3,
which are not documented but they follow the same behavior than
administrative_level_* (even the sublocality_level_3 are only
numbers). Is this a bug? a feature? documentation is not updated? what
am I missing?

Any light is very welcome,
Thanks in advance,

David

davie

unread,
Mar 27, 2011, 3:46:49 PM3/27/11
to Google Maps JavaScript API v3
Hi David
Not a bug. Level 3 in most cases are not defined so no data exists.
ie in USA Level 1 =State
Level 2 =County
There is no Level 3
Regards Davie


On Mar 26, 2:06 pm, DiTieM <dit...@gmail.com> wrote:
> Apologies if this forum is not for maps geolocation, but I use it in
> google maps js api v3.
>
> According to the documentation (http://code.google.com/apis/maps/documentation/geocoding/

DiTieM

unread,
Apr 4, 2011, 9:54:07 AM4/4/11
to Google Maps JavaScript API v3
Hi Davie

Sorry for later reply but I did not get a notification in my inbox.
Sorry.

> Not a bug. Level 3 in most cases are not defined so no data exists.

If no data exists, then why they put a number?

And in the case of Japan, what is "sublocality_level_[1,2,3]"? Talking
with some Japanese friends it seems they put the block and the number
of the building in sublocality_level_2 and 3 respectively (but still,
it does not appear in the documentation.)

Notice: I am talking about sublocality_level_X not
ADMINISTRATIVE_level_X.
It is easy to confuse them.

Best regards,
David

Chris Broadfoot (Google Employee)

unread,
Apr 5, 2011, 9:30:05 PM4/5/11
to google-map...@googlegroups.com

JFrancis

unread,
Apr 6, 2011, 9:33:48 AM4/6/11
to Google Maps JavaScript API v3
Now if only those individual elements were as easy to access as they
were in the v2 API, without requiring lots of if/then looping. <sigh>

-- JF

On Apr 5, 8:30 pm, "Chris Broadfoot (Google Employee)"
<c...@google.com> wrote:
> Sublocality is indeed documented:http://code.google.com/apis/maps/documentation/javascript/services.ht...

DiTieM

unread,
Apr 7, 2011, 7:18:38 AM4/7/11
to google-map...@googlegroups.com
yes, sublocality, but not sublocality_level_[1,2,3] (I found them only in Japan).

I also found more "rare" cases (or at least unexpected by me). For example, 
can a response have 2 localities? (I have several of these):

_xdc_._4464t6 && _xdc_._4464t6( {
  "status": "OK",
  "results": [ {
    "types": [ "sublocality_level_1", "sublocality", "political" ],
    "formatted_address": "Japan, Gifu Prefecture Ono District Shirakawa飯島",
    "address_components": [ {
      "long_name": "飯島",
      "short_name": "飯島",
      "types": [ "sublocality_level_1", "sublocality", "political" ]
    }, {
      "long_name": "Shirakawa",
      "short_name": "Shirakawa",
      "types": [ "locality", "political" ]             <----------------------------------------- NOTICE HERE
    }, {
      "long_name": "Ono District",
      "short_name": "Ono District",
      "types": [ "locality", "political" ]             <----------------------------------------- AND HERE
    }, {
      "long_name": "Gifu Prefecture",
      "short_name": "Gifu Prefecture",
      "types": [ "administrative_area_level_1", "political" ]
    }, {
      "long_name": "Japan",
      "short_name": "JP",
      "types": [ "country", "political" ]
    } ],
    "geometry": {
      "location": {
        "lat": 36.2745084,
        "lng": 136.9003169
      },
      "location_type": "APPROXIMATE",
      "viewport": {
        "southwest": {
          "lat": 36.2565154,
          "lng": 136.8683021
        },
        "northeast": {
          "lat": 36.2924973,
          "lng": 136.9323317
        }
      },
      "bounds": {
        "southwest": {
          "lat": 36.2591263,
          "lng": 136.8505725
        },
        "northeast": {
          "lat": 36.2956679,
          "lng": 136.9138389
        }
      }
    }
  } ]
}
 )




Reply all
Reply to author
Forward
0 new messages