{"id":5724,"date":"2024-06-15T00:02:25","date_gmt":"2024-06-14T15:02:25","guid":{"rendered":"https:\/\/taitan916.info\/blog\/?p=5724"},"modified":"2024-06-14T23:54:53","modified_gmt":"2024-06-14T14:54:53","slug":"post-5724","status":"publish","type":"post","link":"https:\/\/taitan916.info\/blog\/archives\/5724","title":{"rendered":"JavaScript\u306e\u30de\u30c3\u30d7\u7528\u30e9\u30a4\u30d6\u30e9\u30ea\u300cMapLibre GL JS\u300d\u306e\u5229\u7528\u65b9\u6cd5"},"content":{"rendered":"<p>\u3042\u308b\u30b5\u30a4\u30c8\u3092Wappalyzer\u3067\u8abf\u67fb\u3057\u3066\u3044\u305f\u969b\u306b\u300cMapLibre GL JS\u300d\u3068\u3044\u3046JS\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u4f7f\u308f\u308c\u3066\u304a\u308a\u3001\u898b\u305f\u3053\u3068\u306e\u7121\u3044\u540d\u524d\u3060\u3063\u305f\u306e\u3067\u8abf\u3079\u305f\u3068\u3053\u308dLeaflet\u306e\u3088\u3046\u306a\u5730\u56f3\u7cfb\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u6a21\u69d8\u3002\u7c21\u5358\u306a\u4f7f\u3044\u65b9\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3068Leaflet\u3068\u306e\u6bd4\u8f03\u3092\u4ee5\u4e0b\u306b\u30e1\u30e2\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>MapLibre GL JS<\/h2>\n<h3>\u516c\u5f0f\u30b5\u30a4\u30c8<\/h3>\n<p><a href=\"https:\/\/maplibre.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/maplibre.org\/<\/a><\/p>\n<h3>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/h3>\n<p><a href=\"https:\/\/maplibre.org\/maplibre-gl-js\/docs\/\" target=\"_blank\" rel=\"noopener\">https:\/\/maplibre.org\/maplibre-gl-js\/docs\/<\/a><\/p>\n<h3>CDN<\/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;script src=\"https:\/\/unpkg.com\/maplibre-gl@3.1.0\/dist\/maplibre-gl.js\"&gt;&lt;\/script&gt;\r\n&lt;link href=\"https:\/\/unpkg.com\/maplibre-gl@3.1.0\/dist\/maplibre-gl.css\" rel=\"stylesheet\"&gt;<\/pre>\n<p>&nbsp;<\/p>\n<h2>\u30b5\u30f3\u30d7\u30eb<\/h2>\n<p><a href=\"https:\/\/taitan916.info\/sample\/MapLibre_GL_JS\/\" target=\"_blank\" rel=\"noopener\">https:\/\/taitan916.info\/sample\/MapLibre_GL_JS\/<\/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 id=\"map\"&gt;&lt;\/div&gt;\r\n&lt;script src=\"https:\/\/unpkg.com\/maplibre-gl@3.1.0\/dist\/maplibre-gl.js\"&gt;&lt;\/script&gt;\r\n&lt;link href=\"https:\/\/unpkg.com\/maplibre-gl@3.1.0\/dist\/maplibre-gl.css\" rel=\"stylesheet\"&gt;\r\n&lt;script&gt;\r\nconst position = [139.767125, 35.681236];\r\nconst map = new maplibregl.Map({\r\n    container: 'map',\r\n    style: {\r\n        version: 8,\r\n        sources: {\r\n            'raster-tiles': {\r\n                type: 'raster',\r\n                tiles: ['https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png'],\r\n                tileSize: 256,\r\n                attribution: '\u00a9 OpenStreetMap contributors'\r\n            }\r\n        },\r\n        layers: [{\r\n            id: 'simple-tiles',\r\n            type: 'raster',\r\n            source: 'raster-tiles',\r\n            minzoom: 0,\r\n            maxzoom: 22\r\n        }]\r\n    },\r\n    center: position,\r\n    zoom: 15\r\n});\r\nconst popup = new maplibregl.Popup({\r\n    offset: 25,\r\n    closeButton: false,\r\n}).setText('\u30de\u30fc\u30ab\u30fc');\r\n\r\nconst marker = new maplibregl.Marker().setLngLat(position).setPopup(popup).addTo(map);\r\n&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<h2>Leaflet\u3068\u306e\u6bd4\u8f03<\/h2>\n<h3>\u63cf\u5199\u65b9\u6cd5\u304c\u7570\u306a\u308b<\/h3>\n<p>Leaflet\u306fCanvas\u3001MapLibre GL JS\u306fWebGL\u3067\u63cf\u5199\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>WebGL\u306e\u65b9\u304c\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u826f\u3044\u3089\u3057\u304f\u3001<a href=\"https:\/\/qiita.com\/dayjournal\/items\/86e1ca065e03ea88e0fb\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089\u306e\u30b5\u30a4\u30c8<\/a>\u306b\u3088\u308b\u3068\u30de\u30c3\u30d7\u30dd\u30a4\u30f3\u30c8\u306e\u63cf\u5199\u304cLeaflet\u3060\u306810\u4e07\u4ef6\u3067\u8868\u793a\u3055\u308c\u306a\u304f\u306a\u308b\u304c\u3001MapLibre GL JS\u306e\u3060\u306845\u4e07\u4ef6\u3067\u3082\u8868\u793a\u3055\u308c\u308b\u3068\u306e\u3053\u3068\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u30de\u30fc\u30ab\u30fc\u3092\u5927\u91cf\u306b\u8a2d\u7f6e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u7b49\u3060\u3068Leaflet\u3088\u308aMapLibre GL JS\u306e\u65b9\u304c\u826f\u3055\u305d\u3046\u3002<\/p>\n<h3>Leaflet\u3088\u308a\u60c5\u5831\u91cf\u304c\u5c11\u306a\u76ee<\/h3>\n<p>Google\u691c\u7d22\u3057\u305f\u5834\u5408\u306bLeaflet\u3088\u308a\u60c5\u5831\u91cf\u304c\u5c11\u306a\u304f\u611f\u3058\u305f\u3002\u307e\u305f\u3001<a href=\"https:\/\/npmtrends.com\/leaflet-vs-maplibre-gl\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089\u306e\u30b5\u30a4\u30c8<\/a>\u306b\u3088\u308b\u3068Leaflet\u3088\u308a\u3082\u4eba\u6c17\u304c\u7121\u3044\u6a21\u69d8\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3042\u308b\u30b5\u30a4\u30c8\u3092Wappalyzer\u3067\u8abf\u67fb\u3057\u3066\u3044\u305f\u969b\u306b\u300cMapLibre GL JS ... <\/p>\n","protected":false},"author":1,"featured_media":1067,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4],"tags":[100],"class_list":["post-5724","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-library"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/5724","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=5724"}],"version-history":[{"count":1,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/5724\/revisions"}],"predecessor-version":[{"id":5725,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/5724\/revisions\/5725"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media\/1067"}],"wp:attachment":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media?parent=5724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/categories?post=5724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/tags?post=5724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}