{"id":3134,"date":"2013-11-05T09:15:59","date_gmt":"2013-11-05T00:15:59","guid":{"rendered":"https:\/\/gunmagisgeek.com\/wordpress\/?p=3134"},"modified":"2017-02-03T01:19:42","modified_gmt":"2017-02-02T16:19:42","slug":"post-3134","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/d3-js\/3134","title":{"rendered":"\u5730\u7406\u9662\u5730\u56f3\u306e\u5730\u56f3\u30bf\u30a4\u30eb\u3092\u4f7f\u3063\u305fD3.js&#038;Cesium\u30b5\u30f3\u30d7\u30eb"},"content":{"rendered":"<p>D3.js\u3067<a href=\"https:\/\/gunmagisgeek.com\/blog\/d3-js\/3029\">\u30e9\u30b9\u30bf\u30fc\u5730\u56f3\u306e\u30d1\u30f3\uff0f\u30ba\u30fc\u30e0\uff06\u79fb\u52d5<\/a>\u306e\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u9803\u306f\u3001\u307e\u3060\u300c\u96fb\u5b50\u56fd\u571fWeb.NEXT\u300d\u3060\u3063\u305f\u306e\u3067\u3001\u30bf\u30a4\u30eb\u753b\u50cf\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u308b\u306e\u304c\u975e\u5e38\u306b\u30e1\u30f3\u30c9\u30a6\u3060\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u300c\u5730\u7406\u9662\u5730\u56f3\u300d\u306b\u4ee3\u308f\u3063\u3066\u4e00\u822c\u7684\u306axyz\u65b9\u5f0f\u3067\u30bf\u30a4\u30eb\u753b\u50cf\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u8a73\u7d30\u306f\u4e0b\u8a18\u30da\u30fc\u30b8\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong><span class=\"removed_link\" title=\"http:\/\/portal.cyberjapan.jp\/help\/development.html\">\u5730\u7406\u9662\u5730\u56f3\u3000\u5730\u7406\u9662\u30bf\u30a4\u30eb\u3092\u7528\u3044\u305f\u958b\u767a<\/span><\/strong><\/p>\n<p>\u3060\u3044\u3076\u4f7f\u3044\u3084\u3059\u304f\u306a\u308a\u307e\u3057\u305f\u306d\u3002<br \/>\n<a href=\"http:\/\/openlayers.org\/\">OpenLayers<\/a>\u3084<a href=\"http:\/\/leafletjs.com\/\">Leaflet<\/a>\u3092\u7528\u3044\u305f\u30b5\u30f3\u30d7\u30eb\u306f\u516c\u5f0f\u30b5\u30a4\u30c8\u306b\u63b2\u8f09\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u3053\u3067\u306fD3\u3068Cesium\u3092\u4f7f\u3063\u305f\u30b5\u30f3\u30d7\u30eb\u3092\u8f09\u305b\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h2>D3\u30e9\u30b9\u30bf\u30fc\u30bf\u30a4\u30eb\u30b5\u30f3\u30d7\u30eb<\/h2>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"300\" scrolling=\"no\" src=\"http:\/\/shimz.me\/example\/d3js\/geo_template\/geoTile_chiriin\/\"><\/iframe><\/p>\n<pre class=\"lang:xhtml decode:true \" >&lt;script src=&quot;http:\/\/d3js.org\/d3.v3.min.js&quot;&gt;&lt;\/script&gt;\n&lt;script src=&quot;http:\/\/d3js.org\/d3.geo.tile.v0.min.js&quot;&gt;&lt;\/script&gt;\n<\/pre>\n<pre class=\"lang:js decode:true \" >(function(){\n\tvar width = Math.max(960, window.innerWidth);\n\tvar height = Math.max(500, window.innerHeight);\n\n\tvar tile = d3.geo.tile().size([width, height]);\n\n\tvar minZoomLevel = 14;\n\tvar maxZoomLevel = 20;\n\n\tvar projection = d3.geo.mercator()\n\t\t.scale((1 &lt;&lt; minZoomLevel) \/ 2 \/ Math.PI)\n\t\t.translate([width \/ 2, height \/ 2]);\n\n\tvar center = projection([139.3555791,34.7500396]);\n\n\n\tvar svg = d3.select(&quot;svg&quot;)\n\t\t.attr({\n\t\t&quot;width&quot;: width,\n\t\t&quot;height&quot;: height\n\t\t});\n\n\tvar raster = svg.append(&quot;g&quot;);\n\n\tvar zoomed = function() {\n\t\tvar tiles = tile\n\t\t.scale(zoom.scale())\n\t\t.translate(zoom.translate())\n\t\t();\n\t\t\t\n\t\tvar image = raster\n\t\t\t.attr(&quot;transform&quot;, &quot;scale(&quot; + tiles.scale + &quot;)translate(&quot; + tiles.translate + &quot;)&quot;)\n\t\t\t.selectAll(&quot;image&quot;).data(tiles, function(d) { return d; });\n\n\t\timage.exit().remove();\n\n\t\timage.enter().append(&quot;image&quot;)\n\t\t\t.attr(&quot;xlink:href&quot;, function(d) {\n\t\t\t\treturn &quot;http:\/\/cyberjapandata.gsi.go.jp\/xyz\/std\/&quot;+d[2]+&quot;\/&quot;+d[0]+&quot;\/&quot;+d[1]+&quot;.png&quot;;\n\t\t\t})\n\t\t\t.attr({\n\t\t\t\t&quot;width&quot;: 1,\n\t\t\t\t&quot;height&quot;: 1,\n\t\t\t\t&quot;x&quot;: function(d) { return d[0]; },\n\t\t\t\t&quot;y&quot;: function(d) { return d[1]; }\n\t\t\t})\n\n\t}\n\n\tvar zoom = d3.behavior.zoom()\n\t\t.scale(projection.scale() * 2 * Math.PI)\n\t\t.scaleExtent([1 &lt;&lt; minZoomLevel, 1 &lt;&lt; maxZoomLevel]) \/\/\u30b9\u30b1\u30fc\u30eb\u306e\u6700\u5c0f\u5024\u3001\u6700\u5927\u5024\u6307\u5b9a\n\t\t.translate([width - center[0], height - center[1]])\n\t\t.on(&quot;zoom&quot;, zoomed);\n\n\n\tprojection\n\t\t.scale(1 \/ 2 \/ Math.PI)\n\t\t.translate([0, 0]);\n\n\tsvg.call(zoom);\n\tzoomed();\n\n})();<\/pre>\n<p>\u307e\u3041\u3001\u30e9\u30b9\u30bf\u30fc\u5730\u56f3\u3092\u8868\u793a\u3059\u308b\u306a\u3089\u7d20\u76f4\u306bOpenLayers\u3084Leaflet\u4f7f\u3063\u305f\u65b9\u304c\u826f\u3044\u3068\u601d\u3044\u307e\u3059\u304c\u3002<\/p>\n<h2>cesium 3D\u5730\u56f3\u30b5\u30f3\u30d7\u30eb<\/h2>\n<p>\u203bWebGL\u306b\u5bfe\u5fdc\uff0f\u6709\u52b9\u306b\u3057\u305f\u30d6\u30e9\u30a6\u30b6\u3067\u306a\u3044\u3068\u898b\u308c\u307e\u305b\u3093\u3002<br \/>\n<iframe loading=\"lazy\" width=\"100%\" height=\"400\" scrolling=\"no\" src=\"http:\/\/shimz.me\/example\/cesium\/chiriin\/\"><\/iframe><\/p>\n<pre class=\"lang:js decode:true \" >var widget = new Cesium.CesiumWidget('cesiumContainer', {\n\timageryProvider : new Cesium.OpenStreetMapImageryProvider({\n\t\turl : 'http:\/\/cyberjapandata.gsi.go.jp\/xyz\/std\/', \/\/\u5730\u7406\u9662\u5730\u56f3\u3092\u6307\u5b9a\n\t\tcredit : '\u5730\u7406\u9662\u5730\u56f3'\t\n\t})\n});<\/pre>\n<p>\u3061\u3087\u30fc\u7c21\u5358\uff01<br \/>\nOpenLayers\u306e\u30b5\u30a4\u30c8\u3092\u898b\u3066\u3044\u305f\u3089\u3001OpenLayers 3.0\u306b\u306fCesium\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u542b\u307e\u308c\u308b\u3089\u3057\u3044\u306e\u3067\u3001\u4eca\u306e\u3046\u3061\u306b\u52c9\u5f37\u3057\u3066\u304a\u3044\u3066\u3082\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>D3.js\u3067\u30e9\u30b9\u30bf\u30fc\u5730\u56f3\u306e\u30d1\u30f3\uff0f\u30ba\u30fc\u30e0\uff06\u79fb\u52d5\u306e\u8a18\u4e8b&hellip;<\/p>\n","protected":false},"author":1,"featured_media":3135,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,18],"tags":[],"class_list":["post-3134","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cesium","category-d3-js","has-post-thumbnail-archive"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/3134","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=3134"}],"version-history":[{"count":1,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/3134\/revisions"}],"predecessor-version":[{"id":3254,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/3134\/revisions\/3254"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media\/3135"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=3134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=3134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=3134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}