Skip to content

Commit

Permalink
maps: Conditional fields (and remove rogue logging)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Parnell committed Oct 28, 2022
1 parent 9074608 commit 2dc56e7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cove_ofds/templates/cove_ofds/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,9 @@ <h4 class="panel-title">
};

var generatePopup = function (layer) {
console.log(layer.feature)
return `<p><strong>Name:</strong> ${layer.feature.properties.name}</p>
<p><strong>Network:</strong> ${layer.feature.properties.network.name}</p>
<p><strong>Phase:</strong> ${layer.feature.properties.phase.name}</p>`;
try`<p><strong>Name:</strong> ${layer.feature.properties.name || 'Unknown'}</p>
<p><strong>Network:</strong> ${layer.feature.properties.network.name || 'Unknown'}</p>
<p><strong>Phase:</strong> ${layer.feature.properties.phase.name || 'Unknown'}</p>`;
}

var customOptions = {
Expand Down

0 comments on commit 2dc56e7

Please sign in to comment.