M.C.P.C.

―むり・くり―プラスコミュニケーション(更新終了)


| トップページ |

2010年11月 5日 00:01

Adobe Creative Suite 出力対応店一覧をGoogle Mapsで表示させる(12)

このエントリーをはてなブックマークに追加 mixiチェック

アドビのCS5対応プリントショップのリストのページから、Google Mapsに表示させるやつの12回目。

前回は、Google Geocoding APIを使い、住所から緯度/経度を取得するのを、Perlでやってみました。

今回は、第9回と、第11回(前回)のスクリプトをくっつけて、アドビのサイトのHTMLをスクレイピングして、取得した印刷会社の住所から、Google Geocoding APIを使って、印刷会社の所在地を取得したいと思います。


それでは、さっそくくっつけてみましょう。

Filename: test11.pl

#!/usr/bin/perl
 
use strict;
use warnings;
use utf8;
use Web::Scraper;
use YAML;
use Encode;
use WebService::Simple;
 
my $geo = WebService::Simple->new(
    response_parser => 'JSON',
    base_url => 'http://maps.google.com/maps/api/geocode/',
    param    => {
      region   => 'jp',
      language => 'ja',
      sensor   => 'false',
    },
);
 
open my $fh, '<', 'printshop.html';
my $html = decode_utf8(do { local $/; <$fh> });
close $fh;
 
