{"id":152,"date":"2008-01-22T20:59:02","date_gmt":"2008-01-22T11:59:02","guid":{"rendered":"http:\/\/ke-tai.org\/blog\/2008\/01\/22\/ketaigmap\/"},"modified":"2008-01-23T10:11:41","modified_gmt":"2008-01-23T01:11:41","slug":"ketaigmap","status":"publish","type":"post","link":"http:\/\/ke-tai.org\/blog\/2008\/01\/22\/ketaigmap\/","title":{"rendered":"Asial blog\u306b\u643a\u5e2f\u304b\u3089GoogleMap\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306ePHP\u30af\u30e9\u30b9\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059"},"content":{"rendered":"<p>\u5148\u65e5\u3082<a href=\"http:\/\/ke-tai.org\/blog\/2008\/01\/17\/emoji_json\/\">\u3054\u7d39\u4ecb<\/a>\u3057\u305f\u3070\u304b\u308a\u306eAsial blog\u306b\u3001\u30b1\u30fc\u30bf\u30a4\u3067GoogleMap\u3092\u624b\u8efd\u306b\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u3001PHP\u30af\u30e9\u30b9\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u2192\u3000<a href=\"http:\/\/blog.asial.co.jp\/332\" target=\"_blank\">Asial blog\u3000\u643a\u5e2f\u3067GoogleMap\u3092\u624b\u8efd\u306b\u8868\u793a\u3059\u308bPHP\u30af\u30e9\u30b9<\/a> <small>[asial.co.jp]<\/small><\/p>\n<p class=\"spacer-small\">&nbsp;<\/p>\n<p>\u3054\u5b58\u77e5\u306e\u901a\u308aGoogleMap\u306f\u3001PC\u7248\u3067\u306fJavaScript\u3092\u4f7f\u3063\u3066\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u30b1\u30fc\u30bf\u30a4\u3067\u306fJavaScript\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u753b\u50cf\u3068\u3057\u3066\u51fa\u529b\u3059\u308b\u3053\u3068\u3067\u5730\u56f3\u3092\u8868\u793a\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u5b9f\u969b\u306bAsial blog\u306b\u3042\u308b\u30b3\u30fc\u30c9\u3092\u5229\u7528\u3057\u3066\u3001\u30b1\u30fc\u30bf\u30a4\u304b\u3089\u5730\u56f3\u3092\u8868\u793a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>(1) \u300cGoogleMobileMapView.php\u300d\u3092\u4f5c\u6210<\/strong><br \/>\nAsial blog\u4e0a\u306eGoogleMobileMapView\u30af\u30e9\u30b9\u3092\u30b3\u30d4\u30da\u3057\u3066\u3001PHP\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308a\u307e\u3059\u3002<br \/>\n\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u300cGoogleMobileMapView.php\u300d\u3068\u3057\u307e\u3057\u305f\u3002<br \/>\n\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306fPHP5\u7528\u306a\u306e\u3067\u3001PHP4\u3067\u52d5\u304f\u3088\u3046\u306b\u6b21\u306e\u7b87\u6240\u3092\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<small><br \/>\n\u30fb\u300cprivate\u300d\u300cpublic\u300d\u306a\u3069\u3092\u53d6\u308a\u9664\u304f<br \/>\n\u30fb\u30af\u30e9\u30b9\u5909\u6570\uff085\uff5e8\u884c\u76ee\uff09\u306e\u524d\u306b\u300cvar\u300d\u3092\u4ed8\u3051\u308b<br \/>\n<\/small><\/p>\n<p><strong>(2) \u8868\u793a\u7528\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u300cindex.php\u300d\u3092\u4f5c\u308b<\/strong><br \/>\n\u3053\u3061\u3089\u306f\u30b5\u30f3\u30d7\u30eb\u3092\u5143\u306b\u5c11\u3057\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<br \/>\n\uff08\u30c9\u30b3\u30e2\u306e\u5834\u5408\u306fGIF\u3001\u305d\u306e\u4ed6\u306e\u5834\u5408\u306fPNG\u3092\u51fa\u529b\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\uff09<br \/>\n\u4fee\u6b63\u5f8c\u306e\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"super-pre-small\"><code>&lt;?php\r\n\/\/ GoogleMobileMapView\u30af\u30e9\u30b9\u306e\u8aad\u307f\u8fbc\u307f\r\nrequire_once (\".\/GoogleMobileMapView.php\");\r\n\r\n\/\/ \u30de\u30fc\u30ab\u30fc\u306e\u5ea7\u6a19\u3092\u6307\u5b9a\r\n$points = array();\r\n$points[] = array(\r\n\t'latitude' =&gt; 43068637,\r\n\t'longitude' =&gt; 141350795,\r\n\t'iconid' =&gt; 15\r\n);\r\n\r\n\/\/ DoCoMo\u306fGIF\u3001\u305d\u308c\u4ee5\u5916\u306fPNG\r\nif (preg_match('\/^DoCoMo\/', $_SERVER['HTTP_USER_AGENT'])) {\r\n\t$img_format = '1';\r\n} else {\r\n\t$img_format = '2';\r\n}\r\n\r\n\/\/ \u8868\u793a\u30b5\u30a4\u30ba\u3001\u30ba\u30fc\u30e0\u3092\u8a2d\u5b9a\r\n$img_arr = array(\r\n\t'w' =&gt; 220,\r\n\t'h' =&gt; 300,\r\n\t'z'=&gt; 2,\r\n\t'image_format' =&gt; $img_format\r\n);\r\n\r\n\/\/ \u8868\u793a\u51e6\u7406\r\n$gmap = new GoogleMobileMapView();\r\n$gmap-&gt;setUrl(43068637, 141350795, $img_arr, $points);\r\n$gmap-&gt;viewPicture();\r\n?&gt;\r\n<\/code><\/pre>\n<p><strong>(3) \u30b1\u30fc\u30bf\u30a4\u304b\u3089index.php\u3092\u8868\u793a\u3059\u308b<\/strong><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ke-tai.org\/blog\/wp-content\/uploads\/2008\/01\/ketaigmap.jpg\" alt=\"ketaigmap.jpg\" \/><\/p>\n<p>\u3070\u3063\u3061\u308a\u8868\u793a\u3055\u308c\u3066\u307e\u3059\u3002<br \/>\n\u7d20\u6674\u3089\u3057\u3044\u3067\u3059\u306d\u3002<br \/>\n\u30de\u30fc\u30ab\u30fc\u306e\u5ea7\u6a19\u3082\u914d\u5217\u3067\u8907\u6570\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u3053\u306eGoogleMap\u306e\u8868\u793a\u306b\u4f7f\u3063\u3066\u3044\u308bAPI\u306b\u3064\u3044\u3066\u306e\u89e3\u8aac\u306f\u3001\u3053\u3061\u3089\u304c\u8a73\u3057\u3044\u3068\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u2192\u3000<a href=\"http:\/\/labs.anoncom.net\/others\/GoogleMap\/MobileImage.html\" target=\"_blank\">anoncom.Lab.\u3000Google map\u306e\u5730\u56f3\u753b\u50cf\u3092\u643a\u5e2f\u304b\u3089\u5229\u7528\u3059\u308b\u65b9\u6cd52<\/a> <small>[anoncom.net]<\/small><\/p>\n<p class=\"spacer\">&nbsp;<\/p>\n<p><strong><em>\u95a2\u9023\uff1a<\/em><\/strong><\/p>\n<ul>\n<li><em><a href=\"http:\/\/ke-tai.org\/blog\/2008\/01\/17\/emoji_json\/\">Asial blog\u3067\u7d75\u6587\u5b57\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u76f8\u4e92\u5909\u63db\u30de\u30c3\u30d4\u30f3\u30b0\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eJSON\u30d5\u30a1\u30a4\u30eb\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059<\/a><\/em><\/li>\n<li><em><a href=\"http:\/\/ke-tai.org\/blog\/2007\/12\/10\/googlechart\/\">\u300cGoogle Chart API\u300d\u3092\u30b1\u30fc\u30bf\u30a4\u304b\u3089\u4f7f\u3063\u3066\u307f\u308b<\/a><\/em><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u65e5\u3082\u3054\u7d39\u4ecb\u3057\u305f\u3070\u304b\u308a\u306eAsial blog\u306b\u3001\u30b1\u30fc\u30bf\u30a4\u3067GoogleMap\u3092\u624b\u8efd\u306b\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u3001PHP\u30af\u30e9\u30b9\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u2192\u3000Asial blog\u3000\u643a\u5e2f\u3067GoogleMap\u3092\u624b\u8efd\u306b\u8868\u793a\u3059\u308bPH [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,10],"tags":[],"_links":{"self":[{"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/posts\/152"}],"collection":[{"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/comments?post=152"}],"version-history":[{"count":0,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/posts\/152\/revisions"}],"wp:attachment":[{"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/media?parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/categories?post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/tags?post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}