Cluster listings markers to handle overlapping coordinates
All checks were successful
Deploy stAndrews / deploy (push) Successful in 5s

This commit is contained in:
2026-03-09 16:26:36 -04:00
parent 971838cfde
commit 5bc3300ceb

11
app.R
View File

@@ -491,15 +491,16 @@ server <- function(input, output) {
label = ~sub_name
) |>
addMarkers(
data = listings,
lat = ~latitude,
lng = ~longitude,
popup = ~paste0(
data = listings,
lat = ~latitude,
lng = ~longitude,
popup = ~paste0(
"<b>", address, "</b><br>",
"Price: ", scales::dollar(price), "<br>",
"Sq Ft: ", sqft, "<br>",
"$/Sq Ft: ", scales::dollar(price_per_sqft)
)
),
clusterOptions = markerClusterOptions()
) |>
setView(lng = -82.362253, lat = 27.076199, zoom = 16)
})