Skip to content

Commit

Permalink
Fix wrong merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommimon committed Sep 1, 2021
1 parent 2237bd4 commit e05ae36
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions map.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,19 @@ function GetMap() {
document.getElementById('infoBtn').removeAttribute('hidden');
}

function getValue(elem) {
if(elem === null)
return "";
if(elem.v === null)
return "";
return elem.v.toString();
}

// parse markers from row input json
function parseMarkers() {
let text;
text = jsonData;
text = text.split("setResponse(")[1].slice(0, -2);
if (text !== "") {
let rows = JSON.parse(text).table.rows;
for(let i = 0; i < rows.length; i++) {
Expand Down Expand Up @@ -92,9 +101,6 @@ function displayInfobox(event) {

body.push('<div class="infowindow-content">');
body.push('<p>');
/*if(!(pin.metadata.image === undefined)) { // if image is defined
body.push('<img class="image" src="' + pin.metadata.image + '" alt="">');
}*/
body.push('<img class="image" src="' + imageBase + pin.metadata.goalNum + '.jpg' + '" alt="">')
body.push(pin.metadata.description + '<br/>' + '<br/>' + pin.metadata.date + '</p>');
if (!(pin.metadata.link === "")) { // if link is defined
Expand Down

0 comments on commit e05ae36

Please sign in to comment.