{"id":839,"date":"2013-11-17T17:11:54","date_gmt":"2013-11-17T08:11:54","guid":{"rendered":"http:\/\/ts-engine.net\/?p=839"},"modified":"2013-11-17T17:11:54","modified_gmt":"2013-11-17T08:11:54","slug":"geocodingapi%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e4%bd%8f%e6%89%80%e3%81%8b%e3%82%89%e7%b5%8c%e5%ba%a6%e3%80%81%e7%b7%af%e5%ba%a6%e5%8f%96%e5%be%97%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88","status":"publish","type":"post","link":"http:\/\/ts-engine.net\/?p=839","title":{"rendered":"GeoCodingAPI\u3092\u4f7f\u3063\u3066\u4f4f\u6240\u304b\u3089\u7d4c\u5ea6\u3001\u7def\u5ea6\u53d6\u5f97\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u305f\u3002"},"content":{"rendered":"<p>\n\u4eca\u6a5f\u80fd\u3092\u8ffd\u52a0\u3092\u3057\u3066\u3044\u308b\u30b5\u30a4\u30c8\u3001<a href=\"http:\/\/zekkei.me\">\u4e16\u754c\u306e\u7d76\u666f\u30b5\u30a4\u30c8<\/a>\u3067\u3001googlemap\u3068\u306e\u9023\u643a\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002<br \/>\n\u305d\u306e\u969b\u306b\u3001\u4f4f\u6240\u60c5\u5831\u304b\u3089\u3001\u7def\u5ea6\u3001\u7d4c\u5ea6\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u305f\u306e\u3067\u3044\u304b\u306b\u8a18\u8f09\u3057\u307e\u3059\u3002\n<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ts-engine.net\/wp-content\/uploads\/2013\/11\/map.jpg\" alt=\"Map\" title=\"map.jpg\" border=\"0\" width=\"319\" height=\"481\" \/><br \/>\n<br \/><!--more--><\/p>\n<h1>\n\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002\u307e\u305a\u306f\u898b\u3066\u4e0b\u3055\u3044\u3002<br \/>\n<\/h1>\n<p>[bash]<br \/>\n#!\/usr\/bin\/perl<\/p>\n<p>use strict;<br \/>\nuse warnings;<br \/>\nuse LWP::Simple;<br \/>\nuse XML::Simple;<br \/>\nuse Data::Dumper;<br \/>\nuse utf8;<\/p>\n<p>my $country =&quot;the country you want to look into&quot;;<br \/>\nmy $title=&quot;the place you want to look into&quot;;<\/p>\n<p>\t\tmy $base = &quot;http:\/\/www.geocoding.jp\/api\/?v=1.1&amp;q=&quot;;<br \/>\n\t\tmy $query = &quot;${country} ${title}&quot;;<br \/>\n\t\tmy $res = get ($base.$query);<br \/>\n\t\t$res = XML::Simple::-&gt;new()-&gt;XMLin($res);<br \/>\n\t\t#print Dumper $res;<br \/>\n\t\tmy $latitude = $res-&gt;{coordinate}-&gt;{lat};<br \/>\n\t\tmy $longitude = $res-&gt;{coordinate}-&gt;{lng};<br \/>\n\t\tmy $address = $res-&gt;{google_maps};<\/p>\n<p>\t\tprintf (&quot;lat: %f\\n&quot;, $res-&gt;{coordinate}-&gt;{lat});<br \/>\n\t\tprintf (&quot;lng: %f\\n&quot;, $res-&gt;{coordinate}-&gt;{lng});<br \/>\n\t\tprintf (&quot;address: %s\\n&quot;, $res-&gt;{google_maps});<br \/>\n\t\tsleep 5;<br \/>\n[\/bash]<\/p>\n<h1>\u898b\u3066\u306e\u901a\u308a\u3001GeoCodingAPI\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/h1>\n<p>\nwebAPI\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u3053\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u307e\u3059\u3002google\u306b\u3082\u540c\u3058\u3088\u3046\u306aAPI\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u3063\u3061\u3092\u4f7f\u3048\u3070\u826f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u6c17\u3065\u304f\u306e\u304c\u9045\u304f\u3066\u3001\u3053\u3063\u3061\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u4f5c\u3063\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u3001\u307e\u3042\u3044\u3044\u304b\u3068\u304a\u3082\u3063\u3066\u307e\u3059\u3002\n<\/p>\n<h1>API\u5074\u3067\u591a\u304f\u306e\u30a2\u30af\u30bb\u30b9\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u304c\u554f\u984c<\/h1>\n<p>\n\u6700\u521d\u3001\u30ac\u30f3\u30ac\u30f3API\u3092\u305f\u305f\u3044\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u7a81\u7136\u3001\u30a8\u30e9\u30fc\u304c\u5e30\u3063\u3066\u304f\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304d\u307e\u3057\u305f\u3002<br \/>\n\u306a\u3093\u3067\u3060\u308d\u3046\uff5e\u3068\u304a\u3082\u3063\u3066\u3001API\u88fd\u4f5c\u8005\u306etwitter\u307f\u3066\u307f\u305f\u3089\u3001\uff15\u79d2\u306b\u4e00\u56de\u672a\u6e80\u306e\u30a2\u30af\u30bb\u30b9\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3068\u6ce8\u610f\u559a\u8d77\u3057\u3066\u3044\u308b\u306e\u3092\u898b\u3064\u3051\u307e\u3057\u305f\u3002\n<\/p>\n<blockquote class=\"twitter-tweet\">\n<p>\u5f53\u30b5\u30fc\u30d3\u30b9\u304b\u3089HTTP\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9403\u304c\u8fd4\u3055\u308c\u305f\u3089\u300c\u30a2\u30af\u30bb\u30b9\u983b\u5ea6\u9ad8\u3059\u304e\u300d\u306b\u3088\u308b\u30a2\u30af\u30bb\u30b9\u62d2\u5426\u3067\u3059\u300224\u6642\u9593\u3050\u3089\u3044\u7d4c\u3064\u3068\u89e3\u9664\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u304c\u3001\u518d\u3073\u983b\u5ea6\u304c\u591a\u3059\u304e\u308c\u3070\u5373\u62d2\u7d76\u3059\u308b\u30c4\u30f3\u30c7\u30ec\u4ed5\u69d8\u3067\u3059\u3002\u306a\u304a\u3001\u6539\u5584\u3055\u308c\u308b\u898b\u8fbc\u307f\u306a\u3044\u306a\u30fc\u3068\u3053\u3061\u3089\u304c\u5224\u65ad\u3057\u305f\u5834\u5408\u306f\u6052\u4e45\u7684\u306b\u62d2\u5426\u3068\u306a\u308a\u307e\u3059\u3002\u3054\u4e86\u627f\u304f\u3060\u3055\u3044<\/p>\n<p>&mdash; Geocoding.jp (@Geocoding_jp) <a href=\"https:\/\/twitter.com\/Geocoding_jp\/statuses\/377152388118749184\">September 9, 2013<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>\n\u305d\u306e\u305f\u3081\u3001\u50d5\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u66f8\u3044\u3066\u3044\u308b\u901a\u308a\u3001sleep5\u306f\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u304a\u9858\u3044\u3057\u307e\u3059\u3002<br \/>\n\u3061\u306a\u307f\u306b\u3001\u50d5\u306f\u4e0a\u8a18\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4e00\u90e8\u5909\u3048\u3066\u3001DB\u306b\u60c5\u5831\u3092\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u6a5f\u80fd\u3092\u8ffd\u52a0\u3092\u3057\u3066\u3044\u308b\u30b5\u30a4\u30c8\u3001\u4e16\u754c\u306e\u7d76\u666f\u30b5\u30a4\u30c8\u3067\u3001googlemap\u3068\u306e\u9023\u643a\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002 \u305d\u306e\u969b\u306b\u3001\u4f4f\u6240\u60c5\u5831\u304b\u3089\u3001\u7def\u5ea6\u3001\u7d4c\u5ea6\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u305f\u306e\u3067\u3044\u304b\u306b\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,26,20,6,7],"tags":[28],"class_list":["post-839","post","type-post","status-publish","format-standard","hentry","category-perl","category-26","category-20","category-6","category-7","tag-perl"],"_links":{"self":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=839"}],"version-history":[{"count":0,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/839\/revisions"}],"wp:attachment":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=839"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}