{"id":6141,"date":"2024-07-17T11:21:29","date_gmt":"2024-07-17T02:21:29","guid":{"rendered":"https:\/\/taitan916.info\/blog\/?p=6141"},"modified":"2024-05-08T18:41:03","modified_gmt":"2024-05-08T09:41:03","slug":"post-6141","status":"publish","type":"post","link":"https:\/\/taitan916.info\/blog\/archives\/6141","title":{"rendered":"Leaflet\u3067\u8868\u793a\u3057\u305f\u30de\u30c3\u30d7\u306b\u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5(Leaflet.GestureHandling)"},"content":{"rendered":"<p>GoogleMap\u3092\u30ba\u30fc\u30e0\u3059\u308b\u969b\u306bPC\u3060\u3068\u300cCtrl\uff0b\u30b9\u30af\u30ed\u30fc\u30eb\u300d\u3001\u30b9\u30de\u30db\u3060\u3068\u300c2\u672c\u6307\u3067\u30d4\u30f3\u30c1\u30a2\u30a6\u30c8\u300d\u3068\u3044\u3046\u98a8\u306b\u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u304c\u3064\u3044\u3066\u304a\u308a\u3001\u3053\u306e\u6a5f\u80fd\u3092Leaflet\u306e\u30de\u30c3\u30d7\u306b\u3082\u5b9f\u88c5\u3057\u305f\u3044\u3002\u300cLeaflet.GestureHandling\u300d\u3068\u3044\u3046\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u5b9f\u88c5\u3067\u304d\u308b\u6a21\u69d8\u3002\u4ee5\u4e0b\u306b\u5bfe\u5fdc\u65b9\u6cd5\u3092\u30e1\u30e2\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>Leaflet.GestureHandling<\/h2>\n<h3>GitHub<\/h3>\n<p><a href=\"https:\/\/github.com\/elmarquis\/Leaflet.GestureHandling\/\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/elmarquis\/Leaflet.GestureHandling\/<\/a><\/p>\n<h3>\u30c7\u30e2\u30da\u30fc\u30b8<\/h3>\n<p><a href=\"https:\/\/elmarquis.github.io\/Leaflet.GestureHandling\/examples\/\" target=\"_blank\" rel=\"noopener\">https:\/\/elmarquis.github.io\/Leaflet.GestureHandling\/examples\/<\/a><\/p>\n<h3><span id=\"CDN\">CDN<\/span><\/h3>\n<p>CDN\u3067\u4f7f\u3046\u5834\u5408\u306f\u4ee5\u4e0b\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet-gesture-handling\/dist\/leaflet-gesture-handling.min.css\" type=\"text\/css\"&gt;\r\n&lt;script src=\"https:\/\/unpkg.com\/leaflet-gesture-handling\"&gt;&lt;\/script&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h2>\u30b5\u30f3\u30d7\u30eb<\/h2>\n<p><a href=\"https:\/\/taitan916.info\/sample\/leaflet.js\/plugin\/leaflet-gesture-handling\/\" target=\"_blank\" rel=\"noopener\">https:\/\/taitan916.info\/sample\/leaflet.js\/plugin\/leaflet-gesture-handling\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;div class=\"contents\"&gt;\u30b5\u30a4\u30c8\u30b3\u30f3\u30c6\u30f3\u30c4&lt;\/div&gt;\r\n\r\n&lt;div id=\"map\"&gt;&lt;\/div&gt;\r\n\r\n&lt;div class=\"contents\"&gt;\u30b5\u30a4\u30c8\u30b3\u30f3\u30c6\u30f3\u30c4&lt;\/div&gt;\r\n\r\n&lt;link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/leaflet\/1.9.4\/leaflet.css\"\/&gt;\r\n&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/leaflet\/1.9.4\/leaflet.js\"&gt;&lt;\/script&gt;\r\n\r\n&lt;link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet-gesture-handling\/dist\/leaflet-gesture-handling.min.css\" type=\"text\/css\"&gt;\r\n&lt;script src=\"https:\/\/unpkg.com\/leaflet-gesture-handling\"&gt;&lt;\/script&gt;\r\n\r\n&lt;script&gt;\r\nlet map;\r\nmap = L.map('map', {\r\n    gestureHandling: true, \/\/\u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u5316\r\n});\r\n\r\n\/\/\u4e2d\u5fc3\u306e\u7d4c\u5ea6\u7def\u5ea6\r\nconst center = ['35.681236', '139.767125'];\r\n\r\n\/\/\u30ba\u30fc\u30e0\u30ec\u30d9\u30eb\r\nconst zoom = 12;\r\n\r\n\/\/\u30de\u30c3\u30d7\u306e\u4e2d\u5fc3\u5730\u3068\u30ba\u30fc\u30e0\u30ec\u30d9\u30eb\u3092\u6307\u5b9a\r\nmap.setView(center, zoom);\r\n\r\nconst tileLayer = L.tileLayer('https:\/\/{s}.tile.openstreetmap.org\/{z}\/{x}\/{y}.png',{\r\n    attribution: '\u00a9 &lt;a href=\"http:\/\/osm.org\/copyright\"&gt;OpenStreetMap&lt;\/a&gt; contributors',\r\n    maxZoom: 19\r\n});\r\ntileLayer.addTo(map);\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u300cgestureHandling:true\u300d\u3092\u6307\u5b9a\u3059\u308b\u3068\u6709\u52b9\u306b\u306a\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GoogleMap\u3092\u30ba\u30fc\u30e0\u3059\u308b\u969b\u306bPC\u3060\u3068\u300cCtrl\uff0b\u30b9\u30af\u30ed\u30fc\u30eb\u300d\u3001\u30b9\u30de\u30db\u3060\u3068\u300c ... <\/p>\n","protected":false},"author":1,"featured_media":5571,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4],"tags":[101],"class_list":["post-6141","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-leaflet"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/6141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/comments?post=6141"}],"version-history":[{"count":1,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/6141\/revisions"}],"predecessor-version":[{"id":6142,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/6141\/revisions\/6142"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media\/5571"}],"wp:attachment":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media?parent=6141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/categories?post=6141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/tags?post=6141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}