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 label = ~sub_name
) |> ) |>
addMarkers( addMarkers(
data = listings, data = listings,
lat = ~latitude, lat = ~latitude,
lng = ~longitude, lng = ~longitude,
popup = ~paste0( popup = ~paste0(
"<b>", address, "</b><br>", "<b>", address, "</b><br>",
"Price: ", scales::dollar(price), "<br>", "Price: ", scales::dollar(price), "<br>",
"Sq Ft: ", sqft, "<br>", "Sq Ft: ", sqft, "<br>",
"$/Sq Ft: ", scales::dollar(price_per_sqft) "$/Sq Ft: ", scales::dollar(price_per_sqft)
) ),
clusterOptions = markerClusterOptions()
) |> ) |>
setView(lng = -82.362253, lat = 27.076199, zoom = 16) setView(lng = -82.362253, lat = 27.076199, zoom = 16)
}) })