Cluster listings markers to handle overlapping coordinates
All checks were successful
Deploy stAndrews / deploy (push) Successful in 5s
All checks were successful
Deploy stAndrews / deploy (push) Successful in 5s
This commit is contained in:
11
app.R
11
app.R
@@ -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)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user