Language
Login
Language Setting
X
English
日本語 [Japanese]
about this App
nominar_test3
useful
0
Loading...
var all_data; function initialize(){ all_data = new Array(); // データをLinkDataから取得 tmp_a_data = new Array(); $.each(LinkData.getWorks(), function(workKey, workValue) { //$("#result").append("<h3>Work: " + workValue + "</h3>"); $.each(LinkData.getFiles(workValue), function(fileKey, fileValue) { $.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) { var tmp_data = {} tmp_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/rdf1s2590i#address"){ tmp_data["address"] = objValue; }else if(propValue == "http://www.w3.org/2003/01/geo/wgs84_pos#lat"){ tmp_data["lat"] = objValue; }else if(propValue == "http://www.w3.org/2003/01/geo/wgs84_pos#long"){ tmp_data["longitude"] = objValue; }else if(propValue == "http://www.w3.org/2000/01/rdf-schema#label"){ tmp_data["label"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s2590i#bitcoin"){ tmp_data["bitcoin"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s2590i#tell"){ tmp_data["tell"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s2590i#open"){ tmp_data["open"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s2590i#close"){ tmp_data["close"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s2590i#privateroom"){ tmp_data["privateroom"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s2590i#motsunabe"){ tmp_data["motsunabe"] = objValue; }else if(propValue =="http://linkdata.org/property/rdf1s2590i#price"){ tmp_data["price"] = objValue;}else if(propValue == "http://xmlns.com/foaf/0.1/homepage"){ tmp_data["homepage"] = objValue; } }); }); tmp_a_data.push(tmp_data); }); }); }); //全データ all_data = tmp_a_data; //全データを地図上に表示 // 地図センター緯度経度の初期値は「九州大学箱崎キャンパス」 var latlng = new google.maps.LatLng(33.626990, 130.424983); var myOptions = { zoom: 15, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("result"), myOptions); // ウィンドウに表示するデータをつくる var data = new Array(); for (var i in all_data){ var value = all_data[i].label; data.push({position: new google.maps.LatLng(all_data[i].lat, all_data[i].longitude), content: all_data[i].label + '<br><small>' + all_data[i].address + '<br>【電話番号】 ' + all_data[i].tell + '<br>【営業時間】 ' + all_data[i].open + '~' + all_data[i].close + '<br>【個室】 ' + all_data[i].privateroom + '<br>【もつ鍋】 ' + all_data[i].motsunabe + '<br>【ビットコイン】 ' + all_data[i].bitcoin + '<br> 【価格】 ' +all_data[i].price + '<br><a href =' + all_data[i].homepage + '>食べログ</A></small>' }); }; // 地図上にウィンドウで表示 // 地図上にウィンドウで表示 for (i = 0; i < data.length; i++) { var marker = new google.maps.Marker({ position: data[i].position, map: map }); attachMessage(marker, data[i].content); }; }; // 地図のマーカーをクリックするとウィンドウを表示する処理 function attachMessage(marker, msg) { google.maps.event.addListener(marker, 'click', function(event) { new google.maps.InfoWindow({ content: msg }).open(marker.getMap(), marker); }); }; window.onload = function() { $(function(){ initialize(); }); };
<style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <div id="result" style="width:100%; height:100%"></div>
Preview
Input Data
ReadMe
Snapshots
LinkData Work
Table Data
nominar.test3
Contributor:Yusuke Mizuguchi
Update:Jan 25, 2015
90 Downloads, 2 Applications
nominartst3
nominartest4
Contributor:Tokumaru Shiro
Update:Feb 13, 2015
73 Downloads, 2 Applications
nominartest4
Add LinkData work(LinkData)
Link http://app.linkdata.org/run/app1s886i?tab=readme
jquery-1.7.1.min.js
http://maps.googleapis.com/maps/api/js?sensor=false
Work
Add
Clear
insert work id or work name.