{"id":2151,"date":"2012-12-20T09:24:16","date_gmt":"2012-12-20T00:24:16","guid":{"rendered":"https:\/\/gunmagisgeek.com\/wordpress\/?p=2151"},"modified":"2013-12-29T21:05:36","modified_gmt":"2013-12-29T12:05:36","slug":"post-2151","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/google-map-api\/2151","title":{"rendered":"Google Map\u4e0a\u306b\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u3092\u8868\u793a\u3059\u308b"},"content":{"rendered":"<p><a href=\"http:\/\/nlftp.mlit.go.jp\/ksj\/\">\u56fd\u571f\u6570\u5024\u60c5\u5831<\/a>\u30b5\u30a4\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f<a href=\"http:\/\/nlftp.mlit.go.jp\/ksj\/gml\/datalist\/KsjTmplt-L02-v2_1.html\">\u90fd\u9053\u5e9c\u770c\u5730\u4fa1\u8abf\u67fb\u30c7\u30fc\u30bf(\u70b9)<\/a>\u3092\u5143\u306bGoogle Map\u4e0a\u306b\u7fa4\u99ac\u770c\u306e\u5730\u4fa1\u30c7\u30fc\u30bf\u3092\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u3067\u8868\u793a\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"http:\/\/shimz.me\/example\/gmapv3\/06\/\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2012\/12\/WSmm000000-300x141.jpg\" alt=\"WSmm000000\" width=\"300\" height=\"141\" class=\"aligncenter size-medium wp-image-2152\" srcset=\"https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2012\/12\/WSmm000000-300x141.jpg 300w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2012\/12\/WSmm000000.jpg 541w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u56fd\u571f\u6570\u5024\u60c5\u5831\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30c7\u30fc\u30bf\u3092KML\u306b\u30b3\u30f3\u30d0\u30fc\u30c8\u3057\u3001\u3055\u3089\u306bJavascript\u306e\u914d\u5217\u306b\u5909\u66f4(\u624b\u52d5)\u3057\u3066\u307e\u3059\u3002<br \/>\n\uff08\u3076\u3063\u3061\u3083\u3051JPGIS(XML)\u304b\u3089\u3001\u76f4\u63a5JavaScript\u306e\u914d\u5217\u306b\u5909\u63db\u3057\u305f\u65b9\u304c\u697d\u3060\u3063\u305f\u3088\u3046\u306a\u6c17\u3082\u2026\uff09<br \/>\nKML\u5f62\u5f0f\u3078\u306e\u5909\u63db\u306e\u4ed5\u65b9\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/gunmagisgeek.com\/blog\/map\/2135\">Google Map\u4e0a\u306b\u5b66\u6821\u533a\u60c5\u5831\uff08\u56fd\u571f\u6570\u5024\u60c5\u5831\uff09\u3092\u8868\u793a\u3059\u308b<\/a><\/p>\n<p>\u203b\u8ffd\u8a18<br \/>\nQuantum GIS\u3067geoJSON\u5f62\u5f0f\u3067\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u305d\u3063\u3061\u3092\u4f7f\u3046\u65b9\u304c\u3089\u304f\u3067\u3057\u305f\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u3055\u3048\u3067\u304d\u3066\u3057\u307e\u3048\u3070\u3001\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u3092\u8868\u793a\u3059\u308b\u306e\u306f\u7c21\u5358\u3067\u3059\u3002<br \/>\nHeatmapLayer\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001libraries=visualization\u3092\u4ed8\u52a0\u3057\u3066Google Map API\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"lang:xhtml decode:true \" >&lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/maps.googleapis.com\/maps\/api\/js?sensor=false&amp;v=3&amp;language=ja&amp;libraries=visualization&quot;&gt;&lt;\/script&gt;\r\n<\/pre>\n<pre class=\"lang:js decode:true \" title=\"GMAP API HeatmapLayer\" >var data = []; \r\ndata =  [\r\n{&quot;surveyedPrice&quot;:31500,pos:[138.549837,36.534579]},\r\n{&quot;surveyedPrice&quot;:19600,pos:[138.552933,36.537296]},\r\n{&quot;surveyedPrice&quot;:4950,pos:[138.564714,36.461183]},\r\n{&quot;surveyedPrice&quot;:22800,pos:[138.585049,36.59217]},\r\n{&quot;surveyedPrice&quot;:5300,pos:[138.585787,36.508158]},\r\n{&quot;surveyedPrice&quot;:172000,pos:[138.590885,36.521871]},\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u30fb\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u30fb\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u30fb\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u30fb\r\n{&quot;surveyedPrice&quot;:23800,pos:[139.61774,36.220006]}\r\n];\r\n\r\n\r\nfunction initialize() {\r\n    \/\/\u5730\u56f3\u521d\u671f\u5316\r\n    var initPos = new google.maps.LatLng(36.3219088, 139.0032936);\r\n    var myOptions = {\r\n      noClear : true,\r\n      center : initPos,\r\n      zoom : 10,\r\n      mapTypeId : google.maps.MapTypeId.ROADMAP\r\n    };\r\n    var map_canvas = new google.maps.Map(document.getElementById(&quot;map_canvas&quot;), myOptions);    \r\n    \r\n    \r\n    \r\n    \/\/\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u7528\u306e\u30c7\u30fc\u30bf\u306e\u4f5c\u6210\r\n    var bounds = new google.maps.LatLngBounds();\r\n    var  pos, populations = [];\r\n    for (var i=0; i &lt; data.length; i++) {\r\n        pos = new google.maps.LatLng(data[i].pos[1], data[i].pos[0]);\r\n        populations.push({\r\n            location : pos,\r\n            weight : data[i].surveyedPrice \/\/\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u306e\u91cd\u307f\u4ed8\u3051\u306b\u4f7f\u7528\u3059\u308b\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\r\n        })\r\n        bounds.extend(pos); \r\n    }\r\n    map_canvas.fitBounds(bounds); \/\/\u5168\u3066\u306e\u30c7\u30fc\u30bf\u304c\u753b\u9762\u306b\u53ce\u307e\u308b\u69d8\u306b\u8868\u793a\u3092\u5909\u66f4\r\n\r\n    \/\/\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u30ec\u30a4\u30e4\u306e\u4f5c\u6210\r\n    var heatmap = new google.maps.visualization.HeatmapLayer({\r\n            radius:25 \/\/\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u306e\u5404\u30dd\u30a4\u30f3\u30c8\u306e\u5927\u304d\u3055\r\n        });\r\n    \r\n    heatmap.setData(populations);\r\n    heatmap.setMap(map_canvas);\r\n\r\n \r\n}\r\ngoogle.maps.event.addDomListener(window, &quot;load&quot;, initialize);\r\n\r\n <\/pre>\n<p><a href=\"http:\/\/shimz.me\/example\/gmapv3\/06\/\">example<\/a><\/p>\n<p>\u3010\u53c2\u8003\u3011<br \/>\n<a href=\"https:\/\/developers.google.com\/maps\/documentation\/javascript\/layers#JSHeatMaps\">Google Developers &#8211; Google Maps JavaScript API v3  Heatmap Layer<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56fd\u571f\u6570\u5024\u60c5\u5831\u30b5\u30a4\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u90fd\u9053\u5e9c\u770c\u5730\u4fa1&hellip;<\/p>\n","protected":false},"author":1,"featured_media":2152,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-2151","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-map-api","has-post-thumbnail-archive"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/2151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/comments?post=2151"}],"version-history":[{"count":24,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/2151\/revisions"}],"predecessor-version":[{"id":2167,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/2151\/revisions\/2167"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media\/2152"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=2151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=2151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=2151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}