{"id":4142,"date":"2015-03-16T14:37:12","date_gmt":"2015-03-16T05:37:12","guid":{"rendered":"https:\/\/gunmagisgeek.com\/wordpress\/?p=4142"},"modified":"2017-02-07T17:45:43","modified_gmt":"2017-02-07T08:45:43","slug":"post-4142","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/leaflet-js\/4142","title":{"rendered":"\u306c\u308b\u306c\u308b\u52d5\u304f\uff01Web\u5730\u56f3\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u300cLeaflet\u300d\u3092\u4f7f\u304a\u3046\uff01"},"content":{"rendered":"<p>D3.js\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u3082\u4f7f\u3044\u3084\u3059\u3044\u3001Web\u5730\u56f3\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5927\u672c\u547d\u2026\u2026\u3060\u3068\u3001\u500b\u4eba\u7684\u306b\u306f\u601d\u3063\u3066\u308b\u2026\u2026\u305f\u3076\u3093\u3002<\/p>\n<p><a href=\"http:\/\/leafletjs.com\/\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2015\/03\/leafletquickstart150316.jpg\" alt=\"leaflet quickstart\" width=\"666\" height=\"425\" class=\"aligncenter size-full wp-image-4143 border\" srcset=\"https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2015\/03\/leafletquickstart150316.jpg 666w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2015\/03\/leafletquickstart150316-235x150.jpg 235w\" sizes=\"auto, (max-width: 666px) 100vw, 666px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/leafletjs.com\/\">leaflet<\/a><\/p>\n<h2>leaflet.js\u3068\u306f\u4f55\u304b<\/h2>\n<p>leaflet\u306fWeb\u4e0a\u3067\u5730\u56f3\u3092\u8868\u793a\u3059\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30de\u30c3\u30d7\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<br \/>\n\u8efd\u91cf\u3067\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u306a\u3069\u306e\u30bf\u30c3\u30c1\u64cd\u4f5c\u306b\u3082\u5bfe\u5fdc\u3057\u305f\u5730\u56f3\u3092\u624b\u8efd\u306b\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30e6\u30fc\u30b6\u30fc\u306b\u3088\u3063\u3066\u69d8\u3005\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u7279\u5fb4\u3067\u3001\u305d\u308c\u3089\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u591a\u69d8\u306a\u8868\u73fe\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u300c\u5730\u56f3\u306a\u3093\u3066Google Maps API\u3067\u5341\u5206\u3058\u3083\u306d\uff1f\u300d\u3068\u3044\u3046\u65b9\u3082\u3001\u4e00\u5ea6\u89e6\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305d\u3093\u306a\u8a33\u3067\u3001\u7c21\u5358\u306a\u300cLeaflet \u30af\u30a4\u30c3\u30af\u30b9\u30bf\u30fc\u30c8\u300d\u7684\u306a\u3082\u306e\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h2>\u30d9\u30fc\u30b9\u30de\u30c3\u30d7\u306e\u4f5c\u6210<\/h2>\n<p> cdn\u304b\u3089css\u30d5\u30a1\u30a4\u30eb\u3068js\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"lang:xhtml decode:true \" >&lt;link rel=\"stylesheet\" href=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/leaflet.css\" \/&gt;\r\n&lt;script src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/leaflet.js\"&gt;&lt;\/script&gt;<\/pre>\n<p>body\u30bf\u30b0\u5185\u306b\u5730\u56f3\u3092\u8868\u793a\u3059\u308bdiv\u8981\u7d20\u3092\u8a2d\u7f6e\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true \" >&lt;div id=\"map\"&gt;&lt;\/div&gt;<\/pre>\n<p>\u3053\u308c\u3067\u6e96\u5099\u5b8c\u4e86\u3002\u307e\u305a\u306f\u30aa\u30fc\u30d7\u30f3\u30b9\u30c8\u30ea\u30fc\u30c8\u30de\u30c3\u30d7\u306e\u5730\u56f3\u30bf\u30a4\u30eb\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"300\" scrolling=\"no\" src=\"\/\/shimz.me\/example\/leaflet\/QuickStart\/01\/\"><\/iframe><\/p>\n<p><a href=\"\/\/shimz.me\/example\/leaflet\/QuickStart\/01\/\">example<\/a><\/p>\n<pre class=\"lang:js decode:true \" >var map = L.map('map').setView([36.3219088\u3000, 139.0032936], 14);\r\n\r\n\/\/OSM\u30ec\u30a4\u30e4\u30fc\u8ffd\u52a0\r\nL.tileLayer(\r\n\t'http:\/\/{s}.tile.openstreetmap.org\/{z}\/{x}\/{y}.png',\r\n\t{\r\n\t\tattribution: 'Map data &amp;copy; &lt;a href=\"http:\/\/openstreetmap.org\"&gt;OpenStreetMap&lt;\/a&gt;',\r\n\t\tmaxZoom: 18\r\n\t}\r\n).addTo(map);<\/pre>\n<p>\u3068\u3066\u3082\u7c21\u5358\u3002<\/p>\n<h2>\u5730\u7406\u9662\u5730\u56f3\u3092\u4f7f\u3046<\/h2>\n<p>\u6b21\u306b\u5225\u306e\u30bf\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u5730\u56f3\u30bf\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u4f8b\u3068\u3057\u3066\u3001\u5730\u7406\u9662\u5730\u56f3\u3092\u4f7f\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"300\" scrolling=\"no\" src=\"\/\/shimz.me\/example\/leaflet\/QuickStart\/02\/\"><\/iframe><\/p>\n<p><a href=\"\/\/shimz.me\/example\/leaflet\/QuickStart\/02\/\">example<\/a><\/p>\n<pre class=\"lang:js decode:true \" >var map = L.map('map').setView([36.3219088\u3000, 139.0032936], 14);\r\n\r\n\/\/\u5730\u7406\u9662\u5730\u56f3\u30ec\u30a4\u30e4\u30fc\u8ffd\u52a0\r\nL.tileLayer(\r\n\t'http:\/\/cyberjapandata.gsi.go.jp\/xyz\/std\/{z}\/{x}\/{y}.png',\r\n\t{\r\n\t\tattribution: \"&lt;a href='http:\/\/www.gsi.go.jp\/kikakuchousei\/kikakuchousei40182.html' target='_blank'&gt;\u56fd\u571f\u5730\u7406\u9662&lt;\/a&gt;\"\r\n\t}\r\n).addTo(map);<\/pre>\n<h2>\u30de\u30fc\u30ab\u30fc\u306e\u8ffd\u52a0<\/h2>\n<p>\u5730\u56f3\u306e\u57fa\u672c\u30de\u30fc\u30ab\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"300\" scrolling=\"no\" src=\"\/\/shimz.me\/example\/leaflet\/QuickStart\/03\/\"><\/iframe><\/p>\n<p><a href=\"\/\/shimz.me\/example\/leaflet\/QuickStart\/03\/\">example<\/a><\/p>\n<pre class=\"lang:js decode:true \" >var map = L.map('map').setView([36.3219088\u3000, 139.0032936], 14);\r\n\r\n\/\/\u5730\u7406\u9662\u5730\u56f3\u30ec\u30a4\u30e4\u30fc\u8ffd\u52a0\r\nL.tileLayer(\r\n\t'http:\/\/cyberjapandata.gsi.go.jp\/xyz\/std\/{z}\/{x}\/{y}.png',\r\n\t{\r\n\t\tattribution: \"&lt;a href='http:\/\/www.gsi.go.jp\/kikakuchousei\/kikakuchousei40182.html' target='_blank'&gt;\u56fd\u571f\u5730\u7406\u9662&lt;\/a&gt;\"\r\n\t}\r\n).addTo(map);\r\n\r\n\/\/\u30de\u30fc\u30ab\u30fc\u8ffd\u52a0\r\nvar marker = L.marker([36.3219088\u3000, 139.0032936]).addTo(map);<\/pre>\n<h2>\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306e\u8ffd\u52a0<\/h2>\n<p>\u6700\u5f8c\u306b\u30de\u30fc\u30ab\u30fc\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u969b\u306b\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"300\" scrolling=\"no\" src=\"\/\/shimz.me\/example\/leaflet\/QuickStart\/04\/\"><\/iframe><\/p>\n<p><a href=\"\/\/shimz.me\/example\/leaflet\/QuickStart\/04\/\">example<\/a><\/p>\n<pre class=\"lang:js decode:true \" >var map = L.map('map').setView([36.3219088\u3000, 139.0032936], 14);\r\n\r\n\/\/\u5730\u7406\u9662\u5730\u56f3\u30ec\u30a4\u30e4\u30fc\u8ffd\u52a0\r\nL.tileLayer(\r\n\t'http:\/\/cyberjapandata.gsi.go.jp\/xyz\/std\/{z}\/{x}\/{y}.png',\r\n\t{\r\n\t\tattribution: \"&lt;a href='http:\/\/www.gsi.go.jp\/kikakuchousei\/kikakuchousei40182.html' target='_blank'&gt;\u56fd\u571f\u5730\u7406\u9662&lt;\/a&gt;\"\r\n\t}\r\n).addTo(map);\r\n\r\n\/\/\u30de\u30fc\u30ab\u30fc\uff06\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u8ffd\u52a0\r\nvar marker = L.marker([36.3219088\u3000, 139.0032936])\r\n\t.bindPopup(\"&lt;h1&gt;Hello! Leaflet!&lt;\/h1&gt;\")\r\n\t.addTo(map);<\/pre>\n<p>\u3068\u308a\u3042\u3048\u305a\u3053\u3053\u307e\u3067\u3002<\/p>\n<h2>\u5099\u8003<\/h2>\n<p>\u4eca\u307e\u3067\u3061\u3087\u304f\u3061\u3087\u304f\u4f7f\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3042\u3093\u307e\u308a\u3061\u3083\u3093\u3068\u7d39\u4ecb\u3057\u305f\u3053\u3068\u304c\u306a\u304b\u3063\u305f\u306a\u30fc\u3068\u601d\u3063\u3066\u7d39\u4ecb\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u500b\u4eba\u7684\u306b\u306f\u4f7f\u3044\u3053\u306a\u3057\u305f\u3044Web\u5730\u56f3\u30e9\u30a4\u30d6\u30e9\u30eaNo.1\u306a\u306e\u3067\u3001\u4eca\u5f8c\u3082\u3044\u308d\u3044\u308d\u3068\u8a66\u3057\u305f\u3053\u3068\u306a\u3093\u304b\u3092\u30d6\u30ed\u30b0\u306b\u8a18\u9332\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u4eca\u307e\u3067\u306eleaflet\u8a18\u4e8b\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u304b\u3089\u3069\u3046\u305e\u3002<\/p>\n<p><a href=\"\/\/gunmagisgeek.com\/blog\/category\/leaflet-js\">leaflet.js\u8a18\u4e8b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>D3.js\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u3082\u4f7f\u3044\u3084\u3059\u3044\u3001Web\u5730\u56f3\u30af&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4143,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-4142","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-leaflet-js","has-post-thumbnail-archive"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/4142","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=4142"}],"version-history":[{"count":0,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/4142\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media\/4143"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=4142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=4142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=4142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}