Skip to content

Commit

Permalink
include coordinates in popup
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-ninja committed Aug 27, 2024
1 parent e59fdff commit 869d7be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
$("#plot").remove()
if (window.popup) map.closePopup(window.popup)
var p = feature.properties
var g = feature.geometry.coordinates
if (p.site_id.startsWith("nzd")) {
var url = `data/${p.site_id}/transect_time_series_tidally_corrected.csv`
} else {
Expand All @@ -133,6 +134,8 @@
.setContent(`<b>${p.id}</b><br>
along_dist: ${p.along_dist?.toFixed(2)}<br>
along_dist_norm: ${p.along_dist_norm?.toFixed(2)}<br>
origin point (landward): ${g[0][1].toFixed(6)},${g[0][0].toFixed(6)}<br>
destination point (seaward): ${g[1][1].toFixed(6)},${g[1][0].toFixed(6)}<br>
beach_slope: ${p.beach_slope}<br>
n_points: ${p.n_points}<br>
n_points_nonan: ${p.n_points_nonan}<br>
Expand Down

0 comments on commit 869d7be

Please sign in to comment.