map.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. var link = thisUrlParams.link;
  2. prefixes = queryManager['prefixes']['all'];
  3. queryURL = prefixes + (queryManager['querySchedaLuogo']['query']).replace('{URI}', link);
  4. doJsonQuery(queryURL).done(function(data) { handle_data(data); });
  5. queryRef = prefixes + (queryManager['querySchedaLuogo']['queryRiferimenti']).replace('{URI}', link);
  6. doJsonQuery(queryRef).done(function(data) { handle_ref(data); });
  7. queryTopo = prefixes + (queryManager['querySchedaLuogo']['queryToponimi']).replace('{URI}', link);
  8. doJsonQuery(queryTopo).done(function(data) { handle_toponym(data); });
  9. queryRec = prefixes + (queryManager['querySchedaLuogo']['queryRicezione']).replace('{URI}', link);
  10. doJsonQuery(queryRec).done(function(data) { handle_receive(data); });
  11. querySend = prefixes + (queryManager['querySchedaLuogo']['queryInvio']).replace('{URI}', link);
  12. doJsonQuery(querySend).done(function(data) { handle_send(data); });
  13. queryCit = prefixes + (queryManager['querySchedaLuogo']['queryCitazione']).replace('{URI}', link);
  14. doJsonQuery(queryCit).done(function(data) { handle_cit(data); });
  15. queryPer = prefixes + (queryManager['querySchedaLuogo']['queryPersone']).replaceAll('{URI}', link);
  16. doJsonQuery(queryPer).done(function(data) { handle_persons(data); });
  17. queryCon1 = prefixes + (queryManager['querySchedaLuogo']['queryCount']).replace('{URI}', link);
  18. doJsonQuery(queryCon1).done(function(data) { handle_count(data); });
  19. queryCon2 = prefixes + (queryManager['querySchedaLuogo']['queryCount2']).replace('{URI}', link);
  20. doJsonQuery(queryCon2).done(function(data) { handle_count2(data); });
  21. function handle_data(json) {
  22. console.log(json);
  23. const locations = [];
  24. $.each(
  25. json['results']['bindings'],
  26. function (index, value) {
  27. const loc = []
  28. var graph = "Luoghi";
  29. var uri = value['uri']['value'];
  30. var label = value['name_place']['value'];
  31. var coord = value['coordinates']['value'];
  32. var variante = "";
  33. var note = "";
  34. const coordinates = coord.split(", ");
  35. loc.push(label);
  36. loc.push(coordinates[0]);
  37. loc.push(coordinates[1]);
  38. locations.push(loc);
  39. if (value.hasOwnProperty('variant')) {
  40. variante = value['variant']['value'];
  41. } else {
  42. variante = "No resource found for this query";
  43. }
  44. if (value.hasOwnProperty('notes')) {
  45. note = value['notes']['value'];
  46. } else {
  47. note = "No resource found for this query";
  48. }
  49. var Buttons = '<button title="Citazione" type="button" value="object" id="' + uri + '" class="cit btn btn-default" alt="scheda" title="Citazione"><i class="fa fa-quote-right"></i></button> \
  50. <button title="Permalink" type="button" value="object" id="' + uri + '" class="hyp btn btn-default" alt="scheda" title="Hyperlink"><i class="fa fa-link"></i></button> \
  51. <a href="http://iperion.vm.fedcloud.eu/lodlive/?' + uri + '" target="_blank"><button title="Naviga il grafo" type="button" class="btn btn-default info" alt="LOD" title="LodLive"><i class="fa fa-share-alt"></i></button></a></div></div>';
  52. document.getElementById("grafo").innerHTML = graph;
  53. document.getElementById("nome_luogo").innerHTML = label;
  54. document.getElementById("place_name").innerHTML = label;
  55. document.getElementById("coords").innerHTML = coord;
  56. document.getElementById("note").innerHTML = note;
  57. document.getElementById("variants").innerHTML = variante;
  58. document.getElementById("nome_lu").innerHTML = label;
  59. document.getElementById("nome_lp").innerHTML = label;
  60. document.getElementById("nome_ll").innerHTML = label;
  61. document.getElementById("nome_lg").innerHTML = label;
  62. document.getElementById("link_buttons").innerHTML = Buttons;
  63. });
  64. var map = L.map('map').setView([locations[0][1], locations[0][2]], 7);
  65. mapLink = '<a href="https://openstreetmap.org">OpenStreetMap</a>';
  66. L.tileLayer(
  67. 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  68. attribution: '&copy; ' + mapLink + ' Contributors',
  69. maxZoom: 18,
  70. }).addTo(map);
  71. for (var i = 0; i < locations.length; i++) {
  72. marker = new L.marker([locations[i][1], locations[i][2]])
  73. .bindPopup(locations[i][0])
  74. .addTo(map);
  75. }
  76. }
  77. function handle_ref(json) {
  78. console.log(json);
  79. const references = [];
  80. var list_ref = "";
  81. $.each(
  82. json['results']['bindings'],
  83. function (index, value) {
  84. var ref = value['references']['value'];
  85. references.push(ref);
  86. });
  87. for (i=0; i<references.length; i++) {
  88. list_ref += "<a target='_blank' href='" + references[i] + "'>" + references[i] + "</a>";
  89. }
  90. document.getElementById("riferimenti").innerHTML = list_ref;
  91. }
  92. function handle_toponym(json) {
  93. console.log(json);
  94. const toponym = [];
  95. $.each(
  96. json['results']['bindings'],
  97. function (index, value) {
  98. var topo = value['toponimi']['value'];
  99. toponym.push(" " + topo);
  100. });
  101. document.getElementById("toponimi").innerHTML = toponym;
  102. }
  103. function handle_receive(json) {
  104. console.log(json);
  105. const received = [];
  106. var i=0;
  107. $.each(
  108. json['results']['bindings'],
  109. function (index, value) {
  110. uri = value['document_uri']['value'];
  111. title = value['document_name']['value'];
  112. segnatura = value['segnatura']['value'];
  113. var data = "";
  114. var InfObj = "";
  115. if (value.hasOwnProperty('time_span')) {
  116. data = value['time_span']['value'];
  117. }
  118. if (value.hasOwnProperty('InfObj')) {
  119. InfObj = value['InfObj']['value'];
  120. }
  121. received.push([uri, title, segnatura, data, InfObj]);
  122. });
  123. var myArray = "";
  124. for (var i=0; i<received.length; i++) {
  125. var letter = "";
  126. var infObject_button = "";
  127. var object_type = "";
  128. if (received[i][4] != "") {
  129. letter = '<div class="col-8"><p><span id="' + received[i][0] + '" class="title_doc lettera">'+ received[i][1] + '</span>';
  130. object_type = "lettera";
  131. infObject_button += '<button type="button" id="' + received[i][4] +
  132. '" class="lettera btn btn-default" alt="lettera" ><i class="fa fa-envelope"></i><p class="btn-text">Letter</p></button>';
  133. } else {
  134. letter = '<div class="col-8"><p><span id="' + received[i][0] + '" class="title_doc object">'+ received[i][1] + '</span>';
  135. object_type = "object";
  136. infObject_button += '<button type="button" id="' + received[i][0] +
  137. '" class="object btn btn-default" alt="oggetto" title="' + received[i][1] +
  138. '"><i class="fa fa-book"></i><p class="btn-text">Physical object</p></button>';
  139. }
  140. if (received[i][2] != "") {
  141. letter = letter + "<br />Mark: " + received[i][2];
  142. }
  143. if (received[i][3] != "") {
  144. letter = letter + "<br />Date: " + received[i][3];
  145. }
  146. letter = letter + '</p></div>';
  147. myArray += '<div class="row res">'+ letter +
  148. '<div class="col d-flex align-items-start justify-content-end">' + infObject_button +
  149. '<button value="' + object_type + '" type="button" id="' + received[i][0] + '" class="cit btn btn-default" alt="scheda" title="Info"><i class="fa fa-quote-right"></i><p class="btn-text">Citation</p></button>' +
  150. '<button value="' + object_type + '" type="button" id="' + received[i][0] + '" class="hyp btn btn-default" alt="scheda" title="Info"><i class="fa fa-link"></i><p class="btn-text">Hyperlink</p></button>' +
  151. '<a href="http://iperion.vm.fedcloud.eu/lodlive/?' + received[i][0] + '" target="_blank"><button type="button" class="btn btn-default info" alt="LOD"><i class="fa fa-share-alt"></i><p class="btn-text">Lod</p></button></a></div></div>';
  152. }
  153. document.getElementById("n_receive").innerHTML = received.length;
  154. document.getElementById("object_receive").innerHTML = myArray;
  155. if (received.length==0) {
  156. var messaggio = "<p class='no-results'>No resource found for this query</p>";
  157. document.getElementById("object_receive").innerHTML = messaggio;
  158. }
  159. }
  160. function handle_send(json) {
  161. console.log(json);
  162. const sent = [];
  163. var i=0;
  164. $.each(
  165. json['results']['bindings'],
  166. function (index, value) {
  167. uri = value['document_uri']['value'];
  168. title = value['document_name']['value'];
  169. segnatura = value['segnatura']['value'];
  170. var data = "";
  171. var InfObj = "";
  172. if (value.hasOwnProperty('time_span')) {
  173. data = value['time_span']['value'];
  174. }
  175. if (value.hasOwnProperty('InfObj')) {
  176. InfObj = value['InfObj']['value'];
  177. }
  178. sent.push([uri, title, segnatura, data, InfObj]);
  179. });
  180. var myArray = "";
  181. for (var i=0; i<sent.length; i++) {
  182. var letter = "";
  183. var infObject_button = "";
  184. var object_type = "";
  185. if (sent[i][4] != "") {
  186. letter = '<div class="col-8"><p><span id="' + sent[i][0] + '" class="title_doc lettera">'+ sent[i][1] + '</span>';
  187. object_type = "lettera";
  188. infObject_button += '<button type="button" id="' + sent[i][4] +
  189. '" class="lettera btn btn-default" alt="lettera" ><i class="fa fa-envelope"></i><p class="btn-text">Letter</p></button>';
  190. } else {
  191. letter = '<div class="col-8"><p><span id="' + sent[i][0] + '" class="title_doc object">'+ sent[i][1] + '</span>';
  192. object_type = "object";
  193. infObject_button += '<button type="button" id="' + sent[i][0] +
  194. '" class="object btn btn-default" alt="oggetto" title="' + sent[i][1] +
  195. '"><i class="fa fa-book"></i><p class="btn-text">Physical object</p></button>';
  196. }
  197. if (sent[i][2] != "") {
  198. letter = letter + "<br />Mark: " + sent[i][2];
  199. }
  200. if (sent[i][3] != "") {
  201. letter = letter + "<br />Date: " + sent[i][3];
  202. }
  203. letter = letter + '</p></div>';
  204. myArray += '<div class="row res">'+ letter +
  205. '<div class="col d-flex align-items-start justify-content-end">' + infObject_button +
  206. '<button value="' + object_type + '" type="button" id="' + sent[i][0] + '" class="cit btn btn-default" alt="scheda" title="Info"><i class="fa fa-quote-right"></i><p class="btn-text">Citation</p></button>' +
  207. '<button value="' + object_type + '" type="button" id="' + sent[i][0] + '" class="hyp btn btn-default" alt="scheda" title="Info"><i class="fa fa-link"></i><p class="btn-text">Hyperlink</p></button>' +
  208. '<a href="http://iperion.vm.fedcloud.eu/lodlive/?' + sent[i][0] + '" target="_blank"><button type="button" class="btn btn-default info" alt="LOD"><i class="fa fa-share-alt"></i><p class="btn-text">Lod</p></button></a></div></div>';
  209. }
  210. document.getElementById("n_send").innerHTML = sent.length;
  211. document.getElementById("object_send").innerHTML = myArray;
  212. if (sent.length==0) {
  213. var messaggio = "<p class='no-results'>No resource found for this query</p>";
  214. document.getElementById("object_send").innerHTML = messaggio;
  215. }
  216. }
  217. function handle_cit(json) {
  218. console.log(json);
  219. const citations = [];
  220. var i=0;
  221. $.each(
  222. json['results']['bindings'],
  223. function (index, value) {
  224. uri = value['document_uri']['value'];
  225. title = value['document_name']['value'];
  226. segnatura = value['segnatura']['value'];
  227. var data = "";
  228. var InfObj = "";
  229. if (value.hasOwnProperty('time_span')) {
  230. data = value['time_span']['value'];
  231. }
  232. if (value.hasOwnProperty('InfObj')) {
  233. InfObj = value['InfObj']['value'];
  234. }
  235. citations.push([uri, title, segnatura, data, InfObj]);
  236. });
  237. var myArray = "";
  238. for (var i=0; i<citations.length; i++) {
  239. var letter = "";
  240. var infObject_button = "";
  241. var object_type = "";
  242. if (citations[i][4] != "") {
  243. letter = '<div class="col-8"><p><span id="' + citations[i][0] + '" class="title_doc lettera">'+ citations[i][1] + '</span>';
  244. object_type = "lettera";
  245. infObject_button += '<button type="button" id="' + citations[i][4] +
  246. '" class="lettera btn btn-default" alt="lettera" ><i class="fa fa-envelope"></i><p class="btn-text">Lettera</p></button>';
  247. } else {
  248. letter = '<div class="col-8"><p><span id="' + citations[i][0] + '" class="title_doc object">'+ citations[i][1] + '</span>';
  249. object_type = "object";
  250. infObject_button += '<button type="button" id="' + citations[i][0] +
  251. '" class="object btn btn-default" alt="oggetto" title="' + citations[i][1] +
  252. '"><i class="fa fa-book"></i><p class="btn-text">Physical object</p></button>';
  253. }
  254. if (citations[i][2] != "") {
  255. letter = letter + "<br />Mark: " + citations[i][2];
  256. }
  257. if (citations[i][3] != "") {
  258. letter = letter + "<br />Date: " + citations[i][3];
  259. }
  260. letter = letter + "</p></div>";
  261. myArray += '<div class="row res">'+ letter +
  262. '<div class="col d-flex align-items-start justify-content-end">' + infObject_button +
  263. '<button type="button" value="' + object_type + '" id="' + citations[i][0] + '" class="cit btn btn-default" alt="scheda" title="Info"><i class="fa fa-quote-right"></i><p class="btn-text">Citation</p></button>' +
  264. '<button type="button" value="' + object_type + '" id="' + citations[i][0] + '" class="hyp btn btn-default" alt="scheda" title="Info"><i class="fa fa-link"></i><p class="btn-text">Hyperlink</p></button>' +
  265. '<a href="http://iperion.vm.fedcloud.eu/lodlive/?' + citations[i][0] + '" target="_blank"><button type="button" class="btn btn-default info" alt="LOD"><i class="fa fa-share-alt"></i><p class="btn-text">Lod</p></button></a></div></div>';
  266. }
  267. document.getElementById("n_cit").innerHTML = citations.length;
  268. document.getElementById("object_cit").innerHTML = myArray;
  269. if (citations.length==0) {
  270. var messaggio = "<p class='no-results'>No resource found for this query</p>";
  271. document.getElementById("object_cit").innerHTML = messaggio;
  272. }
  273. }
  274. function handle_persons(json) {
  275. console.log(json);
  276. const people = [];
  277. const person_names = [];
  278. const person_events = [];
  279. var Person = "";
  280. $.each(
  281. json['results']['bindings'],
  282. function (index, value) {
  283. var uri = value['range']['value'];
  284. var label = value['label']['value'];
  285. var ruolo = value['role']['value']
  286. var count = value['count']['value']
  287. var evento = ruolo + ": " + count
  288. person_events.push([uri, label, evento]);
  289. if (!person_names.includes(uri)) {
  290. person_names.push([uri, label]);
  291. }
  292. });
  293. for (var k=0; k<person_names.length; k++) {
  294. const tempArray = [];
  295. var uri = person_names[k][0];
  296. var nome = person_names[k][1]
  297. tempArray.push(uri);
  298. tempArray.push(nome);
  299. for (var y=0; y<person_events.length; y++) {
  300. var ev = person_events[y][2];
  301. if (person_names[k][0] == person_events[y][0]) {
  302. tempArray.push(ev);
  303. }
  304. }
  305. people.push(tempArray);
  306. }
  307. for (var i=0; i<people.length; i++) {
  308. var info = "";
  309. for (var h=2; h<people[i].length; h++) {
  310. info += people[i][h] + ' occurrences<br />';
  311. }
  312. Person += '<div class="row res"><div class="col-8">' +
  313. '<p><span id="' + people[i][0] + '" class="title_doc persona">'+ people[i][1] + '</span><br />' + info + '</p></div>' +
  314. '<div class="col d-flex align-items-start justify-content-end"><button type="button" id="' + people[i][0] + '" class="persona btn btn-default" alt="persona" title="' +
  315. people[i][1] + '"><i class="fa fa-user"></i><p class="btn-text">Persona</p></button>' +
  316. '<button type="button" value="Persona" id="' + people[i][0] + '" class="cit btn btn-default" alt="scheda" title="Info"><i class="fa fa-quote-right"></i><p class="btn-text">Citation</p></button>' +
  317. /*DA QUI HYPERLINK ->*/'<button type="button" value="Persona" id="' + people[i][0] + '" class="hyp btn btn-default" alt="scheda" title="Info"><i class="fa fa-link"></i><p class="btn-text">Hyperlink</p></button>' +
  318. /*DA QUI LOD ->*/'<a href="http://iperion.vm.fedcloud.eu/lodlive/?' + people[i][0] + '" target="_blank"><button type="button" class="btn btn-default info" alt="LOD"><i class="fa fa-share-alt"></i><p class="btn-text">Lod</p></button></a></div></div>';
  319. }
  320. document.getElementById("n_per").innerHTML = people.length;
  321. document.getElementById("object_per").innerHTML = Person;
  322. if (people.length==0) {
  323. var messaggio = "<p class='no-results'>Nessun risultato trovato</p>";
  324. document.getElementById("object_per").innerHTML = messaggio;
  325. }
  326. }
  327. function handle_count(json) {
  328. console.log(json);
  329. const toponimi = [];
  330. const dataToponimi = [];
  331. var max = 0;
  332. $.each(
  333. json['results']['bindings'],
  334. function (index, value) {
  335. const topo = [];
  336. var toponimo = value['label']['value'];
  337. var count = value['Count']['value'];
  338. var temp = parseInt(count);
  339. toponimi.push(toponimo);
  340. dataToponimi.push([toponimo, count]);
  341. if (temp>max) {
  342. max = temp;
  343. }
  344. });
  345. // set the dimensions and margins of the graph
  346. var margin = {top: 20, right: 30, bottom: 40, left: 90},
  347. width = 460 - margin.left - margin.right,
  348. height = 400 - margin.top - margin.bottom;
  349. // append the svg object to the body of the page
  350. var svg = d3.select("#my_dataviz")
  351. .append("svg")
  352. .attr("width", width + margin.left + margin.right)
  353. .attr("height", height + margin.top + margin.bottom)
  354. .append("g")
  355. .attr("transform",
  356. "translate(" + margin.left + "," + margin.top + ")");
  357. // Parse the Data
  358. //d3.csv("https://raw.githubusercontent.com/holtzy/data_to_viz/master/Example_dataset/7_OneCatOneNum_header.csv", function(data) {
  359. // Add X axis
  360. var x = d3.scaleLinear()
  361. .domain([0, max])
  362. .range([ 0, width]);
  363. svg.append("g")
  364. .attr("transform", "translate(0," + height + ")")
  365. .call(d3.axisBottom(x))
  366. .selectAll("text")
  367. .attr("transform", "translate(-10,0)rotate(-45)")
  368. .style("text-anchor", "end");
  369. // Y axis
  370. var y = d3.scaleBand()
  371. .range([ 0, height ])
  372. .domain(toponimi)
  373. .padding(.1);
  374. svg.append("g")
  375. .call(d3.axisLeft(y))
  376. //Bars
  377. svg.selectAll("myRect")
  378. .data(dataToponimi)
  379. .enter()
  380. .append("rect")
  381. .attr("x", x(0) )
  382. .attr("y", function(d) { return y(d[0]); })
  383. .attr("width", function(d) { return x(d[1]); })
  384. .attr("height", y.bandwidth() )
  385. .attr("fill", "#69b3a2")
  386. /*var texts = svg.selectAll("myRect")
  387. .data(dataToponimi)
  388. .enter()
  389. .append("text");
  390. texts.attr("x", function(d){ return d[1] / 4 - 20})
  391. .attr("y", function(d,i){ return 22.26*i +20})
  392. .attr("text-anchor", "middle")
  393. .attr("fill", "#fff")
  394. .text(function(d){ return d[1]});*/
  395. }
  396. function handle_count2(json) {
  397. console.log(json);
  398. const toponimi = [];
  399. const dataToponimi = [];
  400. const values = [];
  401. var max = 0;
  402. $.each(
  403. json['results']['bindings'],
  404. function (index, value) {
  405. const topo = [];
  406. var toponimo = value['label']['value'];
  407. var count = value['Count']['value'];
  408. var temp = parseInt(count);
  409. toponimi.push(toponimo);
  410. dataToponimi.push([toponimo, count]);
  411. if (temp>max) {
  412. max = temp;
  413. }
  414. });
  415. // set the dimensions and margins of the graph
  416. var margin = {top: 20, right: 30, bottom: 40, left: 90},
  417. width = 460 - margin.left - margin.right,
  418. height = 400 - margin.top - margin.bottom;
  419. // append the svg object to the body of the page
  420. var svg = d3.select("#my_dataviz2")
  421. .append("svg")
  422. .attr("width", width + margin.left + margin.right)
  423. .attr("height", height + margin.top + margin.bottom)
  424. .append("g")
  425. .attr("transform",
  426. "translate(" + margin.left + "," + margin.top + ")");
  427. // Parse the Data
  428. //d3.csv("https://raw.githubusercontent.com/holtzy/data_to_viz/master/Example_dataset/7_OneCatOneNum_header.csv", function(data) {
  429. // Add X axis
  430. var x = d3.scaleLinear()
  431. .domain([0, max])
  432. .range([ 0, width]);
  433. svg.append("g")
  434. .attr("transform", "translate(0," + height + ")")
  435. .call(d3.axisBottom(x))
  436. .selectAll("text")
  437. .attr("transform", "translate(-10,0)rotate(-45)")
  438. .style("text-anchor", "end");
  439. // Y axis
  440. var y = d3.scaleBand()
  441. .range([ 0, height ])
  442. .domain(toponimi)
  443. .padding(.1);
  444. svg.append("g")
  445. .call(d3.axisLeft(y))
  446. //Bars
  447. svg.selectAll("myRect")
  448. .data(dataToponimi)
  449. .enter()
  450. .append("rect")
  451. .attr("x", x(0) )
  452. .attr("y", function(d) { return y(d[0]); })
  453. .attr("width", function(d) { return x(d[1]); })
  454. .attr("height", y.bandwidth() )
  455. .attr("fill", "#69b3a2")
  456. svg.selectAll("text2")
  457. .data(dataToponimi)
  458. .enter().append("text2")
  459. .text(function(d) {return d[1]})
  460. .attr("class", "text")
  461. }
  462. function open_info() {
  463. document.getElementById("info_luogo").style.display = "block";
  464. document.getElementById("place_info").style.display = "block";
  465. document.getElementById("topo").style.display = "none";
  466. document.getElementById("rif").style.display = "none";
  467. }
  468. function open_toponimi() {
  469. document.getElementById("info_luogo").style.display = "block";
  470. document.getElementById("place_info").style.display = "none";
  471. document.getElementById("topo").style.display = "block";
  472. document.getElementById("rif").style.display = "none";
  473. }
  474. function open_riferimenti() {
  475. document.getElementById("info_luogo").style.display = "block";
  476. document.getElementById("place_info").style.display = "none";
  477. document.getElementById("topo").style.display = "none";
  478. document.getElementById("rif").style.display = "block";
  479. }