{"id":1190,"date":"2013-11-16T13:32:35","date_gmt":"2013-11-16T04:32:35","guid":{"rendered":"http:\/\/wtpmj.com\/?p=1190"},"modified":"2018-05-13T14:19:49","modified_gmt":"2018-05-13T05:19:49","slug":"google-latitude%e3%81%ae%e4%bb%a3%e3%82%8f%e3%82%8a%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/wtpmj.com\/?p=1190","title":{"rendered":"Google Latitude\u306e\u4ee3\u308f\u308a\u3092\u4f5c\u3063\u3066\u307f\u305f"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/newlatitude.jpg\" width=\"186\" height=\"290\"><\/p>\n<p>2013\u5e748\u67089\u65e5\u3092\u3082\u3063\u3066\u3001<a href=\"http:\/\/www.itmedia.co.jp\/news\/articles\/1307\/11\/news035.html\">Google Latitude\u306e\u30b5\u30fc\u30d3\u30b9\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f<\/a>\u3002<\/p>\n<p>\u4eca\u307e\u3067\u306f\u3001\u3053\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3063\u3066\u3001<a href=\"\/?p=146\">\u81ea\u5206\u304c\u3069\u3053\u306b\u3044\u308b\u306e\u304b\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u3067\u77e5\u3089\u305b\u3066\u3044\u307e\u3057\u305f<\/a>\u3002<br \/>\nGPS\u5185\u8535\u306e\u643a\u5e2f\u3084\u30b9\u30de\u30db\u3092\u901a\u3058\u3066(\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u304b\u3089\u624b\u52d5\u3067)\u73fe\u5728\u5730\u3092\u66f4\u65b0\u3057\u3001\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u5316\u3057\u305fGoogle\u30de\u30c3\u30d7\u306e\u4e0a\u306b\u305d\u306e\u73fe\u5728\u5730(\u6700\u7d42\u66f4\u65b0\u5730)\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3057\u305f\u3002<br \/>\n\u3057\u304b\u3057\u3001\u5229\u7528\u8005\u304c\u5c11\u306a\u304b\u3063\u305f\u306e\u304b\u3001\u5132\u304b\u3089\u306a\u3044\u3067\u3042\u308d\u3046\u3053\u306e\u4e8b\u696d\u304b\u3089\u306f\u624b\u3092\u5f15\u3044\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u4f55\u3068\u304b\u4ee3\u66ff\u54c1\u3092\u4f5c\u308b\u3079\u304f\u3001\u3068\u308a\u3042\u3048\u305aiPhone\u3067\u52d5\u304f(\u73fe\u5728\u5730\u66f4\u65b0\u304c\u3067\u304d\u308b)\u3053\u3068\u3092\u76ee\u6a19\u306b\u3001\u7acb\u3061\u4e0a\u304c\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305a\u73fe\u5728\u5730\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3067\u3059\u304c\u3001\u6700\u8fd1\u306e\u30d6\u30e9\u30a6\u30b6\u306f\u6a19\u6e96\u3067\u73fe\u5728\u5730(\u3064\u307e\u308a\u7def\u5ea6\u30fb\u7d4c\u5ea6\u306a\u3069)\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\n\u3053\u308c\u306f<a href=\"http:\/\/www.atmarkit.co.jp\/ait\/articles\/1107\/14\/news119.html\">HTML5\u306eGeolocation API\u3068\u3044\u3046\u4ed5\u69d8<\/a>\u306b\u3088\u308b\u3082\u306e\u3089\u3057\u304f\u3001\u30d1\u30bd\u30b3\u30f3\u3060\u3068IP\u30a2\u30c9\u30ec\u30b9\u306a\u3069\u304b\u3089\u53d6\u5f97\u3059\u308b\u306e\u3067\u4e0d\u6b63\u78ba\u3067\u3059\u304c\u3001iPhone\u306a\u3069\u3067\u306fGPS\u304b\u3089\u306a\u306e\u3067\u3001\u304b\u306a\u308a\u6b63\u78ba\u306a\u73fe\u5728\u5730\u3092\u53d6\u5f97\u3057\u3066\u304f\u308c\u307e\u3059\u3002<br \/>\n\u3064\u307e\u308a\u3001iPhone\u3067\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u3067\u3001\u73fe\u5728\u5730\u304c\u7c21\u5358\u306b\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5f8c\u306f\u53d6\u5f97\u3057\u305f\u7def\u5ea6\u3068\u7d4c\u5ea6\u3092Google\u30de\u30c3\u30d7\u306b\u6e21\u3057\u3066\u3084\u308c\u3070\u73fe\u5728\u5730\u306e\u8868\u793a\u306f\u6bd4\u8f03\u7684\u7c21\u5358\u306b\u3067\u304d\u308b\u306f\u305a\u3002<br \/>\n\u8868\u793a\u3055\u305b\u308b\u3068\u540c\u6642\u306b\u3001\u81ea\u5206\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u4f4d\u7f6e\u60c5\u5831\u3092\u66f8\u304d\u8fbc\u3080\u3002<br \/>\n\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u3067\u306f\u305d\u306e\u4f4d\u7f6e\u60c5\u5831\u3092\u8aad\u307f\u8fbc\u307f\u3001\u6bce\u56deGoogle\u30de\u30c3\u30d7\u306b\u6e21\u3057\u3066\u8868\u793a\u3059\u308c\u3070\u30fb\u30fb\u3068\u982d\u306e\u4e2d\u3067\u4ed5\u69d8\u304c\u5927\u4f53\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u65e9\u901f\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><!--more \u4f5c\u308a\u65b9 --><\/p>\n<p>1.JavaScript\u3067\u73fe\u5728\u5730\u3092\u53d6\u5f97<br \/>\n\u73fe\u5728\u5730\u53d6\u5f97\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u307e\u3059\u3002<br \/>\n[javascript]<br \/>\n<script type=\"text\/javascript\">\n\/\/\u73fe\u5728\u5730\u60c5\u5831\u3092\u53d6\u5f97\nfunction cont_get_current_gps(){\nif(!navigator.geolocation){ alert('navigator.geolocation is not defined.'); return; }\nnavigator.geolocation.getCurrentPosition(\nfunction(position){\nvar ido = position.coords.latitude;\nvar keido = position.coords.longitude;\ndocument.idokeido.lati.value = ido;\ndocument.idokeido.long.value = keido;\n} ,\nfunction(){\nalert('Error!');\n}\n);\n}\n<\/script><br \/>\n[\/javascript]<\/p>\n<p>[html]<br \/>\n<input type=\"button\" value=\"\u73fe\u5728\u5730\u3092\u81ea\u52d5\u3067\u53d6\u5f97\" onclick=\"cont_get_current_gps();\"><br \/>\n[\/html]<\/p>\n<p>2.\u30d5\u30a9\u30fc\u30e0\u306b\u73fe\u5728\u5024\u3092\u6e21\u3059<br \/>\n\u53d6\u5f97\u3057\u305f10\u9032\u6570\u306e\u7def\u5ea6\u3068\u7d4c\u5ea6\u306f\u3001\u30d5\u30a9\u30fc\u30e0\u306b\u6e21\u3055\u308c\u307e\u3059\u3002<br \/>\n\u666e\u901a\u306e\u30d5\u30a9\u30fc\u30e0\u306a\u306e\u3067\u3001\u624b\u52d5\u3067\u3082\u4f4d\u7f6e\u60c5\u5831\u304c\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n[html]<\/p>\n<form method=\"post\" action=\"\" name=\"idokeido\">\n\u7def\u5ea6<input type=\"text\" name=\"lati\" size=\"10\"><br \/>\n\u7d4c\u5ea6<input type=\"text\" name=\"long\" size=\"10\"><br \/>\n<input type=\"submit\" value=\"\u9001\u4fe1\"><br \/>\n<\/form>\n<p>[\/html]<\/p>\n<p>3.\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b<br \/>\n\u30d5\u30a9\u30fc\u30e0\u306b\u5165\u3063\u305f\u7def\u5ea6\u3068\u7d4c\u5ea6\u306f\u3001PHP\u306b\u3088\u308a\u30b5\u30fc\u30d0\u30fc\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u7c21\u5358\u306a\u30c6\u30ad\u30b9\u30c8\u306b\u3057\u307e\u3057\u305f\u304c\u3001KML\u5f62\u5f0f\u3067\u51fa\u529b\u3059\u308b\u3068\u3088\u308a\u826f\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n[php]<br \/>\n<?php\n$lati = $_POST['lati'];\n$long = $_POST['long'];\nif ($lati &amp;&amp; $long) {\n$fp = fopen('here.txt', 'w');\nfwrite($fp, \"{$lati},{$long}\");\nfclose($fp);\necho  <<< EOM\n<iframe id=\"disp\" src=\"http:\/\/maps.google.co.jp\/maps?q=loc:{$lati},{$long}&amp;z=13&amp;output=embed\" width=\"100%\"><\/iframe><br \/>\nEOM;<br \/>\n}<br \/>\n?><br \/>\n[\/php]<\/p>\n<p>4.\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3093\u3067\u73fe\u5728\u5730\u3092\u8868\u793a\u3059\u308b<br \/>\n\u8868\u793a\u7528PHP\u304c\u4f4d\u7f6e\u60c5\u5831\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u307f\u3001\u30de\u30c3\u30d7\u3092\u958b\u304d\u307e\u3059\u3002<br \/>\n\u3042\u3068\u306fiframe\u306a\u3069\u3067\u30d6\u30ed\u30b0\u306b\u8cbc\u308a\u3064\u3051\u308c\u3070\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u3068\u3057\u3066\u3082\u4f7f\u3048\u307e\u3059\u3002<br \/>\n[php]<br \/>\n<?php\n$width = $_GET[\"width\"];\nif(!$width){\n$width = \"100%\";\n}\n$height = $_GET[\"height\"];\nif(!$height){\n$height = \"100%\";\n}\n$z = $_GET[\"z\"];\nif(!$z){\n$z = \"13\";\n}\n$fp = fopen('here.txt', 'r');\n$lines = fgets($fp);\n$arr = explode(\",\",$lines);\n$lati = $arr[0];\n$long = $arr[1];\nfclose($fp);\necho  <<< EOM\n<iframe loading=\"lazy\" src=\"http:\/\/maps.google.co.jp\/maps?ll={$lati},{$long}&amp;z={$z}&amp;output=embed\" width=\"{$width}\" height=\"{$height}\" frameborder=\"0\"><\/iframe><br \/>\n<a href=\"http:\/\/maps.google.co.jp\/maps?q=loc:{$lati},{$long}&amp;z={$z}\">\u5927\u304d\u306a\u5730\u56f3\u3067\u898b\u308b<\/a><br \/>\nEOM;<br \/>\n?><br \/>\n[\/php]<\/p>\n<p>\u4e0a\u8a18\u306e\u307e\u3068\u3081\u306f<a href=\"\/wp-content\/uploads\/gps.zip\">\u3053\u3061\u3089<\/a>\u3067\u3059\u3002<br \/>\n\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b5\u30fc\u30d0\u30fc\u306e\u540c\u3058\u5834\u6240\u306b\u7f6e\u3044\u3066\u30a2\u30af\u30bb\u30b9\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>\u53c2\u8003\u30b5\u30a4\u30c8:<br \/>\n<a href=\"http:\/\/www.pxt.jp\/ja\/diary\/article\/254\/index.html\">http:\/\/www.pxt.jp\/ja\/diary\/article\/254\/index.html<\/a><br \/>\n<a href=\"http:\/\/ascii.jp\/elem\/000\/000\/433\/433470\/index-3.html\">http:\/\/ascii.jp\/elem\/000\/000\/433\/433470\/index-3.html<\/a><br \/>\n<a href=\"http:\/\/blog.fonland.net\/2010\/06\/javascript-iphone-gps.html\">http:\/\/blog.fonland.net\/2010\/06\/javascript-iphone-gps.html<\/a><br \/>\n<a href=\"http:\/\/d.hatena.ne.jp\/yatt\/20130208\/1360316179\">http:\/\/d.hatena.ne.jp\/yatt\/20130208\/1360316179<\/a><br \/>\n<a href=\"http:\/\/www.shurey.com\/html\/googlemaps.html\">http:\/\/www.shurey.com\/html\/googlemaps.html<\/a><br \/>\n<a href=\"http:\/\/www.phpbook.jp\/func\/file\/index4.html\">http:\/\/www.phpbook.jp\/func\/file\/index4.html<\/a><br \/>\n<a href=\"http:\/\/ponk.jp\/php\/file\/write\">http:\/\/ponk.jp\/php\/file\/write<\/a><br \/>\n<a href=\"http:\/\/www.php-ref.com\/b2api\/04_fgets.html\">http:\/\/www.php-ref.com\/b2api\/04_fgets.html<\/a><br \/>\n<a href=\"http:\/\/phpspot.net\/php\/man\/php\/function.explode.html\">http:\/\/phpspot.net\/php\/man\/php\/function.explode.html<\/a><br \/>\n<a href=\"http:\/\/libro.tuyano.com\/index3?id=410001&#038;page=3\">http:\/\/libro.tuyano.com\/index3?id=410001&#038;page=3<\/a><br \/>\n<a href=\"http:\/\/www.geocities.jp\/eijispace\/2012\/0220.html\">http:\/\/www.geocities.jp\/eijispace\/2012\/0220.html<\/a><br \/>\n<a href=\"http:\/\/d.hatena.ne.jp\/takaxi\/20111211\/1323575933\">http:\/\/d.hatena.ne.jp\/takaxi\/20111211\/1323575933<\/a><\/p>\n<p>Enjoy!<\/p>\n<p>\u8ffd\u8a18\uff1a<br \/>\n<a href=\"\/gps\">\u6539\u9020\u3057\u305fWeb\u30a2\u30d7\u30ea\u7248\u3092\u3072\u3063\u305d\u308a\u516c\u958b<\/a>\u3002<br \/>\niPhone\u306a\u3069\u3067\u81ea\u5206\u306e\u5834\u6240\u3092\u53d6\u5f97\u3057\u3001\u305d\u306e\u60c5\u5831\u3092\u77ed\u7e2eURL\u5316\u3057\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3092\u4f7f\u3048\u3070\u3001iMessage\u306a\u3069\u3067\u81ea\u5206\u306e\u5834\u6240\u3092\u53cb\u9054\u3068\u5171\u6709\u3067\u304d\u307e\u3059\u3002<br \/>\n<iframe loading=\"lazy\" src=\"\/gps\" width=\"400\" height=\"400\" frameborder=\"0\">iframe\u5bfe\u5fdc\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>2013\u5e748\u67089\u65e5\u3092\u3082\u3063\u3066\u3001Google Latitude\u306e\u30b5\u30fc\u30d3\u30b9\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002 \u4eca\u307e\u3067\u306f\u3001\u3053\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3063\u3066\u3001\u81ea\u5206\u304c\u3069\u3053\u306b\u3044\u308b\u306e\u304b\u30d6\u30ed\u30b0\u30d1\u30fc\u30c4\u3067\u77e5\u3089\u305b\u3066\u3044\u307e\u3057\u305f\u3002 GPS\u5185\u8535\u306e\u643a\u5e2f\u3084\u30b9\u30de\u30db\u3092\u901a\u3058\u3066(\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[100],"tags":[43,36,41,40,109,107,38],"class_list":["post-1190","post","type-post","status-publish","format-standard","hentry","category-100","tag-google-latitude","tag-google-maps","tag-gps","tag-iphone","tag-javascript","tag-php","tag-38"],"_links":{"self":[{"href":"https:\/\/wtpmj.com\/index.php?rest_route=\/wp\/v2\/posts\/1190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wtpmj.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wtpmj.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wtpmj.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wtpmj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1190"}],"version-history":[{"count":5,"href":"https:\/\/wtpmj.com\/index.php?rest_route=\/wp\/v2\/posts\/1190\/revisions"}],"predecessor-version":[{"id":2462,"href":"https:\/\/wtpmj.com\/index.php?rest_route=\/wp\/v2\/posts\/1190\/revisions\/2462"}],"wp:attachment":[{"href":"https:\/\/wtpmj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wtpmj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wtpmj.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}