my $s = scraper {
    process '//div[@class="tabcontent"][1]//table[@class="data-bordered max"]/tbody/tr', 'codes[]' => scraper {
        process '//td[1]', pref    => [ 'TEXT', sub { s/\s//g; } ];
        process '//td[2]', company => [ 'TEXT', sub { s/\s//g; } ];
        process '//td[3]', address => [ 'TEXT', sub { s/\s//g; s/TEL:.+$//i; return $_; } ];
        process '//td[3]', phone   => [ 'TEXT', sub { s/\s//g; if(m/TEL:([\d-]+)/i){return $1;};}];
        process '//td[3]', fax     => [ 'TEXT', sub { s/\s//g; s/:/:/g; if(m/FAX:([\d-]+)/i){return $1;};undef;}];
        process '//td[4]', illustratorcs5 => [ 'TEXT',  sub { return $_ =~m|yes|i ? 1 : undef; } ];
        process '//td[5]', indesigncs5    => [ 'TEXT',  sub { return $_ =~m|yes|i ? 1 : undef; } ];
        process '//td[6]', pdfx1a         => [ 'TEXT',  sub { return $_ =~m|yes|i ? 1 : undef; } ];
        process '//td[7]', pdfx4          => [ 'TEXT',  sub { return $_ =~m|yes|i ? 1 : undef; } ];
    };
};
 
my $scraped = $s->scrape($html);
#print Dump($scraped->{codes});
 
foreach my $item ( @{$scraped->{codes}} ) {
  my $address = $item->{address};
  #print "$address\n";
  my $res = $geo->get( 'json', { address => $address } );
  my $val = $res->parse_response();
  print Dump( $val );
}
 
exit;
 
__END__

これを、こんな感じで実行してみます。

$ perl test11.pl > results11.txt
$

書き出したresults11.txtは以下の通り。

---
results:
  - address_components:
      - long_name: 8
        short_name: 8
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 1
        short_name: 1
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 6丁目
        short_name: 6丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 二十四軒2条
        short_name: 二十四軒2条
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 西区
        short_name: 西区
        types:
          - locality
          - political
      - long_name: 札幌市
        short_name: 札幌市
        types:
          - locality
          - political
      - long_name: 北海道
        short_name: 北海道
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 北海道札幌市西区二十四軒2条6丁目1−8'
    geometry:
      location:
        lat: 43.0690684
        lng: 141.3118492
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 43.072216
          lng: 141.3149968
        southwest:
          lat: 43.0659208
          lng: 141.3087016
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 27
        short_name: 27
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 4
        short_name: 4
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 1丁目
        short_name: 1丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 菊水2条
        short_name: 菊水2条
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 白石区
        short_name: 白石区
        types:
          - locality
          - political
      - long_name: 札幌市
        short_name: 札幌市
        types:
          - locality
          - political
      - long_name: 北海道
        short_name: 北海道
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 北海道札幌市白石区菊水2条1丁目4−27'
    geometry:
      location:
        lat: 43.0586882
        lng: 141.3690477
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 43.0618358
          lng: 141.3721953
        southwest:
          lat: 43.0555406
          lng: 141.3659001
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 千厩町
        short_name: 千厩町
        types:
          - sublocality_level_1
          - sublocality
          - political
    formatted_address: 千厩町
    geometry:
      location:
        lat: 38.9210556
        lng: 141.3310556
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 38.9297361
          lng: 141.347063
        southwest:
          lat: 38.912374
          lng: 141.3150482
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_1
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 58
        short_name: 58
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 1
        short_name: 1
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 岡田西町
        short_name: 岡田西町
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 宮城野区
        short_name: 宮城野区
        types:
          - locality
          - political
      - long_name: 仙台市
        short_name: 仙台市
        types:
          - locality
          - political
      - long_name: 宮城県
        short_name: 宮城県
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 宮城県仙台市宮城野区岡田西町1−58'
    geometry:
      location:
        lat: 38.2556051
        lng: 140.9586563
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 38.2587527
          lng: 140.9618039
        southwest:
          lat: 38.2524575
          lng: 140.9555087
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 1
        short_name: 1
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 14
        short_name: 14
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 3丁目
        short_name: 3丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 陽東
        short_name: 陽東
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 宇都宮市
        short_name: 宇都宮市
        types:
          - locality
          - political
      - long_name: 栃木県
        short_name: 栃木県
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 栃木県宇都宮市陽東3丁目14−1'
    geometry:
      location:
        lat: 36.5552252
        lng: 139.9215865
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 36.5583728
          lng: 139.9247341
        southwest:
          lat: 36.5520776
          lng: 139.9184389
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 1
        short_name: 1
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 1
        short_name: 1
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 1丁目
        short_name: 1丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 市谷加賀町
        short_name: 市谷加賀町
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 新宿区
        short_name: 新宿区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都新宿区市谷加賀町1丁目1−1'
    geometry:
      location:
        lat: 35.6965434
        lng: 139.7312938
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.699691
          lng: 139.7344414
        southwest:
          lat: 35.6933958
          lng: 139.7281462
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 1
        short_name: 1
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 11
        short_name: 11
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 1丁目
        short_name: 1丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 志村
        short_name: 志村
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 板橋区
        short_name: 板橋区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都板橋区志村1丁目11−1'
    geometry:
      location:
        lat: 35.7728674
        lng: 139.6961498
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.776015
          lng: 139.6992974
        southwest:
          lat: 35.7697198
          lng: 139.6930022
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 12
        short_name: 12
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 14
        short_name: 14
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 4丁目
        short_name: 4丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 小石川
        short_name: 小石川
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 文京区
        short_name: 文京区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都文京区小石川4丁目14−12'
    geometry:
      location:
        lat: 35.7169276
        lng: 139.7447783
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.7200752
          lng: 139.7479259
        southwest:
          lat: 35.71378
          lng: 139.7416307
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 12
        short_name: 12
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 5
        short_name: 5
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 3丁目
        short_name: 3丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 北青山
        short_name: 北青山
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 港区
        short_name: 港区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都港区北青山3丁目5−12'
    geometry:
      location:
        lat: 35.6666104
        lng: 139.7132468
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.669758
          lng: 139.7163944
        southwest:
          lat: 35.6634628
          lng: 139.7100992
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 5
        short_name: 5
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 2
        short_name: 2
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 2丁目
        short_name: 2丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 湊
        short_name: 湊
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 中央区
        short_name: 中央区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都中央区湊2丁目2−5'
    geometry:
      location:
        lat: 35.6716312
        lng: 139.7784971
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.6747788
          lng: 139.7816447
        southwest:
          lat: 35.6684836
          lng: 139.7753495
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 6
        short_name: 6
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 14
        short_name: 14
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 2丁目
        short_name: 2丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 内神田
        short_name: 内神田
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 千代田区
        short_name: 千代田区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都千代田区内神田2丁目14−6'
    geometry:
      location:
        lat: 35.6918701
        lng: 139.7685026
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.6950177
          lng: 139.7716502
        southwest:
          lat: 35.6887225
          lng: 139.765355
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 8
        short_name: 8
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 3
        short_name: 3
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 4丁目
        short_name: 4丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 恵比寿
        short_name: 恵比寿
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 渋谷区
        short_name: 渋谷区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都渋谷区恵比寿4丁目3−8'
    geometry:
      location:
        lat: 35.645985
        lng: 139.7119698
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.6491326
          lng: 139.7151174
        southwest:
          lat: 35.6428374
          lng: 139.7088222
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results:
  - address_components:
      - long_name: 21
        short_name: 21
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 6
        short_name: 6
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 2丁目
        short_name: 2丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 八重洲
        short_name: 八重洲
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 中央区
        short_name: 中央区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都中央区八重洲2丁目6−21'
    geometry:
      location:
        lat: 35.6778579
        lng: 139.7678309
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.6810055
          lng: 139.7709785
        southwest:
          lat: 35.6747103
          lng: 139.7646833
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 12
        short_name: 12
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 6
        short_name: 6
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 1丁目
        short_name: 1丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 虎ノ門
        short_name: 虎ノ門
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 港区
        short_name: 港区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都港区虎ノ門1丁目6−12'
    geometry:
      location:
        lat: 35.6698333
        lng: 139.7495185
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.6729809
          lng: 139.7526661
        southwest:
          lat: 35.6666857
          lng: 139.7463709
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 8
        short_name: 8
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 41
        short_name: 41
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 6丁目
        short_name: 6丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 東日暮里
        short_name: 東日暮里
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 荒川区
        short_name: 荒川区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都荒川区東日暮里6丁目41−8'
    geometry:
      location:
        lat: 35.7299885
        lng: 139.7757894
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.7331361
          lng: 139.778937
        southwest:
          lat: 35.7268409
          lng: 139.7726418
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 7
        short_name: 7
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 13
        short_name: 13
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 1丁目
        short_name: 1丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 白山
        short_name: 白山
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 文京区
        short_name: 文京区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都文京区白山1丁目13−7'
    geometry:
      location:
        lat: 35.7169833
        lng: 139.7520362
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.7201309
          lng: 139.7551838
        southwest:
          lat: 35.7138357
          lng: 139.7488886
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 544
        short_name: 544
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 早稲田鶴巻町
        short_name: 早稲田鶴巻町
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 新宿区
        short_name: 新宿区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都新宿区早稲田鶴巻町544'
    geometry:
      bounds:
        northeast:
          lat: 35.7079351
          lng: 139.7279218
        southwest:
          lat: 35.7073818
          lng: 139.7269333
      location:
        lat: 35.7077282
        lng: 139.7271685
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.716788
          lng: 139.7431759
        southwest:
          lat: 35.6986673
          lng: 139.7111611
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_3
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 49
        short_name: 49
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 2丁目
        short_name: 2丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 西日暮里
        short_name: 西日暮里
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 荒川区
        short_name: 荒川区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都荒川区西日暮里2丁目49'
    geometry:
      bounds:
        northeast:
          lat: 35.7313041
          lng: 139.7702024
        southwest:
          lat: 35.7307256
          lng: 139.769438
      location:
        lat: 35.7309242
        lng: 139.7698427
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.7399814
          lng: 139.7858501
        southwest:
          lat: 35.721866
          lng: 139.7538353
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_3
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 14
        short_name: 14
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 1
        short_name: 1
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 2丁目
        short_name: 2丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 猿楽町
        short_name: 猿楽町
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 千代田区
        short_name: 千代田区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都千代田区猿楽町2丁目1−14'
    geometry:
      location:
        lat: 35.6991245
        lng: 139.7590641
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.7022721
          lng: 139.7622117
        southwest:
          lat: 35.6959769
          lng: 139.7559165
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 6
        short_name: 6
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 17
        short_name: 17
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 3丁目
        short_name: 3丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 舟渡
        short_name: 舟渡
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 板橋区
        short_name: 板橋区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都板橋区舟渡3丁目17−6'
    geometry:
      location:
        lat: 35.7942693
        lng: 139.6815227
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.7974169
          lng: 139.6846703
        southwest:
          lat: 35.7911217
          lng: 139.6783751
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 5
        short_name: 5
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 15
        short_name: 15
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 2丁目
        short_name: 2丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 飯田橋
        short_name: 飯田橋
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 千代田区
        short_name: 千代田区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都千代田区飯田橋2丁目15−5'
    geometry:
      location:
        lat: 35.6989715
        lng: 139.7506257
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.7021191
          lng: 139.7537733
        southwest:
          lat: 35.6958239
          lng: 139.7474781
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 13
        short_name: 13
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 1
        short_name: 1
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 3丁目
        short_name: 3丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 湊
        short_name: 湊
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 中央区
        short_name: 中央区
        types:
          - locality
          - political
      - long_name: 東京都
        short_name: 東京都
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 東京都中央区湊3丁目1−13'
    geometry:
      location:
        lat: 35.6708757
        lng: 139.7778777
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.6740233
          lng: 139.7810253
        southwest:
          lat: 35.6677281
          lng: 139.7747301
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results:
  - address_components:
      - long_name: 3
        short_name: 3
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 6
        short_name: 6
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 浮島町
        short_name: 浮島町
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 瑞穂区
        short_name: 瑞穂区
        types:
          - locality
          - political
      - long_name: 名古屋市
        short_name: 名古屋市
        types:
          - locality
          - political
      - long_name: 愛知県
        short_name: 愛知県
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 愛知県名古屋市瑞穂区浮島町6−3'
    geometry:
      location:
        lat: 35.1169995
        lng: 136.9144186
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.1201471
          lng: 136.9175662
        southwest:
          lat: 35.1138519
          lng: 136.911271
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 40
        short_name: 40
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 4
        short_name: 4
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 5丁目
        short_name: 5丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 金山
        short_name: 金山
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 中区
        short_name: 中区
        types:
          - locality
          - political
      - long_name: 名古屋市
        short_name: 名古屋市
        types:
          - locality
          - political
      - long_name: 愛知県
        short_name: 愛知県
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 愛知県名古屋市中区金山5丁目4−40'
    geometry:
      location:
        lat: 35.145543
        lng: 136.908296
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 35.1486906
          lng: 136.9114436
        southwest:
          lat: 35.1423954
          lng: 136.9051484
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 33
        short_name: 33
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 下鳥羽東芹川町
        short_name: 下鳥羽東芹川町
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 伏見区
        short_name: 伏見区
        types:
          - locality
          - political
      - long_name: 京都市
        short_name: 京都市
        types:
          - locality
          - political
      - long_name: 京都府
        short_name: 京都府
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 京都府京都市伏見区下鳥羽東芹川町33'
    geometry:
      location:
        lat: 34.9429453
        lng: 135.7493915
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 34.9460929
          lng: 135.7525391
        southwest:
          lat: 34.9397977
          lng: 135.7462439
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 12
        short_name: 12
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 上鳥羽火打形町
        short_name: 上鳥羽火打形町
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 南区
        short_name: 南区
        types:
          - locality
          - political
      - long_name: 京都市
        short_name: 京都市
        types:
          - locality
          - political
      - long_name: 京都府
        short_name: 京都府
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 京都府京都市南区上鳥羽火打形町12'
    geometry:
      location:
        lat: 34.9604353
        lng: 135.7512474
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 34.9635829
          lng: 135.754395
        southwest:
          lat: 34.9572877
          lng: 135.7480998
    partial_match: !!perl/scalar:JSON::XS::Boolean 1
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results: []
status: ZERO_RESULTS
---
results: []
status: ZERO_RESULTS
---
results:
  - address_components:
      - long_name: 19
        short_name: 19
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 16
        short_name: 16
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 6丁目
        short_name: 6丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 高殿
        short_name: 高殿
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 旭区
        short_name: 旭区
        types:
          - locality
          - political
      - long_name: 大阪市
        short_name: 大阪市
        types:
          - locality
          - political
      - long_name: 大阪府
        short_name: 大阪府
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 大阪府大阪市旭区高殿6丁目16−19'
    geometry:
      location:
        lat: 34.7188469
        lng: 135.546714
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 34.7219945
          lng: 135.5498616
        southwest:
          lat: 34.7156993
          lng: 135.5435664
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 28
        short_name: 28
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 3
        short_name: 3
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 5丁目
        short_name: 5丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 新高
        short_name: 新高
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 淀川区
        short_name: 淀川区
        types:
          - locality
          - political
      - long_name: 大阪市
        short_name: 大阪市
        types:
          - locality
          - political
      - long_name: 大阪府
        short_name: 大阪府
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 大阪府大阪市淀川区新高5丁目3−28'
    geometry:
      location:
        lat: 34.7326825
        lng: 135.4778531
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 34.7358301
          lng: 135.4810007
        southwest:
          lat: 34.7295349
          lng: 135.4747055
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 31
        short_name: 31
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: 17
        short_name: 17
        types:
          - sublocality_level_3
          - sublocality
          - political
      - long_name: 4丁目
        short_name: 4丁目
        types:
          - sublocality_level_2
          - sublocality
          - political
      - long_name: 木川東
        short_name: 木川東
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 淀川区
        short_name: 淀川区
        types:
          - locality
          - political
      - long_name: 大阪市
        short_name: 大阪市
        types:
          - locality
          - political
      - long_name: 大阪府
        short_name: 大阪府
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 大阪府大阪市淀川区木川東4丁目17−31'
    geometry:
      location:
        lat: 34.7289805
        lng: 135.4903297
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 34.7321281
          lng: 135.4934773
        southwest:
          lat: 34.7258329
          lng: 135.4871821
    types:
      - sublocality_level_4
      - sublocality
      - political
status: OK
---
results:
  - address_components:
      - long_name: 22
        short_name: 22
        types:
          - sublocality_level_5
          - sublocality
          - political
      - long_name: 3
        short_name: 3
        types:
          - sublocality_level_4
          - sublocality
          - political
      - long_name: りんくう南浜
        short_name: りんくう南浜
        types:
          - sublocality_level_1
          - sublocality
          - political
      - long_name: 泉南市
        short_name: 泉南市
        types:
          - locality
          - political
      - long_name: 大阪府
        short_name: 大阪府
        types:
          - administrative_area_level_1
          - political
      - long_name: 日本
        short_name: JP
        types:
          - country
          - political
    formatted_address: '日本, 大阪府泉南市りんくう南浜3−22'
    geometry:
      location:
        lat: 34.3778781
        lng: 135.2629286
      location_type: APPROXIMATE
      viewport:
        northeast:
          lat: 34.3810257
          lng: 135.2660762
        southwest:
          lat: 34.3747305
          lng: 135.259781
    types:
      - sublocality_level_5
      - sublocality
      - political
status: OK
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT
---
results: []
status: OVER_QUERY_LIMIT

……あれ? なんだかstatusにOVER_QUERY_LIMITとかZERO_RESULTSとか混ざってきているぞ?


次回は、Google Geocoding APIからエラーが帰ってきているみたいなので、どうにかしてエラーを解消していくことを試行錯誤してみます。

投稿 大野 義貴 [GoogleMaps] | |

トラックバック(0)

トラックバックURL: http://blog.dtpwiki.jp/MTOS/mt-tb.cgi/3397

コメントする