I have X facilities and Y facilities with their lat/long and I have mapped them with leaflet. Problem is how can I limit only Ys within say 25miles of X locations?
I have tried serching but not finding much that addresses my issue or at least I don't think does.
Z<-leaflet() %>% addTiles() %>% addMarkers(lng = Y$longitude, lat =
Y$latitude, icon = YIcon, group = "BASE")%>% addMarkers(lng =
X$Longitude, lat = X$Latitude, icon = XIcon)
Z