Language
Login
Language Setting
X
English
日本語 [Japanese]
about this App
地震マップ
useful
1
Loading...
var map; var earthquake_data_all; function initialize(lat, lon) { var myLatLng = new google.maps.LatLng(lat, lon); var mapOptions = { center: myLatLng, zoom: 6, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); // 地震データの読み込み earthquake_data_all = new Array(); // Work loop $.each(LinkData.getWorks(), function(workKey, workValue) { // File loop $.each(LinkData.getFiles(workValue), function(fileKey, fileValue) { // Subject loop $.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) { var earthquake_data = {} earthquake_data["id"] = subjValue; $.each(LinkData.getProperties(workValue, fileValue), function(propKey, propValue) { $.each(LinkData.getObjects(workValue, fileValue, subjValue, propValue), function(objKey, objValue) { if(propValue == "http://linkdata.org/property/rdf1s3493i#" + encodeURIComponent("発生日")){ earthquake_data["date"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s3493i#" + encodeURIComponent("発生時刻")){ earthquake_data["time"] = objValue; }else if(propValue == "http://www.w3.org/2003/01/geo/wgs84_pos#lat"){ earthquake_data["lat"] = objValue; }else if(propValue == "http://www.w3.org/2003/01/geo/wgs84_pos#long"){ earthquake_data["lng"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s3493i#" + encodeURIComponent("深さ")){ earthquake_data["depth"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s3493i#" + encodeURIComponent("マグニチュード")){ earthquake_data["magnitude"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s3493i#" + encodeURIComponent("最大震度")){ earthquake_data["scale"] = objValue; } }); }); earthquake_data_all.push(earthquake_data); //link to map display if coordinates exist }); }); }); // マーカーを作る makeMarker(); } // マーカーを作る function makeMarker() { for (var i = 0; i < earthquake_data_all.length; i ++) { makeMarkerSub(earthquake_data_all[i]); } } function makeMarkerSub(earthquake_data) { // 適切なマーカーアイコンを選択 var image = null; if (earthquake_data.scale == '1') { image = "http://app.linkdata.org/asset/a502a960.png"; } else if (earthquake_data.scale == '2') { image = "http://app.linkdata.org/asset/cc8f5396.png"; } else if (earthquake_data.scale == '3') { image = "http://app.linkdata.org/asset/a3c3359b.png"; } else if (earthquake_data.scale == '4') { image = "http://app.linkdata.org/asset/99eea85a.png"; } else if (earthquake_data.scale == 'A') { image = "http://app.linkdata.org/asset/922a64ab.png"; } else if (earthquake_data.scale == 'B') { image = "http://app.linkdata.org/asset/64e1f88d.png"; } else if (earthquake_data.scale == 'D') { image = "http://app.linkdata.org/asset/a1f204c5.png"; } else if (earthquake_data.scale == 'C') { image = "http://app.linkdata.org/asset/b91c895f.png"; } else if (earthquake_data.scale == '7') { image = "http://app.linkdata.org/asset/588aab26.png"; } var marker = new google.maps.Marker({ position: new google.maps.LatLng(earthquake_data.lat, earthquake_data.lng), map: map, icon: image, title: earthquake_data.id }); var content = '発生日時:' + earthquake_data.date + " " + earthquake_data.time + '<br />'; content += '最大震度:' + earthquake_data.scale + '<br />'; content += 'マグニチュード:' + earthquake_data.magnitude + '<br />'; content += '深さ(km):' + earthquake_data.depth + '<br />'; google.maps.event.addListener(marker, 'click', function() { var infowindow = new google.maps.InfoWindow({ content: content }); infowindow.open(map, marker); }); return marker; } window.onload = function() { $(function(){ initialize(35.690551, 139.69257); }); };
span.highlight {color: red;} span.propertyName {color: gray;} span.subject { color: blue; } span.object{ color: black; } body { background: white; } a, a span { text-decoration: underline; } a:hover, a span:hover { text-decoration: none; }
<head> <meta name="viewport" content="user-scalable=yes"> </head> <div id="map_canvas" style="width:100%; height:100%;"></div>
Preview
Input Data
ReadMe
Snapshots
LinkData Work
Table Data
震源データ
Contributor:岡田崇志
Update:Aug 20, 2015
145 Downloads, 1 Applications
地震に関する発生日時と発生位置、震度、マグニチュードのデータです。 気象庁の震源データから震度が観測されたもののみを掲載しています。 最大震度は以下の仕様に沿っています。 1: 震度1 2: 震度2 3: 震度3 4: 震度4 7: 震度7 A: 震度5弱 B: 震度5強 C: 震度6弱 D: 震度6強 最大震度の詳細及び被害規模や津波規模についてはデータのリファレンス先「震源レコードフォーマット」を参照してください。
earthquake_data_2014
Add LinkData work(LinkData)
Link http://app.linkdata.org/run/app1s1108i?tab=readme
テスト中...
レコード数が多いせいか、表示に時間が掛かります。
jquery-1.11.2.min.js
http://maps.googleapis.com/maps/api/js?sensor=false
Work
Add
Clear
insert work id or work name.